Belle II Software development
STRGeometryPar Class Reference

The Class for STR geometry. More...

#include <STRGeometryPar.h>

Inheritance diagram for STRGeometryPar:

Public Member Functions

 STRGeometryPar ()
 Default constructor.
 
 ~STRGeometryPar ()
 Destructor.
 
int getVersion () const
 Get STR geometry version.
 
void setVersion (int version)
 Set STR geometry version.
 
int getNLayers (int shield) const
 Get the number of layers in the shield.
 
void setNLayers (int shield, int nLayers)
 Set the number of layers in the shield, resize std::vectors.
 
std::string getLayerMaterial (int shield, int layer) const
 Get the material of a layer (as a std::string)
 
void setLayerMaterial (int shield, int layer, const std::string &material)
 Set the material of a layer (as a std::string)
 
int getLayerNPlanes (int shield, int layer) const
 Get Number of polycone planes in each layer.
 
void setLayerNPlanes (int shield, int layer, int nplanes)
 Set Number of polycone planes in each layer.
 
double getLayerPlaneZ (int shield, int layer, int plane) const
 Get Z-position of one plane (w.r.t. IP)
 
const double * getLayerPlaneZ (int shield, int layer) const
 Get Z-positions of all planes (w.r.t. IP)
 
void setLayerPlaneZ (int shield, int layer, int plane, double z)
 Set Z-position of each plane (w.r.t. IP)
 
double getLayerPlaneInnerRadius (int shield, int layer, int plane) const
 Get Inner radius of one plane.
 
const double * getLayerPlaneInnerRadius (int shield, int layer) const
 Get Inner radius of all planes.
 
void setLayerPlaneInnerRadius (int shield, int layer, int plane, double r)
 Set Inner radii of the planes.
 
double getLayerPlaneOuterRadius (int shield, int layer, int plane) const
 Get Outer radii of one planes.
 
const double * getLayerPlaneOuterRadius (int shield, int layer) const
 Get Outer radii of all planes.
 
void setLayerPlaneOuterRadius (int shield, int layer, int plane, double r)
 Set Outer radii of the planes.
 
std::string getPoleMaterial (int pole) const
 Get the material of a layer (as a std::string)
 
void setPoleMaterial (int pole, const std::string &material)
 Set the material of a layer (as a std::string)
 
int getPoleNPlanes (int pole) const
 Get Number of polycone planes in each layer.
 
void setPoleNPlanes (int pole, int nplanes)
 Set Number of polycone planes in each layer.
 
double getPolePlaneZ (int pole, int plane) const
 Get Z-position of one plane (w.r.t. IP)
 
const double * getPolePlaneZ (int pole) const
 Get Z-positions of all planes (w.r.t. IP)
 
void setPolePlaneZ (int pole, int plane, double z)
 Set Z-position of each plane (w.r.t. IP)
 
double getPolePlaneInnerRadius (int pole, int plane) const
 Get Inner radius of one plane.
 
const double * getPolePlaneInnerRadius (int pole) const
 Get Inner radius of all planes.
 
void setPolePlaneInnerRadius (int pole, int plane, double r)
 Set Inner radii of the planes.
 
double getPolePlaneOuterRadius (int pole, int plane) const
 Get Outer radii of one planes.
 
const double * getPolePlaneOuterRadius (int pole) const
 Get Outer radii of all planes.
 
void setPolePlaneOuterRadius (int pole, int plane, double r)
 Set Outer radii of the planes.
 

Static Public Attributes

static const int NECLSHIELDS = 2
 Number of ECL shields in Belle2.
 
static const int FWD_ECLSHIELD = 0
 Index corresponding to the forward shield.
 
static const int BWD_ECLSHIELD = 1
 Index corresponding to the backward shield.
 
static const int NPOLEPIECES = 2
 Number of pole pieces in Belle2.
 
static const int FWD_POLEPIECE = 0
 Index corresponding to the forward pole piece.
 
static const int BWD_POLEPIECE = 1
 Index corresponding to the backward pole piece.
 

Private Member Functions

 ClassDef (STRGeometryPar, 1)
 ClassDef, must be the last term before the closing {}.
 

Private Attributes

int m_Version
 Geometry version.
 
int m_NLayers [NECLSHIELDS]
 Number of layers in the shield.
 
