Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1805,6 +1805,16 @@
hm->AddHistogram(histClass, "Mass_Lxyz", "", false, 250, 0.0, 5.0, VarManager::kMass, 1000, 0.0, 5, VarManager::kVertexingLxyz);
hm->AddHistogram(histClass, "Mass_OpeningAngle", "", false, 250, 0.0, 5.0, VarManager::kMass, 800, 0, 0.8, VarManager::kOpeningAngle);
}
if (subGroupStr.Contains("flow-pos-neg-dimuon")) {
int varV2POS[6] = {VarManager::kMass, VarManager::kPt, VarManager::kRap, VarManager::kCentFT0C, VarManager::kU2Q2POS, VarManager::kCos2DeltaPhiPOS};
int varV2NEG[6] = {VarManager::kMass, VarManager::kPt, VarManager::kRap, VarManager::kCentFT0C, VarManager::kU2Q2NEG, VarManager::kCos2DeltaPhiNEG};

int bins[6] = {250, 60, 6, 18, 200, 40};
double minBins[6] = {0.0, 0.0, 2.5, 0.0, -10.0, -2.0};
double maxBins[6] = {5.0, 30.0, 4.0, 90.0, 10.0, 2.0};
hm->AddHistogram(histClass, "Mass_Pt_centrFT0C_V2POS", "", 6, varV2POS, bins, minBins, maxBins, 0, -1, kTRUE);
hm->AddHistogram(histClass, "Mass_Pt_centrFT0C_V2NEG", "", 6, varV2NEG, bins, minBins, maxBins, 0, -1, kTRUE);
}
if (subGroupStr.Contains("flow-dimuon-high-mass")) {
int varV2[6] = {VarManager::kMass, VarManager::kPt, VarManager::kRap, VarManager::kCentFT0C, VarManager::kU2Q2, VarManager::kCos2DeltaPhi};

Expand Down Expand Up @@ -2428,7 +2438,7 @@
LOG(fatal) << "histClass field should be an array of strings, e.g. [class1, class2]";
return false;
}
for (auto& v : hist->FindMember("histClass")->value.GetArray()) {

Check failure on line 2441 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!v.IsString()) {
LOG(fatal) << "histClass field should be an array of strings, e.g. [class1, class2]";
return false;
Expand Down Expand Up @@ -2584,7 +2594,7 @@
}
}
if (isTHn) {
for (auto& v : hist->FindMember("vars")->value.GetArray()) {

Check failure on line 2597 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (VarManager::fgVarNamesMap.find(v.GetString()) == VarManager::fgVarNamesMap.end()) {
LOG(fatal) << "Bad variable in vars (" << v.GetString() << ") specified for histogram";
return false;
Expand Down Expand Up @@ -2647,7 +2657,7 @@

// create an array of strings to store the different histogram classes
std::vector<const char*> histClasses;
for (auto& v : hist.FindMember("histClass")->value.GetArray()) {

Check failure on line 2660 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
histClasses.push_back(v.GetString());
}
const char* title = hist.FindMember("title")->value.GetString();
Expand All @@ -2658,7 +2668,7 @@

int* vars = new int[nDimensions];
int iDim = 0;
for (auto& v : hist.FindMember("vars")->value.GetArray()) {

Check failure on line 2671 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
LOG(debug) << "iDim " << iDim << ": " << v.GetString();
vars[iDim++] = VarManager::fgVarNamesMap[v.GetString()];
}
Expand All @@ -2672,27 +2682,27 @@
xmin = new double[nDimensions];
xmax = new double[nDimensions];
int iDim = 0;
for (auto& v : hist.FindMember("nBins")->value.GetArray()) {

Check failure on line 2685 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
nBins[iDim++] = v.GetInt();
LOG(debug) << "nBins " << iDim << ": " << nBins[iDim - 1];
}
iDim = 0;
for (auto& v : hist.FindMember("xmin")->value.GetArray()) {

Check failure on line 2690 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
xmin[iDim++] = v.GetDouble();
LOG(debug) << "xmin " << iDim << ": " << xmin[iDim - 1];
}
iDim = 0;
for (auto& v : hist.FindMember("xmax")->value.GetArray()) {

Check failure on line 2695 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
xmax[iDim++] = v.GetDouble();
LOG(debug) << "xmax " << iDim << ": " << xmax[iDim - 1];
}
} else {
int iDim = 0;
binLimits = new TArrayD[nDimensions];
for (auto& v : hist.FindMember("binLimits")->value.GetArray()) {

Check failure on line 2702 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
double* lims = new double[v.GetArray().Size()];
int iElem = 0;
for (auto& lim : v.GetArray()) {

Check failure on line 2705 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
lims[iElem++] = lim.GetDouble();
}
binLimits[iDim++] = TArrayD(v.GetArray().Size(), lims);
Expand All @@ -2703,7 +2713,7 @@
if (hist.HasMember("axLabels")) {
axLabels = new TString[hist.FindMember("axLabels")->value.GetArray().Size()];
int iDim = 0;
for (auto& v : hist.FindMember("axLabels")->value.GetArray()) {

Check failure on line 2716 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
axLabels[iDim++] = v.GetString();
}
}
Expand Down
10 changes: 10 additions & 0 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,8 @@ class VarManager : public TObject
kWV2SP,
kWV2EP,
kU2Q2,
kU2Q2POS,
kU2Q2NEG,
kU3Q3,
kQ42XA,
kQ42YA,
Expand Down Expand Up @@ -906,6 +908,8 @@ class VarManager : public TObject
kPsi2C,
kRandomPsi2,
kCos2DeltaPhi,
kCos2DeltaPhiPOS,
kCos2DeltaPhiNEG,
kCos2DeltaPhiMu1, // cos(phi - phi1) for muon1
kCos2DeltaPhiMu2, ////cos(phi - phi2) for muon2
kCos3DeltaPhi,
Expand Down Expand Up @@ -5751,19 +5755,25 @@ void VarManager::FillPairVn(T1 const& t1, T2 const& t2, float* values)
// Compute the scalar product UQ using Q-vector from A, for second and third harmonic
// Dilepton vn could be accessible after dividing this product with the R factor
values[kU2Q2] = values[kQ2X0A] * TMath::Cos(2 * v12.Phi()) + values[kQ2Y0A] * TMath::Sin(2 * v12.Phi());
values[kU2Q2POS] = values[kQ2X0APOS] * TMath::Cos(2 * v12.Phi()) + values[kQ2Y0APOS] * TMath::Sin(2 * v12.Phi());
values[kU2Q2NEG] = values[kQ2X0ANEG] * TMath::Cos(2 * v12.Phi()) + values[kQ2Y0ANEG] * TMath::Sin(2 * v12.Phi());
values[kU3Q3] = values[kQ3X0A] * TMath::Cos(3 * v12.Phi()) + values[kQ3Y0A] * TMath::Sin(3 * v12.Phi());
values[kR2SP_AB] = (values[kQ2X0A] * values[kQ2X0B] + values[kQ2Y0A] * values[kQ2Y0B]);
values[kR2SP_AC] = (values[kQ2X0A] * values[kQ2X0C] + values[kQ2Y0A] * values[kQ2Y0C]);
values[kR2SP_BC] = (values[kQ2X0B] * values[kQ2X0C] + values[kQ2Y0B] * values[kQ2Y0C]);
values[kR3SP] = (values[kQ3X0B] * values[kQ3X0C] + values[kQ3Y0B] * values[kQ3Y0C]);

float Psi2A = getEventPlane(2, values[kQ2X0A], values[kQ2Y0A]);
float Psi2APOS = getEventPlane(2, values[kQ2X0APOS], values[kQ2Y0APOS]);
float Psi2ANEG = getEventPlane(2, values[kQ2X0ANEG], values[kQ2Y0ANEG]);
float Psi3A = getEventPlane(3, values[kQ3X0A], values[kQ3Y0A]);
float Psi2B = getEventPlane(2, values[kQ2X0B], values[kQ2Y0B]);
float Psi3B = getEventPlane(3, values[kQ3X0B], values[kQ3Y0B]);
float Psi2C = getEventPlane(2, values[kQ2X0C], values[kQ2Y0C]);
float Psi3C = getEventPlane(3, values[kQ3X0C], values[kQ3Y0C]);
values[kCos2DeltaPhi] = TMath::Cos(2 * (v12.Phi() - Psi2A));
values[kCos2DeltaPhiPOS] = TMath::Cos(2 * (v12.Phi() - Psi2APOS));
values[kCos2DeltaPhiNEG] = TMath::Cos(2 * (v12.Phi() - Psi2ANEG));
values[kCos3DeltaPhi] = TMath::Cos(3 * (v12.Phi() - Psi3A));
values[kR2EP_AB] = TMath::Cos(2 * (Psi2A - Psi2B));
values[kR2EP_AC] = TMath::Cos(2 * (Psi2A - Psi2C));
Expand Down
Loading