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
14 changes: 7 additions & 7 deletions Tools/ML/MlResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class MlResponse
{
setAvailableInputFeatures();
for (const auto& inputFeature : cfgInputFeatures) {
if (mAvailableInputFeatures.count(inputFeature)) {
if (mAvailableInputFeatures.contains(inputFeature)) {
mCachedIndices.emplace_back(mAvailableInputFeatures[inputFeature]);
} else {
LOG(fatal) << "Input feature " << inputFeature << " not available! Please check your configurables.";
Expand Down Expand Up @@ -279,18 +279,18 @@ class MlResponse
std::vector<o2::ml::OnnxModel> mModels; // OnnxModel objects, one for each bin
uint8_t mNModels = 1; // number of bins
uint8_t mNClasses = 3; // number of model classes
std::vector<double> mBinsLimits = {}; // bin limits of the variable (e.g. pT) used to select which model to use
std::vector<double> mBinsLimitsVar2 = {}; // bin limits of a second variable (e.g. multiplicity) used to select which model to use (not used in this base class)
std::vector<std::string> mPaths = {""}; // paths to the models, one for each bin
std::vector<int> mCutDir = {}; // direction of the cuts on the model scores (no cut is also supported)
o2::framework::LabeledArray<double> mCuts = {}; // array of cut values to apply on the model scores
std::vector<double> mBinsLimits; // bin limits of the variable (e.g. pT) used to select which model to use
std::vector<double> mBinsLimitsVar2; // bin limits of a second variable (e.g. multiplicity) used to select which model to use (not used in this base class)
std::vector<std::string> mPaths; // paths to the models, one for each bin
std::vector<int> mCutDir; // direction of the cuts on the model scores (no cut is also supported)
o2::framework::LabeledArray<double> mCuts; // array of cut values to apply on the model scores
std::map<std::string, uint8_t> mAvailableInputFeatures; // map of available input features
std::vector<uint8_t> mCachedIndices; // vector of index correspondance between configurables and available input features
uint8_t mNVar1Bins = 1; // number of bins of the first variable (e.g. pT) used to select which model to use
uint8_t mNVar2Bins = 1; // number of bins of the second variable (e.g. multiplicity) used to select which model to use
bool mUse2DBinning = false; // switch to enable/disable 2D binning

virtual void setAvailableInputFeatures() { return; } // method to fill the map of available input features
virtual void setAvailableInputFeatures() {} // method to fill the map of available input features

private:
/// Finds matching bin in mBinsLimits
Expand Down
Loading