From 9e1fbae112456f70685a88f34801dd6603434b87 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Wed, 19 Nov 2025 13:23:56 +0100 Subject: [PATCH 1/7] separate max eta range for full region and subevent region --- PWGCF/Flow/Tasks/flowTask.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index c686f4a5de7..1d89d047e1e 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -73,7 +73,8 @@ struct FlowTask { O2_DEFINE_CONFIGURABLE(cfgCutPtMax, float, 10.0f, "Maximal pT for all tracks") O2_DEFINE_CONFIGURABLE(cfgCutEta, float, 0.8f, "Eta range for tracks") O2_DEFINE_CONFIGURABLE(cfgEtaPtPt, float, 0.4, "eta range for pt-pt correlations") - O2_DEFINE_CONFIGURABLE(cfgEtaGapPtPt, float, 0.2, "eta gap for pt-pt correlations, cfgEtaGapPtPt<|eta|fill(1., track.pt()) : fFCpt->fill(weff, track.pt()); + } + + if (std::abs(track.eta()) < cfgEtaSubPtPt) { if (cfgEtaGapPtPtEnabled) { if (track.eta() < -1. * cfgEtaGapPtPt) { (dt == kGen) ? fFCptgen->fillSub1(1., track.pt()) : fFCpt->fillSub1(weff, track.pt()); From 87eb2875c4d47522c559f3bc2c0c43f7cd367043 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Wed, 19 Nov 2025 13:26:21 +0100 Subject: [PATCH 2/7] clang format --- PWGCF/Flow/Tasks/flowTask.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index 1d89d047e1e..0bd4be599dd 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -658,7 +658,6 @@ struct FlowTask { if (std::abs(track.eta()) < cfgEtaPtPt) { (dt == kGen) ? fFCptgen->fill(1., track.pt()) : fFCpt->fill(weff, track.pt()); } - if (std::abs(track.eta()) < cfgEtaSubPtPt) { if (cfgEtaGapPtPtEnabled) { if (track.eta() < -1. * cfgEtaGapPtPt) { From e164201426b0a833ffe085c1b7792d2171fc7537 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 20 Nov 2025 12:37:04 +0100 Subject: [PATCH 3/7] add bootstrap sample for mean pT hist --- PWGCF/Flow/Tasks/flowTask.cxx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index 0bd4be599dd..5640fa90cfe 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -110,6 +110,7 @@ struct FlowTask { O2_DEFINE_CONFIGURABLE(cfgAcceptance, std::string, "", "CCDB path to acceptance object") O2_DEFINE_CONFIGURABLE(cfgUseSmallMemory, bool, false, "Use small memory mode") O2_DEFINE_CONFIGURABLE(cfgTrackDensityCorrUse, bool, false, "Use track density efficiency correction") + O2_DEFINE_CONFIGURABLE(cfgUseUnityEventWeightForPt, bool, true, "Use unity event weight for mean pT") O2_DEFINE_CONFIGURABLE(cfgUseCentralMoments, bool, true, "Use central moments in vn-pt calculations") O2_DEFINE_CONFIGURABLE(cfgUsePtRef, bool, true, "Use refernce pt range for pt container (if you are checking the spectra, you need to extent it)") O2_DEFINE_CONFIGURABLE(cfgMpar, int, 4, "Highest order of pt-pt correlations") @@ -218,6 +219,7 @@ struct FlowTask { std::vector corrconfigsPtVn; TAxis* fPtAxis; TRandom3* fRndm = new TRandom3(0); + std::vector>> bootstrapArray; int lastRunNumber = -1; std::vector runNumbers; std::map> th3sPerRun; // map of TH3 histograms for all runs @@ -238,6 +240,10 @@ struct FlowTask { kLowDptCut = 1, kHighDptCut = 2 }; + enum BootstrapHist { + kMeanPtWithinGap08 = 0, + kCount_BootstrapHist + }; int mRunNumber{-1}; uint64_t mSOR{0}; double mMinSeconds{-1.}; @@ -334,6 +340,14 @@ struct FlowTask { registry.add("hTrackCorrection2d", "Correlation table for number of tracks table; uncorrected track; corrected track", {HistType::kTH2D, {axisNch, axisNch}}); registry.add("hMeanPt", "", {HistType::kTProfile, {axisIndependent}}); registry.add("hMeanPtWithinGap08", "", {HistType::kTProfile, {axisIndependent}}); + // initial array + bootstrapArray.resize(cfgNbootstrap); + for (int i = 0; i < cfgNbootstrap; i++) { + bootstrapArray[i].resize(kCount_ExtraProfile); + } + for (auto i = 0; i < cfgNbootstrap; i++) { + bootstrapArray[i][kMeanPtWithinGap08] = registry.add(Form("BootstrapContainer_%d/hMeanPtWithinGap08", i), "", {HistType::kTProfile, {axisIndependent}}); + } registry.add("c22_gap08_Weff", "", {HistType::kTProfile, {axisIndependent}}); registry.add("c22_gap08_trackMeanPt", "", {HistType::kTProfile, {axisIndependent}}); registry.add("PtVariance_partA_WithinGap08", "", {HistType::kTProfile, {axisIndependent}}); @@ -1157,7 +1171,10 @@ struct FlowTask { registry.fill(HIST("hMeanPt"), independent, ptSum / weffEvent, weffEvent); } if (weffEventWithinGap08) - registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, weffEventWithinGap08); + registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, cfgUseUnityEventWeightForPt ? 1.0 : weffEventWithinGap08); + int sampleIndex = static_cast(cfgNbootstrap * lRandom); + if (weffEventWithinGap08) + bootstrapArray[sampleIndex][kMeanPtWithinGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, cfgUseUnityEventWeightForPt ? 1.0 : weffEventWithinGap08); // c22_gap8 * pt_withGap8 if (weffEventWithinGap08) fillpTvnProfile(corrconfigs.at(7), ptSum_Gap08, weffEventWithinGap08, HIST("c22_gap08_Weff"), HIST("c22_gap08_trackMeanPt"), independent); From eaa5fcee1e1dde3f9ac81828876da28bb7b16925 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 20 Nov 2025 12:39:08 +0100 Subject: [PATCH 4/7] 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 5640fa90cfe..df83174560b 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -1174,7 +1174,7 @@ struct FlowTask { registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, cfgUseUnityEventWeightForPt ? 1.0 : weffEventWithinGap08); int sampleIndex = static_cast(cfgNbootstrap * lRandom); if (weffEventWithinGap08) - bootstrapArray[sampleIndex][kMeanPtWithinGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, cfgUseUnityEventWeightForPt ? 1.0 : weffEventWithinGap08); + bootstrapArray[sampleIndex][kMeanPtWithinGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, cfgUseUnityEventWeightForPt ? 1.0 : weffEventWithinGap08); // c22_gap8 * pt_withGap8 if (weffEventWithinGap08) fillpTvnProfile(corrconfigs.at(7), ptSum_Gap08, weffEventWithinGap08, HIST("c22_gap08_Weff"), HIST("c22_gap08_trackMeanPt"), independent); From d6fef1cb2aba5b48afd8936f35add6a62110ceb2 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 20 Nov 2025 14:05:21 +0100 Subject: [PATCH 5/7] 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 df83174560b..add79e3aeeb 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -343,7 +343,7 @@ struct FlowTask { // initial array bootstrapArray.resize(cfgNbootstrap); for (int i = 0; i < cfgNbootstrap; i++) { - bootstrapArray[i].resize(kCount_ExtraProfile); + bootstrapArray[i].resize(kCount_BootstrapHist); } for (auto i = 0; i < cfgNbootstrap; i++) { bootstrapArray[i][kMeanPtWithinGap08] = registry.add(Form("BootstrapContainer_%d/hMeanPtWithinGap08", i), "", {HistType::kTProfile, {axisIndependent}}); From 2cc3bc9888517b9a1e6bcc33eb4a29ec0bb6fda3 Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 20 Nov 2025 14:53:21 +0100 Subject: [PATCH 6/7] remove one configurable --- PWGCF/Flow/Tasks/flowTask.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index add79e3aeeb..56c1b872955 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -110,7 +110,6 @@ struct FlowTask { O2_DEFINE_CONFIGURABLE(cfgAcceptance, std::string, "", "CCDB path to acceptance object") O2_DEFINE_CONFIGURABLE(cfgUseSmallMemory, bool, false, "Use small memory mode") O2_DEFINE_CONFIGURABLE(cfgTrackDensityCorrUse, bool, false, "Use track density efficiency correction") - O2_DEFINE_CONFIGURABLE(cfgUseUnityEventWeightForPt, bool, true, "Use unity event weight for mean pT") O2_DEFINE_CONFIGURABLE(cfgUseCentralMoments, bool, true, "Use central moments in vn-pt calculations") O2_DEFINE_CONFIGURABLE(cfgUsePtRef, bool, true, "Use refernce pt range for pt container (if you are checking the spectra, you need to extent it)") O2_DEFINE_CONFIGURABLE(cfgMpar, int, 4, "Highest order of pt-pt correlations") @@ -173,6 +172,7 @@ struct FlowTask { TF1* fPtDepDCAxy = nullptr; O2_DEFINE_CONFIGURABLE(cfgDCAxyNSigma, float, 0, "0: disable; Cut on number of sigma deviations from expected DCA in the transverse direction, nsigma=7 is the same with global track"); O2_DEFINE_CONFIGURABLE(cfgDCAxy, std::string, "(0.0026+0.005/(x^1.01))", "Functional form of pt-dependent DCAxy cut"); + O2_DEFINE_CONFIGURABLE(cfgUseUnityEventWeightForPt, bool, true, "Use unity event weight for mean pT") } cfgFuncParas; ConfigurableAxis axisPtHist{"axisPtHist", {100, 0., 10.}, "pt axis for histograms"}; @@ -1171,10 +1171,10 @@ struct FlowTask { registry.fill(HIST("hMeanPt"), independent, ptSum / weffEvent, weffEvent); } if (weffEventWithinGap08) - registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, cfgUseUnityEventWeightForPt ? 1.0 : weffEventWithinGap08); + registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, cfgFuncParas.cfgUseUnityEventWeightForPt ? 1.0 : weffEventWithinGap08); int sampleIndex = static_cast(cfgNbootstrap * lRandom); if (weffEventWithinGap08) - bootstrapArray[sampleIndex][kMeanPtWithinGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, cfgUseUnityEventWeightForPt ? 1.0 : weffEventWithinGap08); + bootstrapArray[sampleIndex][kMeanPtWithinGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, cfgFuncParas.cfgUseUnityEventWeightForPt ? 1.0 : weffEventWithinGap08); // c22_gap8 * pt_withGap8 if (weffEventWithinGap08) fillpTvnProfile(corrconfigs.at(7), ptSum_Gap08, weffEventWithinGap08, HIST("c22_gap08_Weff"), HIST("c22_gap08_trackMeanPt"), independent); From 8ff330c2ffdef9eee2963188cca869032736983a Mon Sep 17 00:00:00 2001 From: Luzhiyongg <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 20 Nov 2025 14:56:18 +0100 Subject: [PATCH 7/7] remove one configurable --- PWGCF/Flow/Tasks/flowTask.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index 56c1b872955..463d03cc410 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -172,7 +172,6 @@ struct FlowTask { TF1* fPtDepDCAxy = nullptr; O2_DEFINE_CONFIGURABLE(cfgDCAxyNSigma, float, 0, "0: disable; Cut on number of sigma deviations from expected DCA in the transverse direction, nsigma=7 is the same with global track"); O2_DEFINE_CONFIGURABLE(cfgDCAxy, std::string, "(0.0026+0.005/(x^1.01))", "Functional form of pt-dependent DCAxy cut"); - O2_DEFINE_CONFIGURABLE(cfgUseUnityEventWeightForPt, bool, true, "Use unity event weight for mean pT") } cfgFuncParas; ConfigurableAxis axisPtHist{"axisPtHist", {100, 0., 10.}, "pt axis for histograms"}; @@ -1171,10 +1170,10 @@ struct FlowTask { registry.fill(HIST("hMeanPt"), independent, ptSum / weffEvent, weffEvent); } if (weffEventWithinGap08) - registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, cfgFuncParas.cfgUseUnityEventWeightForPt ? 1.0 : weffEventWithinGap08); + registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, 1.0); int sampleIndex = static_cast(cfgNbootstrap * lRandom); if (weffEventWithinGap08) - bootstrapArray[sampleIndex][kMeanPtWithinGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, cfgFuncParas.cfgUseUnityEventWeightForPt ? 1.0 : weffEventWithinGap08); + bootstrapArray[sampleIndex][kMeanPtWithinGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, 1.0); // c22_gap8 * pt_withGap8 if (weffEventWithinGap08) fillpTvnProfile(corrconfigs.at(7), ptSum_Gap08, weffEventWithinGap08, HIST("c22_gap08_Weff"), HIST("c22_gap08_trackMeanPt"), independent);