Skip to content

Commit e73d5c9

Browse files
Joonsuk Baeclaude
andcommitted
[PWGJE] jetCrossSectionEfficiency: address review comments of #16546
* Restore <TH1.h> and <TH2.h>. They were dropped in #16546 although the task uses registry.get<TH1>()/get<TH2>(); the build only survived because both arrive transitively through HistogramRegistry.h. The other removals (<algorithm>, <cstddef>, <set>, <utility>, <vector>) match symbols that are no longer used, and <cstdint> is needed for the fixed-width mask member. * Replace the magic-number bin indices of the two cascade variants by enums. They are unscoped, like the counter enums in the other PWGJE tasks, so the enumerators serve directly as bin numbers. Names spell out the variant they belong to (collRecoFirst, bcBitsFirst) and the event-selection flag each step checks. * Drop the redundant local copy of the eventSelections configurable and dispatch the preset through a single switch. * Rename the constexpr constants to UpperCamelCase, as required by the o2-linter rule name/constexpr-constant. Bin numbering, histogram labels and process-function logic are unchanged; the axis labels are identical before and after. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017xzpJe4BMMjS3m14A9w8V4
1 parent f46209e commit e73d5c9

1 file changed

Lines changed: 152 additions & 110 deletions

File tree

PWGJE/Tasks/jetCrossSectionEfficiency.cxx

Lines changed: 152 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
#include <Framework/InitContext.h>
3333
#include <Framework/runDataProcessing.h>
3434

35+
#include <TH1.h>
36+
#include <TH2.h>
37+
3538
#include <cmath>
3639
#include <cstdint>
3740
#include <string>
@@ -86,34 +89,67 @@ struct JetCrossSectionEfficiency {
8689
SplitOkCheckFirstAssocCollOnly // 2
8790
};
8891

89-
static constexpr float configSwitchLow = -98.0f;
90-
static constexpr float configSwitchHigh = 9998.0f;
91-
static constexpr float kBrokenPtHardSentinel = 1.0f;
92+
static constexpr float ConfigSwitchLow = -98.0f;
93+
static constexpr float ConfigSwitchHigh = 9998.0f;
94+
static constexpr float BrokenPtHardSentinel = 1.0f;
9295

9396
// CollRecoFirst: reco collision required first; BC bits read from the reco-coll EvSels.
94-
static constexpr int kBinCRF_Inel = 1;
95-
static constexpr int kBinCRF_RctPass = 2;
96-
static constexpr int kBinCRF_HasColl = 3;
97-
static constexpr int kBinCRF_Zreco = 4;
98-
static constexpr int kBinCRF_NoSplit = 5;
99-
static constexpr int kBinCRF_TVX = 6;
100-
static constexpr int kBinCRF_TFB = 7;
101-
static constexpr int kBinCRF_ROFB = 8;
102-
static constexpr int kBinCRF_SBP = 9;
103-
static constexpr int kBinCRF_N = 9;
97+
enum BinCollRecoFirst {
98+
CollRecoFirstInel = 1,
99+
CollRecoFirstRct,
100+
CollRecoFirstHasCollision,
101+
CollRecoFirstVertexZ,
102+
CollRecoFirstNoSplit,
103+
CollRecoFirstTvx,
104+
CollRecoFirstNoTimeFrameBorder,
105+
CollRecoFirstNoItsRofBorder,
106+
CollRecoFirstNoSameBunchPileup,
107+
CollRecoFirstNBins = CollRecoFirstNoSameBunchPileup
108+
};
104109