std::vector< std::string > m_LayerMaterial [NECLSHIELDS]
 Material of each of the layers.
 
std::vector< int > m_LayerNPlanes [NECLSHIELDS]
 Number of polycone planes in each layer.
 
std::vector< std::vector< double > > m_LayerPlaneZ [NECLSHIELDS]
 Z-position of each plane (w.r.t. IP)
 
std::vector< std::vector< double > > m_LayerPlaneInnerRadius [NECLSHIELDS]
 Inner radii of the planes.
 
std::vector< std::vector< double > > m_LayerPlaneOuterRadius [NECLSHIELDS]
 Outer radii of the planes.
 
std::string m_PoleMaterial [NPOLEPIECES]
 Material of each of the pole pieces.
 
int m_PoleNPlanes [NPOLEPIECES]
 Number of polycone planes in each pole piece.
 
std::vector< double > m_PolePlaneZ [NPOLEPIECES]
 Z-position of each plane (w.r.t. IP)
 
std::vector< double > m_PolePlaneInnerRadius [NPOLEPIECES]
 Inner radii of the planes.
 
std::vector< double > m_PolePlaneOuterRadius [NPOLEPIECES]
 Outer radii of the planes.
 

Static Private Attributes

static STRGeometryParm_Instance
 static pointer to the singleton instance of this class
 

Detailed Description

The Class for STR geometry.

Definition at line 25 of file STRGeometryPar.h.

Constructor & Destructor Documentation

◆ STRGeometryPar()

Default constructor.

Definition at line 13 of file STRGeometryPar.cc.

14{
15 // Set geometry version
16 m_Version = 0;
17
18 // Initialize values (to fix cppcheck warnings)
19 for (int i = 0; i < NECLSHIELDS; i++) {
20 m_NLayers[i] = 0;
21 }
22 for (int i = 0; i < NPOLEPIECES; i++) {
23 m_PoleNPlanes[i] = 0;
24 }
25
26
27}
static const int NPOLEPIECES
Number of pole pieces in Belle2.
int m_PoleNPlanes[NPOLEPIECES]
Number of polycone planes in each pole piece.
int m_NLayers[NECLSHIELDS]
Number of layers in the shield.
static const int NECLSHIELDS
Number of ECL shields in Belle2.
int m_Version
Geometry version.

◆ ~STRGeometryPar()

Destructor.

Definition at line 29 of file STRGeometryPar.cc.

30{
31}

Member Function Documentation

◆ getLayerMaterial()

std::string getLayerMaterial ( int  shield,
int  layer 
) const
inline

Get the material of a layer (as a std::string)

Definition at line 69 of file STRGeometryPar.h.

69{ return m_LayerMaterial[shield].at(layer);}
std::vector< std::string > m_LayerMaterial[NECLSHIELDS]
Material of each of the layers.

◆ getLayerNPlanes()

int getLayerNPlanes ( int  shield,
int  layer 
) const
inline

Get Number of polycone planes in each layer.

Definition at line 75 of file STRGeometryPar.h.

76 {
77 return m_LayerNPlanes[shield].at(layer);
78 }
std::vector< int > m_LayerNPlanes[NECLSHIELDS]
Number of polycone planes in each layer.

◆ getLayerPlaneInnerRadius() [1/2]

const double * getLayerPlaneInnerRadius ( int  shield,
int  layer 
) const
inline

Get Inner radius of all planes.

Definition at line 118 of file STRGeometryPar.h.

119 {
120 return &m_LayerPlaneInnerRadius[shield].at(layer).at(0);
121 }
std::vector< std::vector< double > > m_LayerPlaneInnerRadius[NECLSHIELDS]
Inner radii of the planes.

◆ getLayerPlaneInnerRadius() [2/2]

double getLayerPlaneInnerRadius ( int  shield,
int  layer,
int  plane 
) const
inline

Get Inner radius of one plane.

Definition at line 112 of file STRGeometryPar.h.

113 {
114 return m_LayerPlaneInnerRadius[shield].at(layer).at(plane);
115 }

◆ getLayerPlaneOuterRadius() [1/2]

const double * getLayerPlaneOuterRadius ( int  shield,
int  layer 
) const
inline

Get Outer radii of all planes.

Definition at line 136 of file STRGeometryPar.h.

