Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions PWGCF/Femto/Core/cascadeBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,22 @@ struct ConfCascadeFilters : o2::framework::ConfigurableGroup {
o2::framework::Configurable<std::vector<float>> dauAbsDcaxyMin{"dauAbsDcaxyMin", {0.05f}, "Minimum |DCAxy| of the daughters and bachelor from primary vertex (cm)"}; \
o2::framework::Configurable<std::vector<float>> dauTpcClustersMin{"dauTpcClustersMin", {80.f}, "Minimum number of TPC clusters for daughter tracks"}; \
o2::framework::Configurable<std::vector<float>> posDauTpc{"posDauTpc", {5.f}, "Maximum |nsimga_Pion/Proton| TPC for positive daughter tracks"}; \
o2::framework::Configurable<std::vector<float>> negDauTpc{"negDauTpc", {5.f}, "Maximum |nsimga_Pion/Proton| TPC for negative daughter tracks"};
o2::framework::Configurable<std::vector<float>> negDauTpc{"negDauTpc", {5.f}, "Maximum |nsimga_Pion/Proton| TPC for negative daughter tracks"}; \
o2::framework::Configurable<std::vector<float>> posDauTof{"posDauTof", {}, "Maximum |nsimga_Pion/Proton| TOF for positive daughter tracks"}; \
o2::framework::Configurable<std::vector<float>> negDauTof{"negDauTof", {}, "Maximum |nsigma_Pion/Proton| TOF for negative daughter tracks"};

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

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

#undef CASCADE_DEFAULT_BITS
Expand Down Expand Up @@ -139,10 +143,14 @@ enum CascadeSels {
// PID selection for cascade bachelor
kBachelorTpcPion, ///< TPC Pion PID for bachelor
kBachelorTpcKaon, ///< TPC Kaon PID for bachelor
kBachelorTofPion, ///< TOF Pion PID for bachelor
kBachelorTofKaon, ///< TOF Kaon PID for bachelor
///
// PID selection for lambda daughers
kPosDauTpc, ///< TPC PID for positive daughter
kNegDauTpc, ///< TPC PID for negative daughter
kPosDauTof, ///< TOF PID for positive daughter
kNegDauTof, ///< TOF PID for negative daughter

kCascadeSelsMax
};
Expand All @@ -166,9 +174,12 @@ const std::unordered_map<CascadeSels, std::string> cascadeSelectionNames = {

{kBachelorTpcPion, "Bachelor TPC Pion PID"},
{kBachelorTpcKaon, "Bachelor TPC Kaon PID"},

{kBachelorTofPion, "Bachelor TOF Pion PID"},
{kBachelorTofKaon, "Bachelor TOF Kaon PID"},
{kPosDauTpc, "Positive Daughter TPC PID"},
{kNegDauTpc, "Negative Daughter TPC PID"},
{kPosDauTof, "Positive Daughter TOF PID"},
{kNegDauTof, "Negative Daughter TOF PID"},

{kCascadeSelsMax, "Cascade Selections Max"}};

Expand Down Expand Up @@ -231,6 +242,7 @@ class CascadeSelection : public baseselection::BaseSelection<float, o2::analysis
mOmegaMassLowerLimit = filter.rejectMassOmegaMin.value;
mOmegaMassUpperLimit = filter.rejectMassOmegaMax.value;
this->addSelection(kBachelorTpcPion, cascadeSelectionNames.at(kBachelorTpcPion), config.bachelorTpcPion.value, limits::kAbsUpperLimit, true, true, false);
this->addSelection(kBachelorTofPion, cascadeSelectionNames.at(kBachelorTofPion), config.bachelorTofPion.value, limits::kAbsUpperLimit, true, true, false);
}
if constexpr (modes::isEqual(cascadeType, modes::Cascade::kOmega)) {
mOmegaMassLowerLimit = filter.massOmegaMin.value;
Expand All @@ -239,6 +251,7 @@ class CascadeSelection : public baseselection::BaseSelection<float, o2::analysis
mXiMassLowerLimit = filter.rejectMassXiMin.value;
mXiMassUpperLimit = filter.rejectMassXiMax.value;
this->addSelection(kBachelorTpcKaon, cascadeSelectionNames.at(kBachelorTpcKaon), config.bachelorTpcKaon.value, limits::kAbsUpperLimit, true, true, false);
this->addSelection(kBachelorTofKaon, cascadeSelectionNames.at(kBachelorTofKaon), config.bachelorTofKaon.value, limits::kAbsUpperLimit, true, true, false);
}

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

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

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

