1414// / \since 03/2026
1515// / \brief Study ZDC energy observables versus centrality for Run 2 / Run 3.
1616
17+ #include " Common/Core/TrackSelection.h"
1718#include " Common/DataModel/Centrality.h"
1819#include " Common/DataModel/EventSelection.h"
1920#include " Common/DataModel/Multiplicity.h"
2021#include " Common/DataModel/TrackSelectionTables.h"
21- #include " Common/Core/TrackSelection.h"
2222
2323#include " CCDB/BasicCCDBManager.h"
2424#include " Framework/AnalysisTask.h"
2525#include " Framework/HistogramRegistry.h"
2626#include " Framework/RunningWorkflowInfo.h"
2727#include " Framework/runDataProcessing.h"
2828
29+ #include < chrono>
2930#include < cmath>
3031#include < cstdint>
31- #include < chrono>
3232
3333using namespace o2 ;
3434using namespace o2 ::framework;
3535using namespace o2 ::framework::expressions;
3636
37- #define O2_DEFINE_CONFIGURABLE (NAME, TYPE, DEFAULT, HELP ) Configurable<TYPE> NAME{ #NAME, DEFAULT, HELP };
37+ #define O2_DEFINE_CONFIGURABLE (NAME, TYPE, DEFAULT, HELP ) Configurable<TYPE> NAME{#NAME, DEFAULT, HELP};
3838
3939struct flowZdcEnergy {
4040
4141 struct : ConfigurableGroup{
42- O2_DEFINE_CONFIGURABLE (cfgUseEvsel, bool , true , " whether to enable event selection" )
43- O2_DEFINE_CONFIGURABLE (cfgCentMin, float , 0 .f, " Minimum centrality for selected events" )
44- O2_DEFINE_CONFIGURABLE (cfgCentMax, float , 90 .f, " Maximum centrality for selected events" )
45- O2_DEFINE_CONFIGURABLE (cfgVtxZ, float , 10 .f, " Accepted z-vertex range" )
46- } evsel;
42+ O2_DEFINE_CONFIGURABLE (cfgUseEvsel, bool , true , " whether to enable event selection" )
43+ O2_DEFINE_CONFIGURABLE (cfgCentMin, float , 0 .f, " Minimum centrality for selected events" )
44+ O2_DEFINE_CONFIGURABLE (cfgCentMax, float , 90 .f, " Maximum centrality for selected events" )
45+ O2_DEFINE_CONFIGURABLE (cfgVtxZ, float , 10 .f, " Accepted z-vertex range" )} evsel;
4746
4847 O2_DEFINE_CONFIGURABLE (cfgEtaMax, float , 0 .8f , " Maximum track #eta" )
4948 O2_DEFINE_CONFIGURABLE (cfgPtMin, float , 0 .2f , " Minimum track #P_{t}" )
5049 O2_DEFINE_CONFIGURABLE (cfgPtMax, float , 10 .0f , " Maximum track #P_{t}" )
5150 O2_DEFINE_CONFIGURABLE (cfgDcaXYMax, float , 0 .2f , " Maximum DCAxy" )
5251 O2_DEFINE_CONFIGURABLE (cfgDcaZMax, float , 2 .0f , " Maximum DCAz" )
5352
54- ConfigurableAxis axisCent{ " axisCent" , { 90 , 0 , 90 }, " Centrality (%)" };
55- ConfigurableAxis axisMult{ " axisMult" , { 100 , 0 , 100000 }, " Multiplicity" };
56- ConfigurableAxis axisPt{ " axisPt" , { 100 , 0 , 15 }, " #P_{t}" };
57- ConfigurableAxis axisEta{ " axisEta" , { 64 , -1.6 , 1.6 }, " #eta" };
58- ConfigurableAxis axisEnergy{ " axisEnergy" , { 300 , 0 , 300 }, " Energy" };
59- ConfigurableAxis axisRescaledDiff{ " axisRescaledDiff" , { 400 , -1 , 1 }, " (EA-EC)/(EA+EC)" };
53+ ConfigurableAxis axisCent{" axisCent" , {90 , 0 , 90 }, " Centrality (%)" };
54+ ConfigurableAxis axisMult{" axisMult" , {100 , 0 , 100000 }, " Multiplicity" };
55+ ConfigurableAxis axisPt{" axisPt" , {100 , 0 , 15 }, " #P_{t}" };
56+ ConfigurableAxis axisEta{" axisEta" , {64 , -1.6 , 1.6 }, " #eta" };
57+ ConfigurableAxis axisEnergy{" axisEnergy" , {300 , 0 , 300 }, " Energy" };
58+ ConfigurableAxis axisRescaledDiff{" axisRescaledDiff" , {400 , -1 , 1 }, " (EA-EC)/(EA+EC)" };
6059
6160 // Event counter bins
6261 enum SelectionCriteria : uint8_t {
@@ -70,9 +69,9 @@ struct flowZdcEnergy {
7069 };
7170
7271 Service<ccdb::BasicCCDBManager> ccdb;
73- HistogramRegistry registry{ " registry" };
72+ HistogramRegistry registry{" registry" };
7473
75- Filter trackFilter = nabs(aod::track::eta) < cfgEtaMax && aod::track::pt > cfgPtMin && aod::track::pt < cfgPtMax && nabs(aod::track::dcaXY) < cfgDcaXYMax&& nabs(aod::track::dcaZ) < cfgDcaZMax;
74+ Filter trackFilter = nabs(aod::track::eta) < cfgEtaMax && aod::track::pt > cfgPtMin&& aod::track::pt < cfgPtMax&& nabs(aod::track::dcaXY) < cfgDcaXYMax&& nabs(aod::track::dcaZ) < cfgDcaZMax;
7675 using UsedTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA>>;
7776 // Run 3
7877 using CollisionsRun3 = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs>;
@@ -91,8 +90,8 @@ struct flowZdcEnergy {
9190 std::chrono::system_clock::now ().time_since_epoch ())
9291 .count ();
9392 ccdb->setCreatedNotAfter (now);
94-
95- registry.add (" QA/hEventCount" , " Event counter;Selection;Events" , { HistType::kTH1D , { { kNSelections , 0 , kNSelections } } });
93+
94+ registry.add (" QA/hEventCount" , " Event counter;Selection;Events" , {HistType::kTH1D , {{ kNSelections , 0 , kNSelections }} });
9695 auto hCount = registry.get <TH1>(HIST (" QA/hEventCount" ));
9796 hCount->GetXaxis ()->SetBinLabel (kAllEvents + 1 , " All events" );
9897 hCount->GetXaxis ()->SetBinLabel (kSeln + 1 , " Sel7/8" );
@@ -101,26 +100,26 @@ struct flowZdcEnergy {
101100 hCount->GetXaxis ()->SetBinLabel (kBCHasZDC + 1 , " BC has ZDC" );
102101 hCount->GetXaxis ()->SetBinLabel (kSelectedZDC + 1 , " Selected ZDC" );
103102
104- registry.add (" QA/hCentrality" , " " , { HistType::kTH1D , { axisCent } });
105- registry.add (" QA/hMultiplicity" , " " , { HistType::kTH1D , { axisMult } });
106- registry.add (" QA/hMultiplicity_TPC" , " " , { HistType::kTH1D , { axisMult } });
107- registry.add (" QA/hPt" , " " , { HistType::kTH1D , { axisPt } });
108- registry.add (" QA/hEta" , " " , { HistType::kTH1D , { axisEta } });
109-
110- registry.add (" hEnergyWithCent_ZNA_Common" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
111- registry.add (" hEnergyWithCent_ZNC_Common" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
112- registry.add (" hEnergyWithCent_RescaledDiff" , " " , { HistType::kTH2D , { axisRescaledDiff, axisCent } });
113- registry.add (" hEnergyWithCent_ZNA_1" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
114- registry.add (" hEnergyWithCent_ZNA_2" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
115- registry.add (" hEnergyWithCent_ZNA_3" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
116- registry.add (" hEnergyWithCent_ZNA_4" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
117- registry.add (" hEnergyWithCent_ZNC_1" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
118- registry.add (" hEnergyWithCent_ZNC_2" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
119- registry.add (" hEnergyWithCent_ZNC_3" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
120- registry.add (" hEnergyWithCent_ZNC_4" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
121- registry.add (" hEnergyWithCent_ZNA_SumSectors" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
122- registry.add (" hEnergyWithCent_ZNC_SumSectors" , " " , { HistType::kTH2D , { axisEnergy, axisCent } });
123- registry.add (" hEnergyWithCent_RescaledSumDiff" , " " , { HistType::kTH2D , { axisRescaledDiff, axisCent } });
103+ registry.add (" QA/hCentrality" , " " , {HistType::kTH1D , {axisCent} });
104+ registry.add (" QA/hMultiplicity" , " " , {HistType::kTH1D , {axisMult} });
105+ registry.add (" QA/hMultiplicity_TPC" , " " , {HistType::kTH1D , {axisMult} });
106+ registry.add (" QA/hPt" , " " , {HistType::kTH1D , {axisPt} });
107+ registry.add (" QA/hEta" , " " , {HistType::kTH1D , {axisEta} });
108+
109+ registry.add (" hEnergyWithCent_ZNA_Common" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
110+ registry.add (" hEnergyWithCent_ZNC_Common" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
111+ registry.add (" hEnergyWithCent_RescaledDiff" , " " , {HistType::kTH2D , {axisRescaledDiff, axisCent} });
112+ registry.add (" hEnergyWithCent_ZNA_1" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
113+ registry.add (" hEnergyWithCent_ZNA_2" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
114+ registry.add (" hEnergyWithCent_ZNA_3" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
115+ registry.add (" hEnergyWithCent_ZNA_4" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
116+ registry.add (" hEnergyWithCent_ZNC_1" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
117+ registry.add (" hEnergyWithCent_ZNC_2" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
118+ registry.add (" hEnergyWithCent_ZNC_3" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
119+ registry.add (" hEnergyWithCent_ZNC_4" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
120+ registry.add (" hEnergyWithCent_ZNA_SumSectors" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
121+ registry.add (" hEnergyWithCent_ZNC_SumSectors" , " " , {HistType::kTH2D , {axisEnergy, axisCent} });
122+ registry.add (" hEnergyWithCent_RescaledSumDiff" , " " , {HistType::kTH2D , {axisRescaledDiff, axisCent} });
124123 }
125124
126125 // Helper: event selection
@@ -150,7 +149,7 @@ struct flowZdcEnergy {
150149 }
151150 registry.fill (HIST (" QA/hEventCount" ), kCentrality );
152151 }
153- return true ;
152+ return true ;
154153 }
155154
156155 // Helper: fill ZDC observables
@@ -263,6 +262,5 @@ struct flowZdcEnergy {
263262WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
264263{
265264 return WorkflowSpec{
266- adaptAnalysisTask<flowZdcEnergy>(cfgc)
267- };
268- }
265+ adaptAnalysisTask<flowZdcEnergy>(cfgc)};
266+ }
0 commit comments