-
Notifications
You must be signed in to change notification settings - Fork 678
[PWGCF] Change nsigma TOF selections to optional cuts, force bit=1 when no TOF is found #17315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
b28c6d9
70c0485
75f27d2
6c2c131
c9f4528
0aa1c28
3d37d83
b6343a7
6a167d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,7 @@ | |
| #include <array> | ||
| #include <cmath> | ||
| #include <cstdint> | ||
| #include <limits> | ||
| #include <string> | ||
| #include <unordered_map> | ||
| #include <vector> | ||
|
|
@@ -78,7 +79,9 @@ struct ConfCascadeFilters : o2::framework::ConfigurableGroup { | |
| 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>> 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"}; | ||
| o2::framework::Configurable<std::vector<float>> negDauTof{"negDauTof", {}, "Maximum |nsigma_Pion/Proton| TOF for negative daughter tracks"}; \ | ||
| o2::framework::Configurable<bool> requireTof{"requireTof", false, "If true, TOF PID is a mandatory selection"}; \ | ||
| o2::framework::Configurable<bool> keepTracksWithoutTof{"keepTracksWithoutTof", true, "If true, candidates whose daughters have no TOF signal are kept"}; | ||
|
|
||
| struct ConfXiBits : o2::framework::ConfigurableGroup { | ||
| std::string prefix = std::string("XiBits"); | ||
|
|
@@ -242,7 +245,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); | ||
| this->addSelection(kBachelorTofPion, cascadeSelectionNames.at(kBachelorTofPion), config.bachelorTofPion.value, limits::kAbsUpperLimit, true, mRequireTof, false); | ||
| } | ||
| if constexpr (modes::isEqual(cascadeType, modes::Cascade::kOmega)) { | ||
| mOmegaMassLowerLimit = filter.massOmegaMin.value; | ||
|
|
@@ -251,7 +254,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); | ||
| this->addSelection(kBachelorTofKaon, cascadeSelectionNames.at(kBachelorTofKaon), config.bachelorTofKaon.value, limits::kAbsUpperLimit, true, mRequireTof, false); | ||
| } | ||
|
|
||
| mPtMin = filter.ptMin.value; | ||
|
|
@@ -262,11 +265,13 @@ class CascadeSelection : public baseselection::BaseSelection<float, o2::analysis | |
| mPhiMax = filter.phiMax.value; | ||
| mLambdaMassMin = filter.massLambdaMin.value; | ||
| mLambdaMassMax = filter.massLambdaMax.value; | ||
| mRequireTof = config.requireTof.value; | ||
| mKeepTracksWithoutTof = config.keepTracksWithoutTof.value; | ||
|
|
||
| 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(kPosDauTof, cascadeSelectionNames.at(kPosDauTof), config.posDauTof.value, limits::kAbsUpperLimit, true, mRequireTof, false); | ||
| this->addSelection(kNegDauTof, cascadeSelectionNames.at(kNegDauTof), config.negDauTof.value, limits::kAbsUpperLimit, true, mRequireTof, 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); | ||
|
|
@@ -336,6 +341,9 @@ class CascadeSelection : public baseselection::BaseSelection<float, o2::analysis | |
| if (bachelor.hasTOF()) { | ||
| this->evaluateObservable(kBachelorTofPion, bachelor.tofNSigmaPi()); | ||
| this->evaluateObservable(kBachelorTofKaon, bachelor.tofNSigmaKa()); | ||
| } else if (mKeepTracksWithoutTof) { | ||
| this->setBitmask(kBachelorTofPion, 0); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This call would set the bitmask itself to 0, i.e. the selection would not be passed, which is what we want to avoid in this branch if the track has no TOF. Like this we compare 0 against all the limits (which are positive definite), so all bits in the bitmask will be set to 1. |
||
| this->setBitmask(kBachelorTofKaon, 0); | ||
| } | ||
|
|
||
| // depending on the charge, we check lambda or antilambda hypothesis | ||
|
|
@@ -344,18 +352,26 @@ class CascadeSelection : public baseselection::BaseSelection<float, o2::analysis | |
| this->evaluateObservable(kNegDauTpc, negDaughter.tpcNSigmaPi()); | ||
| if (posDaughter.hasTOF()) { | ||
| this->evaluateObservable(kPosDauTof, posDaughter.tofNSigmaPr()); | ||
| } else if (mKeepTracksWithoutTof) { | ||
| this->setBitmask(kPosDauTof, 0); | ||
| } | ||
| if (negDaughter.hasTOF()) { | ||
| this->evaluateObservable(kNegDauTof, negDaughter.tofNSigmaPi()); | ||
| } else if (mKeepTracksWithoutTof) { | ||
| this->setBitmask(kNegDauTof, 0); | ||
| } | ||
| } else if (cascade.sign() > 0) { | ||
| this->evaluateObservable(kPosDauTpc, posDaughter.tpcNSigmaPi()); | ||
| this->evaluateObservable(kNegDauTpc, negDaughter.tpcNSigmaPr()); | ||
| if (posDaughter.hasTOF()) { | ||
| this->evaluateObservable(kPosDauTof, posDaughter.tofNSigmaPi()); | ||
| } else if (mKeepTracksWithoutTof) { | ||
| this->setBitmask(kPosDauTof, 0); | ||
| } | ||
| if (negDaughter.hasTOF()) { | ||
| this->evaluateObservable(kNegDauTof, negDaughter.tofNSigmaPr()); | ||
| } else if (mKeepTracksWithoutTof) { | ||
| this->setBitmask(kNegDauTof, 0); | ||
| } | ||
| } else { | ||
| LOG(warn) << "Encountered Cascade candidate with 0 charge"; | ||
|
|
@@ -468,6 +484,8 @@ class CascadeSelection : public baseselection::BaseSelection<float, o2::analysis | |
| float mPhiMax = o2::constants::math::TwoPI; | ||
| float mLambdaMassMin = 1.f; | ||
| float mLambdaMassMax = 1.2f; | ||
| bool mRequireTof = false; | ||
| bool mKeepTracksWithoutTof = false; | ||
| }; | ||
|
|
||
| struct CascadeBuilderProducts : o2::framework::ProducesGroup { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This include is no longer needed. Same in V0Builder