From b5be85c896eb9ee467b774890ce75d870682c0fd Mon Sep 17 00:00:00 2001 From: Marcello Di Costanzo Date: Tue, 14 Apr 2026 08:54:19 +0200 Subject: [PATCH 01/12] Species-dependent min prong pt selection --- PWGHF/Core/SelectorCuts.h | 11 ++++++++ PWGHF/TableProducer/trackIndexSkimCreator.cxx | 27 +++++++++++++++---- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/PWGHF/Core/SelectorCuts.h b/PWGHF/Core/SelectorCuts.h index 17a223bcd20..3ee4910f8a1 100644 --- a/PWGHF/Core/SelectorCuts.h +++ b/PWGHF/Core/SelectorCuts.h @@ -251,6 +251,17 @@ static const std::vector labelsPt{}; // column labels static const std::vector labelsCutVar = {"massMin", "massMax", "cosp", "decL"}; + +// Single prong min pt selection +static constexpr int NSpecies3Prong = 8; // number of species for 3-prong candidates +static const float cutsProngMinPt3Prong[NSpecies3Prong] = {0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4}; + +// 3-prong species labels +static const std::vector labelsSpecies3Prong = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"}; + +// column label +static const std::vector labelsMinPt = {"Minimum track transverse momentum (GeV/c)"}; + } // namespace hf_cuts_presel_3prong namespace hf_cuts_presel_ds diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 16ca600001b..7137f913aa5 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -1456,6 +1456,9 @@ struct HfTrackIndexSkimCreator { Configurable> binsPtDstarToD0Pi{"binsPtDstarToD0Pi", std::vector{hf_cuts_presel_dstar::vecBinsPt}, "pT bin limits for D*+->D0pi pT-dependent cuts"}; Configurable> cutsDstarToD0Pi{"cutsDstarToD0Pi", {hf_cuts_presel_dstar::Cuts[0], hf_cuts_presel_dstar::NBinsPt, hf_cuts_presel_dstar::NCutVars, hf_cuts_presel_dstar::labelsPt, hf_cuts_presel_dstar::labelsCutVar}, "D*+->D0pi selections per pT bin"}; + // Species-differential track min pT selection for 3-prong candidates + Configurable> cutsProngPtMin{"cutsProngPtMin", {hf_cuts_presel_3prong::cutsProngMinPt3Prong, hf_cuts_presel_3prong::NSpecies3Prong, 1, hf_cuts_presel_3prong::labelsSpecies3Prong, hf_cuts_presel_3prong::labelsMinPt}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; + // proton PID selections for Lc and Xic Configurable applyProtonPidForLcToPKPi{"applyProtonPidForLcToPKPi", false, "Apply proton PID for Lc->pKpi"}; Configurable applyProtonPidForXicToPKPi{"applyProtonPidForXicToPKPi", false, "Apply proton PID for Xic->pKpi"}; @@ -1848,7 +1851,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) @@ -1999,8 +2002,8 @@ struct HfTrackIndexSkimCreator { /// \param primVtx is the primary vertex /// \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) + template + void applySelection3Prong(const T1& pVecCand, const T2& prongDaugsPt, const T3& secVtx, const T4& primVtx, T5& cutStatus, auto& isSelected) { if (config.debug || isSelected > 0) { @@ -2038,6 +2041,18 @@ struct HfTrackIndexSkimCreator { } } } + + // prong daughter pT + if ((config.debug || TESTBIT(isSelected, iDecay3P))) { + const auto minPtDaug = config.cutsProngPtMin->get(iDecay3P); + if (prongDaugsPt[0] < minPtDaug || prongDaugsPt[1] < minPtDaug || prongDaugsPt[2] < minPtDaug) { + CLRBIT(isSelected, iDecay3P); + if (config.debug) { + cutStatus[iDecay3P][4] = false; + } + } + } + } } } @@ -2643,6 +2658,7 @@ struct HfTrackIndexSkimCreator { auto trackParVarPos2 = getTrackParCov(trackPos2); std::array dcaInfoPos2{trackPos2.dcaXY(), trackPos2.dcaZ()}; + std::array prongPtInfo{trackPos1.pt(), trackNeg1.pt(), trackPos2.pt()}; // preselection of 3-prong candidates if (isSelected3ProngCand) { @@ -2784,7 +2800,7 @@ struct HfTrackIndexSkimCreator { const auto pVecCandProng3Pos = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex - applySelection3Prong(pVecCandProng3Pos, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand); + applySelection3Prong(pVecCandProng3Pos, prongPtInfo, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand); std::array, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs; if (config.applyMlForHfFilters) { @@ -2917,6 +2933,7 @@ struct HfTrackIndexSkimCreator { auto trackNeg2 = trackIndexNeg2.template track_as(); auto trackParVarNeg2 = getTrackParCov(trackNeg2); std::array dcaInfoNeg2{trackNeg2.dcaXY(), trackNeg2.dcaZ()}; + std::array prongPtInfo{trackPos1.pt(), trackNeg1.pt(), trackNeg2.pt()}; // preselection of 3-prong candidates if (isSelected3ProngCand) { @@ -3059,7 +3076,7 @@ struct HfTrackIndexSkimCreator { const auto pVecCandProng3Neg = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex - applySelection3Prong(pVecCandProng3Neg, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand); + applySelection3Prong(pVecCandProng3Neg, prongPtInfo, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand); std::array, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs{}; if (config.applyMlForHfFilters) { From be673b4410111317ec4f85463c4d68da6f1c3441 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 14 Apr 2026 07:01:55 +0000 Subject: [PATCH 02/12] Please consider the following formatting changes --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 7137f913aa5..4ef185afb72 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2052,7 +2052,6 @@ struct HfTrackIndexSkimCreator { } } } - } } } From 6b29ee3f8aafaf069660ba4114e79c1911196fde Mon Sep 17 00:00:00 2001 From: marcellocosti Date: Tue, 28 Apr 2026 15:43:22 +0200 Subject: [PATCH 03/12] Implement Vit comments --- PWGHF/Core/SelectorCuts.h | 4 ++-- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/PWGHF/Core/SelectorCuts.h b/PWGHF/Core/SelectorCuts.h index 3ee4910f8a1..b261bd86348 100644 --- a/PWGHF/Core/SelectorCuts.h +++ b/PWGHF/Core/SelectorCuts.h @@ -254,10 +254,10 @@ static const std::vector labelsCutVar = {"massMin", "massMax", "cos // Single prong min pt selection static constexpr int NSpecies3Prong = 8; // number of species for 3-prong candidates -static const float cutsProngMinPt3Prong[NSpecies3Prong] = {0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4}; +static const float ptProngMin[NSpecies3Prong] = {0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4}; // 3-prong species labels -static const std::vector labelsSpecies3Prong = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"}; +static const std::vector labelsPtProngMin = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"}; // column label static const std::vector labelsMinPt = {"Minimum track transverse momentum (GeV/c)"}; diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 4ef185afb72..97872b8be26 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -1457,7 +1457,7 @@ struct HfTrackIndexSkimCreator { Configurable> cutsDstarToD0Pi{"cutsDstarToD0Pi", {hf_cuts_presel_dstar::Cuts[0], hf_cuts_presel_dstar::NBinsPt, hf_cuts_presel_dstar::NCutVars, hf_cuts_presel_dstar::labelsPt, hf_cuts_presel_dstar::labelsCutVar}, "D*+->D0pi selections per pT bin"}; // Species-differential track min pT selection for 3-prong candidates - Configurable> cutsProngPtMin{"cutsProngPtMin", {hf_cuts_presel_3prong::cutsProngMinPt3Prong, hf_cuts_presel_3prong::NSpecies3Prong, 1, hf_cuts_presel_3prong::labelsSpecies3Prong, hf_cuts_presel_3prong::labelsMinPt}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; + Configurable> ptProngMin3Prong{"ptProngMin3Prong", {hf_cuts_presel_3prong::ptProngMin, hf_cuts_presel_3prong::NSpecies3Prong, 1, hf_cuts_presel_3prong::labelsPtProngMin, hf_cuts_presel_3prong::labelsMinPt}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; // proton PID selections for Lc and Xic Configurable applyProtonPidForLcToPKPi{"applyProtonPidForLcToPKPi", false, "Apply proton PID for Lc->pKpi"}; @@ -2002,8 +2002,8 @@ struct HfTrackIndexSkimCreator { /// \param primVtx is the primary vertex /// \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& prongDaugsPt, const T3& secVtx, const T4& primVtx, T5& cutStatus, auto& isSelected) + template + void applySelection3Prong(const T1& pVecCand, const std::array& ptProngs, const T2& secVtx, const T3& primVtx, T4& cutStatus, auto& isSelected) { if (config.debug || isSelected > 0) { @@ -2044,8 +2044,8 @@ struct HfTrackIndexSkimCreator { // prong daughter pT if ((config.debug || TESTBIT(isSelected, iDecay3P))) { - const auto minPtDaug = config.cutsProngPtMin->get(iDecay3P); - if (prongDaugsPt[0] < minPtDaug || prongDaugsPt[1] < minPtDaug || prongDaugsPt[2] < minPtDaug) { + const auto ptProngMin = config.ptProngMin3Prong->get(iDecay3P); + if (ptProngs[0] < ptProngMin || ptProngs[1] < ptProngMin || ptProngs[2] < ptProngMin) { CLRBIT(isSelected, iDecay3P); if (config.debug) { cutStatus[iDecay3P][4] = false; @@ -2657,7 +2657,7 @@ struct HfTrackIndexSkimCreator { auto trackParVarPos2 = getTrackParCov(trackPos2); std::array dcaInfoPos2{trackPos2.dcaXY(), trackPos2.dcaZ()}; - std::array prongPtInfo{trackPos1.pt(), trackNeg1.pt(), trackPos2.pt()}; + std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackPos2.pt()}; // preselection of 3-prong candidates if (isSelected3ProngCand) { @@ -2799,7 +2799,7 @@ struct HfTrackIndexSkimCreator { const auto pVecCandProng3Pos = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex - applySelection3Prong(pVecCandProng3Pos, prongPtInfo, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand); + applySelection3Prong(pVecCandProng3Pos, ptProngs, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand); std::array, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs; if (config.applyMlForHfFilters) { @@ -2932,7 +2932,7 @@ struct HfTrackIndexSkimCreator { auto trackNeg2 = trackIndexNeg2.template track_as(); auto trackParVarNeg2 = getTrackParCov(trackNeg2); std::array dcaInfoNeg2{trackNeg2.dcaXY(), trackNeg2.dcaZ()}; - std::array prongPtInfo{trackPos1.pt(), trackNeg1.pt(), trackNeg2.pt()}; + std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackNeg2.pt()}; // preselection of 3-prong candidates if (isSelected3ProngCand) { @@ -3075,7 +3075,7 @@ struct HfTrackIndexSkimCreator { const auto pVecCandProng3Neg = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex - applySelection3Prong(pVecCandProng3Neg, prongPtInfo, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand); + applySelection3Prong(pVecCandProng3Neg, ptProngs, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand); std::array, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs{}; if (config.applyMlForHfFilters) { From eb9bbf1acd7e3c91b7aa5afc13fabf574a8b60f3 Mon Sep 17 00:00:00 2001 From: marcellocosti Date: Tue, 28 Apr 2026 15:45:55 +0200 Subject: [PATCH 04/12] Implement Vit comments Implement Vit comments --- PWGHF/Core/SelectorCuts.h | 4 ++-- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGHF/Core/SelectorCuts.h b/PWGHF/Core/SelectorCuts.h index b261bd86348..b334d18711b 100644 --- a/PWGHF/Core/SelectorCuts.h +++ b/PWGHF/Core/SelectorCuts.h @@ -253,8 +253,8 @@ static const std::vector labelsPt{}; static const std::vector labelsCutVar = {"massMin", "massMax", "cosp", "decL"}; // Single prong min pt selection -static constexpr int NSpecies3Prong = 8; // number of species for 3-prong candidates -static const float ptProngMin[NSpecies3Prong] = {0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4}; +static constexpr int NSpecies = 8; // number of species for 3-prong candidates +static const float ptProngMin[NSpecies] = {0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4}; // 3-prong species labels static const std::vector labelsPtProngMin = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"}; diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 97872b8be26..04485713aee 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -1457,7 +1457,7 @@ struct HfTrackIndexSkimCreator { Configurable> cutsDstarToD0Pi{"cutsDstarToD0Pi", {hf_cuts_presel_dstar::Cuts[0], hf_cuts_presel_dstar::NBinsPt, hf_cuts_presel_dstar::NCutVars, hf_cuts_presel_dstar::labelsPt, hf_cuts_presel_dstar::labelsCutVar}, "D*+->D0pi selections per pT bin"}; // Species-differential track min pT selection for 3-prong candidates - Configurable> ptProngMin3Prong{"ptProngMin3Prong", {hf_cuts_presel_3prong::ptProngMin, hf_cuts_presel_3prong::NSpecies3Prong, 1, hf_cuts_presel_3prong::labelsPtProngMin, hf_cuts_presel_3prong::labelsMinPt}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; + Configurable> ptProngMin3Prong{"ptProngMin3Prong", {hf_cuts_presel_3prong::ptProngMin, hf_cuts_presel_3prong::NSpecies, 1, hf_cuts_presel_3prong::labelsPtProngMin, hf_cuts_presel_3prong::labelsMinPt}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; // proton PID selections for Lc and Xic Configurable applyProtonPidForLcToPKPi{"applyProtonPidForLcToPKPi", false, "Apply proton PID for Lc->pKpi"}; From 89d23ad75379f729bf08dbb10b37772a252d498a Mon Sep 17 00:00:00 2001 From: marcellocosti Date: Tue, 28 Apr 2026 15:57:56 +0200 Subject: [PATCH 05/12] Modify description --- PWGHF/Core/SelectorCuts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/Core/SelectorCuts.h b/PWGHF/Core/SelectorCuts.h index b334d18711b..a7aa5c8e62c 100644 --- a/PWGHF/Core/SelectorCuts.h +++ b/PWGHF/Core/SelectorCuts.h @@ -260,7 +260,7 @@ static const float ptProngMin[NSpecies] = {0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0. static const std::vector labelsPtProngMin = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"}; // column label -static const std::vector labelsMinPt = {"Minimum track transverse momentum (GeV/c)"}; +static const std::vector labelsMinPt = {"Minimum prong transverse momentum (GeV/c)"}; } // namespace hf_cuts_presel_3prong From eb1eb00c9957241583ddea986e3c45038368e300 Mon Sep 17 00:00:00 2001 From: marcellocosti Date: Wed, 29 Apr 2026 16:26:47 +0200 Subject: [PATCH 06/12] Fix configurable --- PWGHF/Core/SelectorCuts.h | 2 +- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGHF/Core/SelectorCuts.h b/PWGHF/Core/SelectorCuts.h index a7aa5c8e62c..f22753a1859 100644 --- a/PWGHF/Core/SelectorCuts.h +++ b/PWGHF/Core/SelectorCuts.h @@ -254,7 +254,7 @@ static const std::vector labelsCutVar = {"massMin", "massMax", "cos // Single prong min pt selection static constexpr int NSpecies = 8; // number of species for 3-prong candidates -static const float ptProngMin[NSpecies] = {0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4}; +static const float ptProngMin[NSpecies][1] = {{0.4}, {0.4}, {0.4}, {0.4}, {0.4}, {0.4}, {0.4}, {0.4}}; // 3-prong species labels static const std::vector labelsPtProngMin = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"}; diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 04485713aee..0b8be0160ab 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -1457,7 +1457,7 @@ struct HfTrackIndexSkimCreator { Configurable> cutsDstarToD0Pi{"cutsDstarToD0Pi", {hf_cuts_presel_dstar::Cuts[0], hf_cuts_presel_dstar::NBinsPt, hf_cuts_presel_dstar::NCutVars, hf_cuts_presel_dstar::labelsPt, hf_cuts_presel_dstar::labelsCutVar}, "D*+->D0pi selections per pT bin"}; // Species-differential track min pT selection for 3-prong candidates - Configurable> ptProngMin3Prong{"ptProngMin3Prong", {hf_cuts_presel_3prong::ptProngMin, hf_cuts_presel_3prong::NSpecies, 1, hf_cuts_presel_3prong::labelsPtProngMin, hf_cuts_presel_3prong::labelsMinPt}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; + Configurable> ptProngMin3Prong{"ptProngMin3Prong", {hf_cuts_presel_3prong::ptProngMin[0], hf_cuts_presel_3prong::NSpecies, 1, hf_cuts_presel_3prong::labelsPtProngMin, hf_cuts_presel_3prong::labelsMinPt}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; // proton PID selections for Lc and Xic Configurable applyProtonPidForLcToPKPi{"applyProtonPidForLcToPKPi", false, "Apply proton PID for Lc->pKpi"}; From a2ebc3b0b3130d53e57f3734d0293331385712dd Mon Sep 17 00:00:00 2001 From: marcellocosti Date: Wed, 29 Apr 2026 17:17:44 +0200 Subject: [PATCH 07/12] Implement Vit comments --- PWGHF/Core/SelectorCuts.h | 6 +++--- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/PWGHF/Core/SelectorCuts.h b/PWGHF/Core/SelectorCuts.h index f22753a1859..7b978c945e0 100644 --- a/PWGHF/Core/SelectorCuts.h +++ b/PWGHF/Core/SelectorCuts.h @@ -254,13 +254,13 @@ static const std::vector labelsCutVar = {"massMin", "massMax", "cos // Single prong min pt selection static constexpr int NSpecies = 8; // number of species for 3-prong candidates -static const float ptProngMin[NSpecies][1] = {{0.4}, {0.4}, {0.4}, {0.4}, {0.4}, {0.4}, {0.4}, {0.4}}; +constexpr float ptProngMin[NSpecies][1] = {{0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}}; // 3-prong species labels -static const std::vector labelsPtProngMin = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"}; +static const std::vector labelsSpecies = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"}; // column label -static const std::vector labelsMinPt = {"Minimum prong transverse momentum (GeV/c)"}; +static const std::vector labelsPtProngMin = {"Minimum pT (GeV/c)"}; } // namespace hf_cuts_presel_3prong diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 0b8be0160ab..d08b0befd74 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -1457,7 +1457,7 @@ struct HfTrackIndexSkimCreator { Configurable> cutsDstarToD0Pi{"cutsDstarToD0Pi", {hf_cuts_presel_dstar::Cuts[0], hf_cuts_presel_dstar::NBinsPt, hf_cuts_presel_dstar::NCutVars, hf_cuts_presel_dstar::labelsPt, hf_cuts_presel_dstar::labelsCutVar}, "D*+->D0pi selections per pT bin"}; // Species-differential track min pT selection for 3-prong candidates - Configurable> ptProngMin3Prong{"ptProngMin3Prong", {hf_cuts_presel_3prong::ptProngMin[0], hf_cuts_presel_3prong::NSpecies, 1, hf_cuts_presel_3prong::labelsPtProngMin, hf_cuts_presel_3prong::labelsMinPt}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; + Configurable> ptProngMin3Prong{"ptProngMin3Prong", {hf_cuts_presel_3prong::ptProngMin[0], hf_cuts_presel_3prong::NSpecies, 1, hf_cuts_presel_3prong::labelsSpecies, hf_cuts_presel_3prong::labelsPtProngMin}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; // proton PID selections for Lc and Xic Configurable applyProtonPidForLcToPKPi{"applyProtonPidForLcToPKPi", false, "Apply proton PID for Lc->pKpi"}; @@ -1892,7 +1892,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 @@ -2032,7 +2032,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); @@ -2043,7 +2043,7 @@ struct HfTrackIndexSkimCreator { } // prong daughter pT - if ((config.debug || TESTBIT(isSelected, iDecay3P))) { + if (config.debug || TESTBIT(isSelected, iDecay3P)) { const auto ptProngMin = config.ptProngMin3Prong->get(iDecay3P); if (ptProngs[0] < ptProngMin || ptProngs[1] < ptProngMin || ptProngs[2] < ptProngMin) { CLRBIT(isSelected, iDecay3P); From badc60e4dcb4fc14751a85ffa268e34618e713f8 Mon Sep 17 00:00:00 2001 From: marcellocosti Date: Thu, 30 Apr 2026 15:38:00 +0200 Subject: [PATCH 08/12] Moved variable declaration --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index d08b0befd74..27d96bb2fff 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2657,7 +2657,6 @@ struct HfTrackIndexSkimCreator { auto trackParVarPos2 = getTrackParCov(trackPos2); std::array dcaInfoPos2{trackPos2.dcaXY(), trackPos2.dcaZ()}; - std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackPos2.pt()}; // preselection of 3-prong candidates if (isSelected3ProngCand) { @@ -2799,6 +2798,7 @@ struct HfTrackIndexSkimCreator { const auto pVecCandProng3Pos = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex + std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackPos2.pt()}; applySelection3Prong(pVecCandProng3Pos, ptProngs, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand); std::array, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs; @@ -2932,7 +2932,6 @@ struct HfTrackIndexSkimCreator { auto trackNeg2 = trackIndexNeg2.template track_as(); auto trackParVarNeg2 = getTrackParCov(trackNeg2); std::array dcaInfoNeg2{trackNeg2.dcaXY(), trackNeg2.dcaZ()}; - std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackNeg2.pt()}; // preselection of 3-prong candidates if (isSelected3ProngCand) { @@ -3075,6 +3074,7 @@ struct HfTrackIndexSkimCreator { const auto pVecCandProng3Neg = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex + std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackNeg2.pt()}; applySelection3Prong(pVecCandProng3Neg, ptProngs, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand); std::array, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs{}; From 54458969724f103c0b1c67134c983cf44014d8ce Mon Sep 17 00:00:00 2001 From: marcellocosti Date: Thu, 30 Apr 2026 15:56:51 +0200 Subject: [PATCH 09/12] Add const qualifier --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 27d96bb2fff..1ac56d1ee28 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -2798,7 +2798,7 @@ struct HfTrackIndexSkimCreator { const auto pVecCandProng3Pos = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex - std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackPos2.pt()}; + const std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackPos2.pt()}; applySelection3Prong(pVecCandProng3Pos, ptProngs, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand); std::array, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs; @@ -3074,7 +3074,7 @@ struct HfTrackIndexSkimCreator { const auto pVecCandProng3Neg = RecoDecay::pVec(pvec0, pvec1, pvec2); // 3-prong selections after secondary vertex - std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackNeg2.pt()}; + const std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackNeg2.pt()}; applySelection3Prong(pVecCandProng3Neg, ptProngs, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand); std::array, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs{}; From 262986f0e452bd7e974a812319521236935a99bf Mon Sep 17 00:00:00 2001 From: marcellocosti Date: Thu, 30 Apr 2026 16:18:26 +0200 Subject: [PATCH 10/12] Fix capital letter --- PWGHF/Core/SelectorCuts.h | 2 +- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGHF/Core/SelectorCuts.h b/PWGHF/Core/SelectorCuts.h index 7b978c945e0..390763fee08 100644 --- a/PWGHF/Core/SelectorCuts.h +++ b/PWGHF/Core/SelectorCuts.h @@ -254,7 +254,7 @@ static const std::vector labelsCutVar = {"massMin", "massMax", "cos // Single prong min pt selection static constexpr int NSpecies = 8; // number of species for 3-prong candidates -constexpr float ptProngMin[NSpecies][1] = {{0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}}; +constexpr float PtProngMin[NSpecies][1] = {{0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}}; // 3-prong species labels static const std::vector labelsSpecies = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"}; diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 1ac56d1ee28..b804bb794ef 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -1457,7 +1457,7 @@ struct HfTrackIndexSkimCreator { Configurable> cutsDstarToD0Pi{"cutsDstarToD0Pi", {hf_cuts_presel_dstar::Cuts[0], hf_cuts_presel_dstar::NBinsPt, hf_cuts_presel_dstar::NCutVars, hf_cuts_presel_dstar::labelsPt, hf_cuts_presel_dstar::labelsCutVar}, "D*+->D0pi selections per pT bin"}; // Species-differential track min pT selection for 3-prong candidates - Configurable> ptProngMin3Prong{"ptProngMin3Prong", {hf_cuts_presel_3prong::ptProngMin[0], hf_cuts_presel_3prong::NSpecies, 1, hf_cuts_presel_3prong::labelsSpecies, hf_cuts_presel_3prong::labelsPtProngMin}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; + Configurable> ptProngMin3Prong{"ptProngMin3Prong", {hf_cuts_presel_3prong::PtProngMin[0], hf_cuts_presel_3prong::NSpecies, 1, hf_cuts_presel_3prong::labelsSpecies, hf_cuts_presel_3prong::labelsPtProngMin}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; // proton PID selections for Lc and Xic Configurable applyProtonPidForLcToPKPi{"applyProtonPidForLcToPKPi", false, "Apply proton PID for Lc->pKpi"}; From a5323d4f96f07b6d13a9f99199c92b62ed3bd59c Mon Sep 17 00:00:00 2001 From: marcellocosti Date: Fri, 1 May 2026 17:17:27 +0200 Subject: [PATCH 11/12] Separate flag for prong min pt cut --- PWGHF/Core/SelectorCuts.h | 26 ++++++------------- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 10 +++---- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/PWGHF/Core/SelectorCuts.h b/PWGHF/Core/SelectorCuts.h index 390763fee08..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,31 +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"}; - -// Single prong min pt selection -static constexpr int NSpecies = 8; // number of species for 3-prong candidates -constexpr float PtProngMin[NSpecies][1] = {{0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}, {0.4f}}; - -// 3-prong species labels -static const std::vector labelsSpecies = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"}; - -// column label -static const std::vector labelsPtProngMin = {"Minimum pT (GeV/c)"}; +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] = { @@ -277,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 b804bb794ef..8b97a7e758c 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -1456,9 +1456,6 @@ struct HfTrackIndexSkimCreator { Configurable> binsPtDstarToD0Pi{"binsPtDstarToD0Pi", std::vector{hf_cuts_presel_dstar::vecBinsPt}, "pT bin limits for D*+->D0pi pT-dependent cuts"}; Configurable> cutsDstarToD0Pi{"cutsDstarToD0Pi", {hf_cuts_presel_dstar::Cuts[0], hf_cuts_presel_dstar::NBinsPt, hf_cuts_presel_dstar::NCutVars, hf_cuts_presel_dstar::labelsPt, hf_cuts_presel_dstar::labelsCutVar}, "D*+->D0pi selections per pT bin"}; - // Species-differential track min pT selection for 3-prong candidates - Configurable> ptProngMin3Prong{"ptProngMin3Prong", {hf_cuts_presel_3prong::PtProngMin[0], hf_cuts_presel_3prong::NSpecies, 1, hf_cuts_presel_3prong::labelsSpecies, hf_cuts_presel_3prong::labelsPtProngMin}, "Min pT selection for prongs of 3-prong candidates in GeV/c"}; - // proton PID selections for Lc and Xic Configurable applyProtonPidForLcToPKPi{"applyProtonPidForLcToPKPi", false, "Apply proton PID for Lc->pKpi"}; Configurable applyProtonPidForXicToPKPi{"applyProtonPidForXicToPKPi", false, "Apply proton PID for Xic->pKpi"}; @@ -1823,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)) { @@ -1839,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; } } } @@ -1874,6 +1871,7 @@ struct HfTrackIndexSkimCreator { if (whichHypo[iDecay3P] == 0) { CLRBIT(isSelected, iDecay3P); if (config.debug) { + LOG(info) << "Candidate rejected by PID for decay " << iDecay3P << ", setting " << hf_cuts_presel_3prong::NCutVars << "th bit of cutStatus to false"; cutStatus[iDecay3P][hf_cuts_presel_3prong::NCutVars] = false; // PID } continue; // no need to check further for this particle hypothesis @@ -2044,7 +2042,7 @@ struct HfTrackIndexSkimCreator { // prong daughter pT if (config.debug || TESTBIT(isSelected, iDecay3P)) { - const auto ptProngMin = config.ptProngMin3Prong->get(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) { From 24849241b1e6120366d349e60d5166ab635f24ed Mon Sep 17 00:00:00 2001 From: marcellocosti Date: Fri, 1 May 2026 17:21:32 +0200 Subject: [PATCH 12/12] Remove leftover comment --- PWGHF/TableProducer/trackIndexSkimCreator.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGHF/TableProducer/trackIndexSkimCreator.cxx b/PWGHF/TableProducer/trackIndexSkimCreator.cxx index 8b97a7e758c..c8a7c868c85 100644 --- a/PWGHF/TableProducer/trackIndexSkimCreator.cxx +++ b/PWGHF/TableProducer/trackIndexSkimCreator.cxx @@ -1871,7 +1871,6 @@ struct HfTrackIndexSkimCreator { if (whichHypo[iDecay3P] == 0) { CLRBIT(isSelected, iDecay3P); if (config.debug) { - LOG(info) << "Candidate rejected by PID for decay " << iDecay3P << ", setting " << hf_cuts_presel_3prong::NCutVars << "th bit of cutStatus to false"; cutStatus[iDecay3P][hf_cuts_presel_3prong::NCutVars] = false; // PID } continue; // no need to check further for this particle hypothesis