// depending on the charge, we check lambda or antilambda hypothesis
if (cascade.sign() < 0) {
this->evaluateObservable(kPosDauTpc, posDaughter.tpcNSigmaPr());
this->evaluateObservable(kNegDauTpc, negDaughter.tpcNSigmaPi());
if (posDaughter.hasTOF()) {
this->evaluateObservable(kPosDauTof, posDaughter.tofNSigmaPr());
}
if (negDaughter.hasTOF()) {
this->evaluateObservable(kNegDauTof, negDaughter.tofNSigmaPi());
}
} else if (cascade.sign() > 0) {
this->evaluateObservable(kPosDauTpc, posDaughter.tpcNSigmaPi());
this->evaluateObservable(kNegDauTpc, negDaughter.tpcNSigmaPr());
if (posDaughter.hasTOF()) {
this->evaluateObservable(kPosDauTof, posDaughter.tofNSigmaPi());
}
if (negDaughter.hasTOF()) {
this->evaluateObservable(kNegDauTof, negDaughter.tofNSigmaPr());
}
} else {
LOG(warn) << "Encountered Cascade candidate with 0 charge";
}
Expand Down
31 changes: 30 additions & 1 deletion PWGCF/Femto/Core/v0Builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ struct ConfLambdaBits : o2::framework::ConfigurableGroup {
o2::framework::Configurable<std::vector<float>> posDauTpcProton{"posDauTpcProton", {5.f}, "Maximum |nsimga_Proton| TPC for positive daughter tracks"};
o2::framework::Configurable<std::vector<float>> negDauTpcPion{"negDauTpcPion", {5.f}, "Maximum |nsimga_Pion| TPC for negative daughter tracks"};
o2::framework::Configurable<std::vector<float>> negDauTpcProton{"negDauTpcProton", {5.f}, "Maximum |nsimga_Proton| TPC negative for daughter tracks"};
o2::framework::Configurable<std::vector<float>> posDauTofPion{"posDauTofPion", {}, "Maximum |nsigma_Pion| TOF for positive daughter tracks"};
o2::framework::Configurable<std::vector<float>> posDauTofProton{"posDauTofProton", {}, "Maximum |nsigma_Proton| TOF for positive daughter tracks"};
o2::framework::Configurable<std::vector<float>> negDauTofPion{"negDauTofPion", {}, "Maximum |nsigma_Pion| TOF for negative daughter tracks"};
o2::framework::Configurable<std::vector<float>> negDauTofProton{"negDauTofProton", {}, "Maximum |nsigma_Proton| TOF for negative daughter tracks"};
};

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

#undef V0_DEFAULT_BITS
Expand Down Expand Up @@ -154,6 +160,11 @@ enum V0Sels {
kNegDaughTpcPion, ///< TPC Pion PID for negative daughter
kNegDaughTpcProton, ///< TPC Proton PID for negative daughter

kPosDaughTofPion, ///< TOF Pion PID for positive daughter
kPosDaughTofProton, ///< TOF Proton PID for positive daughter
kNegDaughTofPion, ///< TOF Pion PID for negative daughter
kNegDaughTofProton, ///< TOF Proton PID for negative daughter

kV0SelsMax
};

Expand All @@ -175,7 +186,11 @@ const std::unordered_map<V0Sels, std::string> v0SelectionNames = {
{kPosDaughTpcPion, "TPC Pion PID for positive daughter"},
{kPosDaughTpcProton, "TPC Proton PID for positive daughter"},
{kNegDaughTpcPion, "TPC Pion PID for negative daughter"},
{kNegDaughTpcProton, "TPC Proton PID for negative daughter"}};
{kNegDaughTpcProton, "TPC Proton PID for negative daughter"},
{kPosDaughTofPion, "TOF Pion PID for positive daughter"},
{kPosDaughTofProton, "TOF Proton PID for positive daughter"},
{kNegDaughTofPion, "TOF Pion PID for negative daughter"},
{kNegDaughTofProton, "TOF Proton PID for negative daughter"}};

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

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

this->addSelection(kPosDaughTpcPion, v0SelectionNames.at(kPosDaughTpcPion), config.posDauTpcPion.value, limits::kAbsUpperLimit, true, true, false);
this->addSelection(kNegDaughTpcPion, v0SelectionNames.at(kNegDaughTpcPion), config.negDauTpcPion.value, limits::kAbsUpperLimit, true, true, false);
this->addSelection(kPosDaughTofPion, v0SelectionNames.at(kPosDaughTofPion), config.posDauTofPion.value, limits::kAbsUpperLimit, true, true, false);
this->addSelection(kNegDaughTofPion, v0SelectionNames.at(kNegDaughTofPion), config.negDauTofPion.value, limits::kAbsUpperLimit, true, true, false);
}

this->addSelection(kDcaDaughMax, v0SelectionNames.at(kDcaDaughMax), config.dcaDauMax.value, limits::kAbsUpperLimit, true, true, false);
Expand Down Expand Up @@ -321,6 +342,14 @@ class V0Selection : public baseselection::BaseSelection<float, datatypes::V0Mask
this->evaluateObservable(kPosDaughTpcProton, posDaughter.tpcNSigmaPr());
this->evaluateObservable(kNegDaughTpcPion, negDaughter.tpcNSigmaPi());
this->evaluateObservable(kNegDaughTpcProton, negDaughter.tpcNSigmaPr());
if (posDaughter.hasTOF()) {
this->evaluateObservable(kPosDaughTofPion, posDaughter.tofNSigmaPi());
this->evaluateObservable(kPosDaughTofProton, posDaughter.tofNSigmaPr());
}
if (negDaughter.hasTOF()) {
this->evaluateObservable(kNegDaughTofPion, negDaughter.tofNSigmaPi());
this->evaluateObservable(kNegDaughTofProton, negDaughter.tofNSigmaPr());
}

this->assembleBitmask<SelectionHistName>();
}
Expand Down
Loading