Skip to content
Merged
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
11 changes: 11 additions & 0 deletions PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,17 @@
hm->AddHistogram(histClass, "Coschi_randomPhi_toward", "", false, 40, -1.0, 1.0, VarManager::kMCCosChi_randomPhi_toward, 0, 0, 0, -1, 0, 0, 0, -1, "", "", "", -1, VarManager::kMCWeight_randomPhi_toward);
hm->AddHistogram(histClass, "Coschi_randomPhi_away", "", false, 40, -1.0, 1.0, VarManager::kMCCosChi_randomPhi_away, 0, 0, 0, -1, 0, 0, 0, -1, "", "", "", -1, VarManager::kMCWeight_randomPhi_away);
}
if (!groupStr.CompareTo("polarization-pseudoproper-gen")) {
int varspTHE[3] = {VarManager::kMCPt, VarManager::kMCCosThetaHE, VarManager::kMCVertexingTauxyProjected};
int varspTCS[3] = {VarManager::kMCPt, VarManager::kMCCosThetaCS, VarManager::kMCVertexingTauxyProjected};
int varspTRM[3] = {VarManager::kMCPt, VarManager::kMCCosThetaRM, VarManager::kMCVertexingTauxyProjected};
int bins[3] = {20, 20, 1000};
double xmin[3] = {0., -1., -0.5};
double xmax[3] = {20., 1., 0.5};
hm->AddHistogram(histClass, "Pt_cosThetaHE_Tauxy", "", 3, varspTHE, bins, xmin, xmax, 0, -1, kFALSE);
hm->AddHistogram(histClass, "Pt_cosThetaCS_Tauxy", "", 3, varspTCS, bins, xmin, xmax, 0, -1, kFALSE);
hm->AddHistogram(histClass, "Pt_cosThetaRM_Tauxy", "", 3, varspTRM, bins, xmin, xmax, 0, -1, kFALSE);
}
if (!groupStr.CompareTo("pair")) {
if (subGroupStr.Contains("cepf")) {
hm->AddHistogram(histClass, "Mass", "", false, 300, 0.0, 12.0, VarManager::kMass);
Expand Down Expand Up @@ -2111,7 +2122,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 2125 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 @@ -2267,7 +2278,7 @@
}
}
if (isTHn) {
for (auto& v : hist->FindMember("vars")->value.GetArray()) {

Check failure on line 2281 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 @@ -2330,7 +2341,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 2344 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 @@ -2341,7 +2352,7 @@

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

Check failure on line 2355 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 @@ -2355,27 +2366,27 @@
xmin = new double[nDimensions];
xmax = new double[nDimensions];
int iDim = 0;
for (auto& v : hist.FindMember("nBins")->value.GetArray()) {

Check failure on line 2369 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 2374 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 2379 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 2386 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 2389 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 @@ -2386,7 +2397,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 2400 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
Loading