105110
// BcBitsFirst: BC bits read from the MC truth BC; SBP from a Preslice count
106111
// (exactly one MC collision per truth BC) so it works before requiring reco.
107-
static constexpr int kBinBBF_Inel = 1;
108-
static constexpr int kBinBBF_RctPass = 2;
109-
static constexpr int kBinBBF_TVX = 3;
110-
static constexpr int kBinBBF_TFB = 4;
111-
static constexpr int kBinBBF_ROFB = 5;
112-
static constexpr int kBinBBF_TruthSBP = 6;
113-
static constexpr int kBinBBF_HasColl = 7;
114-
static constexpr int kBinBBF_Zreco = 8;
115-
static constexpr int kBinBBF_NoSplit = 9;
116-
static constexpr int kBinBBF_N = 9;
112+
enum BinBcBitsFirst {
113+
BcBitsFirstInel = 1,
114+
BcBitsFirstRct,
115+
BcBitsFirstTvx,
116+
BcBitsFirstNoTimeFrameBorder,
117+
BcBitsFirstNoItsRofBorder,
118+
BcBitsFirstNoSameBunchPileupTruth,
119+
BcBitsFirstHasCollision,
120+
BcBitsFirstVertexZ,
121+
BcBitsFirstNoSplit,
122+
BcBitsFirstNBins = BcBitsFirstNoSplit
123+
};
124+
125+
enum EventSelectionPreset {
126+
PresetSelTvx = 0,
127+
PresetSelMc,
128+
PresetSelMcFull,
129+
PresetSel8,
130+
PresetSel8Full,
131+
PresetInvalid
132+
};
133+
134+
static EventSelectionPreset getEventSelectionPreset(const std::string& preset)
135+
{
136+
if (preset == "selTVX") {
137+
return PresetSelTvx;
138+
}
139+
if (preset == "selMC") {
140+
return PresetSelMc;
141+
}
142+
if (preset == "selMCFull") {
143+
return PresetSelMcFull;
144+
}
145+
if (preset == "sel8") {
146+
return PresetSel8;
147+
}
148+
if (preset == "sel8Full") {
149+
return PresetSel8Full;
150+
}
151+
return PresetInvalid;
152+
}
117153

118154
Preslice<aod::JetMcCollisions> mcCollsPerBC = aod::jmccollision::bcId;
119155

