From 5b348c63e03825fd609f716cad339ce9e6805c0d Mon Sep 17 00:00:00 2001 From: Zhiyong Lu <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 27 Aug 2026 10:56:09 +0800 Subject: [PATCH 1/3] event weight option for mean pT --- PWGCF/Flow/Tasks/flowTask.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index bb30eddfe97..ec4788de195 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -1478,7 +1478,7 @@ struct FlowTask { registry.fill(HIST("hMeanPt"), independent, ptSum / weffEvent, weffEvent); } if (weffEventWithinGap08) - registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, 1.0); + registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, (cfgUserPtVnEvWeightEnabled == EventWeight::UnityWeight) ? 1.0 : weffEventWithinGap08); if (weffEventWithinGap08) bootstrapArray[sampleIndex][kMeanPtWithinGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, 1.0); // c22_gap8 * pt_withGap8 @@ -1583,7 +1583,7 @@ struct FlowTask { } if (count_Gap08 > 0) - registry.fill(HIST("hMeanPtWithinGap08_MC"), independent, ptSum_Gap08 / count_Gap08, 1.0); + registry.fill(HIST("hMeanPtWithinGap08_MC"), independent, ptSum_Gap08 / count_Gap08, (cfgUserPtVnEvWeightEnabled == EventWeight::UnityWeight) ? 1.0 : count_Gap08); int sampleIndex = static_cast(cfgNbootstrap * lRandom); if (count_Gap08 > 0) bootstrapArray[sampleIndex][kMeanPtWithinGap08_MC]->Fill(independent, ptSum_Gap08 / count_Gap08, 1.0); From 302fef7093c5aec7c1550135f659c0ff19ce1b15 Mon Sep 17 00:00:00 2001 From: Zhiyong Lu <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 27 Aug 2026 10:58:54 +0800 Subject: [PATCH 2/3] fix logic --- PWGCF/Flow/Tasks/flowTask.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index ec4788de195..4a52fec13b1 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -1478,7 +1478,7 @@ struct FlowTask { registry.fill(HIST("hMeanPt"), independent, ptSum / weffEvent, weffEvent); } if (weffEventWithinGap08) - registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, (cfgUserPtVnEvWeightEnabled == EventWeight::UnityWeight) ? 1.0 : weffEventWithinGap08); + registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, cfgUserPtVnEvWeightEnabled ? weffEventWithinGap08 : 1.); if (weffEventWithinGap08) bootstrapArray[sampleIndex][kMeanPtWithinGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, 1.0); // c22_gap8 * pt_withGap8 @@ -1583,7 +1583,7 @@ struct FlowTask { } if (count_Gap08 > 0) - registry.fill(HIST("hMeanPtWithinGap08_MC"), independent, ptSum_Gap08 / count_Gap08, (cfgUserPtVnEvWeightEnabled == EventWeight::UnityWeight) ? 1.0 : count_Gap08); + registry.fill(HIST("hMeanPtWithinGap08_MC"), independent, ptSum_Gap08 / count_Gap08, cfgUserPtVnEvWeightEnabled ? count_Gap08 : 1.); int sampleIndex = static_cast(cfgNbootstrap * lRandom); if (count_Gap08 > 0) bootstrapArray[sampleIndex][kMeanPtWithinGap08_MC]->Fill(independent, ptSum_Gap08 / count_Gap08, 1.0); From ea19dd60c9fb593c87da68485821525312c9036c Mon Sep 17 00:00:00 2001 From: Zhiyong Lu <71517277+Luzhiyongg@users.noreply.github.com> Date: Thu, 27 Aug 2026 11:11:35 +0800 Subject: [PATCH 3/3] fix usage --- PWGCF/Flow/Tasks/flowTask.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index 4a52fec13b1..cc52045a35b 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -1478,7 +1478,7 @@ struct FlowTask { registry.fill(HIST("hMeanPt"), independent, ptSum / weffEvent, weffEvent); } if (weffEventWithinGap08) - registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, cfgUserPtVnEvWeightEnabled ? weffEventWithinGap08 : 1.); + registry.fill(HIST("hMeanPtWithinGap08"), independent, ptSum_Gap08 / weffEventWithinGap08, cfgUserIO.cfgUserPtVnEvWeightEnabled ? weffEventWithinGap08 : 1.); if (weffEventWithinGap08) bootstrapArray[sampleIndex][kMeanPtWithinGap08]->Fill(independent, ptSum_Gap08 / weffEventWithinGap08, 1.0); // c22_gap8 * pt_withGap8 @@ -1583,7 +1583,7 @@ struct FlowTask { } if (count_Gap08 > 0) - registry.fill(HIST("hMeanPtWithinGap08_MC"), independent, ptSum_Gap08 / count_Gap08, cfgUserPtVnEvWeightEnabled ? count_Gap08 : 1.); + registry.fill(HIST("hMeanPtWithinGap08_MC"), independent, ptSum_Gap08 / count_Gap08, cfgUserIO.cfgUserPtVnEvWeightEnabled ? count_Gap08 : 1.); int sampleIndex = static_cast(cfgNbootstrap * lRandom); if (count_Gap08 > 0) bootstrapArray[sampleIndex][kMeanPtWithinGap08_MC]->Fill(independent, ptSum_Gap08 / count_Gap08, 1.0);