 |
Belle II Software
release-05-02-19
|
1 #ifndef CDCTRIGGERMLP_H
2 #define CDCTRIGGERMLP_H
5 #include <framework/logging/Logger.h>
24 unsigned short targets,
25 std::vector<float>& outputscale,
26 std::vector<float>& phirange,
27 std::vector<float>& invptrange,
28 std::vector<float>& thetarange,
29 unsigned short maxHits,
30 unsigned long pattern,
31 unsigned long patternMask,
34 std::string etoption);
69 B2WARNING(
"Use of this flag is deprecated! Use get_et_option() instead!");
84 bool isRelevant(
float relId,
unsigned iSL)
const;
88 float scaleId(
double relId,
unsigned iSL)
const;
90 std::vector<float>
scaleTarget(std::vector<float> target)
const;
92 std::vector<float>
unscaleTarget(std::vector<float> target)
const;
unsigned long getSLpatternMask() const
get bitmask for super layer pattern
std::string get_et_option() const
Returns way of obtaining the event time.
unsigned short targetVars
output variables: 1: z, 2: theta, 3: (z, theta)
std::vector< float > invptRange
Charge / Pt region in 1/GeV for which this expert is trained.
CDCTriggerMLP()
default constructor.
unsigned nWeightsCal() const
calculate number of weights from number of nodes
std::vector< float > relevantID
Hits must be within ID region around 2D track to be used as input.
unsigned long SLpattern
Super layer pattern for which this expert is trained.
~CDCTriggerMLP()
destructor, empty because we don't allocate memory anywhere.
ClassDef(CDCTriggerMLP, 7)
Needed to make the ROOT object storable.
unsigned nWeights() const
get number of weights from length of weights vector
unsigned short getTMax() const
get maximal drift time
bool inThetaRange(float theta) const
check whether given theta value is in sector
unsigned long getSLpatternUnmasked() const
get raw super layer pattern
bool inPtRange(float pt) const
check whether given pt value is in sector
std::string et_option
Returns way of obtaining the event time.
bool isTrained() const
check if weights are default values or set by some trainer
int thetaIndex() const
get target index for theta (-1 if no output is trained for theta)
std::vector< float > getIDRange(unsigned iSL) const
get relevant ID range for given super layer
std::vector< float > unscaleTarget(std::vector< float > target) const
scale target value from [-1, 1] to outputScale
std::vector< float > phiRange
Phi region in radian for which this expert is trained.
bool inPhiRange(float phi) const
check whether given phi value is in sector
unsigned short getMaxHitsPerSL() const
get maximum hit number for a single super layer
std::vector< float > weights
Weights of the network.
std::vector< float > outputScale
Output[i] of the MLP is scaled from [-1, 1] to [outputScale[2i], outputScale[2i+1]].
std::vector< unsigned short > nNodes
Number of nodes in each layer, not including bias nodes.
Abstract base class for different kinds of events.
unsigned nNodesLayer(unsigned iLayer) const
get number of nodes in a layer
std::vector< float > getWeights() const
get weights vector
unsigned nLayers() const
get number of layers
bool trained
Indicator whether the weights are just default values or have been set by some trainer (set to true w...
unsigned short tMax
Maximal drift time (for scaling), hits with larger values are ignored.
unsigned long SLpatternMask
Bitmask for comparing the super layer pattern.
float scaleId(double relId, unsigned iSL) const
scale relative TS ID from relevant range to approximately [-1, 1] (to facilitate the FPGA implementat...
unsigned long getSLpattern() const
get super layer pattern
bool isRelevant(float relId, unsigned iSL) const
check whether given relative TS ID is in relevant range
std::vector< float > thetaRange
Theta region in radian for which this expert is trained.
bool getT0fromHits() const
get flag for event time definition
int zIndex() const
get target index for z (-1 if no output is trained for z)
unsigned short maxHitsPerSL
Maximum number of inputs for a single super layer.
std::vector< float > scaleTarget(std::vector< float > target) const
scale target value from outputScale to [-1, 1]
Class to keep all parameters of an expert MLP for the neuro trigger.
bool T0fromHits
DEPRECATED!! If true, the event time will be determined from hits within relevantID region,...
The trainer module for the neural networks of the CDC trigger.
bool inInvptRange(float invpt) const
check whether given 1/pt value is in sector