@@ -126,93 +162,99 @@ struct JetCrossSectionEfficiency {
126162
rctChecker.init(static_cast<std::string>(rctSelectionsLabel));
127163
rctMask = rctChecker.value();
128164

129-
const std::string es = eventSelections;
130-
if (es == "selTVX") {
131-
applyTFB = false;
132-
applyROFB = false;
133-
applySBP = false;
134-
} else if (es == "selMC") {
135-
applyTFB = true;
136-
applyROFB = false;
137-
applySBP = false;
138-
} else if (es == "selMCFull") {
139-
applyTFB = true;
140-
applyROFB = false;
141-
applySBP = true;
142-
} else if (es == "sel8") {
143-
applyTFB = true;
144-
applyROFB = true;
145-
applySBP = false;
146-
} else if (es == "sel8Full") {
147-
applyTFB = true;
148-
applyROFB = true;
149-
applySBP = true;
150-
} else {
151-
LOGF(fatal, "Configurable eventSelections=%s not supported; use selTVX, selMC, selMCFull, sel8, or sel8Full", es.c_str());
165+
switch (getEventSelectionPreset(static_cast<std::string>(eventSelections))) {
166+
case PresetSelTvx:
167+
applyTFB = false;
168+
applyROFB = false;
169+
applySBP = false;
170+
break;
171+
case PresetSelMc:
172+
applyTFB = true;
173+
applyROFB = false;
174+
applySBP = false;
175+
break;
176+
case PresetSelMcFull:
177+
applyTFB = true;
178+
applyROFB = false;
179+
applySBP = true;
180+
break;
181+
case PresetSel8:
182+
applyTFB = true;
183+
applyROFB = true;
184+
applySBP = false;
185+
break;
186+
case PresetSel8Full:
187+
applyTFB = true;
188+
applyROFB = true;
189+
applySBP = true;
190+
break;
191+
default:
192+
LOGF(fatal, "Configurable eventSelections=%s not supported; use selTVX, selMC, selMCFull, sel8, or sel8Full", static_cast<std::string>(eventSelections).c_str());
193+
break;
152194
}
153195

154196
AxisSpec jetPtAxis = {200, 0., jetPtMax, "#it{p}_{T} (GeV/#it{c})"};
155197

156198
if (doprocessCrossSectionEfficiency) {
157-
AxisSpec axCRF = {kBinCRF_N, 0.5, static_cast<double>(kBinCRF_N) + 0.5, "event selection (CollRecoFirst)"};
199+
AxisSpec axisSelectionCollRecoFirst = {CollRecoFirstNBins, 0.5, static_cast<double>(CollRecoFirstNBins) + 0.5, "event selection (CollRecoFirst)"};
158200
registry.add("h2_jet_pt_part_eventselection_collRecoFirst",
159201
"part jet pT vs event selection (CollRecoFirst);#it{p}_{T,jet}^{part} (GeV/#it{c});event selection;counts",
160-
{HistType::kTH2F, {jetPtAxis, axCRF}});
161-
auto hCRF2 = registry.get<TH2>(HIST("h2_jet_pt_part_eventselection_collRecoFirst"));
162-
hCRF2->GetYaxis()->SetBinLabel(kBinCRF_Inel, "INEL");
163-
hCRF2->GetYaxis()->SetBinLabel(kBinCRF_RctPass, "+RCT_pass");
164-
hCRF2->GetYaxis()->SetBinLabel(kBinCRF_HasColl, "+hasRecoColl");
165-
hCRF2->GetYaxis()->SetBinLabel(kBinCRF_Zreco, "+|zReco|<10");
166-
hCRF2->GetYaxis()->SetBinLabel(kBinCRF_NoSplit, "+noSplit");
167-
hCRF2->GetYaxis()->SetBinLabel(kBinCRF_TVX, "+kTVX");
168-
hCRF2->GetYaxis()->SetBinLabel(kBinCRF_TFB, "+kNoTFB");
169-
hCRF2->GetYaxis()->SetBinLabel(kBinCRF_ROFB, "+kNoITSROFB");
170-
hCRF2->GetYaxis()->SetBinLabel(kBinCRF_SBP, "+kNoSBP");
202+
{HistType::kTH2F, {jetPtAxis, axisSelectionCollRecoFirst}});
203+
auto hJetPtCollRecoFirst = registry.get<TH2>(HIST("h2_jet_pt_part_eventselection_collRecoFirst"));
204+
hJetPtCollRecoFirst->GetYaxis()->SetBinLabel(CollRecoFirstInel, "INEL");
205+
hJetPtCollRecoFirst->GetYaxis()->SetBinLabel(CollRecoFirstRct, "+RCT_pass");
206+
hJetPtCollRecoFirst->GetYaxis()->SetBinLabel(CollRecoFirstHasCollision, "+hasRecoColl");
207+
hJetPtCollRecoFirst->GetYaxis()->SetBinLabel(CollRecoFirstVertexZ, "+|zReco|<10");
208+
hJetPtCollRecoFirst->GetYaxis()->SetBinLabel(CollRecoFirstNoSplit, "+noSplit");
209+
hJetPtCollRecoFirst->GetYaxis()->SetBinLabel(CollRecoFirstTvx, "+kTVX");
210+
hJetPtCollRecoFirst->GetYaxis()->SetBinLabel(CollRecoFirstNoTimeFrameBorder, "+kNoTFB");
211+
hJetPtCollRecoFirst->GetYaxis()->SetBinLabel(CollRecoFirstNoItsRofBorder, "+kNoITSROFB");
212+
hJetPtCollRecoFirst->GetYaxis()->SetBinLabel(CollRecoFirstNoSameBunchPileup, "+kNoSBP");
171213

172214
registry.add("h_mccollisions_eventselection_collRecoFirst",
173215
"number of mc events vs event selection (CollRecoFirst);event selection;entries",
174-
{HistType::kTH1F, {{kBinCRF_N, 0.5, static_cast<double>(kBinCRF_N) + 0.5}}});
175-
auto hCRF1 = registry.get<TH1>(HIST("h_mccollisions_eventselection_collRecoFirst"));
176-
hCRF1->GetXaxis()->SetBinLabel(kBinCRF_Inel, "INEL");
177-
hCRF1->GetXaxis()->SetBinLabel(kBinCRF_RctPass, "+RCT_pass");
178-
hCRF1->GetXaxis()->SetBinLabel(kBinCRF_HasColl, "+hasRecoColl");
179-
hCRF1->GetXaxis()->SetBinLabel(kBinCRF_Zreco, "+|zReco|<10");
180-
hCRF1->GetXaxis()->SetBinLabel(kBinCRF_NoSplit, "+noSplit");
181-
hCRF1->GetXaxis()->SetBinLabel(kBinCRF_TVX, "+kTVX");
182-
hCRF1->GetXaxis()->SetBinLabel(kBinCRF_TFB, "+kNoTFB");
183-
hCRF1->GetXaxis()->SetBinLabel(kBinCRF_ROFB, "+kNoITSROFB");
184-
hCRF1->GetXaxis()->SetBinLabel(kBinCRF_SBP, "+kNoSBP");
216+
{HistType::kTH1F, {{CollRecoFirstNBins, 0.5, static_cast<double>(CollRecoFirstNBins) + 0.5}}});
217+
auto hMcCollisionsCollRecoFirst = registry.get<TH1>(HIST("h_mccollisions_eventselection_collRecoFirst"));
218+
hMcCollisionsCollRecoFirst->GetXaxis()->SetBinLabel(CollRecoFirstInel, "INEL");
219+
hMcCollisionsCollRecoFirst->GetXaxis()->SetBinLabel(CollRecoFirstRct, "+RCT_pass");
220+
hMcCollisionsCollRecoFirst->GetXaxis()->SetBinLabel(CollRecoFirstHasCollision, "+hasRecoColl");
221+
hMcCollisionsCollRecoFirst->GetXaxis()->SetBinLabel(CollRecoFirstVertexZ, "+|zReco|<10");
222+
hMcCollisionsCollRecoFirst->GetXaxis()->SetBinLabel(CollRecoFirstNoSplit, "+noSplit");
223+
hMcCollisionsCollRecoFirst->GetXaxis()->SetBinLabel(CollRecoFirstTvx, "+kTVX");
224+
hMcCollisionsCollRecoFirst->GetXaxis()->SetBinLabel(CollRecoFirstNoTimeFrameBorder, "+kNoTFB");
225+
hMcCollisionsCollRecoFirst->GetXaxis()->SetBinLabel(CollRecoFirstNoItsRofBorder, "+kNoITSROFB");
226+
hMcCollisionsCollRecoFirst->GetXaxis()->SetBinLabel(CollRecoFirstNoSameBunchPileup, "+kNoSBP");
185227
}
186228

