From 455b49b1f7429a7e7d02916dc647b4d74d477fdf Mon Sep 17 00:00:00 2001 From: CyF1rmiana <3326561594@qq.com> Date: Thu, 26 Jun 2025 14:45:42 +0800 Subject: [PATCH 01/10] Add files for q2 calculation --- PWGCF/Flow/Tasks/CMakeLists.txt | 5 + PWGCF/Flow/Tasks/flowEseCorre.cxx | 193 ++++++++++++++++++++++++++++++ 2 files changed, 198 insertions(+) create mode 100644 PWGCF/Flow/Tasks/flowEseCorre.cxx diff --git a/PWGCF/Flow/Tasks/CMakeLists.txt b/PWGCF/Flow/Tasks/CMakeLists.txt index c59895487cf..21c16f1ca69 100644 --- a/PWGCF/Flow/Tasks/CMakeLists.txt +++ b/PWGCF/Flow/Tasks/CMakeLists.txt @@ -83,3 +83,8 @@ o2physics_add_dpl_workflow(flow-ese-p-he3 SOURCES flowEsePHe3.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::GFWCore COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(flow-ese-corre + SOURCES flowEseCorre.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::GFWCore + COMPONENT_NAME Analysis) diff --git a/PWGCF/Flow/Tasks/flowEseCorre.cxx b/PWGCF/Flow/Tasks/flowEseCorre.cxx new file mode 100644 index 00000000000..c124f8be1e6 --- /dev/null +++ b/PWGCF/Flow/Tasks/flowEseCorre.cxx @@ -0,0 +1,193 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// C++/ROOT includes. +#include +#include +#include +#include +#include +#include +#include +#include + +// o2Physics includes. +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/runDataProcessing.h" +#include "Framework/RunningWorkflowInfo.h" +#include "Framework/StaticFor.h" + +#include "Common/DataModel/Qvectors.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/TrackSelectionTables.h" +#include "Common/DataModel/Centrality.h" +#include "Common/Core/EventPlaneHelper.h" +#include "Common/Core/TrackSelection.h" + +#include "CommonConstants/PhysicsConstants.h" + +// o2 includes. + +using namespace o2; +using namespace o2::framework; + +using MyCollisions = soa::Join; +using MyTracks = soa::Join; +using BCsWithRun3Matchings = soa::Join; + +struct flowEseCorre +{ + HistogramRegistry histosQA{"histosQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; + + Configurable> cfgnMods{"cfgnMods", {2}, "Modulation of interest"}; + Configurable cfgDetName{"cfgDetName", "FT0C", "The name of detector to be analyzed"}; + Configurable cfgRefAName{"cfgRefAName", "TPCpos", "The name of detector for reference A"}; + Configurable cfgRefBName{"cfgRefBName", "TPCneg", "The name of detector for reference B"}; + + Configurable cfgMinPt{"cfgMinPt", 0.15, "Minimum transverse momentum for charged track"}; + Configurable cfgMaxEta{"cfgMaxEta", 0.8, "Maximum pseudorapidiy for charged track"}; + Configurable cfgMaxDCArToPVcut{"cfgMaxDCArToPVcut", 0.1, "Maximum transverse DCA"}; + Configurable cfgMaxDCAzToPVcut{"cfgMaxDCAzToPVcut", 1.0, "Maximum longitudinal DCA"}; + + ConfigurableAxis cfgaxisQvecF{"cfgaxisQvecF", {300, -1, 1}, ""}; + ConfigurableAxis cfgaxisQvec{"cfgaxisQvec", {100, -3, 3}, ""}; + ConfigurableAxis cfgaxisCent{"cfgaxisCent", {100, 0, 100}, ""}; + + ConfigurableAxis cfgaxiscos{"cfgaxiscos", {102, -1.02, 1.02}, ""}; + ConfigurableAxis cfgaxispt{"cfgaxispt", {100, 0, 10}, ""}; + ConfigurableAxis cfgaxisCentMerged{"cfgaxisCentMerged", {20, 0, 100}, ""}; + ConfigurableAxis cfgaxisMultnum{"cfgaxisMultnum", {300, 0, 3000}, ""}; + + EventPlaneHelper helperEP; + + void init(InitContext const &) + { + AxisSpec axisCent{cfgaxisCent, "centrality"}; + AxisSpec axisQvec{cfgaxisQvec, "Q"}; + AxisSpec axisQvecF{cfgaxisQvecF, "Q"}; + AxisSpec axisEvtPl = {100, -1.0 * constants::math::PI, constants::math::PI}; + + AxisSpec axisCos{cfgaxiscos, "angle function"}; + AxisSpec axisPt{cfgaxispt, "trasverse momentum"}; + AxisSpec axisCentMerged{cfgaxisCentMerged, "merged centrality"}; + AxisSpec axisMultnum{cfgaxisMultnum, "statistic of mult"}; + + histosQA.add(Form("histQvecV2"), "", {HistType::kTH3F, {axisQvecF, axisQvecF, axisCent}}); + histosQA.add(Form("histEvtPlV2"), "", {HistType::kTH2F, {axisEvtPl, axisCent}}); + histosQA.add(Form("histQvecRes_SigRefAV2"), "", {HistType::kTH2F, {axisQvecF, axisCent}}); + histosQA.add(Form("histCosDetV2"), "", {HistType::kTH3F, {axisCentMerged, axisPt, axisCos}}); + histosQA.add(Form("histMult_Cent"), "", {HistType::kTH2F, {axisMultnum, axisCent}}); + } + + template + bool SelEvent(const CollType &collision) + { + if (!collision.sel8()) + { + return 0; + } + if (!collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) + { + return 0; + } + if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)) + { + return 0; + } + if (!collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) + { + return 0; + } + + return 1; + } + + template + bool SelTrack(const TrackType track) + { + if (track.pt() < cfgMinPt) + return false; + if (std::abs(track.eta()) > cfgMaxEta) + return false; + if (!track.passedITSNCls()) + return false; + if (!track.passedITSChi2NDF()) + return false; + if (!track.passedITSHits()) + return false; + if (!track.passedTPCCrossedRowsOverNCls()) + return false; + if (!track.passedTPCChi2NDF()) + return false; + if (!track.passedDCAxy()) + return false; + if (!track.passedDCAz()) + return false; + + return true; + } + + template + void fillHistosQvec(const CollType &collision, int nmode) + { + if (nmode == 2) + { + histosQA.fill(HIST("histQvecV2"), collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], collision.centFT0C()); + histosQA.fill(HIST("histEvtPlV2"), helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), collision.centFT0C()); + histosQA.fill(HIST("histQvecRes_SigRefAV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), helperEP.GetEventPlane(collision.qvecTPCposReVec()[0], collision.qvecTPCposImVec()[0], nmode), nmode), collision.centFT0C()); + histosQA.fill(HIST("histMult_Cent"), collision.sumAmplFT0C(), collision.centFT0C()); + } + } + + template + void fillHistosFlow(const CollType &collision, const TrackType &track, int nmode) + { + if (collision.sumAmplFT0C() < 1e-4) + { + return; + } + for (auto &trk : track) + { + if (!SelTrack(trk)) + { + continue; + } + if (nmode == 2) + { + histosQA.fill(HIST("histCosDetV2"), collision.centFT0C(), trk.pt(), + std::cos(static_cast(nmode) * (trk.phi() - helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode)))); + } + } + } + + void process(MyCollisions::iterator const &collision, MyTracks const &tracks) + { + if (!SelEvent(collision)) + { + return; + } + for (std::size_t i = 0; i < cfgnMods->size(); i++) + { + fillHistosQvec(collision, cfgnMods->at(i)); + fillHistosFlow(collision, tracks, cfgnMods->at(i)); + } + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) +{ + return WorkflowSpec{ + adaptAnalysisTask(cfgc)}; +} From 329d23ccc60238fce36d871d2afb2f6eb6133907 Mon Sep 17 00:00:00 2001 From: CyF1rmiana <3326561594@qq.com> Date: Thu, 26 Jun 2025 14:57:11 +0800 Subject: [PATCH 02/10] modify the illustration --- PWGCF/Flow/Tasks/flowEseCorre.cxx | 193 ------------------------------ 1 file changed, 193 deletions(-) delete mode 100644 PWGCF/Flow/Tasks/flowEseCorre.cxx diff --git a/PWGCF/Flow/Tasks/flowEseCorre.cxx b/PWGCF/Flow/Tasks/flowEseCorre.cxx deleted file mode 100644 index c124f8be1e6..00000000000 --- a/PWGCF/Flow/Tasks/flowEseCorre.cxx +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. -// -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -// C++/ROOT includes. -#include -#include -#include -#include -#include -#include -#include -#include - -// o2Physics includes. -#include "Framework/AnalysisDataModel.h" -#include "Framework/AnalysisTask.h" -#include "Framework/ASoAHelpers.h" -#include "Framework/HistogramRegistry.h" -#include "Framework/runDataProcessing.h" -#include "Framework/RunningWorkflowInfo.h" -#include "Framework/StaticFor.h" - -#include "Common/DataModel/Qvectors.h" -#include "Common/DataModel/EventSelection.h" -#include "Common/DataModel/TrackSelectionTables.h" -#include "Common/DataModel/Centrality.h" -#include "Common/Core/EventPlaneHelper.h" -#include "Common/Core/TrackSelection.h" - -#include "CommonConstants/PhysicsConstants.h" - -// o2 includes. - -using namespace o2; -using namespace o2::framework; - -using MyCollisions = soa::Join; -using MyTracks = soa::Join; -using BCsWithRun3Matchings = soa::Join; - -struct flowEseCorre -{ - HistogramRegistry histosQA{"histosQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; - - Configurable> cfgnMods{"cfgnMods", {2}, "Modulation of interest"}; - Configurable cfgDetName{"cfgDetName", "FT0C", "The name of detector to be analyzed"}; - Configurable cfgRefAName{"cfgRefAName", "TPCpos", "The name of detector for reference A"}; - Configurable cfgRefBName{"cfgRefBName", "TPCneg", "The name of detector for reference B"}; - - Configurable cfgMinPt{"cfgMinPt", 0.15, "Minimum transverse momentum for charged track"}; - Configurable cfgMaxEta{"cfgMaxEta", 0.8, "Maximum pseudorapidiy for charged track"}; - Configurable cfgMaxDCArToPVcut{"cfgMaxDCArToPVcut", 0.1, "Maximum transverse DCA"}; - Configurable cfgMaxDCAzToPVcut{"cfgMaxDCAzToPVcut", 1.0, "Maximum longitudinal DCA"}; - - ConfigurableAxis cfgaxisQvecF{"cfgaxisQvecF", {300, -1, 1}, ""}; - ConfigurableAxis cfgaxisQvec{"cfgaxisQvec", {100, -3, 3}, ""}; - ConfigurableAxis cfgaxisCent{"cfgaxisCent", {100, 0, 100}, ""}; - - ConfigurableAxis cfgaxiscos{"cfgaxiscos", {102, -1.02, 1.02}, ""}; - ConfigurableAxis cfgaxispt{"cfgaxispt", {100, 0, 10}, ""}; - ConfigurableAxis cfgaxisCentMerged{"cfgaxisCentMerged", {20, 0, 100}, ""}; - ConfigurableAxis cfgaxisMultnum{"cfgaxisMultnum", {300, 0, 3000}, ""}; - - EventPlaneHelper helperEP; - - void init(InitContext const &) - { - AxisSpec axisCent{cfgaxisCent, "centrality"}; - AxisSpec axisQvec{cfgaxisQvec, "Q"}; - AxisSpec axisQvecF{cfgaxisQvecF, "Q"}; - AxisSpec axisEvtPl = {100, -1.0 * constants::math::PI, constants::math::PI}; - - AxisSpec axisCos{cfgaxiscos, "angle function"}; - AxisSpec axisPt{cfgaxispt, "trasverse momentum"}; - AxisSpec axisCentMerged{cfgaxisCentMerged, "merged centrality"}; - AxisSpec axisMultnum{cfgaxisMultnum, "statistic of mult"}; - - histosQA.add(Form("histQvecV2"), "", {HistType::kTH3F, {axisQvecF, axisQvecF, axisCent}}); - histosQA.add(Form("histEvtPlV2"), "", {HistType::kTH2F, {axisEvtPl, axisCent}}); - histosQA.add(Form("histQvecRes_SigRefAV2"), "", {HistType::kTH2F, {axisQvecF, axisCent}}); - histosQA.add(Form("histCosDetV2"), "", {HistType::kTH3F, {axisCentMerged, axisPt, axisCos}}); - histosQA.add(Form("histMult_Cent"), "", {HistType::kTH2F, {axisMultnum, axisCent}}); - } - - template - bool SelEvent(const CollType &collision) - { - if (!collision.sel8()) - { - return 0; - } - if (!collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) - { - return 0; - } - if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)) - { - return 0; - } - if (!collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) - { - return 0; - } - - return 1; - } - - template - bool SelTrack(const TrackType track) - { - if (track.pt() < cfgMinPt) - return false; - if (std::abs(track.eta()) > cfgMaxEta) - return false; - if (!track.passedITSNCls()) - return false; - if (!track.passedITSChi2NDF()) - return false; - if (!track.passedITSHits()) - return false; - if (!track.passedTPCCrossedRowsOverNCls()) - return false; - if (!track.passedTPCChi2NDF()) - return false; - if (!track.passedDCAxy()) - return false; - if (!track.passedDCAz()) - return false; - - return true; - } - - template - void fillHistosQvec(const CollType &collision, int nmode) - { - if (nmode == 2) - { - histosQA.fill(HIST("histQvecV2"), collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], collision.centFT0C()); - histosQA.fill(HIST("histEvtPlV2"), helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), collision.centFT0C()); - histosQA.fill(HIST("histQvecRes_SigRefAV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), helperEP.GetEventPlane(collision.qvecTPCposReVec()[0], collision.qvecTPCposImVec()[0], nmode), nmode), collision.centFT0C()); - histosQA.fill(HIST("histMult_Cent"), collision.sumAmplFT0C(), collision.centFT0C()); - } - } - - template - void fillHistosFlow(const CollType &collision, const TrackType &track, int nmode) - { - if (collision.sumAmplFT0C() < 1e-4) - { - return; - } - for (auto &trk : track) - { - if (!SelTrack(trk)) - { - continue; - } - if (nmode == 2) - { - histosQA.fill(HIST("histCosDetV2"), collision.centFT0C(), trk.pt(), - std::cos(static_cast(nmode) * (trk.phi() - helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode)))); - } - } - } - - void process(MyCollisions::iterator const &collision, MyTracks const &tracks) - { - if (!SelEvent(collision)) - { - return; - } - for (std::size_t i = 0; i < cfgnMods->size(); i++) - { - fillHistosQvec(collision, cfgnMods->at(i)); - fillHistosFlow(collision, tracks, cfgnMods->at(i)); - } - } -}; - -WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) -{ - return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; -} From 363203fca8f3e0f49567fa0f1d52a8a563a02dc6 Mon Sep 17 00:00:00 2001 From: CyF1rmiana <3326561594@qq.com> Date: Thu, 26 Jun 2025 15:04:47 +0800 Subject: [PATCH 03/10] [PWGCF]Add files for q2 calculation --- PWGCF/Flow/Tasks/flowEseCorre.cxx | 193 ++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 PWGCF/Flow/Tasks/flowEseCorre.cxx diff --git a/PWGCF/Flow/Tasks/flowEseCorre.cxx b/PWGCF/Flow/Tasks/flowEseCorre.cxx new file mode 100644 index 00000000000..c124f8be1e6 --- /dev/null +++ b/PWGCF/Flow/Tasks/flowEseCorre.cxx @@ -0,0 +1,193 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// C++/ROOT includes. +#include +#include +#include +#include +#include +#include +#include +#include + +// o2Physics includes. +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/runDataProcessing.h" +#include "Framework/RunningWorkflowInfo.h" +#include "Framework/StaticFor.h" + +#include "Common/DataModel/Qvectors.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/TrackSelectionTables.h" +#include "Common/DataModel/Centrality.h" +#include "Common/Core/EventPlaneHelper.h" +#include "Common/Core/TrackSelection.h" + +#include "CommonConstants/PhysicsConstants.h" + +// o2 includes. + +using namespace o2; +using namespace o2::framework; + +using MyCollisions = soa::Join; +using MyTracks = soa::Join; +using BCsWithRun3Matchings = soa::Join; + +struct flowEseCorre +{ + HistogramRegistry histosQA{"histosQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; + + Configurable> cfgnMods{"cfgnMods", {2}, "Modulation of interest"}; + Configurable cfgDetName{"cfgDetName", "FT0C", "The name of detector to be analyzed"}; + Configurable cfgRefAName{"cfgRefAName", "TPCpos", "The name of detector for reference A"}; + Configurable cfgRefBName{"cfgRefBName", "TPCneg", "The name of detector for reference B"}; + + Configurable cfgMinPt{"cfgMinPt", 0.15, "Minimum transverse momentum for charged track"}; + Configurable cfgMaxEta{"cfgMaxEta", 0.8, "Maximum pseudorapidiy for charged track"}; + Configurable cfgMaxDCArToPVcut{"cfgMaxDCArToPVcut", 0.1, "Maximum transverse DCA"}; + Configurable cfgMaxDCAzToPVcut{"cfgMaxDCAzToPVcut", 1.0, "Maximum longitudinal DCA"}; + + ConfigurableAxis cfgaxisQvecF{"cfgaxisQvecF", {300, -1, 1}, ""}; + ConfigurableAxis cfgaxisQvec{"cfgaxisQvec", {100, -3, 3}, ""}; + ConfigurableAxis cfgaxisCent{"cfgaxisCent", {100, 0, 100}, ""}; + + ConfigurableAxis cfgaxiscos{"cfgaxiscos", {102, -1.02, 1.02}, ""}; + ConfigurableAxis cfgaxispt{"cfgaxispt", {100, 0, 10}, ""}; + ConfigurableAxis cfgaxisCentMerged{"cfgaxisCentMerged", {20, 0, 100}, ""}; + ConfigurableAxis cfgaxisMultnum{"cfgaxisMultnum", {300, 0, 3000}, ""}; + + EventPlaneHelper helperEP; + + void init(InitContext const &) + { + AxisSpec axisCent{cfgaxisCent, "centrality"}; + AxisSpec axisQvec{cfgaxisQvec, "Q"}; + AxisSpec axisQvecF{cfgaxisQvecF, "Q"}; + AxisSpec axisEvtPl = {100, -1.0 * constants::math::PI, constants::math::PI}; + + AxisSpec axisCos{cfgaxiscos, "angle function"}; + AxisSpec axisPt{cfgaxispt, "trasverse momentum"}; + AxisSpec axisCentMerged{cfgaxisCentMerged, "merged centrality"}; + AxisSpec axisMultnum{cfgaxisMultnum, "statistic of mult"}; + + histosQA.add(Form("histQvecV2"), "", {HistType::kTH3F, {axisQvecF, axisQvecF, axisCent}}); + histosQA.add(Form("histEvtPlV2"), "", {HistType::kTH2F, {axisEvtPl, axisCent}}); + histosQA.add(Form("histQvecRes_SigRefAV2"), "", {HistType::kTH2F, {axisQvecF, axisCent}}); + histosQA.add(Form("histCosDetV2"), "", {HistType::kTH3F, {axisCentMerged, axisPt, axisCos}}); + histosQA.add(Form("histMult_Cent"), "", {HistType::kTH2F, {axisMultnum, axisCent}}); + } + + template + bool SelEvent(const CollType &collision) + { + if (!collision.sel8()) + { + return 0; + } + if (!collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) + { + return 0; + } + if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)) + { + return 0; + } + if (!collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) + { + return 0; + } + + return 1; + } + + template + bool SelTrack(const TrackType track) + { + if (track.pt() < cfgMinPt) + return false; + if (std::abs(track.eta()) > cfgMaxEta) + return false; + if (!track.passedITSNCls()) + return false; + if (!track.passedITSChi2NDF()) + return false; + if (!track.passedITSHits()) + return false; + if (!track.passedTPCCrossedRowsOverNCls()) + return false; + if (!track.passedTPCChi2NDF()) + return false; + if (!track.passedDCAxy()) + return false; + if (!track.passedDCAz()) + return false; + + return true; + } + + template + void fillHistosQvec(const CollType &collision, int nmode) + { + if (nmode == 2) + { + histosQA.fill(HIST("histQvecV2"), collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], collision.centFT0C()); + histosQA.fill(HIST("histEvtPlV2"), helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), collision.centFT0C()); + histosQA.fill(HIST("histQvecRes_SigRefAV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), helperEP.GetEventPlane(collision.qvecTPCposReVec()[0], collision.qvecTPCposImVec()[0], nmode), nmode), collision.centFT0C()); + histosQA.fill(HIST("histMult_Cent"), collision.sumAmplFT0C(), collision.centFT0C()); + } + } + + template + void fillHistosFlow(const CollType &collision, const TrackType &track, int nmode) + { + if (collision.sumAmplFT0C() < 1e-4) + { + return; + } + for (auto &trk : track) + { + if (!SelTrack(trk)) + { + continue; + } + if (nmode == 2) + { + histosQA.fill(HIST("histCosDetV2"), collision.centFT0C(), trk.pt(), + std::cos(static_cast(nmode) * (trk.phi() - helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode)))); + } + } + } + + void process(MyCollisions::iterator const &collision, MyTracks const &tracks) + { + if (!SelEvent(collision)) + { + return; + } + for (std::size_t i = 0; i < cfgnMods->size(); i++) + { + fillHistosQvec(collision, cfgnMods->at(i)); + fillHistosFlow(collision, tracks, cfgnMods->at(i)); + } + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) +{ + return WorkflowSpec{ + adaptAnalysisTask(cfgc)}; +} From 55640a177617edc3581cb5fb780d287f693b1abc Mon Sep 17 00:00:00 2001 From: CyF1rmiana <3326561594@qq.com> Date: Thu, 26 Jun 2025 15:15:14 +0800 Subject: [PATCH 04/10] [PWGCF]Add files for q2 calculation --- PWGCF/Flow/Tasks/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/CMakeLists.txt b/PWGCF/Flow/Tasks/CMakeLists.txt index 21c16f1ca69..412062261ef 100644 --- a/PWGCF/Flow/Tasks/CMakeLists.txt +++ b/PWGCF/Flow/Tasks/CMakeLists.txt @@ -87,4 +87,4 @@ o2physics_add_dpl_workflow(flow-ese-p-he3 o2physics_add_dpl_workflow(flow-ese-corre SOURCES flowEseCorre.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::GFWCore - COMPONENT_NAME Analysis) + COMPONENT_NAME Analysis) From da712b72b068f4a997085d2586d2ced77f10c8d0 Mon Sep 17 00:00:00 2001 From: CyF1rmiana <3326561594@qq.com> Date: Thu, 26 Jun 2025 15:27:16 +0800 Subject: [PATCH 05/10] [PWGCF]Add files for q2 calculation --- PWGCF/Flow/Tasks/flowEseCorre.cxx | 83 +++++++++++++------------------ 1 file changed, 35 insertions(+), 48 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowEseCorre.cxx b/PWGCF/Flow/Tasks/flowEseCorre.cxx index c124f8be1e6..fbd2e56832c 100644 --- a/PWGCF/Flow/Tasks/flowEseCorre.cxx +++ b/PWGCF/Flow/Tasks/flowEseCorre.cxx @@ -10,45 +10,43 @@ // or submit itself to any jurisdiction. // C++/ROOT includes. -#include -#include -#include #include #include #include #include #include +#include +#include +#include + // o2Physics includes. +#include "Common/Core/EventPlaneHelper.h" +#include "Common/Core/TrackSelection.h" +#include "Common/DataModel/Centrality.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/Qvectors.h" +#include "Common/DataModel/TrackSelectionTables.h" + +#include "CommonConstants/PhysicsConstants.h" +#include "Framework/ASoAHelpers.h" #include "Framework/AnalysisDataModel.h" #include "Framework/AnalysisTask.h" -#include "Framework/ASoAHelpers.h" #include "Framework/HistogramRegistry.h" -#include "Framework/runDataProcessing.h" #include "Framework/RunningWorkflowInfo.h" #include "Framework/StaticFor.h" - -#include "Common/DataModel/Qvectors.h" -#include "Common/DataModel/EventSelection.h" -#include "Common/DataModel/TrackSelectionTables.h" -#include "Common/DataModel/Centrality.h" -#include "Common/Core/EventPlaneHelper.h" -#include "Common/Core/TrackSelection.h" - -#include "CommonConstants/PhysicsConstants.h" +#include "Framework/runDataProcessing.h" // o2 includes. using namespace o2; using namespace o2::framework; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyTracks = soa::Join; using BCsWithRun3Matchings = soa::Join; -struct flowEseCorre -{ +struct flowEseCorre { HistogramRegistry histosQA{"histosQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; Configurable> cfgnMods{"cfgnMods", {2}, "Modulation of interest"}; @@ -68,11 +66,11 @@ struct flowEseCorre ConfigurableAxis cfgaxiscos{"cfgaxiscos", {102, -1.02, 1.02}, ""}; ConfigurableAxis cfgaxispt{"cfgaxispt", {100, 0, 10}, ""}; ConfigurableAxis cfgaxisCentMerged{"cfgaxisCentMerged", {20, 0, 100}, ""}; - ConfigurableAxis cfgaxisMultnum{"cfgaxisMultnum", {300, 0, 3000}, ""}; + ConfigurableAxis cfgaxisMultnum{"cfgaxisMultnum", {300, 0, 2700}, ""}; EventPlaneHelper helperEP; - void init(InitContext const &) + void init(InitContext const&) { AxisSpec axisCent{cfgaxisCent, "centrality"}; AxisSpec axisQvec{cfgaxisQvec, "Q"}; @@ -92,22 +90,18 @@ struct flowEseCorre } template - bool SelEvent(const CollType &collision) + bool SelEvent(const CollType& collision) { - if (!collision.sel8()) - { + if (!collision.sel8()) { return 0; } - if (!collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) - { + if (!collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) { return 0; } - if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)) - { + if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)) { return 0; } - if (!collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) - { + if (!collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { return 0; } @@ -140,10 +134,9 @@ struct flowEseCorre } template - void fillHistosQvec(const CollType &collision, int nmode) + void fillHistosQvec(const CollType& collision, int nmode) { - if (nmode == 2) - { + if (nmode == 2) { histosQA.fill(HIST("histQvecV2"), collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], collision.centFT0C()); histosQA.fill(HIST("histEvtPlV2"), helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), collision.centFT0C()); histosQA.fill(HIST("histQvecRes_SigRefAV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), helperEP.GetEventPlane(collision.qvecTPCposReVec()[0], collision.qvecTPCposImVec()[0], nmode), nmode), collision.centFT0C()); @@ -152,42 +145,36 @@ struct flowEseCorre } template - void fillHistosFlow(const CollType &collision, const TrackType &track, int nmode) + void fillHistosFlow(const CollType& collision, const TrackType& track, int nmode) { - if (collision.sumAmplFT0C() < 1e-4) - { + if (collision.sumAmplFT0C() < 1e-4) { return; } - for (auto &trk : track) - { - if (!SelTrack(trk)) - { + for (auto& trk : track) { + if (!SelTrack(trk)) { continue; } - if (nmode == 2) - { + if (nmode == 2) { histosQA.fill(HIST("histCosDetV2"), collision.centFT0C(), trk.pt(), std::cos(static_cast(nmode) * (trk.phi() - helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode)))); } } } - void process(MyCollisions::iterator const &collision, MyTracks const &tracks) + void process(MyCollisions::iterator const& collision, MyTracks const& tracks) { - if (!SelEvent(collision)) - { + if (!SelEvent(collision)) { return; } - for (std::size_t i = 0; i < cfgnMods->size(); i++) - { + for (std::size_t i = 0; i < cfgnMods->size(); i++) { fillHistosQvec(collision, cfgnMods->at(i)); fillHistosFlow(collision, tracks, cfgnMods->at(i)); } } }; -WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; + adaptAnalysisTask(cfgc)}; } From 0c28e376c3e4cfb0bbae4e0ffc32aa19f57226e2 Mon Sep 17 00:00:00 2001 From: CyF1rmiana <3326561594@qq.com> Date: Fri, 27 Jun 2025 16:04:28 +0800 Subject: [PATCH 06/10] [PWGCF]Add files for q2 calculation --- PWGCF/Flow/Tasks/CMakeLists.txt | 2 +- PWGCF/Flow/Tasks/flowEseCorre.cxx | 105 ++++++++++++++++-------------- 2 files changed, 57 insertions(+), 50 deletions(-) diff --git a/PWGCF/Flow/Tasks/CMakeLists.txt b/PWGCF/Flow/Tasks/CMakeLists.txt index 412062261ef..21c16f1ca69 100644 --- a/PWGCF/Flow/Tasks/CMakeLists.txt +++ b/PWGCF/Flow/Tasks/CMakeLists.txt @@ -87,4 +87,4 @@ o2physics_add_dpl_workflow(flow-ese-p-he3 o2physics_add_dpl_workflow(flow-ese-corre SOURCES flowEseCorre.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::GFWCore - COMPONENT_NAME Analysis) + COMPONENT_NAME Analysis) diff --git a/PWGCF/Flow/Tasks/flowEseCorre.cxx b/PWGCF/Flow/Tasks/flowEseCorre.cxx index fbd2e56832c..a11b4bc6f6f 100644 --- a/PWGCF/Flow/Tasks/flowEseCorre.cxx +++ b/PWGCF/Flow/Tasks/flowEseCorre.cxx @@ -9,6 +9,10 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +/// \file FlowEseCorre.cxx +/// \brief Task for flow and event shape engineering corrections +/// \author Alice Collaboration + // C++/ROOT includes. #include #include @@ -46,70 +50,72 @@ using MyCollisions = soa::Join; using BCsWithRun3Matchings = soa::Join; -struct flowEseCorre { +struct FlowEseCorr{ HistogramRegistry histosQA{"histosQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; - Configurable> cfgnMods{"cfgnMods", {2}, "Modulation of interest"}; + Configurable> cfgNmods{"cfgNmods", {2}, "Modulation of interest"}; Configurable cfgDetName{"cfgDetName", "FT0C", "The name of detector to be analyzed"}; Configurable cfgRefAName{"cfgRefAName", "TPCpos", "The name of detector for reference A"}; Configurable cfgRefBName{"cfgRefBName", "TPCneg", "The name of detector for reference B"}; - Configurable cfgMinPt{"cfgMinPt", 0.15, "Minimum transverse momentum for charged track"}; - Configurable cfgMaxEta{"cfgMaxEta", 0.8, "Maximum pseudorapidiy for charged track"}; - Configurable cfgMaxDCArToPVcut{"cfgMaxDCArToPVcut", 0.1, "Maximum transverse DCA"}; - Configurable cfgMaxDCAzToPVcut{"cfgMaxDCAzToPVcut", 1.0, "Maximum longitudinal DCA"}; + Configurable cfgMinPt{"cfgMinPt", 0.15f, "Minimum transverse momentum for charged track"}; + Configurable cfgMaxEta{"cfgMaxEta", 0.8f, "Maximum pseudorapidiy for charged track"}; + Configurable cfgMaxDCArToPVcut{"cfgMaxDCArToPVcut", 0.1f, "Maximum transverse DCA"}; + Configurable cfgMaxDCAzToPVcut{"cfgMaxDCAzToPVcut", 1.0f, "Maximum longitudinal DCA"}; + + ConfigurableAxis cfgAxisQvecF{"cfgAxisQvecF", {300, -1, 1}, ""}; + ConfigurableAxis cfgAxisQvec{"cfgAxisQvec", {100, -3, 3}, ""}; + ConfigurableAxis cfgAxisCent{"cfgAxisCent", {100, 0, 100}, ""}; - ConfigurableAxis cfgaxisQvecF{"cfgaxisQvecF", {300, -1, 1}, ""}; - ConfigurableAxis cfgaxisQvec{"cfgaxisQvec", {100, -3, 3}, ""}; - ConfigurableAxis cfgaxisCent{"cfgaxisCent", {100, 0, 100}, ""}; + ConfigurableAxis cfgAxisCos{"cfgAxisCos", {102, -1.02, 1.02}, ""}; + ConfigurableAxis cfgAxisPt{"cfgAxisPt", {100, 0, 10}, ""}; + ConfigurableAxis cfgAxisCentMerged{"cfgAxisCentMerged", {20, 0, 100}, ""}; + ConfigurableAxis cfgAxisMultNum{"cfgAxisMultNum", {300, 0, 2700}, ""}; - ConfigurableAxis cfgaxiscos{"cfgaxiscos", {102, -1.02, 1.02}, ""}; - ConfigurableAxis cfgaxispt{"cfgaxispt", {100, 0, 10}, ""}; - ConfigurableAxis cfgaxisCentMerged{"cfgaxisCentMerged", {20, 0, 100}, ""}; - ConfigurableAxis cfgaxisMultnum{"cfgaxisMultnum", {300, 0, 2700}, ""}; + static constexpr float kMinAmplitudeThreshold = 1e-4f; + static constexpr int kDefaultModulation = 2; EventPlaneHelper helperEP; - void init(InitContext const&) + void init(InitContext const &) { - AxisSpec axisCent{cfgaxisCent, "centrality"}; - AxisSpec axisQvec{cfgaxisQvec, "Q"}; - AxisSpec axisQvecF{cfgaxisQvecF, "Q"}; + AxisSpec axisCent{cfgAxisCent, "centrality"}; + AxisSpec axisQvec{cfgAxisQvec, "Q"}; + AxisSpec axisQvecF{cfgAxisQvecF, "Q"}; AxisSpec axisEvtPl = {100, -1.0 * constants::math::PI, constants::math::PI}; - AxisSpec axisCos{cfgaxiscos, "angle function"}; - AxisSpec axisPt{cfgaxispt, "trasverse momentum"}; - AxisSpec axisCentMerged{cfgaxisCentMerged, "merged centrality"}; - AxisSpec axisMultnum{cfgaxisMultnum, "statistic of mult"}; + AxisSpec axisCos{cfgAxisCos, "angle function"}; + AxisSpec axisPt{cfgAxisPt, "trasverse momentum"}; + AxisSpec axisCentMerged{cfgAxisCentMerged, "merged centrality"}; + AxisSpec axisMultNum{cfgAxisMultNum, "statistic of mult"}; histosQA.add(Form("histQvecV2"), "", {HistType::kTH3F, {axisQvecF, axisQvecF, axisCent}}); histosQA.add(Form("histEvtPlV2"), "", {HistType::kTH2F, {axisEvtPl, axisCent}}); histosQA.add(Form("histQvecRes_SigRefAV2"), "", {HistType::kTH2F, {axisQvecF, axisCent}}); histosQA.add(Form("histCosDetV2"), "", {HistType::kTH3F, {axisCentMerged, axisPt, axisCos}}); - histosQA.add(Form("histMult_Cent"), "", {HistType::kTH2F, {axisMultnum, axisCent}}); + histosQA.add(Form("histMult_Cent"), "", {HistType::kTH2F, {axisMultNum, axisCent}}); } template - bool SelEvent(const CollType& collision) + bool selectEvent(const CollType &collision) { - if (!collision.sel8()) { - return 0; + if (!collision.sel8()){ + return false; } - if (!collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) { - return 0; + if (!collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)){ + return false; } - if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)) { - return 0; + if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)){ + return false; } - if (!collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { - return 0; + if (!collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)){ + return false; } - - return 1; + return true; } template - bool SelTrack(const TrackType track) + bool selectTrack(const TrackType &track) { if (track.pt() < cfgMinPt) return false; @@ -134,9 +140,9 @@ struct flowEseCorre { } template - void fillHistosQvec(const CollType& collision, int nmode) + void fillHistosQvec(const CollType &collision, int nmode) { - if (nmode == 2) { + if (nmode == kDefaultModulation){ histosQA.fill(HIST("histQvecV2"), collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], collision.centFT0C()); histosQA.fill(HIST("histEvtPlV2"), helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), collision.centFT0C()); histosQA.fill(HIST("histQvecRes_SigRefAV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), helperEP.GetEventPlane(collision.qvecTPCposReVec()[0], collision.qvecTPCposImVec()[0], nmode), nmode), collision.centFT0C()); @@ -145,36 +151,37 @@ struct flowEseCorre { } template - void fillHistosFlow(const CollType& collision, const TrackType& track, int nmode) + void fillHistosFlow(const CollType &collision, const TrackType &tracks, int nmode) { - if (collision.sumAmplFT0C() < 1e-4) { + if (collision.sumAmplFT0C() < kMinAmplitudeThreshold){ return; } - for (auto& trk : track) { - if (!SelTrack(trk)) { + for (const auto &trk : tracks) + { + if (!selectTrack(trk)){ continue; } - if (nmode == 2) { + if (nmode == kDefaultModulation){ histosQA.fill(HIST("histCosDetV2"), collision.centFT0C(), trk.pt(), std::cos(static_cast(nmode) * (trk.phi() - helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode)))); } } } - void process(MyCollisions::iterator const& collision, MyTracks const& tracks) + void process(MyCollisions::iterator const &collision, MyTracks const &tracks) { - if (!SelEvent(collision)) { + if (!selectEvent(collision)){ return; } - for (std::size_t i = 0; i < cfgnMods->size(); i++) { - fillHistosQvec(collision, cfgnMods->at(i)); - fillHistosFlow(collision, tracks, cfgnMods->at(i)); + for (const auto &mod : cfgNmods->at(i)){ + fillHistosQvec(collision, mod); + fillHistosFlow(collision, tracks, mod); } } }; -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; -} + adaptAnalysisTask(cfgc)}; +} \ No newline at end of file From 4e314db6654803da919369f12b37d9d3b8b353df Mon Sep 17 00:00:00 2001 From: CyF1rmiana <3326561594@qq.com> Date: Fri, 27 Jun 2025 16:16:20 +0800 Subject: [PATCH 07/10] [PWGCF]Add files for q2 calculation --- PWGCF/Flow/Tasks/flowEseCorre.cxx | 49 +++++++++++++++++-------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowEseCorre.cxx b/PWGCF/Flow/Tasks/flowEseCorre.cxx index a11b4bc6f6f..6be5b39dd93 100644 --- a/PWGCF/Flow/Tasks/flowEseCorre.cxx +++ b/PWGCF/Flow/Tasks/flowEseCorre.cxx @@ -12,6 +12,11 @@ /// \file FlowEseCorre.cxx /// \brief Task for flow and event shape engineering corrections /// \author Alice Collaboration +/// \since 2023-05-15 +/// \version 1.0 +/// +/// This task calculates flow and event shape engineering corrections +/// using Q-vector and event plane methods. // C++/ROOT includes. #include @@ -50,7 +55,7 @@ using MyCollisions = soa::Join; using BCsWithRun3Matchings = soa::Join; -struct FlowEseCorr{ +struct FlowEseCorre { HistogramRegistry histosQA{"histosQA", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; Configurable> cfgNmods{"cfgNmods", {2}, "Modulation of interest"}; @@ -77,7 +82,7 @@ struct FlowEseCorr{ EventPlaneHelper helperEP; - void init(InitContext const &) + void init(InitContext const&) { AxisSpec axisCent{cfgAxisCent, "centrality"}; AxisSpec axisQvec{cfgAxisQvec, "Q"}; @@ -97,25 +102,26 @@ struct FlowEseCorr{ } template - bool selectEvent(const CollType &collision) + bool selectEvent(CollType const& collision) { - if (!collision.sel8()){ + if (!collision.sel8()) { return false; } - if (!collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)){ + if (!collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) { return false; } - if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)){ + if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)) { return false; } - if (!collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)){ + if (!collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { return false; } + return true; } template - bool selectTrack(const TrackType &track) + bool selectTrack(TrackType const& track) { if (track.pt() < cfgMinPt) return false; @@ -140,9 +146,9 @@ struct FlowEseCorr{ } template - void fillHistosQvec(const CollType &collision, int nmode) + void fillHistosQvec(CollType const& collision, int nmode) { - if (nmode == kDefaultModulation){ + if (nmode == kDefaultModulation) { histosQA.fill(HIST("histQvecV2"), collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], collision.centFT0C()); histosQA.fill(HIST("histEvtPlV2"), helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), collision.centFT0C()); histosQA.fill(HIST("histQvecRes_SigRefAV2"), helperEP.GetResolution(helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode), helperEP.GetEventPlane(collision.qvecTPCposReVec()[0], collision.qvecTPCposImVec()[0], nmode), nmode), collision.centFT0C()); @@ -151,37 +157,36 @@ struct FlowEseCorr{ } template - void fillHistosFlow(const CollType &collision, const TrackType &tracks, int nmode) + void fillHistosFlow(CollType const& collision, TrackType const& tracks, int nmode) { - if (collision.sumAmplFT0C() < kMinAmplitudeThreshold){ + if (collision.sumAmplFT0C() < kMinAmplitudeThreshold) { return; } - for (const auto &trk : tracks) - { - if (!selectTrack(trk)){ + for (auto const& trk : tracks) { + if (!selectTrack(trk)) { continue; } - if (nmode == kDefaultModulation){ + if (nmode == kDefaultModulation) { histosQA.fill(HIST("histCosDetV2"), collision.centFT0C(), trk.pt(), std::cos(static_cast(nmode) * (trk.phi() - helperEP.GetEventPlane(collision.qvecFT0CReVec()[0], collision.qvecFT0CImVec()[0], nmode)))); } } } - void process(MyCollisions::iterator const &collision, MyTracks const &tracks) + void process(MyCollisions::iterator const& collision, MyTracks const& tracks) { - if (!selectEvent(collision)){ + if (!selectEvent(collision)) { return; } - for (const auto &mod : cfgNmods->at(i)){ + for (auto const& mod : *cfgNmods) { fillHistosQvec(collision, mod); fillHistosFlow(collision, tracks, mod); } } }; -WorkflowSpec defineDataProcessing(ConfigContext const &cfgc) +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; -} \ No newline at end of file + adaptAnalysisTask(cfgc)}; +} From 57321cd7422dbb84b26f42f45ea4b9b756c510c1 Mon Sep 17 00:00:00 2001 From: CyF1rmiana <3326561594@qq.com> Date: Fri, 27 Jun 2025 16:28:33 +0800 Subject: [PATCH 08/10] [PWGCF]Add files for q2 calculation --- PWGCF/Flow/Tasks/flowEseCorre.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowEseCorre.cxx b/PWGCF/Flow/Tasks/flowEseCorre.cxx index 6be5b39dd93..aecdc00677c 100644 --- a/PWGCF/Flow/Tasks/flowEseCorre.cxx +++ b/PWGCF/Flow/Tasks/flowEseCorre.cxx @@ -178,7 +178,7 @@ struct FlowEseCorre { if (!selectEvent(collision)) { return; } - for (auto const& mod : *cfgNmods) { + for (const auto& mod : cfgNmods->at(i)) { fillHistosQvec(collision, mod); fillHistosFlow(collision, tracks, mod); } @@ -187,6 +187,8 @@ struct FlowEseCorre { WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; -} + return WorkflowSpec{ return WorkflowSpec{ + adaptAnalysisTask(cfgc)}; adaptAnalysisTask(cfgc)}; +} + + From 7dba5d8182f20ecc6e246ea90baf933d3c397afe Mon Sep 17 00:00:00 2001 From: CyF1rmiana <3326561594@qq.com> Date: Fri, 27 Jun 2025 16:41:06 +0800 Subject: [PATCH 09/10] [PWGCF]Add files for q2 calculation --- PWGCF/Flow/Tasks/flowEseCorre.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/PWGCF/Flow/Tasks/flowEseCorre.cxx b/PWGCF/Flow/Tasks/flowEseCorre.cxx index aecdc00677c..84a861bf60d 100644 --- a/PWGCF/Flow/Tasks/flowEseCorre.cxx +++ b/PWGCF/Flow/Tasks/flowEseCorre.cxx @@ -9,7 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// \file FlowEseCorre.cxx +/// \file flowEseCorre.cxx /// \brief Task for flow and event shape engineering corrections /// \author Alice Collaboration /// \since 2023-05-15 @@ -187,8 +187,7 @@ struct FlowEseCorre { WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - return WorkflowSpec{ return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; adaptAnalysisTask(cfgc)}; -} - + return WorkflowSpec{ + adaptAnalysisTask(cfgc)}; +} From 5441422f34e1933cbc5f00877f4577f618a46c38 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Fri, 27 Jun 2025 08:41:58 +0000 Subject: [PATCH 10/10] Please consider the following formatting changes --- PWGCF/Flow/Tasks/flowEseCorre.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowEseCorre.cxx b/PWGCF/Flow/Tasks/flowEseCorre.cxx index 84a861bf60d..1d1c3dfa734 100644 --- a/PWGCF/Flow/Tasks/flowEseCorre.cxx +++ b/PWGCF/Flow/Tasks/flowEseCorre.cxx @@ -190,4 +190,3 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) return WorkflowSpec{ adaptAnalysisTask(cfgc)}; } -