@@ -129,13 +129,13 @@ struct ConfTrackBits : o2::framework::ConfigurableGroup {
129129};
130130
131131// define the template structure for TrackSelection
132- template <auto & Prefix>
132+ template <auto & Prefix, int DefaultChargeSign = 1 >
133133struct ConfTrackSelection : public o2 ::framework::ConfigurableGroup {
134134 std::string prefix = Prefix; // Unique prefix based on the template argument
135135 // configuration parameters
136136 o2::framework::Configurable<int > pdgCodeAbs{" pdgCodeAbs" , 2212 , " Absolute value of PDG code. Set sign of charge to -1 for antiparticle." };
137137 o2::framework::Configurable<int > chargeAbs{" chargeAbs" , 1 , " Absolute value of charge (e.g. 1 for most tracks, 2 for He3)" };
138- o2::framework::Configurable<int > chargeSign{" chargeSign" , 1 , " Track charge sign: +1 for positive, -1 for negative, 0 for both" };
138+ o2::framework::Configurable<int > chargeSign{" chargeSign" , DefaultChargeSign , " Track charge sign: +1 for positive, -1 for negative, 0 for both" };
139139 // filters for kinematics
140140 o2::framework::Configurable<float > ptMin{" ptMin" , 0 .0f , " Minimum pT (GeV/c)" };
141141 o2::framework::Configurable<float > ptMax{" ptMax" , 6 .f , " Maximum pT (GeV/c)" };
@@ -170,8 +170,8 @@ using ConfTrackSelection1 = ConfTrackSelection<PrefixTrackSelection1>;
170170using ConfTrackSelection2 = ConfTrackSelection<PrefixTrackSelection2>;
171171using ConfTrackSelection3 = ConfTrackSelection<PrefixTrackSelection3>;
172172
173- using ConfTrackSelectionDndetaGlobal = ConfTrackSelection<PrefixTrackSelectionDndetaGlobal>;
174- using ConfTrackSelectionDndetaItsOnly = ConfTrackSelection<PrefixTrackSelectionDndetaItsOnly>;
173+ using ConfTrackSelectionDndetaGlobal = ConfTrackSelection<PrefixTrackSelectionDndetaGlobal, 0 >;
174+ using ConfTrackSelectionDndetaItsOnly = ConfTrackSelection<PrefixTrackSelectionDndetaItsOnly, 0 >;
175175
176176// Track selection for resonance daughters (pion+/-, kaon+/-). Charge sign and abs charge are fixed
177177// by the species itself, so they are compile-time constants rather than configurables. No pdg code
0 commit comments