Belle II Software development
KLMTriggerParameters Class Reference

DBObject containing parameters used in KLMTrigger module. More...

#include <KLMTriggerParameters.h>

Inheritance diagram for KLMTriggerParameters:

Public Member Functions

 KLMTriggerParameters ()
 Default constructor.
 
 KLMTriggerParameters (int32_t nLayers, const std::string &whichLayers)
 Constructor.
 
 ~KLMTriggerParameters ()
 Destructor.
 
void setNLayers (int32_t nLayers)
 Set the number of layers used in the trigger logic.
 
void setWhichLayers (const std::string &whichLayers)
 Set the pattern of layers used in the trigger logic.
 
int32_t getNLayers () const
 Get the number of layers used in the trigger logic.
 
std::string getWhichLayers () const
 Get the pattern of layers used in the trigger logic.
 
int32_t getSubdetector (int32_t i) const
 
int32_t getSection (int32_t i) const
 
int32_t getSector (int32_t i) const
 
int32_t getLayer (int32_t i) const
 
int32_t getPlane (int32_t i) const
 
double getSlopeX (int32_t i) const
 
double getOffsetX (int32_t i) const
 
double getSlopeY (int32_t i) const
 
double getOffsetY (int32_t i) const
 
size_t getGeometryDataSize () const
 
void pushGeometryData (int32_t Subdetector, int32_t section, int32_t sector, int32_t layer, int32_t plane, double slopeX, double offsetX, double slopeY, double offsetY)
 

Private Member Functions

 ClassDef (KLMTriggerParameters, 2)
 Class version.
 

Private Attributes

int32_t m_nLayers {0}
 Number of layers used in the trigger logic.
 
std::vector< int32_t > m_Subdetector
 
std::vector< int32_t > m_section
 
std::vector< int32_t > m_sector
 
std::vector< int32_t > m_layer
 
std::vector< int32_t > m_plane
 
std::vector< double > m_slopeX
 
std::vector< double > m_offsetX
 
std::vector< double > m_slopeY
 
std::vector< double > m_offsetY
 
std::string m_whichLayers
 Pattern of layers used in the trigger logic.
 

Detailed Description

DBObject containing parameters used in KLMTrigger module.

Definition at line 31 of file KLMTriggerParameters.h.

Constructor & Destructor Documentation

◆ KLMTriggerParameters() [1/2]

Default constructor.

Definition at line 38 of file KLMTriggerParameters.h.

39 {
40 }

◆ KLMTriggerParameters() [2/2]

KLMTriggerParameters ( int32_t  nLayers,
const std::string &  whichLayers 
)
inline

Constructor.

Parameters
[in]nLayersNumber of layers used in the trigger logic.
[in]whichLayersPattern of layers used in the trigger logic.

Definition at line 47 of file KLMTriggerParameters.h.

47 :
48 m_nLayers{nLayers},
49 m_whichLayers{whichLayers}
50 {
51 }
int32_t m_nLayers
Number of layers used in the trigger logic.
std::string m_whichLayers
Pattern of layers used in the trigger logic.

◆ ~KLMTriggerParameters()

~KLMTriggerParameters ( )
inline

Destructor.

Definition at line 56 of file KLMTriggerParameters.h.

57 {
58 }

Member Function Documentation

◆ getGeometryDataSize()

size_t getGeometryDataSize ( ) const
inline

Definition at line 151 of file KLMTriggerParameters.h.

152 {
153 return m_Subdetector.size();
154 }

◆ getLayer()

int32_t getLayer ( int32_t  i) const
inline

Definition at line 122 of file KLMTriggerParameters.h.

123 {
124 return m_layer[i];
125 }

◆ getNLayers()

int32_t getNLayers ( ) const
inline

Get the number of layers used in the trigger logic.

Definition at line 96 of file KLMTriggerParameters.h.

97 {
98 return m_nLayers;
99 }

◆ getOffsetX()

double getOffsetX ( int32_t  i) const
inline

Definition at line 136 of file KLMTriggerParameters.h.

137 {
138 return m_offsetX[i];
139 }

◆ getOffsetY()

double getOffsetY ( int32_t  i) const
inline

Definition at line 145 of file KLMTriggerParameters.h.

146 {
147 return m_offsetY[i];
148 }

◆ getPlane()

int32_t getPlane ( int32_t  i) const
inline

Definition at line 127 of file KLMTriggerParameters.h.

128 {
129 return m_plane[i];
130 }

◆ getSection()

int32_t getSection ( int32_t  i) const
inline

Definition at line 114 of file KLMTriggerParameters.h.

115 {
116 return m_section[i];
117 }

◆ getSector()

int32_t getSector ( int32_t  i) const
inline

