Skip to content

Commit d152b69

Browse files
committed
Fix caching for different 3-prong species
1 parent 7cb0208 commit d152b69

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

PWGHF/TableProducer/trackIndexSkimCreator.cxx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,14 +1694,8 @@ struct HfTrackIndexSkimCreator {
16941694
const std::vector<int> cutDirMl{o2::cuts_ml::CutDirection::CutGreater, o2::cuts_ml::CutDirection::CutSmaller, o2::cuts_ml::CutDirection::CutSmaller};
16951695
const std::array<LabeledArray<double>, kN3ProngDecaysUsedMlForHfFilters> thresholdMlScore3Prongs{config.thresholdMlScoreDplusToPiKPi, config.thresholdMlScoreLcToPiKP, config.thresholdMlScoreDsToPiKK, config.thresholdMlScoreXicToPiKP};
16961696
const std::vector<std::string> inputFeatures2Prongs = {"ptProng0", "dcaXyProng0", "dcaZProng0", "ptProng1", "dcaXyProng1", "dcaZProng1"};
1697-
std::vector<std::string> inputFeatures3Prongs = {"ptProng0", "dcaXyProng0", "dcaZProng0", "ptProng1", "dcaXyProng1", "dcaZProng1", "ptProng2", "dcaXyProng2", "dcaZProng2"};
1698-
if (doprocess2And3ProngsWithPvRefitWithPidForHfFiltersBdt || doprocess2And3ProngsNoPvRefitWithPidForHfFiltersBdt) {
1699-
inputFeatures3Prongs.push_back("tpcNSigmaPrProng0");
1700-
inputFeatures3Prongs.push_back("tpcNSigmaPrProng2");
1701-
inputFeatures3Prongs.push_back("tpcNSigmaPiProng0");
1702-
inputFeatures3Prongs.push_back("tpcNSigmaPiProng2");
1703-
inputFeatures3Prongs.push_back("tpcNSigmaKaProng1");
1704-
}
1697+
const std::vector<std::string> inputFeatures3Prongs = {"ptProng0", "dcaXyProng0", "dcaZProng0", "ptProng1", "dcaXyProng1", "dcaZProng1", "ptProng2", "dcaXyProng2", "dcaZProng2"};
1698+
const std::vector<std::string> inputFeatures3ProngsWithPid = {"ptProng0", "dcaXyProng0", "dcaZProng0", "ptProng1", "dcaXyProng1", "dcaZProng1", "ptProng2", "dcaXyProng2", "dcaZProng2", "tpcNSigmaPrProng0", "tpcNSigmaPrProng2", "tpcNSigmaPiProng0", "tpcNSigmaPiProng2", "tpcNSigmaKaProng1"};
17051699

17061700
// initialise 2-prong ML response
17071701
hfMlResponse2Prongs.configure(ptBinsMl, config.thresholdMlScoreD0ToKPi, cutDirMl, 3);
@@ -1727,7 +1721,11 @@ struct HfTrackIndexSkimCreator {
17271721
} else {
17281722
hfMlResponse3Prongs[iDecay3P].setModelPathsLocal(onnxFileNames3Prongs[iDecay3P]);
17291723
}
1730-
hfMlResponse3Prongs[iDecay3P].cacheInputFeaturesIndices(inputFeatures3Prongs);
1724+
if ((doprocess2And3ProngsWithPvRefitWithPidForHfFiltersBdt || doprocess2And3ProngsNoPvRefitWithPidForHfFiltersBdt) && iDecay3P == aod::hf_cand_3prong::DecayType::LcToPKPi) {
1725+
hfMlResponse3Prongs[iDecay3P].cacheInputFeaturesIndices(inputFeatures3ProngsWithPid);
1726+
} else {
1727+
hfMlResponse3Prongs[iDecay3P].cacheInputFeaturesIndices(inputFeatures3Prongs);
1728+
}
17311729
hfMlResponse3Prongs[iDecay3P].init();
17321730
}
17331731
}

0 commit comments

Comments
 (0)