Belle II Software development
|
Public Member Functions | |
NeuroTriggerParameters (std::string &filename) | |
int | to_intTiming (const std::string &text) const |
const std::string | to_strTiming (const unsigned &i) const |
const std::string | et_option () const |
return the string variant ov the et option | |
void | loadconfigtxt (const std::string &filename) |
load the configuration from a file | |
void | saveconfigtxt (const std::string &filename) |
save the configuration to a file | |
template<typename X > | |
std::string | print2dArray (const std::string &name, std::vector< std::vector< NNTParam< X > > > vecvec) |
this is a class for piping the output of a 2d array to a string with brackets | |
template<typename X > | |
std::string | print1dArray (const std::string &name, std::vector< NNTParam< X > > vecvec) |
this is a class for piping the output of a 1d array to a string with brackets | |
template<typename X > | |
std::vector< std::vector< X > > | tcastvector (const std::vector< std::vector< NNTParam< X > > > vec) const |
the parameters stored in the parameterset are not advanced enough to be vectors, they can only be single data types. | |
template<typename X > | |
std::vector< X > | tcastvector (const std::vector< NNTParam< X > > vec) const |
Public Attributes | |
NNTParam< unsigned > | nInput |
Network parameters. | |
NNTParam< unsigned > | nOutput |
number of output nodes | |
NNTParam< unsigned > | nMLP |
Number of networks. | |
NNTParam< bool > | targetZ |
train z as output | |
NNTParam< bool > | targetTheta |
train theta as output | |
NNTParam< bool > | multiplyHidden |
If true, multiply nHidden with number of input nodes. | |
NNTParam< unsigned > | tMax |
Maximal drift time, identical for all networks. | |
NNTParam< bool > | rescaleTarget |
flag to allow for target tracks lying out of the output range to be rescaled during training. | |
NNTParam< bool > | cutSum |
only used in the idhist module. | |
NNTParam< double > | relevantCut |
only used in the idhist module. | |
NNTParam< unsigned > | ETOption |
Determine, how the event time should be obtained. | |
std::vector< std::vector< NNTParam< float > > > | phiRangeUse |
Phi region for which MLP is used in degree for all networks. | |
std::vector< std::vector< NNTParam< float > > > | thetaRangeUse |
Theta region for which MLP is used in degree for all networks. | |
std::vector< std::vector< NNTParam< float > > > | invptRangeUse |
Charge / Pt region for which MLP is used in 1/GeV for all networks. | |
std::vector< std::vector< NNTParam< float > > > | phiRangeTrain |
Phi region for which MLP is trained in degree for all networks. | |
std::vector< std::vector< NNTParam< float > > > | thetaRangeTrain |
Theta region for which MLP is trained in degree for all networks. | |
std::vector< std::vector< NNTParam< float > > > | invptRangeTrain |
Charge / Pt region for which MLP is trained in 1/GeV for all networks. | |
std::vector< std::vector< NNTParam< float > > > | nHidden |
Number of nodes in each hidden layer for all networks or factor to multiply with number of inputs. | |
std::vector< std::vector< NNTParam< float > > > | outputScale |
Output scale for all networks. | |
std::vector< NNTParam< unsigned short > > | maxHitsPerSL |
Maximum number of hits in a single super layer for all networks. | |
std::vector< NNTParam< unsigned long > > | SLpattern |
Super layer pattern for which MLP is trained for all networks. | |
std::vector< NNTParam< unsigned long > > | SLpatternMask |
Super layer pattern mask for which MLP is trained for all networks. | |
std::vector< NNTParam< unsigned > > | precision |
precision used for the hardware simulation | |
std::vector< std::vector< NNTParam< float > > > | IDRanges |
relative ID range of the relevant wire IDs of the track segments that are taken into consideration when determining the best fitting track segments. | |
Private Member Functions | |
template<typename X > | |
bool | checkarr (std::vector< std::vector< NNTParam< X > > > vec) |
check, if a vector is already set. | |
template<typename X > | |
bool | checkarr (std::vector< NNTParam< X > > vec) |
check, if a vector is already set. | |
template<typename X > | |
std::vector< std::vector< NNTParam< X > > > | read2dArray (std::string keyx, bool locked) |
fill the array from a given string that looks like: [[1,2],[3, 4]] | |
template<typename X > | |
std::vector< NNTParam< X > > | read1dArray (std::string keyx, bool locked) |
fill the array from a given string that looks like: [1,2,3] | |
Definition at line 70 of file NeuroTriggerParameters.h.
|
inline |
Definition at line 72 of file NeuroTriggerParameters.h.
NeuroTriggerParameters | ( | std::string & | filename | ) |
Definition at line 23 of file NeuroTriggerParameters.cc.
|
inlinevirtual |
Definition at line 74 of file NeuroTriggerParameters.h.
|
private |
check, if a vector is already set.
this is done by just checking the first member of the vector.
Definition at line 147 of file NeuroTriggerParameters.cc.
|
private |
check, if a vector is already set.
this is done by just checking the first member of the vector.
Definition at line 138 of file NeuroTriggerParameters.cc.
|
inline |
return the string variant ov the et option
Definition at line 110 of file NeuroTriggerParameters.h.
void loadconfigtxt | ( | const std::string & | filename | ) |
load the configuration from a file
Definition at line 30 of file NeuroTriggerParameters.cc.
std::string print1dArray | ( | const std::string & | name, |
std::vector< NNTParam< X > > | vecvec | ||
) |
this is a class for piping the output of a 1d array to a string with brackets
Definition at line 341 of file NeuroTriggerParameters.cc.
std::string print2dArray | ( | const std::string & | name, |
std::vector< std::vector< NNTParam< X > > > | vecvec | ||
) |
this is a class for piping the output of a 2d array to a string with brackets
Definition at line 319 of file NeuroTriggerParameters.cc.
|
private |
fill the array from a given string that looks like: [1,2,3]
Definition at line 377 of file NeuroTriggerParameters.cc.
|
private |
fill the array from a given string that looks like: [[1,2],[3, 4]]
Definition at line 356 of file NeuroTriggerParameters.cc.
void saveconfigtxt | ( | const std::string & | filename | ) |
save the configuration to a file
Definition at line 154 of file NeuroTriggerParameters.cc.
|
inline |
Definition at line 140 of file NeuroTriggerParameters.h.
|
inline |
the parameters stored in the parameterset are not advanced enough to be vectors, they can only be single data types.
the workaround was to make every variable contained in the (nested) vector an NNTParam. for the further use, those have to be converted to float vecors, which is done by the tcastvector function.
Definition at line 126 of file NeuroTriggerParameters.h.
|
inline |
Definition at line 77 of file NeuroTriggerParameters.h.
|
inline |
Definition at line 92 of file NeuroTriggerParameters.h.
NNTParam<bool> cutSum |
only used in the idhist module.
it defines wether to use a cutsum or not
Definition at line 173 of file NeuroTriggerParameters.h.
NNTParam<unsigned> ETOption |
Determine, how the event time should be obtained.
The options are: fastestpriority fastest2d etf etf_or_fastestpriority etf_or_fastest2d etf_only etfcc etfhwin etfcc_or_fastestpriority min_etf_fastestpriority min_etfcc_fastestpriority
Definition at line 189 of file NeuroTriggerParameters.h.
std::vector<std::vector<NNTParam<float> > > IDRanges |
relative ID range of the relevant wire IDs of the track segments that are taken into consideration when determining the best fitting track segments.
Definition at line 231 of file NeuroTriggerParameters.h.
std::vector<std::vector<NNTParam<float> > > invptRangeTrain |
Charge / Pt region for which MLP is trained in 1/GeV for all networks.
Can be larger than use range to avoid edge effects.
Definition at line 205 of file NeuroTriggerParameters.h.
std::vector<std::vector<NNTParam<float> > > invptRangeUse |
Charge / Pt region for which MLP is used in 1/GeV for all networks.
Definition at line 196 of file NeuroTriggerParameters.h.
std::vector<NNTParam<unsigned short> > maxHitsPerSL |
Maximum number of hits in a single super layer for all networks.
Definition at line 214 of file NeuroTriggerParameters.h.
NNTParam<bool> multiplyHidden |
If true, multiply nHidden with number of input nodes.
Definition at line 167 of file NeuroTriggerParameters.h.
std::vector<std::vector<NNTParam<float> > > nHidden |
Number of nodes in each hidden layer for all networks or factor to multiply with number of inputs.
The number of layers is derived from the shape.
Definition at line 210 of file NeuroTriggerParameters.h.
NNTParam<unsigned> nInput |
NNTParam<unsigned> nMLP |
Number of networks.
For network specific parameters you can give either a list with values for each network, or a single value that will be used for all. The ranges are also valid if nPhi * nPt * nTheta * nPattern = nMLPs.
Definition at line 161 of file NeuroTriggerParameters.h.
NNTParam<unsigned> nOutput |
number of output nodes
Definition at line 155 of file NeuroTriggerParameters.h.
std::vector<std::vector<NNTParam<float> > > outputScale |
Output scale for all networks.
Definition at line 212 of file NeuroTriggerParameters.h.
std::vector<std::vector<NNTParam<float> > > phiRangeTrain |
Phi region for which MLP is trained in degree for all networks.
Can be larger than use range to avoid edge effects.
Definition at line 199 of file NeuroTriggerParameters.h.
std::vector<std::vector<NNTParam<float> > > phiRangeUse |
Phi region for which MLP is used in degree for all networks.
Definition at line 192 of file NeuroTriggerParameters.h.
std::vector<NNTParam<unsigned> > precision |
precision used for the hardware simulation
Definition at line 229 of file NeuroTriggerParameters.h.
NNTParam<double> relevantCut |
only used in the idhist module.
it defines the how much of the idrange is cut off after making the histogram
Definition at line 175 of file NeuroTriggerParameters.h.
NNTParam<bool> rescaleTarget |
flag to allow for target tracks lying out of the output range to be rescaled during training.
Definition at line 171 of file NeuroTriggerParameters.h.
std::vector<NNTParam<unsigned long> > SLpattern |
Super layer pattern for which MLP is trained for all networks.
Binary pattern of 9 * maxHitsPerSL bits (on/off for each hit). 0 in bit <i>: hits from super layer <i> are not used. 1 in bit <i>: hits from super layer <i> are used. SLpattern = 0: use any hits present, don't check the pattern.
Definition at line 220 of file NeuroTriggerParameters.h.
std::vector<NNTParam<unsigned long> > SLpatternMask |
Super layer pattern mask for which MLP is trained for all networks.
Binary pattern of 9 * maxHitsPerSL bits (on/off for each hit). 0 in bit <i>: super layer <i> may or may not have a hit. 1 in bit <i>: super layer <i>
Definition at line 227 of file NeuroTriggerParameters.h.
NNTParam<bool> targetTheta |
train theta as output
Definition at line 165 of file NeuroTriggerParameters.h.
NNTParam<bool> targetZ |
train z as output
Definition at line 163 of file NeuroTriggerParameters.h.
std::vector<std::vector<NNTParam<float> > > thetaRangeTrain |
Theta region for which MLP is trained in degree for all networks.
Can be larger than use range to avoid edge effects.
Definition at line 202 of file NeuroTriggerParameters.h.
std::vector<std::vector<NNTParam<float> > > thetaRangeUse |
Theta region for which MLP is used in degree for all networks.
Definition at line 194 of file NeuroTriggerParameters.h.
NNTParam<unsigned> tMax |
Maximal drift time, identical for all networks.
Definition at line 169 of file NeuroTriggerParameters.h.