137 {
138 return &m_LayerPlaneOuterRadius[shield].at(layer).at(0);
139 }
std::vector< std::vector< double > > m_LayerPlaneOuterRadius[NECLSHIELDS]
Outer radii of the planes.

◆ getLayerPlaneOuterRadius() [2/2]

double getLayerPlaneOuterRadius ( int  shield,
int  layer,
int  plane 
) const
inline

Get Outer radii of one planes.

Definition at line 130 of file STRGeometryPar.h.

131 {
132 return m_LayerPlaneOuterRadius[shield].at(layer).at(plane);
133 }

◆ getLayerPlaneZ() [1/2]

const double * getLayerPlaneZ ( int  shield,
int  layer 
) const
inline

Get Z-positions of all planes (w.r.t. IP)

Definition at line 98 of file STRGeometryPar.h.

99 {
100 return &m_LayerPlaneZ[shield].at(layer).at(0);
101 }
std::vector< std::vector< double > > m_LayerPlaneZ[NECLSHIELDS]
Z-position of each plane (w.r.t. IP)

◆ getLayerPlaneZ() [2/2]

double getLayerPlaneZ ( int  shield,
int  layer,
int  plane 
) const
inline

Get Z-position of one plane (w.r.t. IP)

Definition at line 92 of file STRGeometryPar.h.

93 {
94 return m_LayerPlaneZ[shield].at(layer).at(plane);
95 }

◆ getNLayers()

int getNLayers ( int  shield) const
inline

Get the number of layers in the shield.

Definition at line 52 of file STRGeometryPar.h.

52{ return m_NLayers[shield] ; }

◆ getPoleMaterial()

std::string getPoleMaterial ( int  pole) const
inline

Get the material of a layer (as a std::string)

Definition at line 151 of file STRGeometryPar.h.

152 {
153 return m_PoleMaterial[pole];
154 }
std::string m_PoleMaterial[NPOLEPIECES]
Material of each of the pole pieces.

◆ getPoleNPlanes()

int getPoleNPlanes ( int  pole) const
inline

Get Number of polycone planes in each layer.

Definition at line 163 of file STRGeometryPar.h.

164 {
165 return m_PoleNPlanes[pole];
166 }

◆ getPolePlaneInnerRadius() [1/2]

const double * getPolePlaneInnerRadius ( int  pole) const
inline

Get Inner radius of all planes.

Definition at line 206 of file STRGeometryPar.h.

207 {
208 return &m_PolePlaneInnerRadius[pole].at(0);
209 }
std::vector< double > m_PolePlaneInnerRadius[NPOLEPIECES]
Inner radii of the planes.

◆ getPolePlaneInnerRadius() [2/2]

double getPolePlaneInnerRadius ( int  pole,
int  plane 
) const
inline

Get Inner radius of one plane.

Definition at line 200 of file STRGeometryPar.h.

201 {
202 return m_PolePlaneInnerRadius[pole].at(plane);
203 }

◆ getPolePlaneOuterRadius() [1/2]

const double * getPolePlaneOuterRadius ( int  pole) const
inline

Get Outer radii of all planes.

Definition at line 224 of file STRGeometryPar.h.

225 {
226 return &m_PolePlaneOuterRadius[pole].at(0);
227 }
std::vector< double > m_PolePlaneOuterRadius[NPOLEPIECES]
Outer radii of the planes.

◆ getPolePlaneOuterRadius() [2/2]

double getPolePlaneOuterRadius ( int  pole,
int  plane 
) const
inline

Get Outer radii of one planes.

Definition at line 218 of file STRGeometryPar.h.

219 {
220 return m_PolePlaneOuterRadius[pole].at(plane);
221 }

◆ getPolePlaneZ() [1/2]

const double * getPolePlaneZ ( int  pole) const
inline

Get Z-positions of all planes (w.r.t. IP)

Definition at line 186 of file STRGeometryPar.h.

187 {
188 return &m_PolePlaneZ[pole].at(0);
189 }
std::vector< double > m_PolePlaneZ[NPOLEPIECES]
Z-position of each plane (w.r.t. IP)

◆ getPolePlaneZ() [2/2]

double getPolePlaneZ ( int  pole,
int  plane 
) const
inline

Get Z-position of one plane (w.r.t. IP)

