Skip to content

Commit 1810831

Browse files
authored
Rename enumerators in SelectionCriteria
e.g. kIsVertexITSTPC --> IsVertexITSTPC
1 parent 7b04421 commit 1810831

1 file changed

Lines changed: 45 additions & 45 deletions

File tree

Common/TableProducer/zdcExtraTableProducer.cxx

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -73,33 +73,33 @@ struct ZdcExtraTableProducer {
7373
Configurable<bool> cfgSaveQaHistos{"cfgSaveQaHistos", false, "Flag to save QA histograms"};
7474

7575
enum SelectionCriteria {
76-
kZvtx,
77-
kSel8,
78-
kOccupancy,
79-
kNoSameBunchPileup,
80-
kIsGoodZvtxFT0vsPV,
81-
kNoCollInTimeRangeStandard,
82-
kIsVertexITSTPC,
83-
kIsGoodITSLayersAll,
84-
kAllEvents,
85-
kNEventSelections
76+
ZVtxCut,
77+
Sel8,
78+
OccupancyCut,
79+
NoSameBunchPileup,
80+
IsGoodZvtxFT0vsPV,
81+
NoCollInTimeRangeStandard,
82+
IsVertexITSTPC,
83+
IsGoodITSLayersAll,
84+
AllEvents,
85+
NEventSelections
8686
};
8787

8888
HistogramRegistry registry{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
8989

9090
void init(InitContext const&)
9191
{
9292

93-
registry.add("hEventCount", "Number of Event; Cut; #Events Passed Cut", {HistType::kTH1D, {{kNEventSelections, 0, kNEventSelections}}});
94-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kAllEvents + 1, "kAllEvents");
95-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kZvtx + 1, "kZvtx");
96-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kSel8 + 1, "kSel8");
97-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kOccupancy + 1, "kOccupancy");
98-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kNoSameBunchPileup + 1, "kNoSameBunchPileup");
99-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kIsGoodZvtxFT0vsPV + 1, "kIsGoodZvtxFT0vsPV");
100-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kNoCollInTimeRangeStandard + 1, "kNoCollInTimeRangeStandard");
101-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kIsVertexITSTPC + 1, "kIsVertexITSTPC");
102-
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(kIsGoodITSLayersAll + 1, "kIsGoodITSLayersAll");
93+
registry.add("hEventCount", "Number of Event; Cut; #Events Passed Cut", {HistType::kTH1D, {{NEventSelections, 0, NEventSelections}}});
94+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(AllEvents + 1, "AllEvents");
95+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(ZVtxCut + 1, "ZVtxCut");
96+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(Sel8 + 1, "Sel8");
97+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(OccupancyCut + 1, "OccupancyCut");
98+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(NoSameBunchPileup + 1, "NoSameBunchPileup");
99+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(IsGoodZvtxFT0vsPV + 1, "IsGoodZvtxFT0vsPV");
100+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(NoCollInTimeRangeStandard + 1, "NoCollInTimeRangeStandard");
101+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(IsVertexITSTPC + 1, "IsVertexITSTPC");
102+
registry.get<TH1>(HIST("hEventCount"))->GetXaxis()->SetBinLabel(IsGoodITSLayersAll + 1, "IsGoodITSLayersAll");
103103

104104
// Skip histogram registration if QA flag is false
105105
if (!cfgSaveQaHistos) {
@@ -129,55 +129,55 @@ struct ZdcExtraTableProducer {
129129
uint8_t selectionBits = 0;
130130
bool selected;
131131

132-
registry.fill(HIST("hEventCount"), kAllEvents);
132+
registry.fill(HIST("hEventCount"), AllEvents);
133133

134134
selected = std::fabs(collision.posZ()) < cfgEvSelVtxZ;
135135
if (selected) {
136-
SETBIT(selectionBits, kZvtx);
137-
registry.fill(HIST("hEventCount"), kZvtx);
136+
SETBIT(selectionBits, ZVtxCut);
137+
registry.fill(HIST("hEventCount"), ZVtxCut);
138138
}
139139

140140
selected = collision.sel8();
141141
if (selected) {
142-
SETBIT(selectionBits, kSel8);
143-
registry.fill(HIST("hEventCount"), kSel8);
142+
SETBIT(selectionBits, Sel8);
143+
registry.fill(HIST("hEventCount"), Sel8);
144144
}
145145

146146
auto occupancy = collision.trackOccupancyInTimeRange();
147147
selected = occupancy <= cfgEvSelsMaxOccupancy;
148148
if (selected) {
149-
SETBIT(selectionBits, kOccupancy);
150-
registry.fill(HIST("hEventCount"), kOccupancy);
149+
SETBIT(selectionBits, OccupancyCut);
150+
registry.fill(HIST("hEventCount"), OccupancyCut);
151151
}
152152

153153
selected = collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup);
154154
if (selected) {
155-
SETBIT(selectionBits, kNoSameBunchPileup);
156-
registry.fill(HIST("hEventCount"), kNoSameBunchPileup);
155+
SETBIT(selectionBits, NoSameBunchPileup);
156+
registry.fill(HIST("hEventCount"), NoSameBunchPileup);
157157
}
158158

159159
selected = collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV);
160160
if (selected) {
161-
SETBIT(selectionBits, kIsGoodZvtxFT0vsPV);
162-
registry.fill(HIST("hEventCount"), kIsGoodZvtxFT0vsPV);
161+
SETBIT(selectionBits, IsGoodZvtxFT0vsPV);
162+
registry.fill(HIST("hEventCount"), IsGoodZvtxFT0vsPV);
163163
}
164164

