Skip to content

Commit b28c6d9

Browse files
committed
[PWGCF] Add TOF nsigma selection for V0 and cascade daughters and bachelors
1 parent e0cd446 commit b28c6d9

2 files changed

Lines changed: 65 additions & 3 deletions

File tree

PWGCF/Femto/Core/cascadeBuilder.h

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,24 @@ struct ConfCascadeFilters : o2::framework::ConfigurableGroup {
7676
o2::framework::Configurable<std::vector<float>> dauAbsDcaxyMin{"dauAbsDcaxyMin", {0.05f}, "Minimum |DCAxy| of the daughters and bachelor from primary vertex (cm)"}; \
7777
o2::framework::Configurable<std::vector<float>> dauTpcClustersMin{"dauTpcClustersMin", {80.f}, "Minimum number of TPC clusters for daughter tracks"}; \
7878
o2::framework::Configurable<std::vector<float>> posDauTpc{"posDauTpc", {5.f}, "Maximum |nsimga_Pion/Proton| TPC for positive daughter tracks"}; \
79-
o2::framework::Configurable<std::vector<float>> negDauTpc{"negDauTpc", {5.f}, "Maximum |nsimga_Pion/Proton| TPC for negative daughter tracks"};
79+
o2::framework::Configurable<std::vector<float>> negDauTpc{"negDauTpc", {5.f}, "Maximum |nsimga_Pion/Proton| TPC for negative daughter tracks"}; \
80+
o2::framework::Configurable<std::vector<float>> posDauTof{"posDauTof", {}, "Maximum |nsimga_Pion/Proton| TOF for positive daughter tracks"}; \
81+
o2::framework::Configurable<std::vector<float>> negDauTof{"negDauTof", {}, "Maximum |nsigma_Pion/Proton| TOF for negative daughter tracks"};
82+
8083

8184
struct ConfXiBits : o2::framework::ConfigurableGroup {
8285
std::string prefix = std::string("XiBits");
8386
CASCADE_DEFAULT_BITS
8487
o2::framework::Configurable<std::vector<float>> bachelorTpcPion{"bachelorTpcPion", {5.f}, "Maximum |nsimga_Pion| TPC for bachelor tracks"};
88+
o2::framework::Configurable<std::vector<float>> bachelorTofPion{"bachelorTofPion", {}, "Maximum |nsimga_Pion| TOF for bachelor tracks"};
89+
8590
};
8691

8792
struct ConfOmegaBits : o2::framework::ConfigurableGroup {
8893
std::string prefix = std::string("OmegaBits");
8994
CASCADE_DEFAULT_BITS
9095
o2::framework::Configurable<std::vector<float>> bachelorTpcKaon{"bachelorTpcKaon", {5.f}, "Maximum |nsimga_Kaon| TPC for bachelor tracks"};
96+
o2::framework::Configurable<std::vector<float>> bachelorTofKaon{"bachelorTofKaon", {}, "Maximum |nsimga_Kaon| TOF for bachelor tracks"};
9197
};
9298

9399
#undef CASCADE_DEFAULT_BITS
@@ -139,10 +145,14 @@ enum CascadeSels {
139145
// PID selection for cascade bachelor
140146
kBachelorTpcPion, ///< TPC Pion PID for bachelor
141147
kBachelorTpcKaon, ///< TPC Kaon PID for bachelor
148+
kBachelorTofPion, ///< TOF Pion PID for bachelor
149+
kBachelorTofKaon, ///< TOF Kaon PID for bachelor
142150
///
143151
// PID selection for lambda daughers
144152
kPosDauTpc, ///< TPC PID for positive daughter
145153
kNegDauTpc, ///< TPC PID for negative daughter
154+
kPosDauTof, ///< TOF PID for positive daughter
155+
kNegDauTof, ///< TOF PID for negative daughter
146156

147157
kCascadeSelsMax
148158
};
@@ -166,9 +176,12 @@ const std::unordered_map<CascadeSels, std::string> cascadeSelectionNames = {
166176

167177
{kBachelorTpcPion, "Bachelor TPC Pion PID"},
168178
{kBachelorTpcKaon, "Bachelor TPC Kaon PID"},
169-
179+
{kBachelorTofPion, "Bachelor TOF Pion PID"},
180+
{kBachelorTofKaon, "Bachelor TOF Kaon PID"},
170181
{kPosDauTpc, "Positive Daughter TPC PID"},
171182
{kNegDauTpc, "Negative Daughter TPC PID"},
183+
{kPosDauTof, "Positive Daughter TOF PID"},
184+
{kNegDauTof, "Negative Daughter TOF PID"},
172185

173186
{kCascadeSelsMax, "Cascade Selections Max"}};
174187

@@ -231,6 +244,7 @@ class CascadeSelection : public baseselection::BaseSelection<float, o2::analysis
231244
mOmegaMassLowerLimit = filter.rejectMassOmegaMin.value;
232245
mOmegaMassUpperLimit = filter.rejectMassOmegaMax.value;
233246
this->addSelection(kBachelorTpcPion, cascadeSelectionNames.at(kBachelorTpcPion), config.bachelorTpcPion.value, limits::kAbsUpperLimit, true, true, false);
247+
this->addSelection(kBachelorTofPion, cascadeSelectionNames.at(kBachelorTofPion), config.bachelorTofPion.value, limits::kAbsUpperLimit, true, true, false);
234248
}
235249
if constexpr (modes::isEqual(cascadeType, modes::Cascade::kOmega)) {
236250
mOmegaMassLowerLimit = filter.massOmegaMin.value;
@@ -239,6 +253,7 @@ class CascadeSelection : public baseselection::BaseSelection<float, o2::analysis
239253
mXiMassLowerLimit = filter.rejectMassXiMin.value;
240254
mXiMassUpperLimit = filter.rejectMassXiMax.value;
241255
this->addSelection(kBachelorTpcKaon, cascadeSelectionNames.at(kBachelorTpcKaon), config.bachelorTpcKaon.value, limits::kAbsUpperLimit, true, true, false);
256+
this->addSelection(kBachelorTofKaon, cascadeSelectionNames.at(kBachelorTofKaon), config.bachelorTofKaon.value, limits::kAbsUpperLimit, true, true, false);
242257
}
243258