187229
if (doprocessCrossSectionEfficiencyBcBitsFirst) {
188-
AxisSpec axBBF = {kBinBBF_N, 0.5, static_cast<double>(kBinBBF_N) + 0.5, "event selection (BcBitsFirst)"};
230+
AxisSpec axisSelectionBcBitsFirst = {BcBitsFirstNBins, 0.5, static_cast<double>(BcBitsFirstNBins) + 0.5, "event selection (BcBitsFirst)"};
189231
registry.add("h2_jet_pt_part_eventselection_bcBitsFirst",
190232
"part jet pT vs event selection (BcBitsFirst);#it{p}_{T,jet}^{part} (GeV/#it{c});event selection;counts",
191-
{HistType::kTH2F, {jetPtAxis, axBBF}});
192-
auto hBBF2 = registry.get<TH2>(HIST("h2_jet_pt_part_eventselection_bcBitsFirst"));
193-
hBBF2->GetYaxis()->SetBinLabel(kBinBBF_Inel, "INEL");
194-
hBBF2->GetYaxis()->SetBinLabel(kBinBBF_RctPass, "+RCT_pass");
195-
hBBF2->GetYaxis()->SetBinLabel(kBinBBF_TVX, "+kTVX(truth)");
196-
hBBF2->GetYaxis()->SetBinLabel(kBinBBF_TFB, "+kNoTFB(truth)");
197-
hBBF2->GetYaxis()->SetBinLabel(kBinBBF_ROFB, "+kNoITSROFB(truth)");
198-
hBBF2->GetYaxis()->SetBinLabel(kBinBBF_TruthSBP, "+kNoSBP(truth)");
199-
hBBF2->GetYaxis()->SetBinLabel(kBinBBF_HasColl, "+hasColl");
200-
hBBF2->GetYaxis()->SetBinLabel(kBinBBF_Zreco, "+|zReco|<10");
201-
hBBF2->GetYaxis()->SetBinLabel(kBinBBF_NoSplit, "+noSplit");
233+
{HistType::kTH2F, {jetPtAxis, axisSelectionBcBitsFirst}});
234+
auto hJetPtBcBitsFirst = registry.get<TH2>(HIST("h2_jet_pt_part_eventselection_bcBitsFirst"));
235+
hJetPtBcBitsFirst->GetYaxis()->SetBinLabel(BcBitsFirstInel, "INEL");
236+
hJetPtBcBitsFirst->GetYaxis()->SetBinLabel(BcBitsFirstRct, "+RCT_pass");
237+
hJetPtBcBitsFirst->GetYaxis()->SetBinLabel(BcBitsFirstTvx, "+kTVX(truth)");
238+
hJetPtBcBitsFirst->GetYaxis()->SetBinLabel(BcBitsFirstNoTimeFrameBorder, "+kNoTFB(truth)");
239+
hJetPtBcBitsFirst->GetYaxis()->SetBinLabel(BcBitsFirstNoItsRofBorder, "+kNoITSROFB(truth)");
240+
hJetPtBcBitsFirst->GetYaxis()->SetBinLabel(BcBitsFirstNoSameBunchPileupTruth, "+kNoSBP(truth)");
241+
hJetPtBcBitsFirst->GetYaxis()->SetBinLabel(BcBitsFirstHasCollision, "+hasColl");
242+
hJetPtBcBitsFirst->GetYaxis()->SetBinLabel(BcBitsFirstVertexZ, "+|zReco|<10");
243+
hJetPtBcBitsFirst->GetYaxis()->SetBinLabel(BcBitsFirstNoSplit, "+noSplit");
202244

