@@ -70,9 +70,12 @@ class CollisonCuts
7070 mApplyZvertexTimedifference = false ;
7171 mApplyPileupRejection = false ;
7272 mApplyNoITSROBorderCut = false ;
73+ mApplyCollInTimeRangeNarrow = false ;
7374 mApplyCollInTimeRangeStandard = false ;
7475 mtrackOccupancyInTimeRangeMax = trackOccupancyInTimeRangeMax;
7576 mtrackOccupancyInTimeRangeMin = trackOccupancyInTimeRangeMin;
77+ mApplyRun2AliEventCuts = true ;
78+ mApplyRun2INELgtZERO = false ;
7679 }
7780
7881 // / Initializes histograms for the task
@@ -113,8 +116,27 @@ class CollisonCuts
113116 // / Print some debug information
114117 void printCuts ()
115118 {
116- LOGF (info, " Debug information for Collison Cuts \n Max. z-vertex: %f \n Check trigger: %d \n Trigger: %d \n Check offline: %d \n Check Run3: %d \n Trigger TVX selection: %d \n Apply time frame border cut: %d \n Apply ITS-TPC vertex: %d \n Apply Z-vertex time difference: %d \n Apply Pileup rejection: %d \n Apply NoITSRO frame border cut: %d \n Track occupancy in time range max: %d \n Track occupancy in time range min: %d \n Apply NoCollInTimeRangeStandard: %d" ,
117- mZvtxMax , mCheckTrigger , mTrigger , mCheckOffline , mCheckIsRun3 , mTriggerTVXselection , mApplyTFBorderCut , mApplyITSTPCvertex , mApplyZvertexTimedifference , mApplyPileupRejection , mApplyNoITSROBorderCut , mtrackOccupancyInTimeRangeMax, mtrackOccupancyInTimeRangeMin, mApplyCollInTimeRangeStandard );
119+ LOGF (info, " Debug information for Collison Cuts" );
120+ LOGF (info, " Max. z-vertex: %f" , mZvtxMax );
121+ LOGF (info, " Check trigger: %d" , mCheckTrigger );
122+ LOGF (info, " Trigger: %d" , mTrigger );
123+ LOGF (info, " Check offline: %d" , mCheckOffline );
124+ LOGF (info, " Check Run3: %d" , mCheckIsRun3 );
125+ if (mCheckIsRun3 ) {
126+ LOGF (info, " Trigger TVX selection: %d" , mTriggerTVXselection );
127+ LOGF (info, " Apply time frame border cut: %d" , mApplyTFBorderCut );
128+ LOGF (info, " Apply ITS-TPC vertex: %d" , mApplyITSTPCvertex );
129+ LOGF (info, " Apply NoCollInTimeRangeNarrow: %d" , mApplyCollInTimeRangeNarrow );
130+ LOGF (info, " Apply Z-vertex time difference: %d" , mApplyZvertexTimedifference );
131+ LOGF (info, " Apply Pileup rejection: %d" , mApplyPileupRejection );
132+ LOGF (info, " Apply NoITSRO frame border cut: %d" , mApplyNoITSROBorderCut );
133+ LOGF (info, " Track occupancy in time range max: %d" , mtrackOccupancyInTimeRangeMax);
134+ LOGF (info, " Track occupancy in time range min: %d" , mtrackOccupancyInTimeRangeMin);
135+ LOGF (info, " Apply NoCollInTimeRangeStandard: %d" , mApplyCollInTimeRangeStandard );
136+ } else {
137+ LOGF (info, " Apply Run2 AliEventCuts: %d" , mApplyRun2AliEventCuts );
138+ LOGF (info, " Apply Run2 INELgtZERO: %d" , mApplyRun2INELgtZERO );
139+ }
118140 }
119141
120142 // / Set MB selection
@@ -129,6 +151,9 @@ class CollisonCuts
129151 // / Set the ITS-TPC matching cut
130152 void setApplyITSTPCvertex (bool applyITSTPCvertex) { mApplyITSTPCvertex = applyITSTPCvertex; }
131153
154+ // / Set the NoCollInTimeRangeNarrow cut
155+ void setApplyCollInTimeRangeNarrow (bool applyCollInTimeRangeNarrow) { mApplyCollInTimeRangeNarrow = applyCollInTimeRangeNarrow; }
156+
132157 // / Set the Z-vertex time difference cut
133158 void setApplyZvertexTimedifference (bool applyZvertexTimedifference) { mApplyZvertexTimedifference = applyZvertexTimedifference; }
134159
@@ -144,10 +169,15 @@ class CollisonCuts
144169 mtrackOccupancyInTimeRangeMax = trackOccupancyInTimeRangeMax;
145170 mtrackOccupancyInTimeRangeMin = trackOccupancyInTimeRangeMin;
146171 }
147-
148172 // / Set the NoCollInTimeRangeStandard cut
149173 void setApplyCollInTimeRangeStandard (bool applyCollInTimeRangeStandard) { mApplyCollInTimeRangeStandard = applyCollInTimeRangeStandard; }
150174
175+ // / Set the Run2 AliEventCuts cut
176+ void setApplyRun2AliEventCuts (bool applyRun2AliEventCuts) { mApplyRun2AliEventCuts = applyRun2AliEventCuts; }
177+
178+ // / Set the Run2 INELgtZERO cut
179+ void setApplyRun2INELgtZERO (bool applyRun2INELgtZERO) { mApplyRun2INELgtZERO = applyRun2INELgtZERO; }
180+
151181 // / Check whether the collisions fulfills the specified selections
152182 // / \tparam T type of the collision
153183 // / \param col Collision
@@ -195,6 +225,10 @@ class CollisonCuts
195225 LOGF (debug, " Pileup rejection failed" );
196226 return false ;
197227 }
228+ if (!col.selection_bit (o2::aod::evsel::kNoCollInTimeRangeNarrow ) && mApplyCollInTimeRangeNarrow ) {
229+ LOGF (debug, " NoCollInTimeRangeNarrow selection failed" );
230+ return false ;
231+ }
198232 mHistogramRegistry ->fill (HIST (" CollCutCounts" ), EvtSel::kFlagBunchPileup );
199233 if (!col.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV ) && mApplyZvertexTimedifference ) {
200234 LOGF (debug, " Z-vertex time difference cut failed" );
@@ -220,11 +254,16 @@ class CollisonCuts
220254 return false ;
221255 }
222256 auto bc = col.template bc_as <BCsWithRun2Info>();
223- if (!(bc.eventCuts () & BIT (aod::Run2EventCuts::kAliEventCutsAccepted ))) {
257+ if (!(bc.eventCuts () & BIT (aod::Run2EventCuts::kAliEventCutsAccepted )) && ! mApplyRun2AliEventCuts ) {
224258 LOGF (debug, " Offline selection failed (AliEventCuts)" );
225259 return false ;
226260 }
227- mHistogramRegistry ->fill (HIST (" CollCutCounts" ), EvtSel::kFlagTrigerTVX );
261+ mHistogramRegistry ->fill (HIST (" CollCutCounts" ), EvtSel::kFlagSel8 );
262+ if (!(bc.eventCuts () & BIT (aod::Run2EventCuts::kINELgtZERO )) && !mApplyRun2INELgtZERO ) {
263+ LOGF (debug, " INELgtZERO selection failed" );
264+ return false ;
265+ }
266+ mHistogramRegistry ->fill (HIST (" CollCutCounts" ), EvtSel::kAllpassed );
228267 }
229268 if (mCheckTrigger && !col.alias_bit (mTrigger )) {
230269 LOGF (debug, " Trigger selection failed" );
@@ -286,10 +325,13 @@ class CollisonCuts
286325 bool mInitialTriggerScan = false ; // /< Check trigger when the event is first selected
287326 bool mApplyTFBorderCut = false ; // /< Apply time frame border cut
288327 bool mApplyITSTPCvertex = false ; // /< Apply at least one ITS-TPC track for vertexing
328+ bool mApplyCollInTimeRangeNarrow = false ; // /< Apply NoCollInTimeRangeNarrow selection
289329 bool mApplyZvertexTimedifference = false ; // /< removes collisions with large differences between z of PV by tracks and z of PV from FT0 A-C time difference.
290330 bool mApplyPileupRejection = false ; // /< Pileup rejection
291331 bool mApplyNoITSROBorderCut = false ; // /< Apply NoITSRO frame border cut
292332 bool mApplyCollInTimeRangeStandard = false ; // /< Apply NoCollInTimeRangeStandard selection
333+ bool mApplyRun2AliEventCuts = true ; // /< Apply Run2 AliEventCuts
334+ bool mApplyRun2INELgtZERO = false ; // /< Apply Run2 INELgtZERO selection
293335 int mTrigger = kINT7 ; // /< Trigger to check for
294336 float mZvtxMax = 999 .f; // /< Maximal deviation from nominal z-vertex (cm)
295337 int mtrackOccupancyInTimeRangeMax = -1 ; // /< Maximum trackOccupancyInTimeRange cut (-1 no cut)
0 commit comments