Skip to content

Commit 6b29ee3

Browse files
committed
Implement Vit comments
1 parent be673b4 commit 6b29ee3

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

PWGHF/Core/SelectorCuts.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ static const std::vector<std::string> labelsCutVar = {"massMin", "massMax", "cos
254254

255255
// Single prong min pt selection
256256
static constexpr int NSpecies3Prong = 8; // number of species for 3-prong candidates
257-
static const float cutsProngMinPt3Prong[NSpecies3Prong] = {0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4};
257+
static const float ptProngMin[NSpecies3Prong] = {0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4};
258258

259259
// 3-prong species labels
260-
static const std::vector<std::string> labelsSpecies3Prong = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"};
260+
static const std::vector<std::string> labelsPtProngMin = {"Dplus", "Lc", "Ds", "Xic", "Cd", "Ct", "Ch", "Ca"};
261261

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

PWGHF/TableProducer/trackIndexSkimCreator.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,7 @@ struct HfTrackIndexSkimCreator {
14571457
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"};
14581458

14591459
// Species-differential track min pT selection for 3-prong candidates
1460-
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"};
1460+
Configurable<LabeledArray<float>> 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"};
14611461

14621462
// proton PID selections for Lc and Xic
14631463
Configurable<bool> applyProtonPidForLcToPKPi{"applyProtonPidForLcToPKPi", false, "Apply proton PID for Lc->pKpi"};
@@ -2002,8 +2002,8 @@ struct HfTrackIndexSkimCreator {
20022002
/// \param primVtx is the primary vertex
20032003
/// \param cutStatus is a 2D array with outcome of each selection (filled only in debug mode)
20042004
/// \param isSelected ia s bitmap with selection outcome
2005-
template <typename T1, typename T2, typename T3, typename T4, typename T5>
2006-
void applySelection3Prong(const T1& pVecCand, const T2& prongDaugsPt, const T3& secVtx, const T4& primVtx, T5& cutStatus, auto& isSelected)
2005+
template <typename T1, typename T2, typename T3, typename T4>
2006+
void applySelection3Prong(const T1& pVecCand, const std::array<float, 3>& ptProngs, const T2& secVtx, const T3& primVtx, T4& cutStatus, auto& isSelected)
20072007
{
20082008
if (config.debug || isSelected > 0) {
20092009

@@ -2044,8 +2044,8 @@ struct HfTrackIndexSkimCreator {
20442044

20452045
// prong daughter pT
20462046
if ((config.debug || TESTBIT(isSelected, iDecay3P))) {
2047-
const auto minPtDaug = config.cutsProngPtMin->get(iDecay3P);
2048-
if (prongDaugsPt[0] < minPtDaug || prongDaugsPt[1] < minPtDaug || prongDaugsPt[2] < minPtDaug) {
2047+
const auto ptProngMin = config.ptProngMin3Prong->get(iDecay3P);
2048+
if (ptProngs[0] < ptProngMin || ptProngs[1] < ptProngMin || ptProngs[2] < ptProngMin) {
20492049
CLRBIT(isSelected, iDecay3P);
20502050
if (config.debug) {
20512051
cutStatus[iDecay3P][4] = false;
@@ -2657,7 +2657,7 @@ struct HfTrackIndexSkimCreator {
26572657

26582658
auto trackParVarPos2 = getTrackParCov(trackPos2);
26592659
std::array dcaInfoPos2{trackPos2.dcaXY(), trackPos2.dcaZ()};
2660-
std::array prongPtInfo{trackPos1.pt(), trackNeg1.pt(), trackPos2.pt()};
2660+
std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackPos2.pt()};
26612661

26622662
// preselection of 3-prong candidates
26632663
if (isSelected3ProngCand) {
@@ -2799,7 +2799,7 @@ struct HfTrackIndexSkimCreator {
27992799
const auto pVecCandProng3Pos = RecoDecay::pVec(pvec0, pvec1, pvec2);
28002800

28012801
// 3-prong selections after secondary vertex
2802-
applySelection3Prong(pVecCandProng3Pos, prongPtInfo, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand);
2802+
applySelection3Prong(pVecCandProng3Pos, ptProngs, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand);
28032803

28042804
std::array<std::vector<float>, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs;
28052805
if (config.applyMlForHfFilters) {
@@ -2932,7 +2932,7 @@ struct HfTrackIndexSkimCreator {
29322932
auto trackNeg2 = trackIndexNeg2.template track_as<TTracks>();
29332933
auto trackParVarNeg2 = getTrackParCov(trackNeg2);
29342934
std::array dcaInfoNeg2{trackNeg2.dcaXY(), trackNeg2.dcaZ()};
2935-
std::array prongPtInfo{trackPos1.pt(), trackNeg1.pt(), trackNeg2.pt()};
2935+
std::array ptProngs{trackPos1.pt(), trackNeg1.pt(), trackNeg2.pt()};
29362936

29372937
// preselection of 3-prong candidates
29382938
if (isSelected3ProngCand) {
@@ -3075,7 +3075,7 @@ struct HfTrackIndexSkimCreator {
30753075
const auto pVecCandProng3Neg = RecoDecay::pVec(pvec0, pvec1, pvec2);
30763076

30773077
// 3-prong selections after secondary vertex
3078-
applySelection3Prong(pVecCandProng3Neg, prongPtInfo, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand);
3078+
applySelection3Prong(pVecCandProng3Neg, ptProngs, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand);
30793079

30803080
std::array<std::vector<float>, kN3ProngDecaysUsedMlForHfFilters> mlScores3Prongs{};
30813081
if (config.applyMlForHfFilters) {

0 commit comments

Comments
 (0)