203245
registry.add("h_mccollisions_eventselection_bcBitsFirst",
204246
"number of mc events vs event selection (BcBitsFirst);event selection;entries",
205-
{HistType::kTH1F, {{kBinBBF_N, 0.5, static_cast<double>(kBinBBF_N) + 0.5}}});
206-
auto hBBF1 = registry.get<TH1>(HIST("h_mccollisions_eventselection_bcBitsFirst"));
207-
hBBF1->GetXaxis()->SetBinLabel(kBinBBF_Inel, "INEL");
208-
hBBF1->GetXaxis()->SetBinLabel(kBinBBF_RctPass, "+RCT_pass");
209-
hBBF1->GetXaxis()->SetBinLabel(kBinBBF_TVX, "+kTVX(truth)");
210-
hBBF1->GetXaxis()->SetBinLabel(kBinBBF_TFB, "+kNoTFB(truth)");
211-
hBBF1->GetXaxis()->SetBinLabel(kBinBBF_ROFB, "+kNoITSROFB(truth)");
212-
hBBF1->GetXaxis()->SetBinLabel(kBinBBF_TruthSBP, "+kNoSBP(truth)");
213-
hBBF1->GetXaxis()->SetBinLabel(kBinBBF_HasColl, "+hasColl");
214-
hBBF1->GetXaxis()->SetBinLabel(kBinBBF_Zreco, "+|zReco|<10");
215-
hBBF1->GetXaxis()->SetBinLabel(kBinBBF_NoSplit, "+noSplit");
247+
{HistType::kTH1F, {{BcBitsFirstNBins, 0.5, static_cast<double>(BcBitsFirstNBins) + 0.5}}});
248+
auto hMcCollisionsBcBitsFirst = registry.get<TH1>(HIST("h_mccollisions_eventselection_bcBitsFirst"));
249+
hMcCollisionsBcBitsFirst->GetXaxis()->SetBinLabel(BcBitsFirstInel, "INEL");
250+
hMcCollisionsBcBitsFirst->GetXaxis()->SetBinLabel(BcBitsFirstRct, "+RCT_pass");
251+
hMcCollisionsBcBitsFirst->GetXaxis()->SetBinLabel(BcBitsFirstTvx, "+kTVX(truth)");
252+
hMcCollisionsBcBitsFirst->GetXaxis()->SetBinLabel(BcBitsFirstNoTimeFrameBorder, "+kNoTFB(truth)");
253+
hMcCollisionsBcBitsFirst->GetXaxis()->SetBinLabel(BcBitsFirstNoItsRofBorder, "+kNoITSROFB(truth)");
254+
hMcCollisionsBcBitsFirst->GetXaxis()->SetBinLabel(BcBitsFirstNoSameBunchPileupTruth, "+kNoSBP(truth)");
255+
hMcCollisionsBcBitsFirst->GetXaxis()->SetBinLabel(BcBitsFirstHasCollision, "+hasColl");
256+
hMcCollisionsBcBitsFirst->GetXaxis()->SetBinLabel(BcBitsFirstVertexZ, "+|zReco|<10");
257+
hMcCollisionsBcBitsFirst->GetXaxis()->SetBinLabel(BcBitsFirstNoSplit, "+noSplit");
216258
}
217259
}
218260

