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 nPlanes, int32_t nLayers, int32_t countPlanes, const std::string &whichLayers)
 Constructor.
 
 ~KLMTriggerParameters ()
 Destructor.
 
void setNPlanes (int32_t nPlanes)
 Set the number of planes used in the trigger logic.
 
void setNLayers (int32_t nLayers)
 Set the number of layers used in the trigger logic.
 
void setCountPlanes (int32_t countPlanes)
 Set the parameter to control counting Layers=0 or Planes=1.
 
void setWhichLayers (const std::string &whichLayers)
 Set the pattern of layers used in the trigger logic.
 
int32_t getNPlanes () const
 Get the number of planes used in the trigger logic.
 
int32_t getNLayers () const
 Get the number of layers used in the trigger logic.
 
int32_t getcountPlanes () 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, 3)
 Class version.
 

Private Attributes

int32_t m_nPlanes {8}
 Number of layers used in the trigger logic.
 
int32_t m_nLayers {0}
 
int32_t m_countPlanes {1}
 
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 nPlanes,
int32_t nLayers,
int32_t countPlanes,
const std::string & whichLayers )
inline

Constructor.

Parameters
[in]nPlanesNumber of planes used in the trigger logic.
[in]nLayersNumber of layers used in the trigger logic.
[in]countPlanesParameter to define when the algorithm changed from counting Layers to Planes
[in]whichLayersPattern of layers used in the trigger logic.

Definition at line 49 of file KLMTriggerParameters.h.

49 :
50 m_nPlanes{nPlanes},
51 m_nLayers{nLayers},
52 m_countPlanes{countPlanes},
53 m_whichLayers{whichLayers}
54 {
55 }

◆ ~KLMTriggerParameters()

~KLMTriggerParameters ( )
inline

Destructor.

Definition at line 60 of file KLMTriggerParameters.h.

61 {
62 }

Member Function Documentation

◆ getcountPlanes()

int32_t getcountPlanes ( ) const
inline

Get the number of layers used in the trigger logic.

Definition at line 152 of file KLMTriggerParameters.h.

153 {
154 return m_countPlanes;
155 }

◆ getGeometryDataSize()

size_t getGeometryDataSize ( ) const
inline

Definition at line 207 of file KLMTriggerParameters.h.

208 {
209 return m_Subdetector.size();
210 }

◆ getLayer()

int32_t getLayer ( int32_t i) const
inline

Definition at line 178 of file KLMTriggerParameters.h.

179 {
180 return m_layer[i];
181 }

◆ getNLayers()

int32_t getNLayers ( ) const
inline

Get the number of layers used in the trigger logic.

Definition at line 144 of file KLMTriggerParameters.h.

145 {
146 return m_nLayers;
147 }

◆ getNPlanes()

int32_t getNPlanes ( ) const
inline

Get the number of planes used in the trigger logic.

Definition at line 135 of file KLMTriggerParameters.h.

136 {
137 return m_nPlanes;
138 }

◆ getOffsetX()

double getOffsetX ( int32_t i) const
inline

Definition at line 192 of file KLMTriggerParameters.h.

193 {
194 return m_offsetX[i];
195 }

◆ getOffsetY()

double getOffsetY ( int32_t i) const
inline

Definition at line 201 of file KLMTriggerParameters.h.

202 {
203 return m_offsetY[i];
204 }

◆ getPlane()

int32_t getPlane ( int32_t i) const
inline

Definition at line 183 of file KLMTriggerParameters.h.

184 {
185 return m_plane[i];
186 }

◆ getSection()

int32_t getSection ( int32_t i) const
inline

Definition at line 170 of file KLMTriggerParameters.h.

171 {
172 return m_section[i];
173 }

◆ getSector()

int32_t getSector ( int32_t i) const
inline

Definition at line 174 of file KLMTriggerParameters.h.

175 {
176 return m_sector[i];
177 }

◆ getSlopeX()

double getSlopeX ( int32_t i) const
inline

Definition at line 188 of file KLMTriggerParameters.h.

189 {
190 return m_slopeX[i];
191 }

◆ getSlopeY()

double getSlopeY ( int32_t i) const
inline

Definition at line 197 of file KLMTriggerParameters.h.

198 {
199 return m_slopeY[i];
200 }

◆ getSubdetector()

int32_t getSubdetector ( int32_t i) const
inline

Definition at line 165 of file KLMTriggerParameters.h.

166 {
167 return m_Subdetector[i];
168 }

◆ getWhichLayers()

std::string getWhichLayers ( ) const
inline

Get the pattern of layers used in the trigger logic.

Definition at line 160 of file KLMTriggerParameters.h.

161 {
162 return m_whichLayers;
163 }

