Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Common/CCDB/EventSelectionParams.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const char* selectionLabels[kNsel] = {
"kNoInconsistentVtx",
"kNoPileupInMultBins",
"kNoPilupMV",
"kNoPileupTPC"
"kNoPileupTPC",
"kIsTriggerTVX",
"kIsINT1"};
}
Expand Down
14 changes: 8 additions & 6 deletions Common/TableProducer/eventSelection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<TH1>(HIST("hColCounterAll"))->Fill(Form("%d", bc.runNumber()), 1);
if (sel7) {
if ((!isINT1period && sel7) || (isINT1period && sel1)) {
histos.get<TH1>(HIST("hColCounterAcc"))->Fill(Form("%d", bc.runNumber()), 1);
}
}
Expand Down
20 changes: 15 additions & 5 deletions Common/Tasks/eventSelectionQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,15 @@ 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<EventSelectionParams>("EventSelection/EventSelectionParams", first_bc.timestamp());
applySelection = par->GetSelection(0);
for (int i = 0; i < kNsel; i++) {
histos.get<TH1>(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
Expand All @@ -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++) {
Expand Down Expand Up @@ -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;
}

Expand Down