Skip to content

Commit d565c3f

Browse files
authored
[PWGLF] Add event selection options for Run2 and Run3 further cuts in collisionCuts (AliceO2Group#9614)
1 parent db858c5 commit d565c3f

File tree

3 files changed

+60
-6
lines changed

3 files changed

+60
-6
lines changed

PWGLF/TableProducer/Resonances/resonanceInitializer.cxx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,12 @@ struct ResonanceInitializer {
9999
Configurable<bool> cfgEvtTriggerTVXSel{"cfgEvtTriggerTVXSel", false, "Evt sel: triggerTVX selection (MB)"};
100100
Configurable<bool> cfgEvtTFBorderCut{"cfgEvtTFBorderCut", false, "Evt sel: apply TF border cut"};
101101
Configurable<bool> cfgEvtUseITSTPCvertex{"cfgEvtUseITSTPCvertex", false, "Evt sel: use at lease on ITS-TPC track for vertexing"};
102+
Configurable<bool> cfgEvtCollInTimeRangeNarrow{"cfgEvtCollInTimeRangeNarrow", false, "Evt sel: apply NoCollInTimeRangeNarrow"};
102103
Configurable<bool> cfgEvtZvertexTimedifference{"cfgEvtZvertexTimedifference", false, "Evt sel: apply Z-vertex time difference"};
103104
Configurable<bool> cfgEvtPileupRejection{"cfgEvtPileupRejection", false, "Evt sel: apply pileup rejection"};
104105
Configurable<bool> cfgEvtNoITSROBorderCut{"cfgEvtNoITSROBorderCut", false, "Evt sel: apply NoITSRO border cut"};
106+
Configurable<bool> cfgEvtRun2AliEventCuts{"cfgEvtRun2AliEventCuts", true, "Evt sel: apply Run2 AliEventCuts"};
107+
Configurable<bool> cfgEvtRun2INELgtZERO{"cfgEvtRun2INELgtZERO", false, "Evt sel: apply Run2 INELgtZERO"};
105108

106109
Configurable<std::string> cfgMultName{"cfgMultName", "FT0M", "The name of multiplicity estimator"};
107110

@@ -969,9 +972,12 @@ struct ResonanceInitializer {
969972
colCuts.setTriggerTVX(cfgEvtTriggerTVXSel);
970973
colCuts.setApplyTFBorderCut(cfgEvtTFBorderCut);
971974
colCuts.setApplyITSTPCvertex(cfgEvtUseITSTPCvertex);
975+
colCuts.setApplyCollInTimeRangeNarrow(cfgEvtCollInTimeRangeNarrow);
972976
colCuts.setApplyZvertexTimedifference(cfgEvtZvertexTimedifference);
973977
colCuts.setApplyPileupRejection(cfgEvtPileupRejection);
974978
colCuts.setApplyNoITSROBorderCut(cfgEvtNoITSROBorderCut);
979+
colCuts.setApplyRun2AliEventCuts(cfgEvtRun2AliEventCuts);
980+
colCuts.setApplyRun2INELgtZERO(cfgEvtRun2INELgtZERO);
975981
if (!cfgBypassCCDB) {
976982
ccdb->setURL(ccdbURL.value);
977983
ccdb->setCaching(true);
@@ -1043,7 +1049,7 @@ struct ResonanceInitializer {
10431049
LOGF(info, "Bz set to %f for run: ", dBz, mRunNumber);
10441050
}
10451051

1046-
void processDummy(ResoRun2Events const& /*collisions*/)
1052+
void processDummy(aod::Collisions const& /*collisions*/)
10471053
{
10481054
}
10491055
PROCESS_SWITCH(ResonanceInitializer, processDummy, "Process for dummy", true);

PWGLF/TableProducer/Resonances/resonanceModuleInitializer.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,12 @@ struct ResonanceModuleInitializer {
100100
Configurable<bool> cfgEvtTriggerTVXSel{"cfgEvtTriggerTVXSel", false, "Evt sel: triggerTVX selection (MB)"};
101101
Configurable<bool> cfgEvtTFBorderCut{"cfgEvtTFBorderCut", false, "Evt sel: apply TF border cut"};
102102
Configurable<bool> cfgEvtUseITSTPCvertex{"cfgEvtUseITSTPCvertex", false, "Evt sel: use at lease on ITS-TPC track for vertexing"};
103+
Configurable<bool> cfgEvtCollInTimeRangeNarrow{"cfgEvtCollInTimeRangeNarrow", false, "Evt sel: apply NoCollInTimeRangeNarrow"};
103104
Configurable<bool> cfgEvtZvertexTimedifference{"cfgEvtZvertexTimedifference", false, "Evt sel: apply Z-vertex time difference"};
104105
Configurable<bool> cfgEvtPileupRejection{"cfgEvtPileupRejection", false, "Evt sel: apply pileup rejection"};
105106
Configurable<bool> cfgEvtNoITSROBorderCut{"cfgEvtNoITSROBorderCut", false, "Evt sel: apply NoITSRO border cut"};
107+
Configurable<bool> cfgEvtRun2AliEventCuts{"cfgEvtRun2AliEventCuts", true, "Evt sel: apply Run2 AliEventCuts"};
108+
Configurable<bool> cfgEvtRun2INELgtZERO{"cfgEvtRun2INELgtZERO", false, "Evt sel: apply Run2 INELgtZERO"};
106109

107110
// Spherocity configuration
108111
Configurable<int> cfgTrackSphMin{"cfgTrackSphMin", 10, "Number of tracks for Spherocity Calculation"};
@@ -160,9 +163,12 @@ struct ResonanceModuleInitializer {
160163
colCuts.setTriggerTVX(cfgEvtTriggerTVXSel);
161164
colCuts.setApplyTFBorderCut(cfgEvtTFBorderCut);
162165
colCuts.setApplyITSTPCvertex(cfgEvtUseITSTPCvertex);
166+
colCuts.setApplyCollInTimeRangeNarrow(cfgEvtCollInTimeRangeNarrow);
163167
colCuts.setApplyZvertexTimedifference(cfgEvtZvertexTimedifference);
164168
colCuts.setApplyPileupRejection(cfgEvtPileupRejection);
165169
colCuts.setApplyNoITSROBorderCut(cfgEvtNoITSROBorderCut);
170+
colCuts.setApplyRun2AliEventCuts(cfgEvtRun2AliEventCuts);
171+
colCuts.setApplyRun2INELgtZERO(cfgEvtRun2INELgtZERO);
166172

167173
// Configure CCDB access if not bypassed
168174
if (!cfgBypassCCDB) {

PWGLF/Utils/collisionCuts.h

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)