1212// / \file flowZdcEnergy.cxx
1313// / \author Kegang Xiong
1414// / \since 03/2026
15- // / \brief Study ZDC energy observables versus centrality for Run 2 / Run 3.
15+ // / \brief Study ZDC energy observables versus multiplicity for Run 2 / Run 3.
1616
1717#include " Common/DataModel/Centrality.h"
1818#include " Common/DataModel/EventSelection.h"
@@ -47,10 +47,7 @@ using namespace o2::framework::expressions;
4747struct flowZdcEnergy {
4848
4949 struct : ConfigurableGroup{
50- O2_DEFINE_CONFIGURABLE (cfgUseEvsel, bool , true , " whether to enable event selection" )
51- O2_DEFINE_CONFIGURABLE (cfgCentMin, float , 0 .f, " Minimum centrality for selected events" )
52- O2_DEFINE_CONFIGURABLE (cfgCentMax, float , 90 .f, " Maximum centrality for selected events" )
53- O2_DEFINE_CONFIGURABLE (cfgVtxZ, float , 10 .f, " Accepted z-vertex range" )} evsel;
50+ O2_DEFINE_CONFIGURABLE (cfgVtxZ, float , 10 .f, " Accepted z-vertex range" )} evsel;
5451
5552 O2_DEFINE_CONFIGURABLE (cfgEtaMax, float , 0 .8f , " Maximum track #eta" )
5653 O2_DEFINE_CONFIGURABLE (cfgPtMin, float , 0 .2f , " Minimum track #P_{t}" )
@@ -59,8 +56,8 @@ struct flowZdcEnergy {
5956 O2_DEFINE_CONFIGURABLE (cfgDcaZMax, float , 2 .0f , " Maximum DCAz" )
6057
6158 ConfigurableAxis axisCent{" axisCent" , {90 , 0 , 90 }, " Centrality (%)" };
62- ConfigurableAxis axisMult{" axisMult" , {100 , 0 , 100000 }, " Multiplicity" };
63- ConfigurableAxis axisMultDivided{" axisMultDivided" , {30 , 0 , 15000 }, " Multiplicity bins for ZN energy" };
59+ ConfigurableAxis axisMult{" axisMult" , {500 , 0 , 15000 }, " Multiplicity" };
60+ ConfigurableAxis axisMultDivided{" axisMultDivided" , {500 , 0 , 10000 }, " Multiplicity bins for ZN energy" };
6461 ConfigurableAxis axisPt{" axisPt" , {100 , 0 , 15 }, " #P_{t}" };
6562 ConfigurableAxis axisEta{" axisEta" , {64 , -1.6 , 1.6 }, " #eta" };
6663 ConfigurableAxis axisEnergy{" axisEnergy" , {300 , 0 , 300 }, " Energy" };
@@ -71,7 +68,6 @@ struct flowZdcEnergy {
7168 kAllEvents = 0 ,
7269 kSeln ,
7370 kZvtx ,
74- kCentrality ,
7571 kBCHasZDC ,
7672 kSelectedZDC ,
7773 kNSelections
@@ -105,13 +101,17 @@ struct flowZdcEnergy {
105101 hCount->GetXaxis ()->SetBinLabel (kAllEvents + 1 , " All events" );
106102 hCount->GetXaxis ()->SetBinLabel (kSeln + 1 , " Sel7/8" );
107103 hCount->GetXaxis ()->SetBinLabel (kZvtx + 1 , " Zvtx" );
108- hCount->GetXaxis ()->SetBinLabel (kCentrality + 1 , " Centrality" );
109104 hCount->GetXaxis ()->SetBinLabel (kBCHasZDC + 1 , " BC has ZDC" );
110105 hCount->GetXaxis ()->SetBinLabel (kSelectedZDC + 1 , " Selected ZDC" );
111106
112- registry.add (" QA/hCentrality" , " " , {HistType::kTH1D , {axisCent}});
113- registry.add (" QA/hMultiplicity" , " " , {HistType::kTH1D , {axisMult}});
114- registry.add (" QA/hMultiplicity_TPC" , " " , {HistType::kTH1D , {axisMult}});
107+ registry.add (" QA/hCentrality_beforeCut" , " " , {HistType::kTH1D , {axisCent}});
108+ registry.add (" QA/hMultiplicity_beforeCut" , " " , {HistType::kTH1D , {axisMult}});
109+ registry.add (" QA/hMultiplicity_TPC_beforeCut" , " " , {HistType::kTH1D , {axisMult}});
110+
111+ registry.add (" QA/hCentrality_afterCut" , " " , {HistType::kTH1D , {axisCent}});
112+ registry.add (" QA/hMultiplicity_afterCut" , " " , {HistType::kTH1D , {axisMult}});
113+ registry.add (" QA/hMultiplicity_TPC_afterCut" , " " , {HistType::kTH1D , {axisMult}});
114+
115115 registry.add (" QA/hPt" , " " , {HistType::kTH1D , {axisPt}});
116116 registry.add (" QA/hEta" , " " , {HistType::kTH1D , {axisEta}});
117117
@@ -148,28 +148,21 @@ struct flowZdcEnergy {
148148
149149 // Helper: event selection
150150 template <typename TCollision>
151- bool acceptEvent (TCollision const & collision, bool UseEvsel, float centrality, const int runmode)
151+ bool acceptEvent (TCollision const & collision, const int runmode)
152152 {
153- if (!UseEvsel) {
154- registry.fill (HIST (" QA/hEventCount" ), kAllEvents );
155- } else {
156- registry.fill (HIST (" QA/hEventCount" ), kAllEvents );
157- if (runmode == 2 && !collision.sel7 ()) {
158- return false ;
159- }
160- if (runmode == 3 && !collision.sel8 ()) {
161- return false ;
162- }
163- registry.fill (HIST (" QA/hEventCount" ), kSeln );
164- if (std::abs (collision.posZ ()) > evsel.cfgVtxZ ) {
165- return false ;
166- }
167- registry.fill (HIST (" QA/hEventCount" ), kZvtx );
168- if (centrality < evsel.cfgCentMin || centrality > evsel.cfgCentMax ) {
169- return false ;
170- }
171- registry.fill (HIST (" QA/hEventCount" ), kCentrality );
153+ registry.fill (HIST (" QA/hEventCount" ), kAllEvents );
154+ if (runmode == 2 && !collision.sel7 ()) {
155+ return false ;
156+ }
157+ if (runmode == 3 && !collision.sel8 ()) {
158+ return false ;
159+ }
160+ registry.fill (HIST (" QA/hEventCount" ), kSeln );
161+ if (std::abs (collision.posZ ()) > evsel.cfgVtxZ ) {
162+ return false ;
172163 }
164+ registry.fill (HIST (" QA/hEventCount" ), kZvtx );
165+
173166 return true ;
174167 }
175168
@@ -252,12 +245,16 @@ struct flowZdcEnergy {
252245 const float multi = collision.multFT0C ();
253246 const float multiTPC = collision.multTPC ();
254247
255- if (!acceptEvent (collision, evsel.cfgUseEvsel , centrality, 3 )) {
248+ registry.fill (HIST (" QA/hCentrality_beforeCut" ), centrality);
249+ registry.fill (HIST (" QA/hMultiplicity_beforeCut" ), multi);
250+ registry.fill (HIST (" QA/hMultiplicity_TPC_beforeCut" ), multiTPC);
251+
252+ if (!acceptEvent (collision, 3 )) {
256253 return ;
257254 }
258- registry.fill (HIST (" QA/hCentrality " ), centrality);
259- registry.fill (HIST (" QA/hMultiplicity " ), multi);
260- registry.fill (HIST (" QA/hMultiplicity_TPC " ), multiTPC);
255+ registry.fill (HIST (" QA/hCentrality_afterCut " ), centrality);
256+ registry.fill (HIST (" QA/hMultiplicity_afterCut " ), multi);
257+ registry.fill (HIST (" QA/hMultiplicity_TPC_afterCut " ), multiTPC);
261258 fillZDCObservables<CollisionsRun3::iterator, BCsRun3>(collision, centrality, multiTPC);
262259
263260 for (const auto & track : tracks) {
@@ -276,12 +273,16 @@ struct flowZdcEnergy {
276273 const float multi = collision.multFV0M ();
277274 const float multiTPC = collision.multTPC ();
278275
279- if (!acceptEvent (collision, evsel.cfgUseEvsel , centrality, 2 )) {
276+ registry.fill (HIST (" QA/hCentrality_beforeCut" ), centrality);
277+ registry.fill (HIST (" QA/hMultiplicity_beforeCut" ), multi);
278+ registry.fill (HIST (" QA/hMultiplicity_TPC_beforeCut" ), multiTPC);
279+
280+ if (!acceptEvent (collision, 2 )) {
280281 return ;
281282 }
282- registry.fill (HIST (" QA/hCentrality " ), centrality);
283- registry.fill (HIST (" QA/hMultiplicity " ), multi);
284- registry.fill (HIST (" QA/hMultiplicity_TPC " ), multiTPC);
283+ registry.fill (HIST (" QA/hCentrality_afterCut " ), centrality);
284+ registry.fill (HIST (" QA/hMultiplicity_afterCut " ), multi);
285+ registry.fill (HIST (" QA/hMultiplicity_TPC_afterCut " ), multiTPC);
285286 fillZDCObservables<CollisionsRun2::iterator, BCsRun2>(collision, centrality, multiTPC);
286287
287288 for (const auto & track : tracks) {
0 commit comments