244259
mPtMin = filter.ptMin.value;
@@ -252,6 +267,8 @@ class CascadeSelection : public baseselection::BaseSelection<float, o2::analysis
252267

253268
this->addSelection(kPosDauTpc, cascadeSelectionNames.at(kPosDauTpc), config.posDauTpc.value, limits::kAbsUpperLimit, true, true, false);
254269
this->addSelection(kNegDauTpc, cascadeSelectionNames.at(kNegDauTpc), config.negDauTpc.value, limits::kAbsUpperLimit, true, true, false);
270+
this->addSelection(kPosDauTof, cascadeSelectionNames.at(kPosDauTof), config.posDauTof.value, limits::kAbsUpperLimit, true, true, false);
271+
this->addSelection(kNegDauTof, cascadeSelectionNames.at(kNegDauTof), config.negDauTof.value, limits::kAbsUpperLimit, true, true, false);
255272

256273
this->addSelection(kCascadeCpaMin, cascadeSelectionNames.at(kCascadeCpaMin), config.cascadeCpaMin.value, limits::kLowerLimit, true, true, false);
257274
this->addSelection(kCascadeTransRadMin, cascadeSelectionNames.at(kCascadeTransRadMin), config.cascadeTransRadMin.value, limits::kLowerLimit, true, true, false);
@@ -318,14 +335,30 @@ class CascadeSelection : public baseselection::BaseSelection<float, o2::analysis
318335
// check both pion and kaon PID for xi and omega
319336
this->evaluateObservable(kBachelorTpcPion, bachelor.tpcNSigmaPi());
320337
this->evaluateObservable(kBachelorTpcKaon, bachelor.tpcNSigmaKa());
338+
if (bachelor.hasTOF()) {
339+
this->evaluateObservable(kBachelorTofPion, bachelor.tofNSigmaPi());
340+
this->evaluateObservable(kBachelorTofKaon, bachelor.tofNSigmaKa());
341+
}
321342

322343
// depending on the charge, we check lambda or antilambda hypothesis
323344
if (cascade.sign() < 0) {
324345
this->evaluateObservable(kPosDauTpc, posDaughter.tpcNSigmaPr());
325346
this->evaluateObservable(kNegDauTpc, negDaughter.tpcNSigmaPi());
347+
if (posDaughter.hasTOF()) {
348+
this->evaluateObservable(kPosDauTof, posDaughter.tofNSigmaPr());
349+
}
350+
if (negDaughter.hasTOF()) {
351+
this->evaluateObservable(kNegDauTof, negDaughter.tofNSigmaPi());
352+
}
326353
} else if (cascade.sign() > 0) {
327354
this->evaluateObservable(kPosDauTpc, posDaughter.tpcNSigmaPi());
328355
this->evaluateObservable(kNegDauTpc, negDaughter.tpcNSigmaPr());
356+
if (posDaughter.hasTOF()) {
357+
this->evaluateObservable(kPosDauTof, posDaughter.tofNSigmaPi());
358+
}
359+
if (negDaughter.hasTOF()) {
360+
this->evaluateObservable(kNegDauTof, negDaughter.tofNSigmaPr());
361+
}
329362
} else {
330363
LOG(warn) << "Encountered Cascade candidate with 0 charge";
331364
}