165165
selected = collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard);
166166
if (selected) {
167-
SETBIT(selectionBits, kNoCollInTimeRangeStandard);
168-
registry.fill(HIST("hEventCount"), kNoCollInTimeRangeStandard);
167+
SETBIT(selectionBits, NoCollInTimeRangeStandard);
168+
registry.fill(HIST("hEventCount"), NoCollInTimeRangeStandard);
169169
}
170170

171171
selected = collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC);
172172
if (selected) {
173-
SETBIT(selectionBits, kIsVertexITSTPC);
174-
registry.fill(HIST("hEventCount"), kIsVertexITSTPC);
173+
SETBIT(selectionBits, IsVertexITSTPC);
174+
registry.fill(HIST("hEventCount"), IsVertexITSTPC);
175175
}
176176

177177
selected = collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll);
178178
if (selected) {
179-
SETBIT(selectionBits, kIsGoodITSLayersAll);
180-
registry.fill(HIST("hEventCount"), kIsGoodITSLayersAll);
179+
SETBIT(selectionBits, IsGoodITSLayersAll);
180+
registry.fill(HIST("hEventCount"), IsGoodITSLayersAll);
181181
}
182182

183183
return selectionBits;
@@ -196,28 +196,28 @@ struct ZdcExtraTableProducer {
196196

197197
uint8_t evSelection = eventSelected(collision);
198198

199-
if (cfgEvSelSel8 && !TESTBIT(evSelection, kSel8)) {
199+
if (cfgEvSelSel8 && !TESTBIT(evSelection, Sel8)) {
200200
continue;
201201
}
202-
if (!TESTBIT(evSelection, kZvtx)) {
202+
if (!TESTBIT(evSelection, ZVtxCut)) {
203203
continue;
204204
}
205-
if (cfgEvSelsDoOccupancySel && !TESTBIT(evSelection, kOccupancy)) {
205+
if (cfgEvSelsDoOccupancySel && !TESTBIT(evSelection, OccupancyCut)) {
206206
continue;
207207
}
208-
if (cfgEvSelsNoSameBunchPileupCut && !TESTBIT(evSelection, kNoSameBunchPileup)) {
208+
if (cfgEvSelsNoSameBunchPileupCut && !TESTBIT(evSelection, NoSameBunchPileup)) {
209209
continue;
210210
}
211-
if (cfgEvSelsIsGoodZvtxFT0vsPV && !TESTBIT(evSelection, kIsGoodZvtxFT0vsPV)) {
211+
if (cfgEvSelsIsGoodZvtxFT0vsPV && !TESTBIT(evSelection, IsGoodZvtxFT0vsPV)) {
212212
continue;
213213
}
214-
if (cfgEvSelsNoCollInTimeRangeStandard && !TESTBIT(evSelection, kNoCollInTimeRangeStandard)) {
214+
if (cfgEvSelsNoCollInTimeRangeStandard && !TESTBIT(evSelection, NoCollInTimeRangeStandard)) {
215215
continue;
216216
}
217-
if (cfgEvSelsIsVertexITSTPC && !TESTBIT(evSelection, kIsVertexITSTPC)) {
217+
if (cfgEvSelsIsVertexITSTPC && !TESTBIT(evSelection, IsVertexITSTPC)) {
218218
continue;
219219
}
220-
if (cfgEvSelsIsGoodITSLayersAll && !TESTBIT(evSelection, kIsGoodITSLayersAll)) {
220+
if (cfgEvSelsIsGoodITSLayersAll && !TESTBIT(evSelection, IsGoodITSLayersAll)) {
221221
continue;
222222
}
223223

0 commit comments

Comments
 (0)