Skip to content

Commit 5603070

Browse files
authored
[PWGHF] Fix int8_t configurables (#8519)
1 parent 5fe3706 commit 5603070

13 files changed

+49
-15
lines changed

PWGHF/D2H/TableProducer/candidateSelectorB0ToDPiReduced.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
/// \author Alexandre Bigot <alexandre.bigot@cern.ch>, IPHC Strasbourg
1616
/// \author Fabrizio Grosa <fabrizio.grosa@cern.ch>, CERN
1717

18+
#include <string>
19+
#include <vector>
20+
1821
#include "Framework/AnalysisTask.h"
1922
#include "Framework/runDataProcessing.h"
2023

@@ -64,7 +67,7 @@ struct HfCandidateSelectorB0ToDPiReduced {
6467
Configurable<std::vector<double>> binsPtB0Ml{"binsPtB0Ml", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
6568
Configurable<std::vector<int>> cutDirB0Ml{"cutDirB0Ml", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
6669
Configurable<LabeledArray<double>> cutsB0Ml{"cutsB0Ml", {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"};
67-
Configurable<int8_t> nClassesB0Ml{"nClassesB0Ml", (int8_t)hf_cuts_ml::nCutScores, "Number of classes in ML model"};
70+
Configurable<int> nClassesB0Ml{"nClassesB0Ml", static_cast<int>(hf_cuts_ml::nCutScores), "Number of classes in ML model"};
6871
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures", std::vector<std::string>{"feature1", "feature2"}, "Names of ML model input features"};
6972
// CCDB configuration
7073
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

PWGHF/D2H/TableProducer/candidateSelectorBplusToD0PiReduced.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
///
1515
/// \author Antonio Palasciano <antonio.palasciano@cern.ch>, Università degli Studi di Bari
1616

17+
#include <string>
18+
#include <vector>
19+
1720
#include "Framework/AnalysisTask.h"
1821
#include "Framework/runDataProcessing.h"
1922

@@ -63,7 +66,7 @@ struct HfCandidateSelectorBplusToD0PiReduced {
6366
Configurable<std::vector<double>> binsPtBpMl{"binsPtBpMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
6467
Configurable<std::vector<int>> cutDirBpMl{"cutDirBpMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
6568
Configurable<LabeledArray<double>> cutsBpMl{"cutsBpMl", {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"};
66-
Configurable<int8_t> nClassesBpMl{"nClassesBpMl", (int8_t)hf_cuts_ml::nCutScores, "Number of classes in ML model"};
69+
Configurable<int> nClassesBpMl{"nClassesBpMl", static_cast<int>(hf_cuts_ml::nCutScores), "Number of classes in ML model"};
6770
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures", std::vector<std::string>{"feature1", "feature2"}, "Names of ML model input features"};
6871
// CCDB configuration
6972
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

PWGHF/D2H/TableProducer/candidateSelectorBsToDsPiReduced.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
///
1515
/// \author Fabio Catalano <fabio.catalano@cern.ch>, CERN
1616

17+
#include <string>
18+
#include <vector>
19+
1720
#include "Framework/AnalysisTask.h"
1821
#include "Framework/runDataProcessing.h"
1922

@@ -63,7 +66,7 @@ struct HfCandidateSelectorBsToDsPiReduced {
6366
Configurable<std::vector<double>> binsPtBsMl{"binsPtBsMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
6467
Configurable<std::vector<int>> cutDirBsMl{"cutDirBsMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
6568
Configurable<LabeledArray<double>> cutsBsMl{"cutsBsMl", {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"};
66-
Configurable<int8_t> nClassesBsMl{"nClassesBsMl", (int8_t)hf_cuts_ml::nCutScores, "Number of classes in ML model"};
69+
Configurable<int> nClassesBsMl{"nClassesBsMl", static_cast<int>(hf_cuts_ml::nCutScores), "Number of classes in ML model"};
6770
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures", std::vector<std::string>{"feature1", "feature2"}, "Names of ML model input features"};
6871
// CCDB configuration
6972
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ struct HfTaskCharmHadronsFemtoDream {
7777

7878
/// Particle 2 (Charm Hadrons)
7979
Configurable<float> charmHadBkgBDTmax{"charmHadBkgBDTmax", 1., "Maximum background bdt score for Charm Hadron (particle 2)"};
80-
Configurable<int8_t> charmHadCandSel{"charmHadCandSel", 1, "candidate selection for charm hadron"};
81-
Configurable<int8_t> charmHadMcSel{"charmHadMcSel", 2, "charm hadron selection for mc, partDplusToPiKPi (1), partLcToPKPi (2), partDsToKKPi (4), partXicToPKPi (8)"};
80+
Configurable<int> charmHadCandSel{"charmHadCandSel", 1, "candidate selection for charm hadron"};
81+
Configurable<int> charmHadMcSel{"charmHadMcSel", 2, "charm hadron selection for mc, partDplusToPiKPi (1), partLcToPKPi (2), partDsToKKPi (4), partXicToPKPi (8)"};
8282
Configurable<float> charmHadFdBDTmin{"charmHadFdBDTmin", 0., "Minimum feed-down bdt score Charm Hadron (particle 2)"};
8383
Configurable<float> charmHadFdBDTmax{"charmHadFdBDTmax", 1., "Maximum feed-down bdt score Charm Hadron (particle 2)"};
8484
Configurable<float> charmHadMaxInvMass{"charmHadMaxInvMass", 2.45, "Maximum invariant mass of Charm Hadron (particle 2)"};

PWGHF/HFL/Tasks/taskSingleMuon.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ struct HfTaskSingleMuonSelectionAmbiguousMftIndexBuilder {
5656
};
5757

5858
struct HfTaskSingleMuon {
59-
Configurable<uint8_t> trkType{"trkType", 0, "Muon track type, valid values are 0, 1, 2, 3 and 4"};
60-
Configurable<uint8_t> mcMaskSelection{"mcMaskSelection", 0, "McMask for correct match, valid values are 0 and 128"};
59+
Configurable<uint> trkType{"trkType", 0u, "Muon track type, valid values are 0, 1, 2, 3 and 4"};
60+
Configurable<uint> mcMaskSelection{"mcMaskSelection", 0u, "McMask for correct match, valid values are 0 and 128"};
6161
Configurable<float> etaMin{"etaMin", -3.6, "eta minimum value"};
6262
Configurable<float> etaMax{"etaMax", -2.5, "eta maximum value"};
6363
Configurable<float> pDcaMin{"pDcaMin", 324., "p*DCA maximum value for small Rabs"};

PWGHF/TableProducer/candidateSelectorBsToDsPi.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
///
1616
/// \author Phil Stahlhut <phil.lennart.stahlhut@cern.ch>
1717

18+
#include <string>
19+
#include <vector>
20+
1821
#include "Framework/AnalysisTask.h"
1922
#include "Framework/runDataProcessing.h"
2023
#include "Framework/RunningWorkflowInfo.h"
@@ -59,7 +62,7 @@ struct HfCandidateSelectorBsToDsPi {
5962
Configurable<std::vector<double>> binsPtMl{"binsPtMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
6063
Configurable<std::vector<int>> cutDirMl{"cutDirMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
6164
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"};
62-
Configurable<int8_t> nClassesMl{"nClassesMl", (int8_t)hf_cuts_ml::nCutScores, "Number of classes in ML model"};
65+
Configurable<int> nClassesMl{"nClassesMl", static_cast<int>(hf_cuts_ml::nCutScores), "Number of classes in ML model"};
6366
// CCDB configuration
6467
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
6568
Configurable<std::vector<std::string>> modelPathsCCDB{"modelPathsCCDB", std::vector<std::string>{"EventFiltering/PWGHF/BDTBs"}, "Paths of models on CCDB"};

PWGHF/TableProducer/candidateSelectorD0.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
/// \author Nima Zardoshti <nima.zardoshti@cern.ch>, CERN
1616
/// \author Vít Kučera <vit.kucera@cern.ch>, CERN
1717

18+
#include <string>
19+
#include <vector>
20+
1821
#include "CommonConstants/PhysicsConstants.h"
1922
#include "Framework/AnalysisTask.h"
2023
#include "Framework/runDataProcessing.h"
@@ -64,7 +67,7 @@ struct HfCandidateSelectorD0 {
6467
Configurable<std::vector<double>> binsPtMl{"binsPtMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
6568
Configurable<std::vector<int>> cutDirMl{"cutDirMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
6669
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"};
67-
Configurable<int8_t> nClassesMl{"nClassesMl", (int8_t)hf_cuts_ml::nCutScores, "Number of classes in ML model"};
70+
Configurable<int> nClassesMl{"nClassesMl", static_cast<int>(hf_cuts_ml::nCutScores), "Number of classes in ML model"};
6871
Configurable<bool> enableDebugMl{"enableDebugMl", false, "Flag to enable histograms to monitor BDT application"};
6972
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures", std::vector<std::string>{"feature1", "feature2"}, "Names of ML model input features"};
7073
// CCDB configuration

PWGHF/TableProducer/candidateSelectorDplusToPiKPi.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
/// \author Fabio Catalano <fabio.catalano@cern.ch>, Politecnico and INFN Torino
1616
/// \author Vít Kučera <vit.kucera@cern.ch>, CERN
1717

18+
#include <string>
19+
#include <vector>
20+
1821
#include "CommonConstants/PhysicsConstants.h"
1922
#include "Framework/AnalysisTask.h"
2023
#include "Framework/runDataProcessing.h"
@@ -67,7 +70,7 @@ struct HfCandidateSelectorDplusToPiKPi {
6770
Configurable<std::vector<double>> binsPtMl{"binsPtMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
6871
Configurable<std::vector<int>> cutDirMl{"cutDirMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
6972
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"};
70-
Configurable<int8_t> nClassesMl{"nClassesMl", (int8_t)hf_cuts_ml::nCutScores, "Number of classes in ML model"};
73+
Configurable<int> nClassesMl{"nClassesMl", static_cast<int>(hf_cuts_ml::nCutScores), "Number of classes in ML model"};
7174
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures", std::vector<std::string>{"feature1", "feature2"}, "Names of ML model input features"};
7275
// CCDB configuration
7376
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

PWGHF/TableProducer/candidateSelectorDsToKKPi.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
/// \author Fabio Catalano <fabio.catalano@cern.ch>, Universita and INFN Torino
1616
/// \author Stefano Politano <stefano.politano@cern.ch>, Politecnico and INFN Torino
1717

18+
#include <string>
19+
#include <vector>
20+
1821
#include "CommonConstants/PhysicsConstants.h"
1922
#include "Framework/AnalysisTask.h"
2023
#include "Framework/runDataProcessing.h"
@@ -66,7 +69,7 @@ struct HfCandidateSelectorDsToKKPi {
6669
Configurable<std::vector<double>> binsPtMl{"binsPtMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
6770
Configurable<std::vector<int>> cutDirMl{"cutDirMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
6871
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"};
69-
Configurable<int8_t> nClassesMl{"nClassesMl", (int8_t)hf_cuts_ml::nCutScores, "Number of classes in ML model"};
72+
Configurable<int> nClassesMl{"nClassesMl", static_cast<int>(hf_cuts_ml::nCutScores), "Number of classes in ML model"};
7073
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures", std::vector<std::string>{"feature1", "feature2"}, "Names of ML model input features"};
7174
// CCDB configuration
7275
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

PWGHF/TableProducer/candidateSelectorDstarToD0Pi.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
/// \author Deependra Sharma <deependra.sharma@cern.ch>, IITB
1616
/// \author Fabrizio Grosa <fabrizio.grosa@cern.ch>, CERN
1717

18+
#include <algorithm>
19+
#include <string>
20+
#include <vector>
21+
1822
// O2
1923
#include "CommonConstants/PhysicsConstants.h"
2024
#include "Framework/AnalysisDataModel.h"
@@ -81,7 +85,7 @@ struct HfCandidateSelectorDstarToD0Pi {
8185
Configurable<std::vector<double>> binsPtMl{"binsPtMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
8286
Configurable<std::vector<int>> cutDirMl{"cutDirMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
8387
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"};
84-
Configurable<int8_t> nClassesMl{"nClassesMl", (int8_t)hf_cuts_ml::nCutScores, "Number of classes in ML model"};
88+
Configurable<int> nClassesMl{"nClassesMl", static_cast<int>(hf_cuts_ml::nCutScores), "Number of classes in ML model"};
8589
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures", std::vector<std::string>{"feature1", "feature2"}, "Names of ML model input features"};
8690

8791
// CCDB configuration

0 commit comments

Comments
 (0)