Skip to content

Commit 61fc67d

Browse files
committed
Readjust event selection bits to be backward compatible
1 parent f815356 commit 61fc67d

File tree

2 files changed

+188
-104
lines changed

2 files changed

+188
-104
lines changed

Common/TableProducer/zdcTaskLightIons.cxx

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ struct ZdcTaskLightIons {
5252
Configurable<bool> cfgApplyZvtxCut{"cfgApplyZvtxCut", true, "Event selection: zVtx"};
5353
Configurable<float> cfgEvSelVtxZ{"cfgEvSelVtxZ", 10, "Event selection: zVtx cut value"};
5454
Configurable<bool> cfgEvSelSel8{"cfgEvSelSel8", true, "Event selection: sel8"};
55-
Configurable<bool> cfgIsTriggerTVX{"cfgIsTriggerTVX", true, "Event selection: is trigger TVX"};
5655
Configurable<bool> cfgEvSelsDoOccupancySel{"cfgEvSelsDoOccupancySel", true, "Event selection: do occupancy selection"};
5756
Configurable<float> cfgEvSelsMaxOccupancy{"cfgEvSelsMaxOccupancy", 10000, "Event selection: set max occupancy"};
5857
Configurable<bool> cfgEvSelsNoSameBunchPileupCut{"cfgEvSelsNoSameBunchPileupCut", true, "Event selection: no same bunch pileup cut"};
@@ -61,13 +60,13 @@ struct ZdcTaskLightIons {
6160
Configurable<bool> cfgNoTimeFrameBorder{"cfgNoTimeFrameBorder", true, "Event selection: no time frame border"};
6261
Configurable<bool> cfgNoITSROFFrameBorder{"cfgNoITSROFFrameBorder", true, "Event selection: no ITS ROF frame border"};
6362
Configurable<bool> cfgEvSelsIsGoodITSLayersAll{"cfgEvSelsIsGoodITSLayersAll", true, "Event selection: is good ITS layers all"};
63+
Configurable<bool> cfgIsTriggerTVX{"cfgIsTriggerTVX", true, "Event selection: is trigger TVX"};
6464
//
6565
HistogramRegistry registry{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
6666

6767
enum SelectionCriteria {
6868
evSel_zvtx,
6969
evSel_sel8,
70-
evSel_kIsTriggerTVX,
7170
evSel_occupancy,
7271
evSel_kNoSameBunchPileup,
7372
evSel_kIsGoodZvtxFT0vsPV,
@@ -76,27 +75,28 @@ struct ZdcTaskLightIons {
7675
evSel_kNoITSROFrameBorder,
7776
evSel_kIsGoodITSLayersAll,
7877
evSel_allEvents,
78+
evSel_kIsTriggerTVX,
7979
nEventSelections
8080
};
8181

8282
void init(InitContext const&)
8383
{
8484
registry.add("zdcDebunchHist", "ZN sum vs. diff; ZNA-ZNC (ns); ZNA+ZNC (ns)", {HistType::kTH2D, {{nBinsTiming, -20., 20.}, {nBinsTiming, -20., 20.}}});
8585

86-
// if (doprocessALICEcoll) {
87-
registry.add("hEventCount", "Number of events; Cut; # of selected events ", {HistType::kTH1D, {{nEventSelections, 0, nEventSelections}}});
88-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_allEvents + 1, "All events");
89-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_zvtx + 1, "vtxZ");
90-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_sel8 + 1, "sel8");
91-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kIsTriggerTVX + 1, "kIsTriggerTVX");
92-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_occupancy + 1, "kOccupancy");
93-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kNoSameBunchPileup + 1, "kNoSameBunchPileup");
94-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kIsGoodZvtxFT0vsPV + 1, "kIsGoodZvtxFT0vsPV");
95-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kNoCollInTimeRangeStandard + 1, "kNoCollInTimeRangeStandard");
96-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kNoTimeFrameBorder + 1, "kNoTimeFrameBorder");
97-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kNoITSROFrameBorder + 1, "kNoITSROFrameBorder");
98-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kIsGoodITSLayersAll + 1, "kkIsGoodITSLayersAll");
99-
//}
86+
if (doprocessALICEcoll) {
87+
registry.add("hEventCount", "Number of events; Cut; # of selected events ", {HistType::kTH1D, {{nEventSelections, 0, nEventSelections}}});
88+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_allEvents + 1, "All events");
89+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_zvtx + 1, "vtxZ");
90+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_sel8 + 1, "sel8");
91+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_occupancy + 1, "kOccupancy");
92+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kNoSameBunchPileup + 1, "kNoSameBunchPileup");
93+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kIsGoodZvtxFT0vsPV + 1, "kIsGoodZvtxFT0vsPV");
94+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kNoCollInTimeRangeStandard + 1, "kNoCollInTimeRangeStandard");
95+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kNoTimeFrameBorder + 1, "kNoTimeFrameBorder");
96+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kNoITSROFrameBorder + 1, "kNoITSROFrameBorder");
97+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kIsGoodITSLayersAll + 1, "kkIsGoodITSLayersAll");
98+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(evSel_kIsTriggerTVX + 1, "kIsTriggerTVX");
99+
}
100100
}
101101

102102
template <typename TCollision>
@@ -120,12 +120,6 @@ struct ZdcTaskLightIons {
120120
registry.fill(HIST("hEventCount"), evSel_sel8);
121121
}
122122

123-
selected = collision.selection_bit(kIsTriggerTVX);
124-
if (selected) {
125-
selectionBits |= (uint8_t)(0x1u << evSel_kIsTriggerTVX);
126-
registry.fill(HIST("hEventCount"), evSel_kIsTriggerTVX);
127-
}
128-
129123
auto occupancy = collision.trackOccupancyInTimeRange();
130124
selected = occupancy <= cfgEvSelsMaxOccupancy;
131125
if (selected) {
@@ -169,6 +163,12 @@ struct ZdcTaskLightIons {
169163
registry.fill(HIST("hEventCount"), evSel_kIsGoodITSLayersAll);
170164
}
171165

166+
selected = collision.selection_bit(kIsTriggerTVX);
167+
if (selected) {
168+
selectionBits |= (uint8_t)(0x1u << evSel_kIsTriggerTVX);
169+
registry.fill(HIST("hEventCount"), evSel_kIsTriggerTVX);
170+
}
171+
172172
return selectionBits;
173173
}
174174

0 commit comments

Comments
 (0)