Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions PWGHF/TableProducer/candidateSelectorD0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ struct HfCandidateSelectorD0 {
Configurable<std::vector<int>> cutDirMl{"cutDirMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
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::labelsCutScore}, "ML selections per pT bin"};
Configurable<int8_t> nClassesMl{"nClassesMl", (int8_t)hf_cuts_ml::nCutScores, "Number of classes in ML model"};
Configurable<bool> enableDebugMl{"enableDebugMl", false, "Flag to enable histograms to monitor BDT application"};
// CCDB configuration
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Configurable<std::string> modelPathsCCDB{"modelPathsCCDB", "EventFiltering/PWGHF/BDTD0", "Path on CCDB"};
Expand Down Expand Up @@ -89,7 +90,7 @@ struct HfCandidateSelectorD0 {
LOGP(fatal, "Only one process function can be enabled at a time.");
}

if (applyMl) {
if (applyMl && enableDebugMl) {
registry.add("DebugBdt/hBdtScore1VsStatus", ";BDT score;status", {HistType::kTH2F, {axisBdtScore, axisSelStatus}});
registry.add("DebugBdt/hBdtScore2VsStatus", ";BDT score;status", {HistType::kTH2F, {axisBdtScore, axisSelStatus}});
registry.add("DebugBdt/hBdtScore3VsStatus", ";BDT score;status", {HistType::kTH2F, {axisBdtScore, axisSelStatus}});
Expand Down Expand Up @@ -378,14 +379,19 @@ struct HfCandidateSelectorD0 {
statusD0 = 0;
statusD0bar = 0;
}
registry.fill(HIST("DebugBdt/hBdtScore1VsStatus"), outputMl[0], statusD0);
registry.fill(HIST("DebugBdt/hBdtScore1VsStatus"), outputMl[0], statusD0bar);
registry.fill(HIST("DebugBdt/hBdtScore2VsStatus"), outputMl[1], statusD0);
registry.fill(HIST("DebugBdt/hBdtScore2VsStatus"), outputMl[1], statusD0bar);
registry.fill(HIST("DebugBdt/hBdtScore3VsStatus"), outputMl[2], statusD0);
registry.fill(HIST("DebugBdt/hBdtScore3VsStatus"), outputMl[2], statusD0bar);
if (statusD0 != 0 || statusD0bar != 0) {
registry.fill(HIST("DebugBdt/hMassDmesonSel"), hfHelper.invMassD0ToPiK(candidate));
if (enableDebugMl) {
registry.fill(HIST("DebugBdt/hBdtScore1VsStatus"), outputMl[0], statusD0);
registry.fill(HIST("DebugBdt/hBdtScore1VsStatus"), outputMl[0], statusD0bar);
registry.fill(HIST("DebugBdt/hBdtScore2VsStatus"), outputMl[1], statusD0);
registry.fill(HIST("DebugBdt/hBdtScore2VsStatus"), outputMl[1], statusD0bar);
registry.fill(HIST("DebugBdt/hBdtScore3VsStatus"), outputMl[2], statusD0);
registry.fill(HIST("DebugBdt/hBdtScore3VsStatus"), outputMl[2], statusD0bar);
if (statusD0 > 0) {
registry.fill(HIST("DebugBdt/hMassDmesonSel"), hfHelper.invMassD0ToPiK(candidate));
}
if (statusD0bar > 0) {
registry.fill(HIST("DebugBdt/hMassDmesonSel"), hfHelper.invMassD0barToKPi(candidate));
}
}
}
hfSelD0Candidate(statusD0, statusD0bar, statusHFFlag, statusTopol, statusCand, statusPID);
Expand Down