Definition at line 180 of file STRGeometryPar.h.

181 {
182 return m_PolePlaneZ[pole].at(plane);
183 }

◆ getVersion()

int getVersion ( ) const
inline

Get STR geometry version.

Definition at line 41 of file STRGeometryPar.h.

41{ return m_Version; }

◆ setLayerMaterial()

void setLayerMaterial ( int  shield,
int  layer,
const std::string &  material 
)
inline

Set the material of a layer (as a std::string)

Definition at line 72 of file STRGeometryPar.h.

72{ m_LayerMaterial[shield].at(layer) = material; }

◆ setLayerNPlanes()

void setLayerNPlanes ( int  shield,
int  layer,
int  nplanes 
)
inline

Set Number of polycone planes in each layer.

Definition at line 81 of file STRGeometryPar.h.

82 {
83 m_LayerNPlanes[shield].at(layer) = nplanes;
84
85 // Resize std::vectors according to the number of planes in each layer
86 m_LayerPlaneZ[shield].at(layer).resize(nplanes);
87 m_LayerPlaneInnerRadius[shield].at(layer).resize(nplanes);
88 m_LayerPlaneOuterRadius[shield].at(layer).resize(nplanes);
89 }

◆ setLayerPlaneInnerRadius()

void setLayerPlaneInnerRadius ( int  shield,
int  layer,
int  plane,
double  r 
)
inline

Set Inner radii of the planes.

Definition at line 124 of file STRGeometryPar.h.

125 {
126 m_LayerPlaneInnerRadius[shield].at(layer).at(plane) = r;
127 }

◆ setLayerPlaneOuterRadius()

void setLayerPlaneOuterRadius ( int  shield,
int  layer,
int  plane,
double  r 
)
inline

Set Outer radii of the planes.

Definition at line 142 of file STRGeometryPar.h.

143 {
144 m_LayerPlaneOuterRadius[shield].at(layer).at(plane) = r;
145 }

◆ setLayerPlaneZ()

void setLayerPlaneZ ( int  shield,
int  layer,
int  plane,
double  z 
)
inline

Set Z-position of each plane (w.r.t. IP)

Definition at line 105 of file STRGeometryPar.h.

106 {
107 m_LayerPlaneZ[shield].at(layer).at(plane) = z;
108 }

◆ setNLayers()

void setNLayers ( int  shield,
int  nLayers 
)
inline

Set the number of layers in the shield, resize std::vectors.

Definition at line 55 of file STRGeometryPar.h.

56 {
57 m_NLayers[shield] = nLayers ;
58
59 // Resize std::vectors according to the number of layers
60 m_LayerMaterial[shield].resize(nLayers);
61 m_LayerNPlanes[shield].resize(nLayers);
62 m_LayerPlaneZ[shield].resize(nLayers);
63 m_LayerPlaneInnerRadius[shield].resize(nLayers);
64 m_LayerPlaneOuterRadius[shield].resize(nLayers);
65
66 }

◆ setPoleMaterial()

void setPoleMaterial ( int  pole,
const std::string &  material 
)
inline

Set the material of a layer (as a std::string)

Definition at line 157 of file STRGeometryPar.h.

158 {
159 m_PoleMaterial[pole] = material;
160 }

◆ setPoleNPlanes()

void setPoleNPlanes ( int  pole,
int  nplanes 
)
inline

Set Number of polycone planes in each layer.

Definition at line 169 of file STRGeometryPar.h.

170 {
171 m_PoleNPlanes[pole] = nplanes;
172
173 // Resize std::vectors according to the number of planes in each layer
174 m_PolePlaneZ[pole].resize(nplanes);
175 m_PolePlaneInnerRadius[pole].resize(nplanes);
176 m_PolePlaneOuterRadius[pole].resize(nplanes);
177 }

◆ setPolePlaneInnerRadius()

void setPolePlaneInnerRadius ( int  pole,
int  plane,
double  r 
)
inline

Set Inner radii of the planes.

Definition at line 212 of file STRGeometryPar.h.

213 {
214 m_PolePlaneInnerRadius[pole].at(plane) = r;
215 }

◆ setPolePlaneOuterRadius()

void setPolePlaneOuterRadius ( int  pole,
int  plane,
double  r 
)
inline

Set Outer radii of the planes.

