11#include <framework/gearbox/Const.h>
12#include <framework/logging/Logger.h>
40 typedef std::vector< std::tuple<size_t, size_t, double, double, double> >
PIDNNInputsToCut;
55 const std::vector<std::string>& inputNames,
56 const std::string& modelDefinition,
57 const std::vector<int>& outputSpeciesPdg,
58 const std::vector<float>& meanValues,
59 const std::vector<float>& standardDeviations,
79 int pdg2OutputIndex(
const int pdg,
const bool throwException =
true)
const;
Class for handling the parameters for the neural-network PID.
size_t getInputSize() const
Get number of inputs.
PIDNeuralNetworkParameters()
Constructor.
PIDNNInputsToCut m_inputsToCut
overwrite certain input variables
size_t getInputIndex(const std::string &name) const
Get input index for input name.
const PIDNNMissingInputs & getHandleMissingInputs() const
Get vector of input indices and corresponding values that are set if the corresponding input is NaN.
const std::string & getModelDefinition() const
Get the neural network model-definition string for frugally-deep.
const std::vector< float > & getMeanValues() const
Get the mean values of the inputs for normalization.
const std::string & getDescription() const
Get neural network description.
std::vector< float > m_standardDeviations
standard deviations of inputs
ClassDef(PIDNeuralNetworkParameters, 1)
ClassDef as this is a TObject.
PIDNNMissingInputs m_handleMissingInputs
handling of NaN inputs
std::vector< std::string > m_inputNames
list of input names
const std::vector< float > & getStandardDeviations() const
Get the standard deviations of the inputs for normalization.
bool hasPdgCode(const int pdg, const bool throwException=false) const
std::string m_modelDefinition
neural network string for frugally-deep
const PIDNNInputsToCut & getInputsToCut() const
Get vector of input indices, whose values are overwritten if other input variables are in a certain r...
PIDNeuralNetworkParameters(const std::string &description, const std::vector< std::string > &inputNames, const std::string &modelDefinition, const std::vector< int > &outputSpeciesPdg, const std::vector< float > &meanValues, const std::vector< float > &standardDeviations, const PIDNNMissingInputs &handleMissingInputs, const PIDNNInputsToCut &inputsToCut)
Construct with individual neural-network parameters.
std::vector< float > m_meanValues
mean values of inputs
std::vector< int > m_outputSpeciesPdg
PDG codes of hypotheses of neural-network output.
std::string m_description
description of neural network parameters
const std::vector< int > & getOutputSpeciesPdg() const
Get the list of pdg codes of species hypotheses, for which the network predicts the probability in th...
const std::vector< std::string > & getInputNames() const
Get input names.
int pdg2OutputIndex(const int pdg, const bool throwException=true) const
Convert pdg code to the index of the neural-network output that represents the corresponding probabil...
std::vector< std::tuple< size_t, size_t, double, double, double > > PIDNNInputsToCut
Stores information on whether and how to overwrite certain inputs.
std::vector< std::tuple< size_t, float > > PIDNNMissingInputs
Stores information on how to handle missing inputs, i.e.
Abstract base class for different kinds of events.