Skip to content

Commit 522e496

Browse files
MaximVirtaalibuild
andauthored
[Common] Event selection flags added (#12418)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent e832f6f commit 522e496

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

Common/Tasks/qVectorsCorrection.cxx

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,15 @@ struct qVectorsCorrection {
6868
Configurable<std::string> cfgRefBName{"cfgRefBName", "TPCneg", "The name of detector for reference B"};
6969
Configurable<bool> cfgAddEvtSel{"cfgAddEvtSel", true, "event selection"};
7070

71+
Configurable<int> cfgEvtSel{"cfgEvtSel", 0, "Event selection flags\n0: Sel8\n1: Sel8+kIsGoodZvtxFT0vsPV+kNoSameBunchPileup\n2: Sel8+kIsGoodZvtxFT0vsPV+kNoSameBunchPileup+kNoCollInTimeRangeStandard\n3: Sel8+kNoSameBunchPileup"};
72+
7173
Configurable<int> cfgnTotalSystem{"cfgnTotalSystem", 7, "total qvector number"};
7274
Configurable<int> cfgNbinsEP{"cfgNbinsEP", 360, "nbins for EP histograms"};
7375

7476
Configurable<bool> cfgQAAll{"cfgQAAll", false, "draw all q-vector steps"};
7577
Configurable<bool> cfgQAFinal{"cfgQAFinal", false, "draw final q-vector steps"};
7678
Configurable<bool> cfgQAFlowStudy{"cfgQAFlowStudy", false, "configurable for flow study"};
7779
Configurable<bool> cfgQAOccupancyStudy{"cfgQAOccupancyStudy", false, "configurable for occupancy study"};
78-
Configurable<bool> cfgAddEvtSelPileup{"cfgAddEvtSelPileup", false, "configurable for pileup selection"};
7980

8081
Configurable<float> cfgMinPt{"cfgMinPt", 0.15, "Minimum transverse momentum for charged track"};
8182
Configurable<float> cfgMaxEta{"cfgMaxEta", 0.8, "Maximum pseudorapidiy for charged track"};
@@ -541,16 +542,31 @@ struct qVectorsCorrection {
541542
void process(MyCollisions::iterator const& qVec, MyTracks const& tracks)
542543
{
543544
histosQA.fill(HIST("histCentFull"), qVec.cent());
544-
if (cfgAddEvtSel && (!qVec.sel8() ||
545-
!qVec.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) ||
546-
!qVec.selection_bit(aod::evsel::kNoSameBunchPileup))) {
547-
return;
548-
}
549-
if (cfgAddEvtSel && (qVec.trackOccupancyInTimeRange() > cfgMaxOccupancy || qVec.trackOccupancyInTimeRange() < cfgMinOccupancy)) {
550-
return;
551-
}
552-
if (cfgAddEvtSelPileup && !qVec.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
553-
return;
545+
if (cfgAddEvtSel) {
546+
switch (cfgEvtSel) {
547+
case 0: // Sel8
548+
if (!qVec.sel8())
549+
return;
550+
break;
551+
case 1: // PbPb standard
552+
if (!qVec.sel8() || !qVec.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !qVec.selection_bit(aod::evsel::kNoSameBunchPileup))
553+
return;
554+
break;
555+
case 2: // PbPb with pileup
556+
if (!qVec.sel8() || !qVec.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) ||
557+
!qVec.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV) || !qVec.selection_bit(aod::evsel::kNoSameBunchPileup))
558+
return;
559+
break;
560+
case 3: // Small systems (OO, NeNe, pp)
561+
if (!qVec.sel8() || !qVec.selection_bit(aod::evsel::kNoSameBunchPileup))
562+
return;
563+
break;
564+
default:
565+
LOGF(warning, "Event selection flag was not found, continuing without basic event selections!\n");
566+
}
567+
// Check occupancy
568+
if (qVec.trackOccupancyInTimeRange() > cfgMaxOccupancy || qVec.trackOccupancyInTimeRange() < cfgMinOccupancy)
569+
return;
554570
}
555571

556572
for (uint i = 0; i < cfgnMods->size(); i++) {

0 commit comments

Comments
 (0)