From 7d61cbe68c8e0ca7c164903832186cb55593698f Mon Sep 17 00:00:00 2001 From: Zhiyong Lu <71517277+Luzhiyongg@users.noreply.github.com> Date: Wed, 28 Oct 2026 09:05:22 +0800 Subject: [PATCH 1/3] validation for new version flowPtContainer --- PWGCF/Flow/Tasks/flowTask.cxx | 70 ++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index ec583bdabd8..0b0e5bdc212 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -244,6 +244,13 @@ struct FlowTask { std::vector> listNptV2; std::vector> listPtX; O2_DEFINE_CONFIGURABLE(cfgManualCk, bool, false, "Produce pt-pt variance") + O2_DEFINE_CONFIGURABLE(cfgNewPtContainer, bool, false, "Switch to new version of flowPtContainer. This switch will be removed after validation of new container.") + Configurable cfgNpcRegions{"cfgNpcRegions", {{"refN", "refP", "refMid", "refFull"}, {-0.8, 0.4, -0.4, -0.8},{-0.4, 0.8, 0.4, 0.8},{0, 0, 0, 0},{1, 1, 1, 1}}, "Configurations for GFW regions"}; + Configurable cfgNpcPtVnCorrConfig{"cfgNpcPtVnCorrConfig", {{"refP {pt} refN {pt}", "refP {2} refMid {pt} refN {-2}", "refP {2} refMid {pt pt} refN {-2}", "refFull {pt}", "refFull {pt pt}", "refFull {pt pt pt}", "refFull {pt pt pt pt}", "refP {pt} refMid {pt} refN {pt}"}, {"ChGapPtPt", "ChGap22pt", "ChGap22ptpt", "ChFullPt", "ChFullPtPt", "ChFullPtPtPt", "ChFullPtPtPtPt", "ChGapPtPtPtABC"},{0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0}}, "Configurations for vn-pt correlations based on new version flowPtContainer"}; + Configurable> cfgNpcGFWCorr{"cfgNpcGFWCorr", std::vector{"refN {2} refP {-2}", "refN {3} refP {-3}"}, "GFW corrconfig for new version flowPtContainer"}; + GFWRegions npcRegions; + GFWCorrConfigs npcPtVnCorrConfig; + GFW npcGfw; } cfgAdditionObs; ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.5, 4, 5, 6, 8, 10}, "pt axis for histograms"}; @@ -667,14 +674,42 @@ struct FlowTask { // Mask 1: vn-[pT], 3: vn-[pT^2], 7: vn-[pT^3], 15: vn-[pT^4] gfwConfigs.SetpTCorrMasks(cfgUserPtVnCorrConfig->GetpTCorrMasks()); gfwConfigs.Print(); - fFCpt->setUseCentralMoments(cfgUseCentralMoments); - fFCpt->setUseGapMethod(true); if (!cfgUserIO.cfgUserPtVnEvWeightEnabled) fFCpt->setEventWeight(EventWeight::UnityWeight); else fFCpt->setEventWeight(EventWeight::TupleWeight); - fFCpt->initialise(axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap); - if (cfgEtaGapPtPtEnabled) { + if (cfgAdditionObs.cfgNewPtContainer) { + cfgAdditionObs.npcRegions.SetNames(cfgAdditionObs.cfgNpcRegions->GetNames()); + cfgAdditionObs.npcRegions.SetEtaMin(cfgAdditionObs.cfgNpcRegions->GetEtaMin()); + cfgAdditionObs.npcRegions.SetEtaMax(cfgAdditionObs.cfgNpcRegions->GetEtaMax()); + cfgAdditionObs.npcRegions.SetpTDifs(cfgAdditionObs.cfgNpcRegions->GetpTDifs()); + cfgAdditionObs.npcRegions.SetBitmasks(cfgAdditionObs.cfgNpcRegions->GetBitmasks()); + cfgAdditionObs.npcPtVnCorrConfig.SetCorrs(cfgAdditionObs.cfgNpcPtVnCorrConfig->GetCorrs()); + cfgAdditionObs.npcPtVnCorrConfig.SetHeads(cfgAdditionObs.cfgNpcPtVnCorrConfig->GetHeads()); + cfgAdditionObs.npcPtVnCorrConfig.SetpTDifs(cfgAdditionObs.cfgNpcPtVnCorrConfig->GetpTDifs()); + cfgAdditionObs.npcPtVnCorrConfig.SetpTCorrMasks(cfgAdditionObs.cfgNpcPtVnCorrConfig->GetpTCorrMasks()); + cfgAdditionObs.npcRegions.Print(); + cfgAdditionObs.npcPtVnCorrConfig.Print(); + fFCpt->initialise(axisIndependent, cfgAdditionObs.npcRegions, cfgAdditionObs.npcPtVnCorrConfig, cfgNbootstrap); + + for (int region = 0; region < cfgAdditionObs.npcRegions.GetSize(); ++region) { + cfgAdditionObs.npcGfw.AddRegion(cfgAdditionObs.npcRegions.GetNames()[region], cfgAdditionObs.npcRegions.GetEtaMin()[region], + cfgAdditionObs.npcRegions.GetEtaMax()[region], 1, + cfgAdditionObs.npcRegions.GetBitmasks()[region]); + } + std::vector npcGFWCorr = cfgAdditionObs.cfgNpcGFWCorr; + if (!npcGFWCorr.empty()) { + for (uint i = 0; i < npcGFWCorr.size(); i++) { + cfgAdditionObs.npcGfw.GetCorrelatorConfig(npcGFWCorr.at(i).c_str()); + } + } + cfgAdditionObs.npcGfw.CreateRegions(); + } else { + fFCpt->setUseCentralMoments(cfgUseCentralMoments); + fFCpt->setUseGapMethod(true); + fFCpt->initialise(axisIndependent, cfgMpar, gfwConfigs, cfgNbootstrap); + } + if (!cfgAdditionObs.cfgNewPtContainer && cfgEtaGapPtPtEnabled) { for (int i = 0; i < 4; ++i) { // o2-linter: disable=magic-number (maximum of 4 subevents) if (cfgPtPtGaps->getData()[i][0] < -1. || cfgPtPtGaps->getData()[i][1] < -1.) continue; @@ -1264,6 +1299,9 @@ struct FlowTask { fGFW->Clear(); fFCpt->clearVector(); cfgAdditionObs.nPt.clear(); + if (cfgAdditionObs.cfgNewPtContainer) { + cfgAdditionObs.npcGfw.Clear(); + } if (cfgGetInteractionRate) { initHadronicRate(bc); double hadronicRate = mRateFetcher.fetch(ccdb.service, bc.timestamp(), mRunNumber, "ZNC hadronic") * 1.e-3; // @@ -1443,10 +1481,20 @@ struct FlowTask { fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 2); if (withinPtPOI && withinPtRef) fGFW->Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 4); - if (cfgUsePtRef && withinPtRef) - fillPtSums(track, weff); - if (!cfgUsePtRef && withinPtPOI) - fillPtSums(track, weff); + if (cfgAdditionObs.cfgNewPtContainer) { + fFCpt->fill(track.eta(), weff, track.pt(), 1); + if (withinPtRef) + cfgAdditionObs.npcGfw.Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 1); + if (withinPtPOI) + cfgAdditionObs.npcGfw.Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 2); + if (withinPtPOI && withinPtRef) + cfgAdditionObs.npcGfw.Fill(track.eta(), fPtAxis->FindBin(track.pt()) - 1, track.phi(), wacc * weff, 4); + } else { + if (cfgUsePtRef && withinPtRef) + fillPtSums(track, weff); + if (!cfgUsePtRef && withinPtPOI) + fillPtSums(track, weff); + } } registry.fill(HIST("hTrackCorrection2d"), nTracksUncorrected, nTracksCorrected); if (cfgUseNch && cfgUseNchCorrected) { @@ -1548,7 +1596,11 @@ struct FlowTask { fillFC(corrconfigs.at(l_ind), independent, lRandom); } // Filling pt Container - fillPtContainers(independent, lRandom); + if (cfgAdditionObs.cfgNewPtContainer) { + fFCpt->fillPtProfiles(cfgAdditionObs.npcGfw, independent, lRandom); + } else { + fillPtContainers(independent, lRandom); + } } PROCESS_SWITCH(FlowTask, processData, "Process analysis for non-derived data", true); From 0809834147df2515abc95f2fb364e392eaed7f1c Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 28 Oct 2026 01:06:48 +0000 Subject: [PATCH 2/3] Please consider the following formatting changes --- PWGCF/Flow/Tasks/flowTask.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index 0b0e5bdc212..4899ccafbd8 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -245,8 +245,8 @@ struct FlowTask { std::vector> listPtX; O2_DEFINE_CONFIGURABLE(cfgManualCk, bool, false, "Produce pt-pt variance") O2_DEFINE_CONFIGURABLE(cfgNewPtContainer, bool, false, "Switch to new version of flowPtContainer. This switch will be removed after validation of new container.") - Configurable cfgNpcRegions{"cfgNpcRegions", {{"refN", "refP", "refMid", "refFull"}, {-0.8, 0.4, -0.4, -0.8},{-0.4, 0.8, 0.4, 0.8},{0, 0, 0, 0},{1, 1, 1, 1}}, "Configurations for GFW regions"}; - Configurable cfgNpcPtVnCorrConfig{"cfgNpcPtVnCorrConfig", {{"refP {pt} refN {pt}", "refP {2} refMid {pt} refN {-2}", "refP {2} refMid {pt pt} refN {-2}", "refFull {pt}", "refFull {pt pt}", "refFull {pt pt pt}", "refFull {pt pt pt pt}", "refP {pt} refMid {pt} refN {pt}"}, {"ChGapPtPt", "ChGap22pt", "ChGap22ptpt", "ChFullPt", "ChFullPtPt", "ChFullPtPtPt", "ChFullPtPtPtPt", "ChGapPtPtPtABC"},{0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0}}, "Configurations for vn-pt correlations based on new version flowPtContainer"}; + Configurable cfgNpcRegions{"cfgNpcRegions", {{"refN", "refP", "refMid", "refFull"}, {-0.8, 0.4, -0.4, -0.8}, {-0.4, 0.8, 0.4, 0.8}, {0, 0, 0, 0}, {1, 1, 1, 1}}, "Configurations for GFW regions"}; + Configurable cfgNpcPtVnCorrConfig{"cfgNpcPtVnCorrConfig", {{"refP {pt} refN {pt}", "refP {2} refMid {pt} refN {-2}", "refP {2} refMid {pt pt} refN {-2}", "refFull {pt}", "refFull {pt pt}", "refFull {pt pt pt}", "refFull {pt pt pt pt}", "refP {pt} refMid {pt} refN {pt}"}, {"ChGapPtPt", "ChGap22pt", "ChGap22ptpt", "ChFullPt", "ChFullPtPt", "ChFullPtPtPt", "ChFullPtPtPtPt", "ChGapPtPtPtABC"}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}}, "Configurations for vn-pt correlations based on new version flowPtContainer"}; Configurable> cfgNpcGFWCorr{"cfgNpcGFWCorr", std::vector{"refN {2} refP {-2}", "refN {3} refP {-3}"}, "GFW corrconfig for new version flowPtContainer"}; GFWRegions npcRegions; GFWCorrConfigs npcPtVnCorrConfig; @@ -694,8 +694,8 @@ struct FlowTask { for (int region = 0; region < cfgAdditionObs.npcRegions.GetSize(); ++region) { cfgAdditionObs.npcGfw.AddRegion(cfgAdditionObs.npcRegions.GetNames()[region], cfgAdditionObs.npcRegions.GetEtaMin()[region], - cfgAdditionObs.npcRegions.GetEtaMax()[region], 1, - cfgAdditionObs.npcRegions.GetBitmasks()[region]); + cfgAdditionObs.npcRegions.GetEtaMax()[region], 1, + cfgAdditionObs.npcRegions.GetBitmasks()[region]); } std::vector npcGFWCorr = cfgAdditionObs.cfgNpcGFWCorr; if (!npcGFWCorr.empty()) { From 28dc7f1ec95a838d084d0a905477c3c6108ce2b3 Mon Sep 17 00:00:00 2001 From: Zhiyong Lu <71517277+Luzhiyongg@users.noreply.github.com> Date: Wed, 28 Oct 2026 09:47:07 +0800 Subject: [PATCH 3/3] fix code-check error --- PWGCF/Flow/Tasks/flowTask.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowTask.cxx b/PWGCF/Flow/Tasks/flowTask.cxx index 4899ccafbd8..ef7ace49c6a 100644 --- a/PWGCF/Flow/Tasks/flowTask.cxx +++ b/PWGCF/Flow/Tasks/flowTask.cxx @@ -1154,9 +1154,9 @@ struct FlowTask { template bool trackSelected(const TTrack& track) { - if (cfgTrackCuts->getData()[kDCAxyNSigma][kTrCutObs] && (std::fabs(track.dcaXY()) > cfgFuncParas.fPtDepDCAxy->Eval(track.pt()))) + if (cfgTrackCuts->getData()[kDCAxyNSigma][kTrCutObs] && cfgFuncParas.fPtDepDCAxy != nullptr && (std::fabs(track.dcaXY()) > cfgFuncParas.fPtDepDCAxy->Eval(track.pt()))) return false; - if (cfgTrackCuts->getData()[kDCAzNSigma][kTrCutObs] && (std::fabs(track.dcaZ()) > cfgFuncParas.fPtDepDCAz->Eval(track.pt()))) + if (cfgTrackCuts->getData()[kDCAzNSigma][kTrCutObs] && cfgFuncParas.fPtDepDCAz != nullptr && (std::fabs(track.dcaZ()) > cfgFuncParas.fPtDepDCAz->Eval(track.pt()))) return false; return ((track.tpcNClsFound() >= cfgTrackCuts->getData()[kTPCclu][kTrCutObs]) && (track.tpcNClsCrossedRows() >= cfgTrackCuts->getData()[kTPCCrossedRows][kTrCutObs]) && (track.itsNCls() >= cfgTrackCuts->getData()[kITSclu][kTrCutObs]) && (track.tpcChi2NCl() < cfgTrackCuts->getData()[kChi2prTPCcls][kTrCutObs]) && (std::fabs(track.dcaZ()) < cfgTrackCuts->getData()[kDCAz][kTrCutObs])); } @@ -1164,9 +1164,9 @@ struct FlowTask { template bool trackSelectedForNch(const TTrack& track) { - if (cfgTrackCuts->getData()[kDCAxyNSigma][kTrCutNch] && (std::fabs(track.dcaXY()) > cfgFuncParas.fPtDepDCAxyForNch->Eval(track.pt()))) + if (cfgTrackCuts->getData()[kDCAxyNSigma][kTrCutNch] && cfgFuncParas.fPtDepDCAxyForNch != nullptr && (std::fabs(track.dcaXY()) > cfgFuncParas.fPtDepDCAxyForNch->Eval(track.pt()))) return false; - if (cfgTrackCuts->getData()[kDCAzNSigma][kTrCutNch] && (std::fabs(track.dcaZ()) > cfgFuncParas.fPtDepDCAzForNch->Eval(track.pt()))) + if (cfgTrackCuts->getData()[kDCAzNSigma][kTrCutNch] && cfgFuncParas.fPtDepDCAzForNch != nullptr && (std::fabs(track.dcaZ()) > cfgFuncParas.fPtDepDCAzForNch->Eval(track.pt()))) return false; return ((track.tpcNClsFound() >= cfgTrackCuts->getData()[kTPCclu][kTrCutNch]) && (track.tpcNClsCrossedRows() >= cfgTrackCuts->getData()[kTPCCrossedRows][kTrCutNch]) && (track.itsNCls() >= cfgTrackCuts->getData()[kITSclu][kTrCutNch]) && (track.tpcChi2NCl() < cfgTrackCuts->getData()[kChi2prTPCcls][kTrCutNch]) && (std::fabs(track.dcaZ()) < cfgTrackCuts->getData()[kDCAz][kTrCutNch])); }