[PWGCF] Change nsigma TOF selections to optional cuts, force bit=1 when no TOF is found - #17315
[PWGCF] Change nsigma TOF selections to optional cuts, force bit=1 when no TOF is found#17315allesgrau wants to merge 9 commits into
Conversation
Please consider the following formatting changes to AliceO2Group#17302
|
O2 linter results: ❌ 0 errors, |
| 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, only keep candidates whose daughters have a TOF signal"}; |
There was a problem hiding this comment.
I would introduce 2 new configurables
- The first one you have, i.e. making TOF a minimal (true) or optional (false) selection
- The second configurable should be called like "keepTracksWithoutTof", such that daughters without TOF can be kept
| 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, false, false); |
There was a problem hiding this comment.
Here the flag should be set according to "requireTof" from the configuration
| 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, false, false); |
| if (bachelor.hasTOF()) { | ||
| this->evaluateObservable(kBachelorTofPion, bachelor.tofNSigmaPi()); | ||
| this->evaluateObservable(kBachelorTofKaon, bachelor.tofNSigmaKa()); | ||
| } else if (!mRequireTof) { |
There was a problem hiding this comment.
here you should then check against the flag whether to keep tracks without Tof or not
Also, the limit to check against should be 0 (since it is a AbsUpperCut, so the only value which should alwasy succeed is 0. Using max value would always fail)
|
Hi @allesgrau , |
Please consider the following formatting changes to AliceO2Group#17315
| #include <array> | ||
| #include <cmath> | ||
| #include <cstdint> | ||
| #include <limits> |
There was a problem hiding this comment.
This include is no longer needed. Same in V0Builder
| this->evaluateObservable(kBachelorTofPion, bachelor.tofNSigmaPi()); | ||
| this->evaluateObservable(kBachelorTofKaon, bachelor.tofNSigmaKa()); | ||
| } else if (mKeepTracksWithoutTof) { | ||
| this->setBitmask(kBachelorTofPion, 0); |
There was a problem hiding this comment.
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.
You have to call here
this->evaluateObservable(kBachelorTofPion, 0);
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 applies to all other calls below (and in the V0Builder).
No description provided.