Skip to content

Commit e1f4a7d

Browse files
committed
Implement workaround to for check in MlResponse not compatible with fixed features
1 parent c6c2693 commit e1f4a7d

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

PWGHF/TableProducer/trackIndexSkimCreator.cxx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,6 +1693,15 @@ struct HfTrackIndexSkimCreator {
16931693
const std::vector<double> ptBinsMl{0., 1.e10};
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};
1696+
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+
}
16961705

16971706
// initialise 2-prong ML response
16981707
hfMlResponse2Prongs.configure(ptBinsMl, config.thresholdMlScoreD0ToKPi, cutDirMl, 3);
@@ -1702,6 +1711,7 @@ struct HfTrackIndexSkimCreator {
17021711
} else {
17031712
hfMlResponse2Prongs.setModelPathsLocal(onnxFileNames2Prongs);
17041713
}
1714+
hfMlResponse2Prongs.cacheInputFeaturesIndices(inputFeatures2Prongs);
17051715
hfMlResponse2Prongs.init();
17061716

17071717
// initialise 3-prong ML responses
@@ -1717,6 +1727,7 @@ struct HfTrackIndexSkimCreator {
17171727
} else {
17181728
hfMlResponse3Prongs[iDecay3P].setModelPathsLocal(onnxFileNames3Prongs[iDecay3P]);
17191729
}
1730+
hfMlResponse3Prongs.cacheInputFeaturesIndices(inputFeatures2Prongs);
17201731
hfMlResponse3Prongs[iDecay3P].init();
17211732
}
17221733
}

0 commit comments

Comments
 (0)