PWGCF/Femto/Core/v0Builder.h

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ struct ConfLambdaBits : o2::framework::ConfigurableGroup {
8181
o2::framework::Configurable<std::vector<float>> posDauTpcProton{"posDauTpcProton", {5.f}, "Maximum |nsimga_Proton| TPC for positive daughter tracks"};
8282
o2::framework::Configurable<std::vector<float>> negDauTpcPion{"negDauTpcPion", {5.f}, "Maximum |nsimga_Pion| TPC for negative daughter tracks"};
8383
o2::framework::Configurable<std::vector<float>> negDauTpcProton{"negDauTpcProton", {5.f}, "Maximum |nsimga_Proton| TPC negative for daughter tracks"};
84+
o2::framework::Configurable<std::vector<float>> posDauTofPion{"posDauTofPion", {}, "Maximum |nsigma_Pion| TOF for positive daughter tracks"};
85+
o2::framework::Configurable<std::vector<float>> posDauTofProton{"posDauTofProton", {}, "Maximum |nsigma_Proton| TOF for positive daughter tracks"};
86+
o2::framework::Configurable<std::vector<float>> negDauTofPion{"negDauTofPion", {}, "Maximum |nsigma_Pion| TOF for negative daughter tracks"};
87+
o2::framework::Configurable<std::vector<float>> negDauTofProton{"negDauTofProton", {}, "Maximum |nsigma_Proton| TOF for negative daughter tracks"};
8488
};
8589

8690
// derived selection bits for K0Short
@@ -89,6 +93,8 @@ struct ConfK0shortBits : o2::framework::ConfigurableGroup {
8993
V0_DEFAULT_BITS
9094
o2::framework::Configurable<std::vector<float>> posDauTpcPion{"posDauTpcPion", {5.f}, "Maximum |nsimga_Pion| TPC for positive daughter tracks"};
9195
o2::framework::Configurable<std::vector<float>> negDauTpcPion{"negDauTpcPion", {5.f}, "Maximum |nsimga_Pion| TPC for negative daughter tracks"};
96+
o2::framework::Configurable<std::vector<float>> posDauTofPion{"posDauTofPion", {}, "Maximum |nsigma_Pion| TOF for positive daughter tracks"};
97+
o2::framework::Configurable<std::vector<float>> negDauTofPion{"negDauTofPion", {}, "Maximum |nsigma_Pion| TOF for negative daughter tracks"};
9298
};
9399

94100
#undef V0_DEFAULT_BITS
@@ -154,6 +160,11 @@ enum V0Sels {
154160
kNegDaughTpcPion, ///< TPC Pion PID for negative daughter
155161
kNegDaughTpcProton, ///< TPC Proton PID for negative daughter
156162

163+
kPosDaughTofPion, ///< TOF Pion PID for positive daughter
164+
kPosDaughTofProton, ///< TOF Proton PID for positive daughter
165+
kNegDaughTofPion, ///< TOF Pion PID for negative daughter
166+
kNegDaughTofProton, ///< TOF Proton PID for negative daughter
167+
157168
kV0SelsMax
158169
};
159170

@@ -175,7 +186,11 @@ const std::unordered_map<V0Sels, std::string> v0SelectionNames = {
175186
{kPosDaughTpcPion, "TPC Pion PID for positive daughter"},
176187
{kPosDaughTpcProton, "TPC Proton PID for positive daughter"},
177188
{kNegDaughTpcPion, "TPC Pion PID for negative daughter"},
178-
{kNegDaughTpcProton, "TPC Proton PID for negative daughter"}};
189+
{kNegDaughTpcProton, "TPC Proton PID for negative daughter"},
190+
{kPosDaughTofPion, "TOF Pion PID for positive daughter"},
191+
{kPosDaughTofProton, "TOF Proton PID for positive daughter"},
192+
{kNegDaughTofPion, "TOF Pion PID for negative daughter"},
193+
{kNegDaughTofProton, "TOF Proton PID for negative daughter"}};
179194

