Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions PWGHF/Core/SelectorCuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,17 @@ static const std::vector<std::string> labelsPt{};

// column labels
static const std::vector<std::string> 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<std::string> labelsSpecies3Prong = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"};

// column label
static const std::vector<std::string> labelsMinPt = {"Minimum track transverse momentum (GeV/c)"};

} // namespace hf_cuts_presel_3prong

namespace hf_cuts_presel_ds
Expand Down
26 changes: 21 additions & 5 deletions PWGHF/TableProducer/trackIndexSkimCreator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,9 @@ struct HfTrackIndexSkimCreator {
Configurable<std::vector<double>> binsPtDstarToD0Pi{"binsPtDstarToD0Pi", std::vector<double>{hf_cuts_presel_dstar::vecBinsPt}, "pT bin limits for D*+->D0pi pT-dependent cuts"};
Configurable<LabeledArray<double>> 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<LabeledArray<float>> 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<bool> applyProtonPidForLcToPKPi{"applyProtonPidForLcToPKPi", false, "Apply proton PID for Lc->pKpi"};
Configurable<bool> applyProtonPidForXicToPKPi{"applyProtonPidForXicToPKPi", false, "Apply proton PID for Xic->pKpi"};
Expand Down Expand Up @@ -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 <typename T2, typename T3, typename T4>
void applyPreselection3Prong(T2 const& pVecTrack0, T2 const& pVecTrack1, T2 const& pVecTrack2, const auto isIdentifiedPidTrack0, const auto isIdentifiedPidTrack2, T3& cutStatus, T4& whichHypo, auto& isSelected)
Expand Down Expand Up @@ -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 <typename T1, typename T2, typename T3, typename T4>
void applySelection3Prong(const T1& pVecCand, const T2& secVtx, const T3& primVtx, T4& cutStatus, auto& isSelected)
template <typename T1, typename T2, typename T3, typename T4, typename T5>
void applySelection3Prong(const T1& pVecCand, const T2& prongDaugsPt, const T3& secVtx, const T4& primVtx, T5& cutStatus, auto& isSelected)
{
if (config.debug || isSelected > 0) {

Expand Down Expand Up @@ -2038,6 +2041,17 @@ 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;
}
}
}
}
}
}
Expand Down Expand Up @@ -2643,6 +2657,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) {
Expand Down Expand Up @@ -2784,7 +2799,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<std::vector<float>, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs;
if (config.applyMlForHfFilters) {
Expand Down Expand Up @@ -2917,6 +2932,7 @@ struct HfTrackIndexSkimCreator {
auto trackNeg2 = trackIndexNeg2.template track_as<TTracks>();
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) {
Expand Down Expand Up @@ -3059,7 +3075,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<std::vector<float>, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs{};
if (config.applyMlForHfFilters) {
Expand Down
Loading