@@ -55,7 +55,11 @@ struct jEPFlowAnalysis {
5555 Configurable<float > cfgEtaMax{" cfgEtaMax" , 1 .f , " Maximum eta used for track selection." };
5656 } cfgTrackCuts;
5757
58- Configurable<bool > cfgAddEvtSel{" cfgAddEvtSel" , true , " Use event selection" };
58+ Configurable<bool > cfgAddEvtSel{" cfgAddEvtSel" , true , " event selection" };
59+ Configurable<int > cfgEvtSel{" cfgEvtSel" , 0 , " Event selection flags\n 0: Sel8\n 1: Sel8+kIsGoodZvtxFT0vsPV+kNoSameBunchPileup\n 2: Sel8+kIsGoodZvtxFT0vsPV+kNoSameBunchPileup+kNoCollInTimeRangeStandard\n 3: Sel8+kNoSameBunchPileup" };
60+ Configurable<int > cfgMaxOccupancy{" cfgMaxOccupancy" , 999999 , " maximum occupancy of tracks in neighbouring collisions in a given time range" };
61+ Configurable<int > cfgMinOccupancy{" cfgMinOccupancy" , 0 , " maximum occupancy of tracks in neighbouring collisions in a given time range" };
62+
5963 Configurable<int > cfgnTotalSystem{" cfgnTotalSystem" , 7 , " Total number of detectors in qVectorsTable" };
6064 Configurable<int > cfgnMode{" cfgnMode" , 1 , " the number of modulations" };
6165
@@ -114,6 +118,7 @@ struct jEPFlowAnalysis {
114118
115119 AxisSpec axisMod{cfgnMode, 2 ., cfgnMode + 2 .};
116120 AxisSpec axisEvtPl{360 , -constants::math::PI * 1.1 , constants::math::PI * 1.1 };
121+ AxisSpec axisVertex{150 , -12.5 , 12.5 };
117122
118123 AxisSpec axisCent{cfgAxisCent, " cent" };
119124 AxisSpec axisPt{cfgAxisPt, " pT" };
@@ -129,15 +134,43 @@ struct jEPFlowAnalysis {
129134
130135 epFlowHistograms.add (" vncos" , " " , {HistType::kTHnSparseF , {axisMod, axisCent, axisPt, axisCos}});
131136 epFlowHistograms.add (" vnsin" , " " , {HistType::kTHnSparseF , {axisMod, axisCent, axisPt, axisCos}});
137+
138+ epFlowHistograms.add (" hCentrality" , " " , {HistType::kTH1F , {axisCent}});
139+ epFlowHistograms.add (" hVertex" , " " , {HistType::kTH1F , {axisVertex}});
132140 }
133141
134142 void process (MyCollisions::iterator const & coll, soa::Filtered<MyTracks> const & tracks, aod::BCsWithTimestamps const &)
135143 {
136- if (cfgAddEvtSel && (!coll.sel8 () || !coll.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !coll.selection_bit (aod::evsel::kNoSameBunchPileup )))
137- return ;
144+ if (cfgAddEvtSel) {
145+ switch (cfgEvtSel) {
146+ case 0 : // Sel8
147+ if (!coll.sel8 ())
148+ return ;
149+ break ;
150+ case 1 : // PbPb standard
151+ if (!coll.sel8 () || !coll.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !coll.selection_bit (aod::evsel::kNoSameBunchPileup ))
152+ return ;
153+ break ;
154+ case 2 : // PbPb with pileup
155+ if (!coll.sel8 () || !coll.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard ) ||
156+ !coll.selection_bit (aod::evsel::kIsGoodZvtxFT0vsPV ) || !coll.selection_bit (aod::evsel::kNoSameBunchPileup ))
157+ return ;
158+ break ;
159+ case 3 : // Small systems (OO, NeNe, pp)
160+ if (!coll.sel8 () || !coll.selection_bit (aod::evsel::kNoSameBunchPileup ))
161+ return ;
162+ break ;
163+ default :
164+ LOGF (warning, " Event selection flag was not found, continuing without basic event selections!\n " );
165+ }
166+ // Check occupancy
167+ if (coll.trackOccupancyInTimeRange () > cfgMaxOccupancy || coll.trackOccupancyInTimeRange () < cfgMinOccupancy)
168+ return ;
169+ }
138170
139171 float cent = coll.cent ();
140- epFlowHistograms.fill (HIST (" FullCentrality" ), cent);
172+ epFlowHistograms.fill (HIST (" hCentrality" ), cent);
173+ epFlowHistograms.fill (HIST (" hVertex" ), coll.posZ ());
141174 float eps[3 ] = {0 .};
142175
143176 if (cfgShiftCorr) {
@@ -156,7 +189,7 @@ struct jEPFlowAnalysis {
156189 }
157190 }
158191
159- for (int i = 0 ; i < cfgnMode; i++) { // loop over different harmonic orders
192+ for (int i = 0 ; i < cfgnMode; i++) { // loop over different harmonic orders
160193 harmInd = cfgnTotalSystem * 4 * (i) + 3 ; // harmonic index to access corresponding Q-vector as all Q-vectors are in same vector
161194 eps[0 ] = helperEP.GetEventPlane (coll.qvecRe ()[detId + harmInd], coll.qvecIm ()[detId + harmInd], i + 2 );
162195 eps[1 ] = helperEP.GetEventPlane (coll.qvecRe ()[refAId + harmInd], coll.qvecIm ()[refAId + harmInd], i + 2 );
0 commit comments