Skip to content

Commit c717e1d

Browse files
authored
Added evsel QA for periods with INT1 minbias condition (#991)
1 parent d8e2466 commit c717e1d

3 files changed

Lines changed: 24 additions & 12 deletions

File tree

Common/CCDB/EventSelectionParams.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const char* selectionLabels[kNsel] = {
4545
"kNoInconsistentVtx",
4646
"kNoPileupInMultBins",
4747
"kNoPilupMV",
48-
"kNoPileupTPC"
48+
"kNoPileupTPC",
4949
"kIsTriggerTVX",
5050
"kIsINT1"};
5151
}

Common/TableProducer/eventSelection.cxx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ struct BcSelectionTask {
162162
selection[kNoPileupMV] = (eventCuts & 1 << aod::kPileUpMV) > 0;
163163
selection[kNoPileupTPC] = (eventCuts & 1 << aod::kTPCPileUp) > 0;
164164
selection[kIsTriggerTVX] = bc.has_ft0() ? (bc.ft0().triggerMask() & BIT(o2::ft0::Triggers::bitVertex)) > 0 : 0;
165+
selection[kIsINT1] = bbV0A || bbV0C || ofSPD > 0;
165166

166167
int32_t foundFT0 = bc.has_ft0() ? bc.ft0().globalIndex() : -1;
167168
int32_t foundFV0 = bc.has_fv0a() ? bc.fv0a().globalIndex() : -1;
@@ -383,16 +384,17 @@ struct EventSelectionTask {
383384
sel7 &= applySelection[i] ? selection[i] : 1;
384385
}
385386

386-
// TODO apply other cuts for sel8
387-
// TODO introduce sel1 etc?
388387
// TODO introduce array of sel[0]... sel[8] or similar?
389-
bool sel8 = selection[kIsBBT0A] & selection[kIsBBT0C];
388+
bool sel8 = selection[kIsBBT0A] & selection[kIsBBT0C]; // TODO apply other cuts for sel8
389+
bool sel1 = selection[kIsINT1] & selection[kNoBGV0A] & selection[kNoBGV0C] & selection[kNoTPCLaserWarmUp] & selection[kNoTPCHVdip];
390390

391-
// fill counters
391+
// INT1 (SPDFO>0 | V0A | V0C) mimimum bias trigger logic used in pp2010 and pp2011
392+
bool isINT1period = bc.runNumber() <= 136377 || (bc.runNumber() >= 144871 && bc.runNumber() <= 159582);
392393

393-
if (isMC || alias[kINT7]) {
394+
// fill counters
395+
if (isMC || (!isINT1period && alias[kINT7]) || (isINT1period && alias[kINT1])) {
394396
histos.get<TH1>(HIST("hColCounterAll"))->Fill(Form("%d", bc.runNumber()), 1);
395-
if (sel7) {
397+
if ((!isINT1period && sel7) || (isINT1period && sel1)) {
396398
histos.get<TH1>(HIST("hColCounterAcc"))->Fill(Form("%d", bc.runNumber()), 1);
397399
}
398400
}

Common/Tasks/eventSelectionQa.cxx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,15 @@ struct EventSelectionQaTask {
227227
aod::FT0s const& ft0s,
228228
aod::FDDs const& fdds)
229229
{
230+
bool isINT1period = 0;
230231
if (!applySelection) {
231232
auto first_bc = bcs.iteratorAt(0);
232233
EventSelectionParams* par = ccdb->getForTimeStamp<EventSelectionParams>("EventSelection/EventSelectionParams", first_bc.timestamp());
233234
applySelection = par->GetSelection(0);
234235
for (int i = 0; i < kNsel; i++) {
235236
histos.get<TH1>(HIST("hSelMask"))->SetBinContent(i + 1, applySelection[i]);
236237
}
238+
isINT1period = first_bc.runNumber() <= 136377 || (first_bc.runNumber() >= 144871 && first_bc.runNumber() <= 159582);
237239
}
238240

239241
// bc-based event selection qa
@@ -245,19 +247,24 @@ struct EventSelectionQaTask {
245247

246248
// collision-based event selection qa
247249
for (auto& col : cols) {
250+
auto selection = col.selection();
251+
bool sel1 = selection[kIsINT1] & selection[kNoBGV0A] & selection[kNoBGV0C] & selection[kNoTPCLaserWarmUp] & selection[kNoTPCHVdip];
252+
248253
for (int iAlias = 0; iAlias < kNaliases; iAlias++) {
249254
if (!col.alias()[iAlias]) {
250255
continue;
251256
}
252257
histos.fill(HIST("hColCounterAll"), iAlias, 1);
253-
if (!col.sel7()) {
254-
continue;
258+
if ((!isINT1period && col.sel7()) || (isINT1period && sel1)) {
259+
histos.fill(HIST("hColCounterAcc"), iAlias, 1);
255260
}
256-
histos.fill(HIST("hColCounterAcc"), iAlias, 1);
257261
}
258262

263+
bool mb = isMC;
264+
mb |= !isINT1period && col.alias()[kINT7];
265+
mb |= isINT1period && col.alias()[kINT1];
259266
// further checks just on minimum bias triggers
260-
if (!isMC && !col.alias()[kINT7]) {
267+
if (!mb) {
261268
continue;
262269
}
263270
for (int i = 0; i < kNsel; i++) {
@@ -354,7 +361,10 @@ struct EventSelectionQaTask {
354361
histos.fill(HIST("hV0C012vsTklCol"), nTracklets, multRingV0C012);
355362

356363
// filling plots for accepted events
357-
if (!col.sel7()) {
364+
bool accepted = 0;
365+
accepted |= !isINT1period & col.sel7();
366+
accepted |= isINT1period & sel1;
367+
if (!accepted) {
358368
continue;
359369
}
360370

0 commit comments

Comments
 (0)