Skip to content

Commit 270f50d

Browse files
author
Pei-Ying Kuan
committed
load phi weight from MC and real data separately
1 parent 1d58b83 commit 270f50d

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

‎PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -947,17 +947,17 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
947947

948948
// Book pt MC rec histogram with this run number:
949949
if (!wt.fPtRealByRunMap.contains(ebye.fRunNumber)) {
950-
auto* hPtReal = new TH1F(Form("hPtReal_run%d", ebye.fRunNumber), Form("pt MC rec distribution for run %d", ebye.fRunNumber), static_cast<int>(tc.fPtBins[0]), tc.fPtBins[1], tc.fPtBins[2]);
951-
hPtReal->SetDirectory(nullptr);
952-
wt.fPtRealByRunMap.try_emplace(ebye.fRunNumber, hPtReal);
950+
auto* hPtRec = new TH1F(Form("hPtRec_run%d", ebye.fRunNumber), Form("pt MC rec distribution for run %d", ebye.fRunNumber), static_cast<int>(tc.fPtBins[0]), tc.fPtBins[1], tc.fPtBins[2]);
951+
hPtRec->SetDirectory(nullptr);
952+
wt.fPtRealByRunMap.try_emplace(ebye.fRunNumber, hPtRec);
953953
wt.fWeightHistogramsList->Add(wt.fPtRealByRunMap[ebye.fRunNumber]);
954954
}
955955

956956
// Book pt MC sim histogram with this run number:
957957
if (!wt.fPtMCByRunMap.contains(ebye.fRunNumber)) {
958-
auto* hPtMC = 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]);
959-
hPtMC->SetDirectory(nullptr);
960-
wt.fPtMCByRunMap.try_emplace(ebye.fRunNumber, hPtMC);
958+
auto* hPtSim = new TH1F(Form("hPtSim_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]);
959+
hPtSim->SetDirectory(nullptr);
960+
wt.fPtMCByRunMap.try_emplace(ebye.fRunNumber, hPtSim);
961961
wt.fWeightHistogramsList->Add(wt.fPtMCByRunMap[ebye.fRunNumber]);
962962
}
963963

@@ -975,7 +975,11 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam
975975
continue;
976976
}
977977
TString histName = hist->GetName();
978-
if (histName.BeginsWith("wPhi")) {
978+
if (histName.BeginsWith("wPhiReal") && doprocessRec) {
979+
delete phiWeightHist;
980+
phiWeightHist = dynamic_cast<TH1F*>(hist->Clone(Form("wPhi_run%d", ebye.fRunNumber)));
981+
break;
982+
} else if (histName.BeginsWith("wPhiMC") && doprocessRecSim) {
979983
delete phiWeightHist;
980984
phiWeightHist = dynamic_cast<TH1F*>(hist->Clone(Form("wPhi_run%d", ebye.fRunNumber)));
981985
break;

0 commit comments

Comments
 (0)