Skip to content
Closed
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
28 changes: 14 additions & 14 deletions PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,13 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
bool fWeightSwitch = kTRUE;
TList* fWeightHistogramsList = NULL;
// Fill phi/pt histograms with that run number:
std::map<int, TH1F*> fPtRealByRunMap; // MC rec (too lazy to change name) data pt histograms, valid if processMonteCarlo
std::map<int, TH1F*> fPtMCByRunMap; // MC sim (too lazy to change name) data pt histograms, valid if processMonteCarlo
std::map<int, TH1F*> fPhiByRunMap; // Phi histograms, valid if processRealData
std::map<int, TH1F*> fPtRealByRunMap; // MC rec (too lazy to change name) data pt histograms, valid if processMonteCarlo
std::map<int, TH1F*> fPtMCByRunMap; // MC sim (too lazy to change name) data pt histograms, valid if processMonteCarlo
std::map<int, TH1F*> fPhiByRunMap; // Phi histograms, valid if processRealData
// Make weight histograms locally. Upload weight histograms to CCDB:
std::vector<TH1F*> fWeightHistograms; // Get all weight histograms with that run number
std::map<int, TH1F*> fPhiWeightHistogramsMap; // Get phi weight histograms
std::map<int, TH1F*> fPtWeightHistogramsMap; // Get pt weight histograms
std::vector<TH1F*> fWeightHistograms; // Get all weight histograms with that run number
std::map<int, TH1F*> fPhiWeightHistogramsMap; // Get phi weight histograms
std::map<int, TH1F*> fPtWeightHistogramsMap; // Get pt weight histograms
// Null weight histograms. Use them when no weight histograms found in the given run number:
TH1F* fDummyPhiWeightHistogram = NULL;
TH1F* fDummyPtWeightHistogram = NULL;
Expand Down Expand Up @@ -763,7 +763,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
wt.fPtRealByRunMap[ebye.fRunNumber]->SetDirectory(nullptr);
wt.fWeightHistogramsList->Add(wt.fPtRealByRunMap[ebye.fRunNumber]);
}

// Book pt MC sim histogram with this run number:
if (wt.fPtMCByRunMap.find(ebye.fRunNumber) == wt.fPtMCByRunMap.end()) {
wt.fPtMCByRunMap[ebye.fRunNumber] = new TH1F(Form("hPtMC_run%d", ebye.fRunNumber), Form("pt MC sim distribution for run %d", ebye.fRunNumber), static_cast<int>(tc.fPtBins[0]), tc.fPtBins[1], tc.fPtBins[2]);
Expand All @@ -773,13 +773,13 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam

// Get phi and pt weight histogram with this run number:
if (wt.fWeightSwitch && wt.fPhiWeightHistogramsMap.find(ebye.fRunNumber) == wt.fPhiWeightHistogramsMap.end()) {

TH1F* phiWeightHist = dynamic_cast<TH1F*>(wt.fDummyPhiWeightHistogram->Clone(Form("wPhi_run%d", ebye.fRunNumber)));
TH1F* ptWeightHist = dynamic_cast<TH1F*>(wt.fDummyPtWeightHistogram->Clone(Form("wPt_run%d", ebye.fRunNumber)));

wt.fWeightHistograms = getHistogramsWithWeights(tc.fFileWithWeights.c_str(), stringRunNumber.c_str());

for(TH1F* const hist : wt.fWeightHistograms){
for (TH1F* const hist : wt.fWeightHistograms) {
if (!hist) {
LOGF(warning, "Fail to loop weight histograms");
continue;
Expand All @@ -792,7 +792,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
}
}

for(TH1F* const hist : wt.fWeightHistograms){
for (TH1F* const hist : wt.fWeightHistograms) {
if (!hist) {
LOGF(warning, "Fail to loop weight histograms");
continue;
Expand Down Expand Up @@ -887,7 +887,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
if (tc.fPrintSwitch) {

LOGF(info, "Run number: %d", ebye.fRunNumber);

LOGF(info, "Centrality: %f", rlCollisionCent);
LOGF(info, "Multiplicity: %f", static_cast<float>(rlCollisionMult));

Expand Down Expand Up @@ -1018,7 +1018,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
}
}

// Fail the event cut, skip this collision:
// Fail the event cut, skip this collision:
} else {
return;
}
Expand Down Expand Up @@ -1468,11 +1468,11 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
bookCorrHistograms<eCorrMult>(lCrBins, cr);

wt.fDummyPhiWeightHistogram = new TH1F("fDummyPhiWeightHistogram", "Dummy phi weight histogram", tc.fPhiBins[0], tc.fPhiBins[1], tc.fPhiBins[2]);
for(int i=1; i<=wt.fDummyPhiWeightHistogram->GetNbinsX(); i++){
for (int i = 1; i <= wt.fDummyPhiWeightHistogram->GetNbinsX(); i++) {
wt.fDummyPhiWeightHistogram->SetBinContent(i, 1.);
}
wt.fDummyPtWeightHistogram = new TH1F("fDummyPtWeightHistogram", "Dummy pt weight histogram", tc.fPtBins[0], tc.fPtBins[1], tc.fPtBins[2]);
for(int i=1; i<=wt.fDummyPtWeightHistogram->GetNbinsX(); i++){
for (int i = 1; i <= wt.fDummyPtWeightHistogram->GetNbinsX(); i++) {
wt.fDummyPtWeightHistogram->SetBinContent(i, 1.);
}

Expand Down