◆ 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 212 of file KLMTriggerParameters.h.

215 {
216
217 m_Subdetector.push_back(Subdetector);
218 m_section.push_back(section);
219 m_sector.push_back(sector);
220 m_layer.push_back(layer);
221 m_plane.push_back(plane);
222 m_slopeX.push_back(slopeX);
223 m_offsetX.push_back(offsetX);
224 m_slopeY.push_back(slopeY);
225 m_offsetY.push_back(offsetY);
226 }

◆ setCountPlanes()

void setCountPlanes ( int32_t countPlanes)
inline

Set the parameter to control counting Layers=0 or Planes=1.

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

Definition at line 113 of file KLMTriggerParameters.h.

114 {
115 m_countPlanes = countPlanes;
116 }

◆ 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 91 of file KLMTriggerParameters.h.

92 {
93 // Reject values that exceed the number of layers in backward EKLM,
94 // since it is the part with the smallest number of layers.
95 int32_t threshold{static_cast<int32_t>(EKLMElementNumbers::Instance().getMaximalDetectorLayerNumber(EKLMElementNumbers::c_BackwardSection))};
96 if (nLayers > threshold) {
97 B2FATAL("The value passed to 'setNLayers' exceed the maximum allowed number of layers."
98 << LogVar("nLayers", nLayers)
99 << LogVar("layers threshold", threshold));
100 } else if (nLayers < 0) {
101 B2FATAL("The value passed to 'setNLayers' is smaller than zero."
102 << LogVar("nLayers", nLayers)
103 );
104 }
105 m_nLayers = nLayers;
106 }

◆ setNPlanes()

void setNPlanes ( int32_t nPlanes)
inline

Set the number of planes used in the trigger logic.

Parameters
[in]nPlanesMax number of active KLM planes for an event.

Definition at line 69 of file KLMTriggerParameters.h.

70 {
71 // Reject values that exceed the number of layers in backward EKLM,
72 // since it is the part with the smallest number of layers.
73 int32_t threshold{static_cast<int32_t>(EKLMElementNumbers::Instance().getMaximalDetectorLayerNumber(EKLMElementNumbers::c_BackwardSection)) * 2};
74 if (nPlanes > threshold) {
75 B2FATAL("The value passed to 'setNPlanes' exceed the maximum allowed number of layers."
76 << LogVar("nPlanes", nPlanes)
77 << LogVar("layers threshold", threshold));
78 } else if (nPlanes < 0) {
79 B2FATAL("The value passed to 'setNPlanes' is smaller than zero."
80 << LogVar("nPlanes", nPlanes)
81 );
82 }
83 m_nPlanes = nPlanes;
84 }

◆ 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 123 of file KLMTriggerParameters.h.

124 {
125 if (whichLayers.empty())
126 B2FATAL("The string passed to 'setWhichLayers' is empty."
127 << LogVar("string", whichLayers));
128 m_whichLayers = whichLayers;
129 }

Member Data Documentation

◆ m_countPlanes

int32_t m_countPlanes {1}
private

Definition at line 236 of file KLMTriggerParameters.h.

236{1};

◆ m_layer

std::vector<int32_t> m_layer
private

Definition at line 241 of file KLMTriggerParameters.h.

◆ m_nLayers

int32_t m_nLayers {0}
private

Definition at line 235 of file KLMTriggerParameters.h.

235{0};

◆ m_nPlanes

int32_t m_nPlanes {8}
private

Number of layers used in the trigger logic.

Definition at line 234 of file KLMTriggerParameters.h.

234{8};

◆ m_offsetX

std::vector<double> m_offsetX
private

Definition at line 244 of file KLMTriggerParameters.h.

◆ m_offsetY

std::vector<double> m_offsetY
private

Definition at line 246 of file KLMTriggerParameters.h.

◆ m_plane

std::vector<int32_t> m_plane
private

Definition at line 242 of file KLMTriggerParameters.h.

◆ m_section

std::vector<int32_t> m_section
private

Definition at line 239 of file KLMTriggerParameters.h.

◆ m_sector

std::vector<int32_t> m_sector
private

Definition at line 240 of file KLMTriggerParameters.h.

◆ m_slopeX

std::vector<double> m_slopeX
private

Definition at line 243 of file KLMTriggerParameters.h.

◆ m_slopeY

std::vector<double> m_slopeY
private

Definition at line 245 of file KLMTriggerParameters.h.

◆ m_Subdetector

std::vector<int32_t> m_Subdetector
private

Definition at line 238 of file KLMTriggerParameters.h.

◆ m_whichLayers

std::string m_whichLayers
private

Pattern of layers used in the trigger logic.

Definition at line 253 of file KLMTriggerParameters.h.


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