From 890ae8612e5c6cd179d27792577fa82fc8c77085 Mon Sep 17 00:00:00 2001 From: Pei-Ying Kuan Date: Sun, 29 Nov 2026 20:00:59 +0100 Subject: [PATCH 1/3] add occupancy histogram and ncontrib cut --- .../Tasks/multiparticleCumulants.cxx | 250 +++++++----------- 1 file changed, 90 insertions(+), 160 deletions(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx index d82cba63864..d655ae63abc 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx @@ -32,7 +32,6 @@ #include #include -#include #include #include #include @@ -98,6 +97,7 @@ enum EnEventHistograms { eVertexZ, eNumContrib, eNumTrack, + eOccupancy, eEventHistograms_N }; @@ -108,7 +108,8 @@ static constexpr std::array EventHistNames = { "VertexY", "VertexZ", "NumContrib", - "NumTrack"}; + "NumTrack", + "Occupancy"}; enum EnParticleHistograms { ePt, @@ -128,10 +129,18 @@ static constexpr std::array ParticleHistName enum EnQAHistograms { eQACent, - eQAMultNumContrib, + eQAMultANumContrib, + eQAMultBNumContrib, + eQAMultCNumContrib, eQAHistograms_N }; +static constexpr std::array QAHistNames = { + "Centrality", + "NContributionMultiplicityA", + "NContributionMultiplicityB", + "NContributionMultiplicityC"}; + enum EnCorrHistograms { eCorrCent, eCorrMult, @@ -144,17 +153,6 @@ static constexpr std::array CorrHistNames = { "Multiplicity", "NContributionMultiplicity"}; -enum EnCorrBound { - eCentABBound, - eCentACBound, - eCentBCBound, - eMultABBound, - eMultACBound, - eMultBCBound, - eNumContribMultBound, - eCorrBound_N -}; - enum EnCentEstm { eCentFT0C, eCentFT0M, @@ -258,14 +256,16 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam Configurable> cfCentCut{"cfCentCut", {10., 20.}, "centrality range: {min, max}[%]"}; Configurable> cfNumContribCut{"cfNumContribCut", {0, 3000.}, "NContribution range: {min, max}"}; Configurable> cfNumTrackCut{"cfNumTrackCut", {0, 3000.}, "NTrack range: {min, max}"}; - Configurable> cfOccupancyCut{"cfOccupancyCut", {0, 6000.}, "Occupancy range: {min, max}"}; + Configurable> cfOccupancyCut{"cfOccupancyCut", {0, 6000.}, "Occupancy range: {min <= occup < max}"}; Configurable> cfCentABCorrCut{"cfCentABCorrCut", {1.4, 300., 1.4, 300.}, "parameters of limits in FT0C vs. FT0M centrality 2D histograms, cx+d < y < ax+b: {a,b,c,d}"}; Configurable> cfCentACCorrCut{"cfCentACCorrCut", {1.4, 300., 1.4, 300.}, "parameters of limits in FT0C vs. FT0M centrality 2D histograms, cx+d < y < ax+b: {a,b,c,d}"}; Configurable> cfCentBCCorrCut{"cfCentBCCorrCut", {1.4, 300., 1.4, 300.}, "parameters of limits in FT0C vs. FT0M centrality 2D histograms, cx+d < y < ax+b: {a,b,c,d}"}; Configurable> cfMultABCorrCut{"cfMultABCorrCut", {1.4, 300., 1.4, 300.}, "parameters of limits in FT0C vs. FT0M multiplicities 2D histograms, cx+d < y < ax+b: {a,b,c,d}"}; Configurable> cfMultACCorrCut{"cfMultACCorrCut", {1.4, 300., 1.4, 300.}, "parameters of limits in FT0C vs. FV0A multiplicities 2D histograms, cx+d < y < ax+b: {a,b,c,d}"}; Configurable> cfMultBCCorrCut{"cfMultBCCorrCut", {1.4, 300., 1.4, 300.}, "parameters of limits in FT0M vs. FV0A multiplicities 2D histograms, cx+d < y < ax+b: {a,b,c,d}"}; - Configurable> cfNumContribMultCorrCut{"cfNumContribMultCorrCut", {0.035, 100., 0.024, -600.}, "parameters of limits in NContribution vs. multiplicity 2D histograms, cx+d < y < ax+b: {a,b,c,d}"}; + Configurable> cfNumContribMultACorrCut{"cfNumContribMultACorrCut", {0.035, 100., 0.024, -600.}, "parameters of limits in NContribution vs. FT0C multiplicity 2D histograms, cx+d < y < ax+b: {a,b,c,d}"}; + Configurable> cfNumContribMultBCorrCut{"cfNumContribMultBCorrCut", {0.035, 100., 0.024, -600.}, "parameters of limits in NContribution vs. FT0M multiplicity 2D histograms, cx+d < y < ax+b: {a,b,c,d}"}; + Configurable> cfNumContribMultCCorrCut{"cfNumContribMultCCorrCut", {0.035, 100., 0.024, -600.}, "parameters of limits in NContribution vs. FV0A multiplicity 2D histograms, cx+d < y < ax+b: {a,b,c,d}"}; // *) Particle cut Configurable> cfPtCut{"cfPtCut", {0.2, 5.0}, "Pt range: {min, max}[GeV], with convention: min < Pt < max"}; @@ -296,6 +296,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam Configurable> cfVerZBins{"cfVerZBins", {100, -50., 50.}, "nVerZBins, VerZMin, VerZMax"}; Configurable> cfNumContribBins{"cfNumContribBins", {100, 0., 5000.}, "nNumContribBins, NumContribMin, NumContribMax"}; Configurable> cfNumTrackBins{"cfNumTrackBins", {100, 0., 5000.}, "nNumTrackBins, NumTrackMin, NumTrackMax"}; + Configurable> cfOccupancyBins{"cfOccupancyBins", {100, 0., 15000.}, "nOccupancyBins, OccupancyMin, OccupancyMax"}; Configurable> cfTwoParticleCorrBins{"cfTwoParticleCorrBins", {100, 0., 2e-3}, "nTwoParticleCorrBins, TwoParticleCorrMin, TwoParticleCorrMax"}; Configurable> cfThreeParticleCorrBins{"cfThreeParticleCorrBins", {100, 0., 2e-4}, "nThreeParticleCorrBins, ThreeParticleCorrMin, ThreeParticleCorrMax"}; @@ -340,7 +341,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam std::vector fOccupancyCut = {0, 6000.}; std::vector>> fCentAllCorrCut = {{{0., 0., 0., 0.}, {0., 0., 0., 0.}, {0., 0., 0., 0.}}, {{0., 0., 0., 0.}, {0., 0., 0., 0.}, {0., 0., 0., 0.}}, {{0., 0., 0., 0.}, {0., 0., 0., 0.}, {0., 0., 0., 0.}}}; std::vector>> fMultAllCorrCut = {{{0., 0., 0., 0.}, {0., 0., 0., 0.}, {0., 0., 0., 0.}}, {{0., 0., 0., 0.}, {0., 0., 0., 0.}, {0., 0., 0., 0.}}, {{0., 0., 0., 0.}, {0., 0., 0., 0.}, {0., 0., 0., 0.}}}; - std::vector fNumContribMultCorrCut = {0.024, -600., 0.035, 100.}; + std::vector> fNumContribMultCorrCut = {{0., 0., 0., 0.}, {0., 0., 0., 0.}, {0., 0., 0., 0.}}; std::vector fPtCut = {0.2, 5.0}; std::vector fEtaCut = {-0.8, 0.8}; std::vector fSignCut = {1, 0, 1}; @@ -367,6 +368,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam std::vector fVerZBins = {100, -50., 50.}; std::vector fNumContribBins = {100, 0, 5000}; std::vector fNumTrackBins = {100, 0, 5000}; + std::vector fOccupancyBins = {100, 0, 15000}; std::vector fTwoParticleCorrBins = {100, 0, 2e-3}; std::vector fThreeParticleCorrBins = {100, 0., 2e-4}; std::vector fFourParticleCorrBins = {100, 0, 1e-7}; @@ -395,17 +397,17 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam struct CorrHistograms { TList* fCorrHistogramsList = nullptr; - std::array, eMultEstm_N>, eMultEstm_N>, eCorrHistograms_N - 1> fCorrHistograms{}; // [mult/cent][type][type][before/after cut] - std::array, eCorrBound_N> fCorrBounds{}; // [centAB/centAC/centBC/multAB/multAC/multBC/NumContrib vs. mult][upper/lower] + std::array, eMultEstm_N>, eMultEstm_N>, eCorrHistograms_N - 1> fCorrHistograms{}; // [mult/cent][type][type][before/after cut], mult vs. NumContrib histograms are in QA + // std::array, eCorrBound_N> fCorrBounds{}; // [centAB/centAC/centBC/multAB/multAC/multBC/multANumContrib/multBNumContrib/multCNumContrib][upper/lower] } cr; struct WeightHistograms { bool fWeightSwitch = kTRUE; TList* fWeightHistogramsList = nullptr; // Fill phi/pt histograms with that run number: - std::map fPtRealByRunMap; // MC rec (too lazy to change name) data pt histograms, valid if processMonteCarlo - std::map fPtMCByRunMap; // MC sim (too lazy to change name) data pt histograms, valid if processMonteCarlo - std::map fPhiByRunMap; // Phi histograms, valid if processRealData + std::map fPtRecByRunMap; // MC rec data pt histograms, valid if processMonteCarlo + std::map fPtSimByRunMap; // MC sim data pt histograms, valid if processMonteCarlo + std::map fPhiByRunMap; // Phi histograms, valid for both processRealData and processMonteCarlo // Make weight histograms locally. Upload weight histograms to CCDB: std::vector fWeightHistograms; // Get all weight histograms with that run number std::map fPhiWeightHistogramsMap; // Get phi weight histograms @@ -464,7 +466,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam float fCentralitySim = 0.; float fImpactParameter = 0.; float fNumContrib = 0.; - std::array, eBeforeAfter_N> fTwoParticleCorrelationEbye{}; // <<2>> [before, after][, ,, ] + std::array, eBeforeAfter_N> fTwoParticleCorrelationEbye{}; // <<2>> [before, after][, , , ] std::array, eBeforeAfter_N> fTwoParticleCorrelationMinEbye{}; std::array, eBeforeAfter_N> fTwoParticleCorrelationMaxEbye{}; std::array, eBeforeAfter_N> fFourParticleCorrelationEbye{}; // <<4>> [before, after][, , , , , ] @@ -517,39 +519,42 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam ebye.fNumContrib > tc.fNumContribCut[0]; // *) NumOccupancyCut bNumOccupancyCut = collision.trackOccupancyInTimeRange() < tc.fOccupancyCut[1] && - collision.trackOccupancyInTimeRange() > tc.fOccupancyCut[0]; + collision.trackOccupancyInTimeRange() >= tc.fOccupancyCut[0]; // *) CentCorrCut - float iCent = 0.; - float jCent = 0.; - int nCentComb = 0; + double iCent = 0.; + double jCent = 0.; for (int i = 0; i < eCentEstm_N; i++) { iCent = rlCollisionCentAll[i]; for (int j = i + 1; j < eCentEstm_N; j++) { jCent = rlCollisionCentAll[j]; - float upper = cr.fCorrBounds[eCentABBound + nCentComb][0]->Eval(iCent); - float lower = cr.fCorrBounds[eCentABBound + nCentComb][1]->Eval(iCent); + const auto& params = tc.fCentAllCorrCut[i][j]; + float upper = params[0] * iCent + params[1]; + float lower = params[2] * iCent + params[3]; bCentCorrCut &= jCent >= lower && jCent <= upper; - nCentComb += 1; } } // *) MultCorrCut - float iMult = 0.; - float jMult = 0.; - int nMultComb = 0; + double iMult = 0.; + double jMult = 0.; for (int i = 0; i < eMultEstm_N; i++) { iMult = rlCollisionMultAll[i]; for (int j = i + 1; j < eMultEstm_N; j++) { jMult = rlCollisionMultAll[j]; - float upper = cr.fCorrBounds[eMultABBound + nMultComb][0]->Eval(iMult); - float lower = cr.fCorrBounds[eMultABBound + nMultComb][1]->Eval(iMult); + const auto& params = tc.fMultAllCorrCut[i][j]; + float upper = params[0] * iMult + params[1]; + float lower = params[2] * iMult + params[3]; bMultCorrCut &= jMult >= lower && jMult <= upper; - nMultComb += 1; } } // *) NumContribMultCorrCut - float upper = cr.fCorrBounds[eNumContribMultBound][0]->Eval(ebye.fReferenceMultiplicity); - float lower = cr.fCorrBounds[eNumContribMultBound][1]->Eval(ebye.fReferenceMultiplicity); - bNumContribMultCorrCut = rlCollisionNumContrib >= lower && rlCollisionNumContrib <= upper; + iMult = 0.; + for (int i = 0; i < eMultEstm_N; i++) { + iMult = rlCollisionMultAll[i]; + const auto& params = tc.fNumContribMultCorrCut[i]; + float upper = params[0] * iMult + params[1]; + float lower = params[2] * iMult + params[3]; + bNumContribMultCorrCut &= rlCollisionNumContrib >= lower && rlCollisionNumContrib <= upper; + } } // *) For sim event only @@ -946,19 +951,19 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam } // Book pt MC rec histogram with this run number: - if (!wt.fPtRealByRunMap.contains(ebye.fRunNumber)) { + if (!wt.fPtRecByRunMap.contains(ebye.fRunNumber)) { auto* hPtRec = new TH1F(Form("hPtRec_run%d", ebye.fRunNumber), Form("pt MC rec distribution for run %d", ebye.fRunNumber), static_cast(tc.fPtBins[0]), tc.fPtBins[1], tc.fPtBins[2]); hPtRec->SetDirectory(nullptr); - wt.fPtRealByRunMap.try_emplace(ebye.fRunNumber, hPtRec); - wt.fWeightHistogramsList->Add(wt.fPtRealByRunMap[ebye.fRunNumber]); + wt.fPtRecByRunMap.try_emplace(ebye.fRunNumber, hPtRec); + wt.fWeightHistogramsList->Add(wt.fPtRecByRunMap[ebye.fRunNumber]); } // Book pt MC sim histogram with this run number: - if (!wt.fPtMCByRunMap.contains(ebye.fRunNumber)) { + if (!wt.fPtSimByRunMap.contains(ebye.fRunNumber)) { auto* hPtSim = new TH1F(Form("hPtSim_run%d", ebye.fRunNumber), Form("pt MC sim distribution for run %d", ebye.fRunNumber), static_cast(tc.fPtBins[0]), tc.fPtBins[1], tc.fPtBins[2]); hPtSim->SetDirectory(nullptr); - wt.fPtMCByRunMap.try_emplace(ebye.fRunNumber, hPtSim); - wt.fWeightHistogramsList->Add(wt.fPtMCByRunMap[ebye.fRunNumber]); + wt.fPtSimByRunMap.try_emplace(ebye.fRunNumber, hPtSim); + wt.fWeightHistogramsList->Add(wt.fPtSimByRunMap[ebye.fRunNumber]); } // Get phi and pt weight histogram with this run number: @@ -1245,6 +1250,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam ev.fEventHistograms[eVertexY][eRec][eBefore]->Fill(collision.posY()); ev.fEventHistograms[eVertexZ][eRec][eBefore]->Fill(collision.posZ()); ev.fEventHistograms[eNumContrib][eRec][eBefore]->Fill(rlCollisionNumContrib); + ev.fEventHistograms[eOccupancy][eRec][eBefore]->Fill(collision.trackOccupancyInTimeRange()); // Fill centrality correlation histograms before cut: for (int i = 0; i < eCentEstm_N; i++) { @@ -1274,7 +1280,9 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam // Fill NContrib vs. multiplicity QA histogram before cut: if (qa.fQASwitch) { - qa.fQAHistograms[eQAMultNumContrib][eBefore]->Fill(rlCollisionMult, rlCollisionNumContrib); + for (int i = 0; i < eMultEstm_N; i++) { + qa.fQAHistograms[eQAMultANumContrib + i][eBefore]->Fill(rlCollisionMultAll[i], rlCollisionNumContrib); + } } // If RecAndSim: @@ -1338,6 +1346,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam ev.fEventHistograms[eVertexY][eRec][eAfter]->Fill(collision.posY()); ev.fEventHistograms[eVertexZ][eRec][eAfter]->Fill(collision.posZ()); ev.fEventHistograms[eNumContrib][eRec][eAfter]->Fill(rlCollisionNumContrib); + ev.fEventHistograms[eOccupancy][eRec][eAfter]->Fill(collision.trackOccupancyInTimeRange()); // Fill centrality correlation histograms after cut: for (int i = 0; i < eCentEstm_N; i++) { @@ -1363,7 +1372,9 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam // Fill NContrib vs. multiplicity QA histogram after cut: if (qa.fQASwitch) { - qa.fQAHistograms[eQAMultNumContrib][eAfter]->Fill(rlCollisionMult, rlCollisionNumContrib); + for (int i = 0; i < eMultEstm_N; i++) { + qa.fQAHistograms[eQAMultANumContrib + i][eAfter]->Fill(rlCollisionMultAll[i], rlCollisionNumContrib); + } } } else { @@ -1449,7 +1460,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam // Fill phi (real rec), pt (MC rec) histogram with this run number: wt.fPhiByRunMap.at(ebye.fRunNumber)->Fill(track.phi()); - wt.fPtRealByRunMap.at(ebye.fRunNumber)->Fill(track.pt()); + wt.fPtRecByRunMap.at(ebye.fRunNumber)->Fill(track.pt()); // Fill particle histograms after cut: pc.fParticleHistograms[ePt][eRec][eAfter]->Fill(track.pt()); @@ -1509,7 +1520,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam if (ctParticleCuts(mcparticle)) { // Fill pt (MC sim) histogram with this run number: - wt.fPtMCByRunMap.at(ebye.fRunNumber)->Fill(mcparticle.pt()); + wt.fPtSimByRunMap.at(ebye.fRunNumber)->Fill(mcparticle.pt()); // Fill MC particle histograms after cut: pc.fParticleHistograms[ePt][eSim][eAfter]->Fill(mcparticle.pt()); pc.fParticleHistograms[eEta][eSim][eAfter]->Fill(mcparticle.eta()); @@ -1614,7 +1625,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam double waa = mcc.fQvectorAfterA[n][0][1].Re(); double wab = mcc.fQvectorAfterB[n][0][1].Re(); double gapa = 0.; - if (waa * wab > 0) { + if (waa * wab > 0 && bNumTrackCut) { gapa = (qvaa * TComplex::Conjugate(qvab)).Re() / (waa * wab); mc.fTwoParticleCorrelationGapProfiles[n][eAfter]->Fill(mc.fTwoParticleCorrelationGapProfiles[n][eAfter]->GetXaxis()->GetBinCenter(i + 1), gapa, waa * wab); mc.fTwoParticleCorrelationGapHistograms[n][i]->Fill(gapa, waa * wab); @@ -1892,52 +1903,54 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam void bookQAHistograms(int histType, const std::vector>& lQABins) { + // for mult vs. nContrib: int nBinsCentX = 0; float minCentX = 0.; float maxCentX = 0.; int nBinsCentY = 0; float minCentY = 0.; float maxCentY = 0.; + // for cent: int nBinsCent = 0; float minCent = 0.; float maxCent = 0.; - if (histType == eMult) { - const auto& lCentBinsX = lQABins[1]; // MultBins + if (histType == eQACent) { + const auto& lCentBins = lQABins[histType]; + nBinsCent = static_cast(lCentBins[0]); + minCent = lCentBins[1]; + maxCent = lCentBins[2]; + } else { + const auto& lCentBinsX = lQABins[histType]; // MultBins nBinsCentX = static_cast(lCentBinsX[0]); minCentX = lCentBinsX[1]; maxCentX = lCentBinsX[2]; - const auto& lCentBinsY = lQABins[2]; // nContribBins + const auto& lCentBinsY = lQABins[eQAHistograms_N]; // nContribBins nBinsCentY = static_cast(lCentBinsY[0]); minCentY = lCentBinsY[1]; maxCentY = lCentBinsY[2]; - } else { - const auto& lCentBins = lQABins[histType]; - nBinsCent = static_cast(lCentBins[0]); - minCent = lCentBins[1]; - maxCent = lCentBins[2]; } for (int ba = 0; ba < eBeforeAfter_N; ba++) { - std::string name = Form("fHist%s[%s cut]", EventHistNames[histType], BeforeAfterNames[ba]); + std::string name = Form("fHist%s[%s cut]", QAHistNames[histType], BeforeAfterNames[ba]); std::string namefull; - if (histType == eCent) { - namefull = Form("Quality assurance of %s %s", tc.fCentEstm.c_str(), EventHistNames[histType]); - } else if (histType == eMult) { - namefull = Form("Quality assurance of %s %s vs. NContributors", tc.fMultEstm.c_str(), EventHistNames[histType]); + if (histType == eQACent) { + namefull = Form("Quality assurance of %s Centrality", tc.fCentEstm.c_str()); } else { - namefull = Form("Quality assurance of %s", EventHistNames[histType]); + const char* estm = MultEstmNames[histType - eQAMultANumContrib]; + namefull = Form("Quality assurance of %s Multiplicity vs. NContributors", estm); } - if (histType == eMult) { + if (histType == eQACent) { + qa.fQAHistograms[histType][ba] = new TH2F(name.c_str(), namefull.c_str(), nBinsCent, minCent, maxCent, nBinsCent, minCent, maxCent); + qa.fQAHistograms[histType][ba]->GetYaxis()->SetTitle("Simulated Centrality"); + qa.fQAHistograms[histType][ba]->GetXaxis()->SetTitle("Reconstructed Centrality"); + } else { + const char* estm = MultEstmNames[histType - eQAMultANumContrib]; qa.fQAHistograms[histType][ba] = new TH2F(name.c_str(), namefull.c_str(), nBinsCentX, minCentX, maxCentX, nBinsCentY, minCentY, maxCentY); qa.fQAHistograms[histType][ba]->GetYaxis()->SetTitle("NContributors"); - qa.fQAHistograms[histType][ba]->GetXaxis()->SetTitle("Reference multiplicity"); - } else { - qa.fQAHistograms[histType][ba] = new TH2F(name.c_str(), namefull.c_str(), nBinsCent, minCent, maxCent, nBinsCent, minCent, maxCent); - qa.fQAHistograms[histType][ba]->GetYaxis()->SetTitle(Form("Simulated %s", EventHistNames[histType])); - qa.fQAHistograms[histType][ba]->GetXaxis()->SetTitle(Form("Reconstructed %s", EventHistNames[histType])); + qa.fQAHistograms[histType][ba]->GetXaxis()->SetTitle(Form("%s Multiplicity", estm)); } qa.fQAHistogramsList->Add(qa.fQAHistograms[histType][ba]); } @@ -1945,26 +1958,6 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam void bookCorrHistograms(int histType, const std::vector>& lCrBins) { - // (mult)(cent)(NContribMult) offset - int boundOffset = histType == eCorrCent ? eCentABBound : histType == eCorrMult ? eMultABBound - : eNumContribMultBound; - // (mult)(cent)(NContribMult) book functions: - if (histType == eCorrCent || histType == eCorrMult) { - for (int i = 0; i < eEstmCorr_N; i++) { - int indexBound = boundOffset + i; - cr.fCorrBounds[indexBound][0] = new TF1(Form("fCorrUpperBound%s%s", EstmCorrName[i], CorrHistNames[histType]), "[0] * x + [1]"); - cr.fCorrBounds[indexBound][1] = new TF1(Form("fCorrLowerBound%s%s", EstmCorrName[i], CorrHistNames[histType]), "[0] * x + [1]"); - cr.fCorrBounds[indexBound][0]->SetTitle(Form("%s %s upper bound", EstmCorrName[i], CorrHistNames[histType])); - cr.fCorrBounds[indexBound][1]->SetTitle(Form("%s %s lower bound", EstmCorrName[i], CorrHistNames[histType])); - } - } else if (histType == eCorrNumContribMult) { - int indexBound = boundOffset; - cr.fCorrBounds[indexBound][0] = new TF1(Form("fCorrUpperBound%s", CorrHistNames[histType]), "[0] * x + [1]"); - cr.fCorrBounds[indexBound][1] = new TF1(Form("fCorrLowerBound%s", CorrHistNames[histType]), "[0] * x + [1]"); - cr.fCorrBounds[indexBound][0]->SetTitle(Form("%s upper bound", CorrHistNames[histType])); - cr.fCorrBounds[indexBound][1]->SetTitle(Form("%s lower bound", CorrHistNames[histType])); - } - int nBinsXCent = 0; float minXCent = 0.; float maxXCent = 0.; @@ -1977,38 +1970,6 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam int nBinsYMult = 0; float minYMult = 0.; float maxYMult = 0.; - // int nBinsNumContrib = 0; - // float minNumContrib = 0.; - float maxNumContrib = 0.; - - // (NContribMult) set functions and add to list: - if (histType == eCorrNumContribMult) { - - int indexBins = histType + static_cast(eMultEstm_N); - - // (NContribMult) get bins: - const auto& lMultXBins = lCrBins[indexBins]; - // nBinsXMult = static_cast(lMultXBins[0]); - minXMult = lMultXBins[1]; - maxXMult = lMultXBins[2]; - const auto& lNumContribBins = lCrBins[indexBins - 1]; - // nBinsNumContrib = static_cast(lNumContribBins[0]); - // minNumContrib = lNumContribBins[1]; - maxNumContrib = lNumContribBins[2]; - - // (NContribMult) set functions and add to list: - int indexBound = boundOffset; - cr.fCorrBounds[indexBound][0]->SetRange(minXMult, maxXMult); - cr.fCorrBounds[indexBound][1]->SetRange(minXMult, maxXMult); - cr.fCorrBounds[indexBound][0]->SetMinimum(0); - cr.fCorrBounds[indexBound][1]->SetMinimum(0); - cr.fCorrBounds[indexBound][0]->SetMaximum(maxNumContrib); - cr.fCorrBounds[indexBound][1]->SetMaximum(maxNumContrib); - cr.fCorrBounds[indexBound][0]->SetParameters(tc.fNumContribMultCorrCut[0], tc.fNumContribMultCorrCut[1]); - cr.fCorrBounds[indexBound][1]->SetParameters(tc.fNumContribMultCorrCut[2], tc.fNumContribMultCorrCut[3]); - cr.fCorrHistogramsList->Add(cr.fCorrBounds[indexBound][0]); - cr.fCorrHistogramsList->Add(cr.fCorrBounds[indexBound][1]); - } // (mult)(cent) Book histograms, set functions and add to list: if (histType != eCorrNumContribMult) { @@ -2023,8 +1984,6 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam nEstm = eMultEstm_N; } - int nComb = 0; // count combination AB, AC, BC - for (int i = 0; i < nEstm; i++) { std::string titleX; @@ -2052,21 +2011,6 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam minYCent = lCentYBins[1]; maxYCent = lCentYBins[2]; - // (cent) set functions and add to list: - if (static_cast(ba)) { - int indexBound = boundOffset + nComb; - cr.fCorrBounds[indexBound][0]->SetRange(minXCent, maxXCent); - cr.fCorrBounds[indexBound][1]->SetRange(minXCent, maxXCent); - cr.fCorrBounds[indexBound][0]->SetParameters(tc.fCentAllCorrCut[i][j][0], tc.fCentAllCorrCut[i][j][1]); - cr.fCorrBounds[indexBound][1]->SetParameters(tc.fCentAllCorrCut[i][j][2], tc.fCentAllCorrCut[i][j][3]); - cr.fCorrBounds[indexBound][0]->SetMinimum(0); - cr.fCorrBounds[indexBound][1]->SetMinimum(0); - cr.fCorrBounds[indexBound][0]->SetMaximum(maxYCent); - cr.fCorrBounds[indexBound][1]->SetMaximum(maxYCent); - cr.fCorrHistogramsList->Add(cr.fCorrBounds[indexBound][0]); - cr.fCorrHistogramsList->Add(cr.fCorrBounds[indexBound][1]); - } - // (cent) book corr 2D histogram: cr.fCorrHistograms[histType][i][j][ba] = new TH2F(name.c_str(), namefull.c_str(), nBinsXCent, minXCent, maxXCent, nBinsYCent, minYCent, maxYCent); @@ -2084,21 +2028,6 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam minYMult = lMultYBins[1]; maxYMult = lMultYBins[2]; - // (mult) set functions and add to list: - if (static_cast(ba)) { - int indexBound = boundOffset + nComb; - cr.fCorrBounds[indexBound][0]->SetRange(minXMult, maxXMult); - cr.fCorrBounds[indexBound][1]->SetRange(minXMult, maxXMult); - cr.fCorrBounds[indexBound][0]->SetParameters(tc.fMultAllCorrCut[i][j][0], tc.fMultAllCorrCut[i][j][1]); - cr.fCorrBounds[indexBound][1]->SetParameters(tc.fMultAllCorrCut[i][j][2], tc.fMultAllCorrCut[i][j][3]); - cr.fCorrBounds[indexBound][0]->SetMinimum(0); - cr.fCorrBounds[indexBound][1]->SetMinimum(0); - cr.fCorrBounds[indexBound][0]->SetMaximum(maxYMult); - cr.fCorrBounds[indexBound][1]->SetMaximum(maxYMult); - cr.fCorrHistogramsList->Add(cr.fCorrBounds[indexBound][0]); - cr.fCorrHistogramsList->Add(cr.fCorrBounds[indexBound][1]); - } - // (mult) book corr 2D histogram: cr.fCorrHistograms[histType][i][j][ba] = new TH2F(name.c_str(), namefull.c_str(), nBinsXMult, minXMult, maxXMult, nBinsYMult, minYMult, maxYMult); } @@ -2107,8 +2036,6 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam cr.fCorrHistograms[histType][i][j][ba]->GetYaxis()->SetTitle(titleY.c_str()); cr.fCorrHistograms[histType][i][j][ba]->GetXaxis()->SetTitle(titleX.c_str()); cr.fCorrHistogramsList->Add(cr.fCorrHistograms[histType][i][j][ba]); - - nComb += 1; } } } @@ -2162,7 +2089,9 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam tc.fMultAllCorrCut[0][1] = cfMultABCorrCut; tc.fMultAllCorrCut[0][2] = cfMultACCorrCut; tc.fMultAllCorrCut[1][2] = cfMultBCCorrCut; - tc.fNumContribMultCorrCut = cfNumContribMultCorrCut; + tc.fNumContribMultCorrCut[0] = cfNumContribMultACorrCut; + tc.fNumContribMultCorrCut[1] = cfNumContribMultBCorrCut; + tc.fNumContribMultCorrCut[2] = cfNumContribMultCCorrCut; tc.fPtCut = cfPtCut; tc.fEtaCut = cfEtaCut; @@ -2189,6 +2118,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam tc.fVerZBins = cfVerZBins; tc.fNumContribBins = cfNumContribBins; tc.fNumTrackBins = cfNumTrackBins; + tc.fOccupancyBins = cfOccupancyBins; tc.fTwoParticleCorrBins = cfTwoParticleCorrBins; tc.fThreeParticleCorrBins = cfThreeParticleCorrBins; tc.fFourParticleCorrBins = cfFourParticleCorrBins; @@ -2248,9 +2178,9 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam fBaseList->Add(mc.fMultiparticleCorrelationProfilesList); std::vector> lPcBins = {tc.fPtBins, tc.fEtaBins, tc.fPhiBins, tc.fDCAXYBins, tc.fDCAZBins}; - std::vector> lEvBins = {tc.fCentBins, tc.fMultBins, tc.fVerXBins, tc.fVerYBins, tc.fVerZBins, tc.fNumContribBins, tc.fNumTrackBins}; - std::vector> lQABins = {tc.fCentBins, tc.fMultBins, tc.fNumContribBins}; - std::vector> lCrBins = {tc.fCentBins, tc.fFT0CMultBins, tc.fFT0MMultBins, tc.fFV0AMultBins, tc.fNumContribBins, tc.fMultBins}; + std::vector> lEvBins = {tc.fCentBins, tc.fMultBins, tc.fVerXBins, tc.fVerYBins, tc.fVerZBins, tc.fNumContribBins, tc.fNumTrackBins, tc.fOccupancyBins}; + std::vector> lQABins = {tc.fCentBins, tc.fFT0CMultBins, tc.fFT0MMultBins, tc.fFV0AMultBins, tc.fNumContribBins}; + std::vector> lCrBins = {tc.fCentBins, tc.fFT0CMultBins, tc.fFT0MMultBins, tc.fFV0AMultBins, tc.fNumContribBins}; for (int i = 0; i < eParticleHistograms_N; i++) { bookParticleHistograms(i, lPcBins); From bb96dc20fb7f15d5fa18745a8f566c3c6c60defa Mon Sep 17 00:00:00 2001 From: Pei-Ying Kuan Date: Sun, 29 Nov 2026 20:25:17 +0100 Subject: [PATCH 2/3] remove unused variable and fix if statement --- .../Tasks/multiparticleCumulants.cxx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx index d655ae63abc..28d2362af12 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx @@ -184,11 +184,6 @@ enum EnEstmCorr { eEstmCorr_N }; -static constexpr std::array EstmCorrName = { - "FT0CFT0M", - "FT0CFV0A", - "FT0MFV0A"}; - enum EnBeforeAfter { eBefore, eAfter, @@ -980,11 +975,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam continue; } TString histName = hist->GetName(); - if (histName.BeginsWith("wPhiReal") && doprocessRec) { - delete phiWeightHist; - phiWeightHist = dynamic_cast(hist->Clone(Form("wPhi_run%d", ebye.fRunNumber))); - break; - } else if (histName.BeginsWith("wPhiMC") && doprocessRecSim) { + if (histName.BeginsWith("wPhiReal") && doprocessRec || histName.BeginsWith("wPhiMC") && doprocessRecSim) { delete phiWeightHist; phiWeightHist = dynamic_cast(hist->Clone(Form("wPhi_run%d", ebye.fRunNumber))); break; From 90763f18cd1f6205ce7d62d3ce752b899375e782 Mon Sep 17 00:00:00 2001 From: Pei-Ying Kuan Date: Sun, 29 Nov 2026 20:29:32 +0100 Subject: [PATCH 3/3] add parentheses --- .../MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx index 28d2362af12..bf2dddb39ce 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiparticleCumulants.cxx @@ -975,7 +975,7 @@ struct MultiparticleCumulants { // this name is used in lower-case format to nam continue; } TString histName = hist->GetName(); - if (histName.BeginsWith("wPhiReal") && doprocessRec || histName.BeginsWith("wPhiMC") && doprocessRecSim) { + if ((histName.BeginsWith("wPhiReal") && doprocessRec) || (histName.BeginsWith("wPhiMC") && doprocessRecSim)) { delete phiWeightHist; phiWeightHist = dynamic_cast(hist->Clone(Form("wPhi_run%d", ebye.fRunNumber))); break;