@@ -1820,7 +1820,7 @@ struct HfTrackIndexSkimCreator {
18201820 template <typename T1, typename T2, typename T3>
18211821 void applyPreselectionPhiDecay (const int binPt, T1 const & pVecTrack0, T1 const & pVecTrack1, T1 const & pVecTrack2, T2& cutStatus, T3& whichHypo, auto & isSelected)
18221822 {
1823- const double deltaMassMax = cut3Prong[hf_cand_3prong::DecayType::DsToKKPi].get (binPt, 4u );
1823+ const double deltaMassMax = cut3Prong[hf_cand_3prong::DecayType::DsToKKPi].get (binPt, 5u );
18241824 if (TESTBIT (whichHypo[hf_cand_3prong::DecayType::DsToKKPi], 0 )) {
18251825 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 ]});
18261826 if (mass2PhiKKPi > (MassPhi + deltaMassMax) * (MassPhi + deltaMassMax) || mass2PhiKKPi < (MassPhi - deltaMassMax) * (MassPhi - deltaMassMax)) {
@@ -1836,7 +1836,7 @@ struct HfTrackIndexSkimCreator {
18361836 if (whichHypo[hf_cand_3prong::DecayType::DsToKKPi] == 0 ) {
18371837 CLRBIT (isSelected, hf_cand_3prong::DecayType::DsToKKPi);
18381838 if (config.debug ) {
1839- cutStatus[hf_cand_3prong::DecayType::DsToKKPi][4 ] = false ;
1839+ cutStatus[hf_cand_3prong::DecayType::DsToKKPi][5 ] = false ;
18401840 }
18411841 }
18421842 }
@@ -1848,7 +1848,7 @@ struct HfTrackIndexSkimCreator {
18481848 // / \param isIdentifiedPidTrack0 is the flag that tells if the track 0 has been tagged as a proton
18491849 // / \param isIdentifiedPidTrack2 is the flag that tells if the track 2 has been tagged as a proton
18501850 // / \param cutStatus is a 2D array with outcome of each selection (filled only in debug mode)
1851- // / \param whichHypo information of the mass hypoteses that were selected
1851+ // / \param whichHypo information of the mass hypotheses that were selected
18521852 // / \param isSelected is a bitmap with selection outcome
18531853 template <typename T2, typename T3, typename T4>
18541854 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 {
18891889 }
18901890
18911891 // invariant mass
1892- if (( config.debug || TESTBIT (isSelected, iDecay3P) )) {
1892+ if (config.debug || TESTBIT (isSelected, iDecay3P)) {
18931893 const double minMass = cut3Prong[iDecay3P].get (binPt, 0u );
18941894 const double maxMass = cut3Prong[iDecay3P].get (binPt, 1u );
18951895 if (minMass >= 0 . && maxMass > 0 .) { // no need to check isSelected but to avoid mistakes
@@ -2000,7 +2000,7 @@ struct HfTrackIndexSkimCreator {
20002000 // / \param cutStatus is a 2D array with outcome of each selection (filled only in debug mode)
20012001 // / \param isSelected ia s bitmap with selection outcome
20022002 template <typename T1, typename T2, typename T3, typename T4>
2003- void applySelection3Prong (const T1& pVecCand, const T2& secVtx, const T3& primVtx, T4& cutStatus, auto & isSelected)
2003+ void applySelection3Prong (const T1& pVecCand, const std::array< float , 3 >& ptProngs, const T2& secVtx, const T3& primVtx, T4& cutStatus, auto & isSelected)
20042004 {
20052005 if (config.debug || isSelected > 0 ) {
20062006
@@ -2029,7 +2029,7 @@ struct HfTrackIndexSkimCreator {
20292029 }
20302030
20312031 // decay length
2032- if (( config.debug || TESTBIT (isSelected, iDecay3P) )) {
2032+ if (config.debug || TESTBIT (isSelected, iDecay3P)) {
20332033 const auto decayLength = RecoDecay::distance (primVtx, secVtx);
20342034 if (decayLength < cut3Prong[iDecay3P].get (binPt, 3u )) { // 3u == decLenIndex[iDecay3P]
20352035 CLRBIT (isSelected, iDecay3P);
@@ -2038,6 +2038,17 @@ struct HfTrackIndexSkimCreator {
20382038 }
20392039 }
20402040 }
2041+
2042+ // prong pT
2043+ if (config.debug || TESTBIT (isSelected, iDecay3P)) {
2044+ const auto ptProngMin = cut3Prong[iDecay3P].get (binPt, 4u ); // 4u == ptProngMinIndex[iDecay3P]
2045+ if (ptProngs[0 ] < ptProngMin || ptProngs[1 ] < ptProngMin || ptProngs[2 ] < ptProngMin) {
2046+ CLRBIT (isSelected, iDecay3P);
2047+ if (config.debug ) {
2048+ cutStatus[iDecay3P][4 ] = false ;
2049+ }
2050+ }
2051+ }
20412052 }
20422053 }
20432054 }
@@ -2784,7 +2795,8 @@ struct HfTrackIndexSkimCreator {
27842795 const auto pVecCandProng3Pos = RecoDecay::pVec (pvec0, pvec1, pvec2);
27852796
27862797 // 3-prong selections after secondary vertex
2787- applySelection3Prong (pVecCandProng3Pos, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand);
2798+ const std::array ptProngs{trackPos1.pt (), trackNeg1.pt (), trackPos2.pt ()};
2799+ applySelection3Prong (pVecCandProng3Pos, ptProngs, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand);
27882800
27892801 std::array<std::vector<float >, kN3ProngDecaysUsedMlForHfFilters > mlScores3Prongs;
27902802 if (config.applyMlForHfFilters ) {
@@ -3059,7 +3071,8 @@ struct HfTrackIndexSkimCreator {
30593071 const auto pVecCandProng3Neg = RecoDecay::pVec (pvec0, pvec1, pvec2);
30603072
30613073 // 3-prong selections after secondary vertex
3062- applySelection3Prong (pVecCandProng3Neg, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand);
3074+ const std::array ptProngs{trackPos1.pt (), trackNeg1.pt (), trackNeg2.pt ()};
3075+ applySelection3Prong (pVecCandProng3Neg, ptProngs, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand);
30633076
30643077 std::array<std::vector<float >, kN3ProngDecaysUsedMlForHfFilters > mlScores3Prongs{};
30653078 if (config.applyMlForHfFilters ) {
0 commit comments