Definition at line 118 of file KLMTriggerParameters.h.

119 {
120 return m_sector[i];
121 }

◆ getSlopeX()

double getSlopeX ( int32_t  i) const
inline

Definition at line 132 of file KLMTriggerParameters.h.

133 {
134 return m_slopeX[i];
135 }

◆ getSlopeY()

double getSlopeY ( int32_t  i) const
inline

Definition at line 141 of file KLMTriggerParameters.h.

142 {
143 return m_slopeY[i];
144 }

◆ getSubdetector()

int32_t getSubdetector ( int32_t  i) const
inline

Definition at line 109 of file KLMTriggerParameters.h.

110 {
111 return m_Subdetector[i];
112 }

◆ getWhichLayers()

std::string getWhichLayers ( ) const
inline

Get the pattern of layers used in the trigger logic.

Definition at line 104 of file KLMTriggerParameters.h.

105 {
106 return m_whichLayers;
107 }

◆ pushGeometryData()

void pushGeometryData ( int32_t  Subdetector,
int32_t  section,
int32_t  sector,
int32_t  layer,
int32_t  plane,
double  slopeX,
double  offsetX,
double  slopeY,
double  offsetY 
)
inline

Definition at line 156 of file KLMTriggerParameters.h.

159 {
160
161 m_Subdetector.push_back(Subdetector);
162 m_section.push_back(section);
163 m_sector.push_back(sector);
164 m_layer.push_back(layer);
165 m_plane.push_back(plane);
166 m_slopeX.push_back(slopeX);
167 m_offsetX.push_back(offsetX);
168 m_slopeY.push_back(slopeY);
169 m_offsetY.push_back(offsetY);
170 }

◆ setNLayers()

void setNLayers ( int32_t  nLayers)
inline

Set the number of layers used in the trigger logic.

Parameters
[in]nLayersMax number of CDC hits for an event.

Definition at line 64 of file KLMTriggerParameters.h.

65 {
66 // Reject values that exceed the number of layers in backward EKLM,
67 // since it is the part with the smallest number of layers.
69 if (nLayers > threshold) {
70 B2FATAL("The value passed to 'setNLayers' exceed the maximum allowed number of layers."
71 << LogVar("nLayers", nLayers)
72 << LogVar("layers threshold", threshold));
73 } else if (nLayers < 0) {
74 B2FATAL("The value passed to 'setNLayers' is smaller than zero."
75 << LogVar("nLayers", nLayers)
76 );
77 }
78 m_nLayers = nLayers;
79 }
int getMaximalDetectorLayerNumber(int section) const
Get maximal detector layer number.
static const EKLMElementNumbers & Instance()
Instantiation.
Class to store variables with their name which were sent to the logging service.

◆ setWhichLayers()

void setWhichLayers ( const std::string &  whichLayers)
inline

Set the pattern of layers used in the trigger logic.

Parameters
[in]whichLayersPattern of layers used in the trigger logic.

Definition at line 85 of file KLMTriggerParameters.h.

86 {
87 if (whichLayers.empty())
88 B2FATAL("The string passed to 'setWhichLayers' is empty."
89 << LogVar("string", whichLayers));
90 m_whichLayers = whichLayers;
91 }

Member Data Documentation

◆ m_layer

std::vector<int32_t> m_layer
private

Definition at line 183 of file KLMTriggerParameters.h.

◆ m_nLayers

int32_t m_nLayers {0}
private

Number of layers used in the trigger logic.

Definition at line 178 of file KLMTriggerParameters.h.

◆ m_offsetX

std::vector<double> m_offsetX
private

Definition at line 186 of file KLMTriggerParameters.h.

◆ m_offsetY

std::vector<double> m_offsetY
private

Definition at line 188 of file KLMTriggerParameters.h.

◆ m_plane

std::vector<int32_t> m_plane
private

Definition at line 184 of file KLMTriggerParameters.h.

◆ m_section

std::vector<int32_t> m_section
private

Definition at line 181 of file KLMTriggerParameters.h.

◆ m_sector

std::vector<int32_t> m_sector
private

Definition at line 182 of file KLMTriggerParameters.h.

◆ m_slopeX

std::vector<double> m_slopeX
private

Definition at line 185 of file KLMTriggerParameters.h.

◆ m_slopeY

std::vector<double> m_slopeY
private

Definition at line 187 of file KLMTriggerParameters.h.

◆ m_Subdetector

std::vector<int32_t> m_Subdetector
private

Definition at line 180 of file KLMTriggerParameters.h.

◆ m_whichLayers

std::string m_whichLayers
private

Pattern of layers used in the trigger logic.

Definition at line 195 of file KLMTriggerParameters.h.


The documentation for this class was generated from the following file: