From f7ac10a16c53bb4cf819923b9403e3c787ddc88c Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Fri, 12 Dec 2025 15:48:36 +0100 Subject: [PATCH 1/3] add MC mean pt --- PWGCF/Flow/Tasks/flowTask.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index cff8ef2bbaf..93134baa9db 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -242,6 +242,7 @@ struct FlowTask { }; enum BootstrapHist { kMeanPtWithinGap08 = 0, + kMeanPtWithinGap08_MC, kCount_BootstrapHist }; int mRunNumber{-1}; @@ -359,6 +360,10 @@ struct FlowTask { registry.add("MCGen/MChPhi", "#phi distribution", {HistType::kTH1D, {axisPhi}}); registry.add("MCGen/MChEta", "#eta distribution", {HistType::kTH1D, {axisEta}}); registry.add("MCGen/MChPtRef", "p_{T} distribution after cut", {HistType::kTH1D, {axisPtHist}}); + registry.add("hMeanPtWithinGap08_MC", "mean p_{T}", {HistType::kTProfile, {axisIndependent}}); + for (auto i = 0; i < cfgNbootstrap; i++) { + bootstrapArray[i][kMeanPtWithinGap08_MC] = registry.add(Form("BootstrapContainer_%d/hMeanPtWithinGap08_MC", i), "", {HistType::kTProfile, {axisIndependent}}); + } } o2::framework::AxisSpec axis = axisPt; @@ -1248,16 +1253,23 @@ struct FlowTask { fGFW->Clear(); fFCptgen->clearVector(); + double ptSum_Gap08 = 0.; + double count_Gap08 = 0.; for (const auto& mcParticle : mcParticles) { if (!mcParticle.isPhysicalPrimary()) continue; bool withinPtPOI = (cfgCutPtPOIMin < mcParticle.pt()) && (mcParticle.pt() < cfgCutPtPOIMax); // within POI pT range bool withinPtRef = (cfgCutPtRefMin < mcParticle.pt()) && (mcParticle.pt() < cfgCutPtRefMax); // within RF pT range + bool withinEtaGap08 = (std::abs(mcParticle.eta()) < cfgEtaPtPt); if (withinPtRef) { registry.fill(HIST("MCGen/MChPhi"), mcParticle.phi()); registry.fill(HIST("MCGen/MChEta"), mcParticle.eta()); registry.fill(HIST("MCGen/MChPtRef"), mcParticle.pt()); + if (withinEtaGap08) { + ptSum_Gap08 += mcParticle.pt(); + count_Gap08 += 1.; + } } if (withinPtRef) fGFW->Fill(mcParticle.eta(), fPtAxis->FindBin(mcParticle.pt()) - 1, mcParticle.phi(), 1., 1); @@ -1270,6 +1282,12 @@ struct FlowTask { if (!cfgUsePtRef && withinPtPOI) fillPtSums(mcParticle, 1.); } + + if (count_Gap08 > 0) + registry.fill(HIST("hMeanPtWithinGap08_MC"), independent, ptSum_Gap08 / count_Gap08, 1.0); + int sampleIndex = static_cast(cfgNbootstrap * lRandom); + if (count_Gap08) + bootstrapArray[sampleIndex][kMeanPtWithinGap08_MC]->Fill(independent, ptSum_Gap08 / count_Gap08, 1.0); // Filling Flow Container for (uint l_ind = 0; l_ind < corrconfigs.size(); l_ind++) { From 4e1016d9807faf3b3b936126d5fbe23b7ae94541 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Fri, 12 Dec 2025 15:50:22 +0100 Subject: [PATCH 2/3] small fix --- PWGCF/Flow/Tasks/flowTask.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index 93134baa9db..a84f55f98d6 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -1286,7 +1286,7 @@ struct FlowTask { if (count_Gap08 > 0) registry.fill(HIST("hMeanPtWithinGap08_MC"), independent, ptSum_Gap08 / count_Gap08, 1.0); int sampleIndex = static_cast(cfgNbootstrap * lRandom); - if (count_Gap08) + if (count_Gap08 > 0) bootstrapArray[sampleIndex][kMeanPtWithinGap08_MC]->Fill(independent, ptSum_Gap08 / count_Gap08, 1.0); // Filling Flow Container From 818ad3fc42fd4580cafa07084490edcb9080bf01 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Fri, 12 Dec 2025 15:53:30 +0100 Subject: [PATCH 3/3] clang format --- PWGCF/Flow/Tasks/flowTask.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index a84f55f98d6..dad969af8c1 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -1282,7 +1282,7 @@ struct FlowTask { if (!cfgUsePtRef && withinPtPOI) fillPtSums(mcParticle, 1.); } - + if (count_Gap08 > 0) registry.fill(HIST("hMeanPtWithinGap08_MC"), independent, ptSum_Gap08 / count_Gap08, 1.0); int sampleIndex = static_cast(cfgNbootstrap * lRandom);