Skip to content

Commit c98eb61

Browse files
[PWGHF] Refactor ML configuration with new cut parameters (#18055)
1 parent 8741b74 commit c98eb61

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎PWGHF/HFC/TableProducer/producerCharmHadronsCharmFemtoDream.cxx‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "PWGHF/Core/CentralityEstimation.h"
1818
#include "PWGHF/Core/HfMlResponseD0ToKPi.h"
1919
#include "PWGHF/Core/HfMlResponseDstarToD0Pi.h"
20+
#include "PWGHF/Core/SelectorCuts.h"
2021
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
2122
#include "PWGHF/DataModel/CandidateSelectionTables.h"
2223
#include "PWGHF/Utils/utilsBfieldCCDB.h"
@@ -54,6 +55,7 @@
5455

5556
using namespace o2;
5657
using namespace o2::framework;
58+
using namespace o2::analysis;
5759
using namespace o2::framework::expressions;
5860

5961
struct HfProducerCharmHadronsCharmFemtoDream {
@@ -68,12 +70,11 @@ struct HfProducerCharmHadronsCharmFemtoDream {
6870
// Each species needs its own model, feature order and pT-dependent cuts.
6971
struct HfMlConfig : ConfigurableGroup {
7072
std::string prefix;
71-
static inline const std::array<double, 3> defaultCuts{1., 0., 0.};
7273
Configurable<int> mlApplicationMode{"mlApplicationMode", FillMlFromSelector, "0: no ML, 1: selector scores, 2: new BDT after selector"};
73-
Configurable<std::vector<double>> binsPtMl{"binsPtMl", std::vector<double>{0., 36.}, "pT bin limits for new BDT"};
74-
Configurable<LabeledArray<double>> cutsMl{"cutsMl", {defaultCuts.data(), 1, 3}, "New BDT cuts per pT bin: background, prompt, nonprompt"};
75-
Configurable<std::vector<int>> cutDirMl{"cutDirMl", std::vector<int>{0, 1, 1}, "Reject scores above (0), below (1), or do not cut (2)"};
76-
Configurable<int> nClassesMl{"nClassesMl", 3, "Three output classes: background, prompt, nonprompt"};
74+
Configurable<std::vector<double>> binsPtMl{"binsPtMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for new BDT"};
75+
Configurable<LabeledArray<double>> cutsMl{"cutsMl", {hf_cuts_ml::Cuts[0], hf_cuts_ml::NBinsPt, hf_cuts_ml::NCutScores, hf_cuts_ml::labelsPt, hf_cuts_ml::labelsDmesCutScore}, "New BDT cuts per pT bin: background, prompt, nonprompt"};
76+
Configurable<std::vector<int>> cutDirMl{"cutDirMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Reject scores above (0), below (1), or do not cut (2)"};
77+
Configurable<int> nClassesMl{"nClassesMl", int{hf_cuts_ml::NCutScores}, "Three output classes: background, prompt, nonprompt"};
7778
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures", std::vector<std::string>{}, "Ordered input feature names for new BDT"};
7879
Configurable<std::vector<std::string>> onnxFileNames{"onnxFileNames", std::vector<std::string>{}, "Model files, one per pT bin"};
7980
Configurable<std::vector<std::string>> modelPathsCCDB{"modelPathsCCDB", std::vector<std::string>{}, "CCDB model paths, one per pT bin"};

0 commit comments

Comments
 (0)