Definition at line 230 of file STRGeometryPar.h.

231 {
232 m_PolePlaneOuterRadius[pole].at(plane) = r;
233 }

◆ setPolePlaneZ()

void setPolePlaneZ ( int  pole,
int  plane,
double  z 
)
inline

Set Z-position of each plane (w.r.t. IP)

Definition at line 193 of file STRGeometryPar.h.

194 {
195 m_PolePlaneZ[pole].at(plane) = z;
196 }

◆ setVersion()

void setVersion ( int  version)
inline

Set STR geometry version.

Definition at line 44 of file STRGeometryPar.h.

44{ m_Version = version; }

Member Data Documentation

◆ BWD_ECLSHIELD

const int BWD_ECLSHIELD = 1
static

Index corresponding to the backward shield.

Definition at line 248 of file STRGeometryPar.h.

◆ BWD_POLEPIECE

const int BWD_POLEPIECE = 1
static

Index corresponding to the backward pole piece.

Definition at line 255 of file STRGeometryPar.h.

◆ FWD_ECLSHIELD

const int FWD_ECLSHIELD = 0
static

Index corresponding to the forward shield.

Definition at line 246 of file STRGeometryPar.h.

◆ FWD_POLEPIECE

const int FWD_POLEPIECE = 0
static

Index corresponding to the forward pole piece.

Definition at line 253 of file STRGeometryPar.h.

◆ m_Instance

STRGeometryPar* m_Instance
staticprivate

static pointer to the singleton instance of this class

Definition at line 263 of file STRGeometryPar.h.

◆ m_LayerMaterial

std::vector<std::string> m_LayerMaterial[NECLSHIELDS]
private

Material of each of the layers.

Definition at line 283 of file STRGeometryPar.h.

◆ m_LayerNPlanes

std::vector<int> m_LayerNPlanes[NECLSHIELDS]
private

Number of polycone planes in each layer.

Definition at line 286 of file STRGeometryPar.h.

◆ m_LayerPlaneInnerRadius

std::vector< std::vector<double> > m_LayerPlaneInnerRadius[NECLSHIELDS]
private

Inner radii of the planes.

Definition at line 292 of file STRGeometryPar.h.

◆ m_LayerPlaneOuterRadius

std::vector< std::vector<double> > m_LayerPlaneOuterRadius[NECLSHIELDS]
private

Outer radii of the planes.

Definition at line 295 of file STRGeometryPar.h.

◆ m_LayerPlaneZ

std::vector< std::vector<double> > m_LayerPlaneZ[NECLSHIELDS]
private

Z-position of each plane (w.r.t. IP)

Definition at line 289 of file STRGeometryPar.h.

◆ m_NLayers

int m_NLayers[NECLSHIELDS]
private

Number of layers in the shield.

Definition at line 280 of file STRGeometryPar.h.

◆ m_PoleMaterial

std::string m_PoleMaterial[NPOLEPIECES]
private

Material of each of the pole pieces.

Definition at line 303 of file STRGeometryPar.h.

◆ m_PoleNPlanes

int m_PoleNPlanes[NPOLEPIECES]
private

Number of polycone planes in each pole piece.

Definition at line 306 of file STRGeometryPar.h.

◆ m_PolePlaneInnerRadius

std::vector<double> m_PolePlaneInnerRadius[NPOLEPIECES]
private

Inner radii of the planes.

Definition at line 312 of file STRGeometryPar.h.

◆ m_PolePlaneOuterRadius

std::vector<double> m_PolePlaneOuterRadius[NPOLEPIECES]
private

Outer radii of the planes.

Definition at line 315 of file STRGeometryPar.h.

◆ m_PolePlaneZ

std::vector<double> m_PolePlaneZ[NPOLEPIECES]
private

Z-position of each plane (w.r.t. IP)

Definition at line 309 of file STRGeometryPar.h.

◆ m_Version

int m_Version
private

Geometry version.

Definition at line 273 of file STRGeometryPar.h.

◆ NECLSHIELDS

const int NECLSHIELDS = 2
static

Number of ECL shields in Belle2.

Definition at line 244 of file STRGeometryPar.h.

◆ NPOLEPIECES

const int NPOLEPIECES = 2
static

Number of pole pieces in Belle2.

Definition at line 251 of file STRGeometryPar.h.


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