diff --git a/PWGHF/Core/HfMlResponseXicToXiPikf.h b/PWGHF/Core/HfMlResponseXicToXiPikf.h index fb7a9aae2ba..e50b0f56639 100644 --- a/PWGHF/Core/HfMlResponseXicToXiPikf.h +++ b/PWGHF/Core/HfMlResponseXicToXiPikf.h @@ -80,7 +80,7 @@ class HfMlResponseXicToXiPikf : public HfMlResponse /// \param candidate is the Xic candidate /// \return inputFeatures vector template - //std::vector getInputFeatures(T1 const& candidate) + // std::vector getInputFeatures(T1 const& candidate) std::vector getInputFeatures(T1 const& candidate, T2 const& lamProngPi, T2 const& cascProngPi, T3 const& charmBaryonProngPi) { std::vector inputFeatures; diff --git a/PWGHF/TableProducer/candidateSelectorXic0ToXiPiKf.cxx b/PWGHF/TableProducer/candidateSelectorXic0ToXiPiKf.cxx index efcd278e62e..a2c209783b0 100644 --- a/PWGHF/TableProducer/candidateSelectorXic0ToXiPiKf.cxx +++ b/PWGHF/TableProducer/candidateSelectorXic0ToXiPiKf.cxx @@ -123,26 +123,26 @@ struct HfCandidateSelectorXic0ToXiPiKf { Configurable nClustersItsMin{"nClustersItsMin", 3, "Minimum number of ITS clusters requirement for pi <- charm baryon"}; Configurable nClustersItsInnBarrMin{"nClustersItsInnBarrMin", 1, "Minimum number of ITS clusters in inner barrel requirement for pi <- charm baryon"}; Configurable itsChi2PerClusterMax{"itsChi2PerClusterMax", 36, "Maximum value of chi2 fit over ITS clusters for pi <- charm baryon"}; - + // ML inference Configurable applyMl{"applyMl", true, "Flag to apply ML selections"}; Configurable> binsPtMl{"binsPtMl", std::vector{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"}; Configurable> cutDirMl{"cutDirMl", std::vector{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"}; Configurable> cutsMl{"cutsMl", {hf_cuts_ml::Cuts[0], hf_cuts_ml::NBinsPt, hf_cuts_ml::NCutScores, hf_cuts_ml::labelsPt, hf_cuts_ml::labelsCutScore}, "ML selections per pT bin"}; - Configurable nClassesMl{"nClassesMl", static_cast(hf_cuts_ml::NCutScores), "Number of classes in ML model"}; + Configurable nClassesMl{"nClassesMl", static_cast(hf_cuts_ml::NCutScores), "Number of classes in ML model"}; Configurable> namesInputFeatures{"namesInputFeatures", std::vector{"feature1", "feature2"}, "Names of ML model input features"}; - + // CCDB configuration Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; Configurable> modelPathsCCDB{"modelPathsCCDB", std::vector{"EventFiltering/PWGHF/BDTXic"}, "Paths of models on CCDB"}; Configurable> onnxFileNames{"onnxFileNames", std::vector{"ModelHandler_onnx_XicToXipikf.onnx"}, "ONNX file names for each pT bin (if not from CCDB full path)"}; Configurable timestampCCDB{"timestampCCDB", -1, "timestamp of the ONNX file for ML model used to query in CCDB"}; Configurable loadModelsFromCCDB{"loadModelsFromCCDB", false, "Flag to enable or disable the loading of models from CCDB"}; - + o2::analysis::HfMlResponseXicToXiPikf hfMlResponse; std::vector outputMlXicToXiPi = {}; o2::ccdb::CcdbApi ccdbApi; - + TrackSelectorPr selectorProton; TrackSelectorPi selectorPion; @@ -203,7 +203,7 @@ struct HfCandidateSelectorXic0ToXiPiKf { registry.add("hSelMassCharmBaryon", "hSelMassCharmBaryon;status;entries", {HistType::kTH1D, {axisSel}}); registry.add("hSelDcaXYToPvV0Daughters", "hSelDcaXYToPvV0Daughters;status;entries", {HistType::kTH1D, {axisSel}}); registry.add("hSelDcaXYToPvPiFromCasc", "hSelDcaXYToPvPiFromCasc;status;entries", {HistType::kTH1D, {axisSel}}); - + if (applyMl) { hfMlResponse.configure(binsPtMl, cutsMl, cutDirMl, nClassesMl); if (loadModelsFromCCDB) { @@ -215,7 +215,6 @@ struct HfCandidateSelectorXic0ToXiPiKf { hfMlResponse.cacheInputFeaturesIndices(namesInputFeatures); hfMlResponse.init(); } - } void process(aod::HfCandToXiPiKf const& candidates, @@ -225,7 +224,7 @@ struct HfCandidateSelectorXic0ToXiPiKf { // looping over charm baryon candidates for (const auto& candidate : candidates) { - + auto ptCand = RecoDecay::sqrtSumOfSquares(candidate.pxCharmBaryon(), candidate.pyCharmBaryon()); bool resultSelections = true; // True if the candidate passes all the selections, False otherwise @@ -556,7 +555,7 @@ struct HfCandidateSelectorXic0ToXiPiKf { continue; } } - + hfSelToXiPi(statusPidCharmBaryon, statusPidCascade, statusPidLambda, statusInvMassCharmBaryon, statusInvMassCascade, statusInvMassLambda, resultSelections, infoTpcStored, infoTofStored, trackPiFromCharm.tpcNSigmaPi(), trackPiFromCasc.tpcNSigmaPi(), trackPiFromLam.tpcNSigmaPi(), trackPrFromLam.tpcNSigmaPr(), trackPiFromCharm.tofNSigmaPi(), trackPiFromCasc.tofNSigmaPi(), trackPiFromLam.tofNSigmaPi(), trackPrFromLam.tofNSigmaPr());