Skip to content

Commit c6481a1

Browse files
[PWGLF] added event selection options (#17036)
1 parent a151a89 commit c6481a1

4 files changed

Lines changed: 28 additions & 5 deletions

File tree

PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ struct he3HadronFemto {
282282
Configurable<float> settingCutNsigmaTOF{"settingCutNsigmaTOF", 3.0f, "Value of the TOF Nsigma cut"};
283283
} cutSettings;
284284

285-
Configurable<LabeledArray<int>> settingEventSelections{"settingEventSelections", {nuclei::EvSelDefault[0], 8, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};
285+
Configurable<LabeledArray<int>> settingEventSelections{"settingEventSelections", {nuclei::EvSelDefault[0], nuclei::evSel::kNevSels, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};
286286
Configurable<int> settingNoMixedEvents{"settingNoMixedEvents", 5, "Number of mixed events per event"};
287287
Configurable<bool> settingEnableBkgUS{"settingEnableBkgUS", false, "Enable US background"};
288288
Configurable<bool> settingEnableDCAfitter{"settingEnableDCAfitter", false, "Enable DCA fitter"};

PWGLF/TableProducer/Nuspex/nucleiFlowTree.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ struct nucleiFlowTree {
110110
Configurable<float> cfgCutPtMinTree{"cfgCutPtMinTree", 0.2f, "Minimum track transverse momentum for tree saving"};
111111
Configurable<float> cfgCutPtMaxTree{"cfgCutPtMaxTree", 15.0f, "Maximum track transverse momentum for tree saving"};
112112

113-
Configurable<LabeledArray<int>> cfgEventSelections{"cfgEventSelections", {nuclei::EvSelDefault[0], 8, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};
113+
Configurable<LabeledArray<int>> cfgEventSelections{"cfgEventSelections", {nuclei::EvSelDefault[0], nuclei::evSel::kNevSels, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};
114114

115115
Configurable<LabeledArray<double>> cfgMomentumScalingBetheBloch{"cfgMomentumScalingBetheBloch", {nuclei::bbMomScalingDefault[0], 5, 2, nuclei::names, nuclei::chargeLabelNames}, "TPC Bethe-Bloch momentum scaling for light nuclei"};
116116
Configurable<LabeledArray<double>> cfgBetheBlochParams{"cfgBetheBlochParams", {nuclei::betheBlochDefault[0], 5, 6, nuclei::names, nuclei::betheBlochParNames}, "TPC Bethe-Bloch parameterisation for light nuclei"};

PWGLF/TableProducer/QC/nucleiQC.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252

5353
#include <fmt/format.h>
5454

55+
#include <algorithm>
5556
#include <array>
5657
#include <cmath>
5758
#include <cstddef>
@@ -100,7 +101,7 @@ struct nucleiQC {
100101
Configurable<bool> cfgSkipNonReconstructedCollisions{"cfgSkipNonReconstructedCollisions", true, "Should you skip collisions for which no particle is reconstructed?"};
101102
Configurable<bool> cfgFillOnlyPhysicalPrimaries{"cfgFillOnlyPhysicalPrimaries", true, "Should you only select physical primary particles?"};
102103
Configurable<LabeledArray<int>> cfgSpeciesToProcess{"cfgSpeciesToProcess", {nuclei::speciesToProcessDefault[0], nuclei::Species::kNspecies, 1, nuclei::names, {"processNucleus"}}, "Nuclei to process"};
103-
Configurable<LabeledArray<int>> cfgEventSelections{"cfgEventSelections", {nuclei::EvSelDefault[0], 8, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};
104+
Configurable<LabeledArray<int>> cfgEventSelections{"cfgEventSelections", {nuclei::EvSelDefault[0], nuclei::evSel::kNevSels, 1, nuclei::eventSelectionLabels, nuclei::eventSelectionTitle}, "Event selections"};
104105
Configurable<int> cfgCentralityEstimator{"cfgCentralityEstimator", 0, "Centrality estimator (FV0A: 0, FT0M: 1, FT0A: 2, FT0C: 3)"};
105106
Configurable<bool> cfgPerformPidSelectionInIts{"cfgPerformPidSelectionInIts", false, "Perform PID selections in ITS"};
106107
Configurable<bool> cfgPerformPidSelectionInTpc{"cfgPerformPidSelectionInTpc", false, "Perform PID selections in TPC"};

PWGLF/Utils/nucleiUtils.h

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,20 +307,26 @@ enum evSel {
307307
kIsGoodZvtxFT0vsPV,
308308
kIsGoodITSLayersAll,
309309
kIsEPtriggered,
310+
kNoCollInRofStandard,
311+
kNoHighMultCollInPrevRof,
312+
kNoCollInTimeRangeStandard,
310313
kNevSels
311314
};
312315

313316
static const std::vector<std::string> eventSelectionTitle{"Event selections"};
314-
static const std::vector<std::string> eventSelectionLabels{"TVX", "Z vtx", "TF border", "ITS ROF border", "No same-bunch pile-up", "kIsGoodZvtxFT0vsPV", "isGoodITSLayersAll", "isEPtriggered"};
317+
static const std::vector<std::string> eventSelectionLabels{"TVX", "Z vtx", "TF border", "ITS ROF border", "No same-bunch pile-up", "kIsGoodZvtxFT0vsPV", "isGoodITSLayersAll", "isEPtriggered", "No collision in ROF standard", "No high-multiplicity collision in previous ROF", "No collision in time range standard"};
315318

316-
constexpr int EvSelDefault[8][1]{
319+
constexpr int EvSelDefault[evSel::kNevSels][1]{
317320
{1},
318321
{1},
319322
{0},
320323
{0},
321324
{0},
322325
{0},
323326
{0},
327+
{0},
328+
{0},
329+
{0},
324330
{0}};
325331

326332
template <typename Tcollision> // move to nucleiUtils
@@ -382,6 +388,22 @@ bool eventSelection(const Tcollision& collision, o2::framework::HistogramRegistr
382388
}
383389
registry.fill(HIST("hEventSelections"), evSel::kIsEPtriggered + 1);
384390
}
391+
392+
if (eventSelections.get(evSel::kNoCollInRofStandard) && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) {
393+
return false;
394+
}
395+
registry.fill(HIST("hEventSelections"), evSel::kNoCollInRofStandard + 1);
396+
397+
if (eventSelections.get(evSel::kNoHighMultCollInPrevRof) && !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) {
398+
return false;
399+
}
400+
registry.fill(HIST("hEventSelections"), evSel::kNoHighMultCollInPrevRof + 1);
401+
402+
if (eventSelections.get(evSel::kNoCollInTimeRangeStandard) && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
403+
return false;
404+
}
405+
registry.fill(HIST("hEventSelections"), evSel::kNoCollInTimeRangeStandard + 1);
406+
385407
registry.fill(HIST("hVtxZ"), collision.posZ());
386408

387409
return true;

0 commit comments

Comments
 (0)