@@ -221,7 +263,7 @@ struct JetCrossSectionEfficiency {
221263
{
222264
float ptHardFromMc = ptHardCalcMethodSwitch;
223265
float storedPtHard = mccollision.ptHard();
224-
if (storedPtHard > kBrokenPtHardSentinel && storedPtHard < ptHardCalcMethodSwitch) {
266+
if (storedPtHard > BrokenPtHardSentinel && storedPtHard < ptHardCalcMethodSwitch) {
225267
ptHardFromMc = storedPtHard;
226268
}
227269
float weight = mccollision.weight();
@@ -233,13 +275,13 @@ struct JetCrossSectionEfficiency {
233275
template <typename TTracks, typename TJets>
234276
bool isAcceptedJet(TJets const& jet)
235277
{
236-
if (jetAreaFractionMin > configSwitchLow) {
278+
if (jetAreaFractionMin > ConfigSwitchLow) {
237279
if (jet.area() < jetAreaFractionMin * o2::constants::math::PI * (jet.r() / 100.0) * (jet.r() / 100.0)) {
238280
return false;
239281
}
240282
}
241-
bool checkConstituentMinPt = (leadingConstituentPtMinMCP > configSwitchLow);
242-
bool checkConstituentMaxPt = (leadingConstituentPtMaxMCP < configSwitchHigh);
283+
bool checkConstituentMinPt = (leadingConstituentPtMinMCP > ConfigSwitchLow);
284+
bool checkConstituentMaxPt = (leadingConstituentPtMaxMCP < ConfigSwitchHigh);
243285
bool checkConstituentPt = checkConstituentMinPt || checkConstituentMaxPt;
244286

245287
if (checkConstituentPt) {
@@ -299,17 +341,17 @@ struct JetCrossSectionEfficiency {
299341
}
300342

301343
bool passesRct = applyRCT ? (mccollision.bc_as<aod::JBCs>().rct_raw() & rctMask) == 0 : true;
302-
bool pass[kBinCRF_N + 1] = {false, true, passesRct, hasRecoColl, passesZvtxCutReco,
303-
hasRecoColl && noSplitPass, passesTVX,
304-
applyTFB ? passesNoTFB : true,
305-
applyROFB ? passesNoITSROFB : true,
306-
applySBP ? passesNoSBP : true};
344+
bool pass[CollRecoFirstNBins + 1] = {false, true, passesRct, hasRecoColl, passesZvtxCutReco,
345+
hasRecoColl && noSplitPass, passesTVX,
346+
applyTFB ? passesNoTFB : true,
347+
applyROFB ? passesNoITSROFB : true,
348+
applySBP ? passesNoSBP : true};
307349

308350
// Unified weight handling: MB MC -> weight=1 (no-op), JJ MC -> per-event sigma fraction.
309351
float weight = mccollision.weight();
310352

311353
int sMax = 0;
312-
for (int s = kBinCRF_Inel; s <= kBinCRF_N; ++s) {
354+
for (int s = CollRecoFirstInel; s <= CollRecoFirstNBins; ++s) {
313355
if (!pass[s])
314356
break;
315357
registry.fill(HIST("h_mccollisions_eventselection_collRecoFirst"), static_cast<double>(s), weight);
@@ -330,7 +372,7 @@ struct JetCrossSectionEfficiency {
330372
!isAcceptedJet<aod::JetParticles>(jet)) {
331373
continue;
332374
}
333-
for (int s = kBinCRF_Inel; s <= sMax; ++s) {
375+
for (int s = CollRecoFirstInel; s <= sMax; ++s) {
334376
registry.fill(HIST("h2_jet_pt_part_eventselection_collRecoFirst"), jet.pt(), static_cast<double>(s), weight);
335377
}
336378
}
@@ -375,16 +417,16 @@ struct JetCrossSectionEfficiency {
375417
bool noSplitPass = (acceptSplitCollisions == NonSplitOnly) ? (collisions.size() == 1) : true;
376418

377419
bool passesRct = applyRCT ? (truthBC.rct_raw() & rctMask) == 0 : true;
378-
bool pass[kBinBBF_N + 1] = {false, true, passesRct, passesTVXTruth,
379-
applyTFB ? passesNoTFBTruth : true,
380-
applyROFB ? passesNoITSROFBTruth : true,
381-
applySBP ? truthNoSBP : true,
382-
hasRecoColl, passesZvtxCutReco, hasRecoColl && noSplitPass};
420+
bool pass[BcBitsFirstNBins + 1] = {false, true, passesRct, passesTVXTruth,
421+
applyTFB ? passesNoTFBTruth : true,
422+
applyROFB ? passesNoITSROFBTruth : true,
423+
applySBP ? truthNoSBP : true,
424+
hasRecoColl, passesZvtxCutReco, hasRecoColl && noSplitPass};
383425

384426
float weight = mccollision.weight();
385427

386428
int sMax = 0;
387-
for (int s = kBinBBF_Inel; s <= kBinBBF_N; ++s) {
429+
for (int s = BcBitsFirstInel; s <= BcBitsFirstNBins; ++s) {
388430
if (!pass[s])
389431
break;
390432
registry.fill(HIST("h_mccollisions_eventselection_bcBitsFirst"), static_cast<double>(s), weight);
@@ -405,7 +447,7 @@ struct JetCrossSectionEfficiency {
405447
!isAcceptedJet<aod::JetParticles>(jet)) {
406448
continue;
407449
}
408-
for (int s = kBinBBF_Inel; s <= sMax; ++s) {
450+
for (int s = BcBitsFirstInel; s <= sMax; ++s) {
409451
registry.fill(HIST("h2_jet_pt_part_eventselection_bcBitsFirst"), jet.pt(), static_cast<double>(s), weight);
410452
}
411453
}

0 commit comments

Comments
 (0)