Skip to content

Commit ebae3f3

Browse files
committed
extend particleWiseCuts (not packed into array and not applied yet)
1 parent 858ef22 commit ebae3f3

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

‎DPG/Tasks/TPC/treeCreatorPidTpcDiagnostics.cxx‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,25 +86,33 @@ struct TreeCreatorPidTpcDiagnostics {
8686
Configurable<bool> treatLimitedAcceptanceAsBad{"treatLimitedAcceptanceAsBad", false, "reject all events where the detectors relevant for the specified Runlist are flagged as LimitedAcceptance"};
8787
Configurable<bool> requireGoodRct{"requireGoodRct", false, "require good detector flag in run condtion table"};
8888

89-
#define DECLARE_PARTICLE_WISE_CONFIGURABLES(ParticleNameShort, ParticleNameLong) \
90-
Configurable<float> cutTpcInnerParameterMin##ParticleNameLong{"cutTpcInnerParameterMin" #ParticleNameLong, 0.f, "Lower-value cut on tpcInnerParam for " #ParticleNameLong}; /* o2-linter: disable=name/configurable (Configurable defined in macro)*/ \
91-
Configurable<float> cutTpcInnerParameterMax##ParticleNameLong{"cutTpcInnerParameterMax" #ParticleNameLong, 999.f, "Upper-value cut on tpcInnerParam for " #ParticleNameLong}; /* o2-linter: disable=name/configurable (Configurable defined in macro)*/ \
92-
Configurable<float> cutNSigmaTpcAbs##ParticleNameLong{"cutNSigmaTpcAbs" #ParticleNameLong, 999.f, "Cut on absolute value of nSigmaTpc for " #ParticleNameLong}; // o2-linter: disable=name/configurable (Configurable defined in macro)
93-
94-
DO_FOR_ALL_PARTICLES(DECLARE_PARTICLE_WISE_CONFIGURABLES)
89+
struct ParticleWiseCuts : ConfigurableGroup {
90+
91+
#define DECLARE_PARTICLE_WISE_CONFIGURABLES(ParticleNameShort, ParticleNameLong) \
92+
Configurable<float> cutTpcInnerParameterMin##ParticleNameLong{"cutTpcInnerParameterMin" #ParticleNameLong, 0.f, "Lower-value cut on tpcInnerParam for " #ParticleNameLong}; /* o2-linter: disable=name/configurable (Configurable defined in macro)*/ \
93+
Configurable<float> cutTpcInnerParameterMax##ParticleNameLong{"cutTpcInnerParameterMax" #ParticleNameLong, 999.f, "Upper-value cut on tpcInnerParam for " #ParticleNameLong}; /* o2-linter: disable=name/configurable (Configurable defined in macro)*/ \
94+
Configurable<float> cutExpSigmaMax##ParticleNameLong{"cutExpSigmaMax" #ParticleNameLong, 1e9f, "Upper-value cut on (positively-defined) expected sigma for " #ParticleNameLong}; /* o2-linter: disable=name/configurable (Configurable defined in macro)*/ \
95+
Configurable<float> cutDeDxExpectedMin##ParticleNameLong{"cutDeDxExpectedMin" #ParticleNameLong, -1e9f, "Lower-value cut on expected dE/dx for " #ParticleNameLong}; /* o2-linter: disable=name/configurable (Configurable defined in macro)*/ \
96+
Configurable<float> cutDeDxExpectedMax##ParticleNameLong{"cutDeDxExpectedMax" #ParticleNameLong, 1e9f, "Upper-value cut on expected dE/dx for " #ParticleNameLong}; /* o2-linter: disable=name/configurable (Configurable defined in macro)*/ \
97+
Configurable<float> cutDeDxDiffMin##ParticleNameLong{"cutDeDxDiffMin" #ParticleNameLong, -1e9f, "Lower-value cut on real - expected dE/dx difference for " #ParticleNameLong}; /* o2-linter: disable=name/configurable (Configurable defined in macro)*/ \
98+
Configurable<float> cutDeDxDiffMax##ParticleNameLong{"cutDeDxDiffMax" #ParticleNameLong, 1e9f, "Upper-value cut on real - expected dE/dx difference for " #ParticleNameLong}; /* o2-linter: disable=name/configurable (Configurable defined in macro)*/ \
99+
Configurable<float> cutNSigmaTpcAbs##ParticleNameLong{"cutNSigmaTpcAbs" #ParticleNameLong, 999.f, "Cut on absolute value of nSigmaTpc for " #ParticleNameLong}; // o2-linter: disable=name/configurable (Configurable defined in macro)
100+
101+
DO_FOR_ALL_PARTICLES(DECLARE_PARTICLE_WISE_CONFIGURABLES)
95102
#undef DECLARE_PARTICLE_WISE_CONFIGURABLES
103+
} particleWiseCuts;
96104

97-
#define PACK_CONFIGURABLES_TO_ARRAY(ParticleNameShort, ParticleNameLong) &cutTpcInnerParameterMin##ParticleNameLong,
105+
#define PACK_CONFIGURABLES_TO_ARRAY(ParticleNameShort, ParticleNameLong) &particleWiseCuts.cutTpcInnerParameterMin##ParticleNameLong,
98106
std::array<Configurable<float>*, PID::Alpha + 1> cutTpcInnerParameterMin{
99107
DO_FOR_ALL_PARTICLES(PACK_CONFIGURABLES_TO_ARRAY)};
100108
#undef PACK_CONFIGURABLES_TO_ARRAY
101109

102-
#define PACK_CONFIGURABLES_TO_ARRAY(ParticleNameShort, ParticleNameLong) &cutTpcInnerParameterMax##ParticleNameLong,
110+
#define PACK_CONFIGURABLES_TO_ARRAY(ParticleNameShort, ParticleNameLong) &particleWiseCuts.cutTpcInnerParameterMax##ParticleNameLong,
103111
std::array<Configurable<float>*, PID::Alpha + 1> cutTpcInnerParameterMax{
104112
DO_FOR_ALL_PARTICLES(PACK_CONFIGURABLES_TO_ARRAY)};
105113
#undef PACK_CONFIGURABLES_TO_ARRAY
106114

107-
#define PACK_CONFIGURABLES_TO_ARRAY(ParticleNameShort, ParticleNameLong) &cutNSigmaTpcAbs##ParticleNameLong,
115+
#define PACK_CONFIGURABLES_TO_ARRAY(ParticleNameShort, ParticleNameLong) &particleWiseCuts.cutNSigmaTpcAbs##ParticleNameLong,
108116
std::array<Configurable<float>*, PID::Alpha + 1> cutNSigmaTpcAbs{
109117
DO_FOR_ALL_PARTICLES(PACK_CONFIGURABLES_TO_ARRAY)};
110118
#undef PACK_CONFIGURABLES_TO_ARRAY

0 commit comments

Comments
 (0)