diff --git a/PWGHF/Core/SelectorCuts.h b/PWGHF/Core/SelectorCuts.h index 17a223bcd20..764fd0cc0c6 100644 --- a/PWGHF/Core/SelectorCuts.h +++ b/PWGHF/Core/SelectorCuts.h @@ -232,7 +232,7 @@ static const std::vector labelsCutVar = {"massMin", "massMax", "cos namespace hf_cuts_presel_3prong { static constexpr int NBinsPt = 2; -static constexpr int NCutVars = 4; +static constexpr int NCutVars = 5; // default values for the pT bin edges (can be used to configure histogram axis) // common for any 3-prong candidate // offset by 1 from the bin numbers in cuts array @@ -243,20 +243,21 @@ constexpr double BinsPt[NBinsPt + 1] = { const auto vecBinsPt = std::vector{BinsPt, BinsPt + NBinsPt + 1}; // default values for the cuts -constexpr double Cuts[NBinsPt][NCutVars] = {{1.75, 2.05, 0.7, 0.02}, /* 1 < pt < 5 */ - {1.75, 2.05, 0.5, 0.02}}; /* 5 < pt < 1000 */ +constexpr double Cuts[NBinsPt][NCutVars] = {{1.75, 2.05, 0.7, 0.02, 0.3}, /* 1 < pt < 5 */ + {1.75, 2.05, 0.5, 0.02, 0.3}}; /* 5 < pt < 1000 */ // row labels static const std::vector labelsPt{}; // column labels -static const std::vector labelsCutVar = {"massMin", "massMax", "cosp", "decL"}; +static const std::vector labelsCutVar = {"massMin", "massMax", "cosp", "decL", "ptProngMin"}; + } // namespace hf_cuts_presel_3prong namespace hf_cuts_presel_ds { static constexpr int NBinsPt = 2; -static constexpr int NCutVars = 5; +static constexpr int NCutVars = 6; // default values for the pT bin edges (can be used to configure histogram axis) // offset by 1 from the bin numbers in cuts array constexpr double BinsPt[NBinsPt + 1] = { @@ -266,14 +267,14 @@ constexpr double BinsPt[NBinsPt + 1] = { const auto vecBinsPt = std::vector{BinsPt, BinsPt + NBinsPt + 1}; // default values for the cuts -constexpr double Cuts[NBinsPt][NCutVars] = {{1.70, 2.15, 0.7, 0.02, 0.02}, /* 1 < pt < 5 */ - {1.70, 2.15, 0.5, 0.02, 0.02}}; /* 5 < pt < 1000 */ +constexpr double Cuts[NBinsPt][NCutVars] = {{1.70, 2.15, 0.7, 0.02, 0.3, 0.02}, /* 1 < pt < 5 */ + {1.70, 2.15, 0.5, 0.02, 0.3, 0.02}}; /* 5 < pt < 1000 */ // row labels static const std::vector labelsPt{}; // column labels -static const std::vector labelsCutVar = {"massMin", "massMax", "cosp", "decL", "deltaMassKK"}; +static const std::vector labelsCutVar = {"massMin", "massMax", "cosp", "decL", "ptProngMin", "deltaMassKK"}; } // namespace hf_cuts_presel_ds namespace hf_cuts_presel_dstar diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 16ca600001b..c8a7c868c85 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -1820,7 +1820,7 @@ struct HfTrackIndexSkimCreator { template void applyPreselectionPhiDecay(const int binPt, T1 const& pVecTrack0, T1 const& pVecTrack1, T1 const& pVecTrack2, T2& cutStatus, T3& whichHypo, auto& isSelected) { - const double deltaMassMax = cut3Prong[hf_cand_3prong::DecayType::DsToKKPi].get(binPt, 4u); + const double deltaMassMax = cut3Prong[hf_cand_3prong::DecayType::DsToKKPi].get(binPt, 5u); if (TESTBIT(whichHypo[hf_cand_3prong::DecayType::DsToKKPi], 0)) { const double mass2PhiKKPi = RecoDecay::m2(std::array{pVecTrack0, pVecTrack1}, std::array{arrMass3Prong[hf_cand_3prong::DecayType::DsToKKPi][0][0], arrMass3Prong[hf_cand_3prong::DecayType::DsToKKPi][0][1]}); if (mass2PhiKKPi > (MassPhi + deltaMassMax) * (MassPhi + deltaMassMax) || mass2PhiKKPi < (MassPhi - deltaMassMax) * (MassPhi - deltaMassMax)) { @@ -1836,7 +1836,7 @@ struct HfTrackIndexSkimCreator { if (whichHypo[hf_cand_3prong::DecayType::DsToKKPi] == 0) { CLRBIT(isSelected, hf_cand_3prong::DecayType::DsToKKPi); if (config.debug) { - cutStatus[hf_cand_3prong::DecayType::DsToKKPi][4] = false; + cutStatus[hf_cand_3prong::DecayType::DsToKKPi][5] = false; } } } @@ -1848,7 +1848,7 @@ struct HfTrackIndexSkimCreator { /// \param isIdentifiedPidTrack0 is the flag that tells if the track 0 has been tagged as a proton /// \param isIdentifiedPidTrack2 is the flag that tells if the track 2 has been tagged as a proton /// \param cutStatus is a 2D array with outcome of each selection (filled only in debug mode) - /// \param whichHypo information of the mass hypoteses that were selected + /// \param whichHypo information of the mass hypotheses that were selected /// \param isSelected is a bitmap with selection outcome template void applyPreselection3Prong(T2 const& pVecTrack0, T2 const& pVecTrack1, T2 const& pVecTrack2, const auto isIdentifiedPidTrack0, const auto isIdentifiedPidTrack2, T3& cutStatus, T4& whichHypo, auto& isSelected) @@ -1889,7 +1889,7 @@ struct HfTrackIndexSkimCreator { } // invariant mass - if ((config.debug || TESTBIT(isSelected, iDecay3P))) { + if (config.debug || TESTBIT(isSelected, iDecay3P)) { const double minMass = cut3Prong[iDecay3P].get(binPt, 0u); const double maxMass = cut3Prong[iDecay3P].get(binPt, 1u); if (minMass >= 0. && maxMass > 0.) { // no need to check isSelected but to avoid mistakes @@ -2000,7 +2000,7 @@ struct HfTrackIndexSkimCreator { /// \param cutStatus is a 2D array with outcome of each selection (filled only in debug mode) /// \param isSelected ia s bitmap with selection outcome template - void applySelection3Prong(const T1& pVecCand, const T2& secVtx, const T3& primVtx, T4& cutStatus, auto& isSelected) + void applySelection3Prong(const T1& pVecCand, const std::array& ptProngs, const T2& secVtx, const T3& primVtx, T4& cutStatus, auto& isSelected) { if (config.debug || isSelected > 0) { @@ -2029,7 +2029,7 @@ struct HfTrackIndexSkimCreator { } // decay length - if ((config.debug || TESTBIT(isSelected, iDecay3P))) { + if (config.debug || TESTBIT(isSelected, iDecay3P)) { const auto decayLength = RecoDecay::distance(primVtx, secVtx); if (decayLength < cut3Prong[iDecay3P].get(binPt, 3u)) { // 3u == decLenIndex[iDecay3P] CLRBIT(isSelected, iDecay3P); @@ -2038,6 +2038,17 @@ struct HfTrackIndexSkimCreator { } } } + + // prong daughter pT + if (config.debug || TESTBIT(isSelected, iDecay3P)) { + const auto ptProngMin = cut3Prong[iDecay3P].get(binPt, 4u); // 4u == ptProngMinIndex[iDecay3P] + if (ptProngs[0] < ptProngMin || ptProngs[1] < ptProngMin || ptProngs[2] < ptProngMin) { + CLRBIT(isSelected, iDecay3P); + if (config.debug) { + cutStatus[iDecay3P][4] = false; + } + } + } } } } @@ -2784,7 +2795,8 @@ struct HfTrackIndexSkimCreator { const auto pVecCandProng3Pos = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex - applySelection3Prong(pVecCandProng3Pos, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand); + const std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackPos2.pt()}; + applySelection3Prong(pVecCandProng3Pos, ptProngs, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand); std::array, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs; if (config.applyMlForHfFilters) { @@ -3059,7 +3071,8 @@ struct HfTrackIndexSkimCreator { const auto pVecCandProng3Neg = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex - applySelection3Prong(pVecCandProng3Neg, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand); + const std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackNeg2.pt()}; + applySelection3Prong(pVecCandProng3Neg, ptProngs, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand); std::array, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs{}; if (config.applyMlForHfFilters) {