diff --git a/Common/CCDB/EventSelectionParams.cxx b/Common/CCDB/EventSelectionParams.cxx index 2a1f62c49ce..7c90632d272 100644 --- a/Common/CCDB/EventSelectionParams.cxx +++ b/Common/CCDB/EventSelectionParams.cxx @@ -45,7 +45,7 @@ const char* selectionLabels[kNsel] = { "kNoInconsistentVtx", "kNoPileupInMultBins", "kNoPilupMV", - "kNoPileupTPC" + "kNoPileupTPC", "kIsTriggerTVX", "kIsINT1"}; } diff --git a/Common/TableProducer/eventSelection.cxx b/Common/TableProducer/eventSelection.cxx index 9e88120cc7f..4d0f3f35814 100644 --- a/Common/TableProducer/eventSelection.cxx +++ b/Common/TableProducer/eventSelection.cxx @@ -162,6 +162,7 @@ struct BcSelectionTask { selection[kNoPileupMV] = (eventCuts & 1 << aod::kPileUpMV) > 0; selection[kNoPileupTPC] = (eventCuts & 1 << aod::kTPCPileUp) > 0; selection[kIsTriggerTVX] = bc.has_ft0() ? (bc.ft0().triggerMask() & BIT(o2::ft0::Triggers::bitVertex)) > 0 : 0; + selection[kIsINT1] = bbV0A || bbV0C || ofSPD > 0; int32_t foundFT0 = bc.has_ft0() ? bc.ft0().globalIndex() : -1; int32_t foundFV0 = bc.has_fv0a() ? bc.fv0a().globalIndex() : -1; @@ -383,16 +384,17 @@ struct EventSelectionTask { sel7 &= applySelection[i] ? selection[i] : 1; } - // TODO apply other cuts for sel8 - // TODO introduce sel1 etc? // TODO introduce array of sel[0]... sel[8] or similar? - bool sel8 = selection[kIsBBT0A] & selection[kIsBBT0C]; + bool sel8 = selection[kIsBBT0A] & selection[kIsBBT0C]; // TODO apply other cuts for sel8 + bool sel1 = selection[kIsINT1] & selection[kNoBGV0A] & selection[kNoBGV0C] & selection[kNoTPCLaserWarmUp] & selection[kNoTPCHVdip]; - // fill counters + // INT1 (SPDFO>0 | V0A | V0C) mimimum bias trigger logic used in pp2010 and pp2011 + bool isINT1period = bc.runNumber() <= 136377 || (bc.runNumber() >= 144871 && bc.runNumber() <= 159582); - if (isMC || alias[kINT7]) { + // fill counters + if (isMC || (!isINT1period && alias[kINT7]) || (isINT1period && alias[kINT1])) { histos.get(HIST("hColCounterAll"))->Fill(Form("%d", bc.runNumber()), 1); - if (sel7) { + if ((!isINT1period && sel7) || (isINT1period && sel1)) { histos.get(HIST("hColCounterAcc"))->Fill(Form("%d", bc.runNumber()), 1); } } diff --git a/Common/Tasks/eventSelectionQa.cxx b/Common/Tasks/eventSelectionQa.cxx index 2e6300dc7f9..558422a7d6c 100644 --- a/Common/Tasks/eventSelectionQa.cxx +++ b/Common/Tasks/eventSelectionQa.cxx @@ -227,6 +227,7 @@ struct EventSelectionQaTask { aod::FT0s const& ft0s, aod::FDDs const& fdds) { + bool isINT1period = 0; if (!applySelection) { auto first_bc = bcs.iteratorAt(0); EventSelectionParams* par = ccdb->getForTimeStamp("EventSelection/EventSelectionParams", first_bc.timestamp()); @@ -234,6 +235,7 @@ struct EventSelectionQaTask { for (int i = 0; i < kNsel; i++) { histos.get(HIST("hSelMask"))->SetBinContent(i + 1, applySelection[i]); } + isINT1period = first_bc.runNumber() <= 136377 || (first_bc.runNumber() >= 144871 && first_bc.runNumber() <= 159582); } // bc-based event selection qa @@ -245,19 +247,24 @@ struct EventSelectionQaTask { // collision-based event selection qa for (auto& col : cols) { + auto selection = col.selection(); + bool sel1 = selection[kIsINT1] & selection[kNoBGV0A] & selection[kNoBGV0C] & selection[kNoTPCLaserWarmUp] & selection[kNoTPCHVdip]; + for (int iAlias = 0; iAlias < kNaliases; iAlias++) { if (!col.alias()[iAlias]) { continue; } histos.fill(HIST("hColCounterAll"), iAlias, 1); - if (!col.sel7()) { - continue; + if ((!isINT1period && col.sel7()) || (isINT1period && sel1)) { + histos.fill(HIST("hColCounterAcc"), iAlias, 1); } - histos.fill(HIST("hColCounterAcc"), iAlias, 1); } + bool mb = isMC; + mb |= !isINT1period && col.alias()[kINT7]; + mb |= isINT1period && col.alias()[kINT1]; // further checks just on minimum bias triggers - if (!isMC && !col.alias()[kINT7]) { + if (!mb) { continue; } for (int i = 0; i < kNsel; i++) { @@ -354,7 +361,10 @@ struct EventSelectionQaTask { histos.fill(HIST("hV0C012vsTklCol"), nTracklets, multRingV0C012); // filling plots for accepted events - if (!col.sel7()) { + bool accepted = 0; + accepted |= !isINT1period & col.sel7(); + accepted |= isINT1period & sel1; + if (!accepted) { continue; }