180195
// enum for all track filters (loose pre-selection, applied before quality/PID cuts)
181196
enum V0Filters {
@@ -242,11 +257,15 @@ class V0Selection : public baseselection::BaseSelection<float, datatypes::V0Mask
242257
if constexpr (modes::isEqual(v0Type, modes::V0::kLambda)) {
243258
this->addSelection(kPosDaughTpcProton, v0SelectionNames.at(kPosDaughTpcProton), config.posDauTpcProton.value, limits::kAbsUpperLimit, true, true, false);
244259
this->addSelection(kNegDaughTpcPion, v0SelectionNames.at(kNegDaughTpcPion), config.negDauTpcPion.value, limits::kAbsUpperLimit, true, true, false);
260+
this->addSelection(kPosDaughTofProton, v0SelectionNames.at(kPosDaughTofProton), config.posDauTofProton.value, limits::kAbsUpperLimit, true, true, false);
261+
this->addSelection(kNegDaughTofPion, v0SelectionNames.at(kNegDaughTofPion), config.negDauTofPion.value, limits::kAbsUpperLimit, true, true, false);
245262
}
246263

247264
if constexpr (modes::isEqual(v0Type, modes::V0::kAntiLambda)) {
248265
this->addSelection(kPosDaughTpcPion, v0SelectionNames.at(kPosDaughTpcPion), config.posDauTpcPion.value, limits::kAbsUpperLimit, true, true, false);
249266
this->addSelection(kNegDaughTpcProton, v0SelectionNames.at(kNegDaughTpcProton), config.negDauTpcProton.value, limits::kAbsUpperLimit, true, true, false);
267+
this->addSelection(kPosDaughTofPion, v0SelectionNames.at(kPosDaughTofPion), config.posDauTofPion.value, limits::kAbsUpperLimit, true, true, false);
268+
this->addSelection(kNegDaughTofProton, v0SelectionNames.at(kNegDaughTofProton), config.negDauTofProton.value, limits::kAbsUpperLimit, true, true, false);
250269
}
251270
}
252271
if constexpr (modes::isEqual(v0Type, modes::V0::kK0short)) {
@@ -258,6 +277,8 @@ class V0Selection : public baseselection::BaseSelection<float, datatypes::V0Mask
258277

259278
this->addSelection(kPosDaughTpcPion, v0SelectionNames.at(kPosDaughTpcPion), config.posDauTpcPion.value, limits::kAbsUpperLimit, true, true, false);
260279
this->addSelection(kNegDaughTpcPion, v0SelectionNames.at(kNegDaughTpcPion), config.negDauTpcPion.value, limits::kAbsUpperLimit, true, true, false);
280+
this->addSelection(kPosDaughTofPion, v0SelectionNames.at(kPosDaughTofPion), config.posDauTofPion.value, limits::kAbsUpperLimit, true, true, false);
281+
this->addSelection(kNegDaughTofPion, v0SelectionNames.at(kNegDaughTofPion), config.negDauTofPion.value, limits::kAbsUpperLimit, true, true, false);
261282
}
262283

263284
this->addSelection(kDcaDaughMax, v0SelectionNames.at(kDcaDaughMax), config.dcaDauMax.value, limits::kAbsUpperLimit, true, true, false);
@@ -321,6 +342,14 @@ class V0Selection : public baseselection::BaseSelection<float, datatypes::V0Mask
321342
this->evaluateObservable(kPosDaughTpcProton, posDaughter.tpcNSigmaPr());
322343
this->evaluateObservable(kNegDaughTpcPion, negDaughter.tpcNSigmaPi());
323344
this->evaluateObservable(kNegDaughTpcProton, negDaughter.tpcNSigmaPr());
345+
if (posDaughter.hasTOF()) {
346+
this->evaluateObservable(kPosDaughTofPion, posDaughter.tofNSigmaPi());
347+
this->evaluateObservable(kPosDaughTofProton, posDaughter.tofNSigmaPr());
348+
}
349+
if (negDaughter.hasTOF()) {
350+
this->evaluateObservable(kNegDaughTofPion, negDaughter.tofNSigmaPi());
351+
this->evaluateObservable(kNegDaughTofProton, negDaughter.tofNSigmaPr());
352+
}
324353

325354
this->assembleBitmask<SelectionHistName>();
326355
}

0 commit comments

Comments
 (0)