Belle II Software development
|
Class to call PID neural network. More...
#include <PIDNeuralNetwork.h>
Public Member Functions | |
PIDNeuralNetwork () | |
Constructor with default paramenter-set name. | |
PIDNeuralNetwork (const std::string ¶meterName) | |
Constructor with given paramenter-set name. | |
PIDNeuralNetwork (PIDNeuralNetwork &&other) | |
Move constructor. | |
std::map< int, double > | predict (std::vector< float > inputs) const |
Predict neural-network output for all implemented hypotheses using the given inputs. | |
size_t | getInputSize () const |
Get number of inputs. | |
const std::vector< std::string > & | getInputBasf2Names () const |
Get names of input variables in the basf2 naming scheme, which may be different from the one in the payload. | |
const std::vector< int > & | getOutputSpeciesPdg () const |
Get the list of pdg codes of species hypotheses, for which the network predicts the probability in the order defined by the network output layer. | |
const std::string & | getPIDNeuralNetworkParametersName () const |
Get the name of the used neural network. | |
bool | hasPdgCode (const int pdg, const bool throwException=false) const |
const std::string & | getExtraInfoName (const int pdg) const |
Private Member Functions | |
void | loadParametersFromDB () |
Load neural-network parameters with name m_pidNeuralNetworkParametersName from the conditions data base. | |
void | check () |
Check that Neural Network can be evaluated, e.g. | |
Private Attributes | |
std::string | m_pidNeuralNetworkParametersName = "PIDNeuralNetworkParameters" |
name of the parameter set | |
std::unique_ptr< DBObjPtr< PIDNeuralNetworkParameters > > | m_pidNeuralNetworkParametersDB |
db object for the parameter set | |
std::unique_ptr< const fdeep::model > | m_model |
frugally-deep neural network | |
std::vector< std::string > | m_inputBasf2Names |
list of input names of input variables in the basf2 naming scheme | |
std::map< int, std::string > | m_extraInfoNames |
map from PDG code to extraInfo name that stores the output of this network | |
Class to call PID neural network.
Definition at line 32 of file PIDNeuralNetwork.h.
|
inline |
Constructor with default paramenter-set name.
Definition at line 39 of file PIDNeuralNetwork.h.
|
inline |
Constructor with given paramenter-set name.
Definition at line 51 of file PIDNeuralNetwork.h.
|
inline |
Move constructor.
Definition at line 63 of file PIDNeuralNetwork.h.
|
inlineprivate |
Check that Neural Network can be evaluated, e.g.
that all required inputs exist
Definition at line 143 of file PIDNeuralNetwork.h.
|
inline |
pdg | pdg code of hypothesis |
Definition at line 117 of file PIDNeuralNetwork.h.
|
inline |
Get names of input variables in the basf2 naming scheme, which may be different from the one in the payload.
Definition at line 90 of file PIDNeuralNetwork.h.
|
inline |
Get number of inputs.
Definition at line 84 of file PIDNeuralNetwork.h.
|
inline |
Get the list of pdg codes of species hypotheses, for which the network predicts the probability in the order defined by the network output layer.
Definition at line 97 of file PIDNeuralNetwork.h.
|
inline |
Get the name of the used neural network.
Definition at line 103 of file PIDNeuralNetwork.h.
|
inline |
pdg | pdg code of hypothesis |
throwException | throw exception if pdg code is not predicted |
Definition at line 111 of file PIDNeuralNetwork.h.
|
private |
Load neural-network parameters with name m_pidNeuralNetworkParametersName
from the conditions data base.
Definition at line 17 of file PIDNeuralNetwork.cc.
std::map< int, double > predict | ( | std::vector< float > | inputs | ) | const |
Predict neural-network output for all implemented hypotheses using the given inputs.
inputs | set of input variables |
Definition at line 60 of file PIDNeuralNetwork.cc.
|
private |
map from PDG code to extraInfo name that stores the output of this network
Definition at line 135 of file PIDNeuralNetwork.h.
|
private |
list of input names of input variables in the basf2 naming scheme
Definition at line 134 of file PIDNeuralNetwork.h.
|
private |
frugally-deep neural network
Definition at line 133 of file PIDNeuralNetwork.h.
|
private |
db object for the parameter set
Definition at line 132 of file PIDNeuralNetwork.h.
|
private |
name of the parameter set
Definition at line 131 of file PIDNeuralNetwork.h.