Belle II Software development
|
EKLM element numbers. More...
#include <EKLMElementNumbers.h>
Public Types | |
enum | Section { c_BackwardSection = 1 , c_ForwardSection = 2 } |
Constants for section numbers. More... | |
Public Member Functions | |
bool | checkSection (int section, bool fatalError=true) const |
Check if section number is correct. | |
bool | checkLayer (int layer, bool fatalError=true) const |
Check if layer number is correct. | |
bool | checkDetectorLayer (int section, int layer, bool fatalError=true) const |
Check if detector layer number is correct (fatal error if not). | |
bool | checkSector (int sector, bool fatalError=true) const |
Check if sector number is correct (fatal error if not). | |
bool | checkPlane (int plane, bool fatalError=true) const |
Check if plane number is correct (fatal error if not). | |
bool | checkSegment (int segment, bool fatalError=true) const |
Check if segment number is correct (fatal error if not). | |
bool | checkStrip (int strip, bool fatalError=true) const |
Check if strip number is correct (fatal error if not). | |
int | detectorLayerNumber (int section, int layer) const |
Get detector layer number. | |
void | layerNumberToElementNumbers (int layerGlobal, int *section, int *layer) const |
Get element numbers by detector layer global number. | |
int | sectorNumber (int section, int layer, int sector) const |
Get sector number. | |
int | sectorNumberKLMOrder (int section, int sector) const |
Get sector number (KLM order of elements: section, sector, layer). | |
void | sectorNumberToElementNumbers (int sectorGlobal, int *section, int *layer, int *sector) const |
Get element numbers by sector global number. | |
int | planeNumber (int section, int layer, int sector, int plane) const |
Get plane number. | |
void | planeNumberToElementNumbers (int planeGlobal, int *section, int *layer, int *sector, int *plane) const |
Get element numbers by plane global number. | |
int | segmentNumber (int section, int layer, int sector, int plane, int segment) const |
Get segment number. | |
void | segmentNumberToElementNumbers (int segmentGlobal, int *section, int *layer, int *sector, int *plane, int *segment) const |
Get element numbers by segment global number. | |
int | stripNumber (int section, int layer, int sector, int plane, int strip) const |
Get strip number. | |
void | stripNumberToElementNumbers (int stripGlobal, int *section, int *layer, int *sector, int *plane, int *strip) const |
Get element numbers by strip global number. | |
int | getSectionByGlobalStrip (int stripGlobal) |
Get section number by global strip number. | |
int | getLayerByGlobalStrip (int stripGlobal) |
Get layer number by global strip number. | |
int | getSectorByGlobalStrip (int stripGlobal) |
Get sector number by global strip number. | |
int | getPlaneByGlobalStrip (int stripGlobal) |
Get plane number by global strip number. | |
int | getStripByGlobalStrip (int stripGlobal) |
Get strip number by global strip number. | |
int | getMaximalDetectorLayerNumber (int section) const |
Get maximal detector layer number. | |
Static Public Member Functions | |
static const EKLMElementNumbers & | Instance () |
Instantiation. | |
static std::string | getHSLBName (int copper, int slot) |
Get HSLB name. | |
static constexpr int | getMaximalSectionNumber () |
Get maximal section number. | |
static constexpr int | getMaximalLayerNumber () |
Get maximal layer number. | |
static constexpr int | getMaximalSectorNumber () |
Get maximal sector number. | |
static constexpr int | getMaximalPlaneNumber () |
Get maximal plane number. | |
static constexpr int | getMaximalSegmentNumber () |
Get maximal segment number. | |
static constexpr int | getMaximalStripNumber () |
Get maximal strip number. | |
static constexpr int | getMaximalLayerGlobalNumber () |
Get maximal detector layer global number. | |
static constexpr int | getMaximalSectorGlobalNumber () |
Get maximal sector global number. | |
static constexpr int | getMaximalSectorGlobalNumberKLMOrder () |
Get maximal sector global number with KLM ordering (section, sector). | |
static constexpr int | getMaximalPlaneGlobalNumber () |
Get maximal plane global number. | |
static constexpr int | getMaximalSegmentGlobalNumber () |
Get maximal segment global number. | |
static constexpr int | getMaximalStripGlobalNumber () |
Get maximal strip global number. | |
static constexpr int | getNStripsLayer () |
Get number of strips in a layer. | |
static constexpr int | getNStripsSector () |
Get number of strips in a sector. | |
static constexpr int | getNStripsSegment () |
Get number of strips in a segment. | |
static constexpr int | getTotalChannelNumber () |
Get total number of channels. | |
Static Protected Attributes | |
static constexpr int | m_MaximalSectionNumber = 2 |
Maximal section number. | |
static constexpr int | m_MaximalLayerNumber = 14 |
Maximal layer number. | |
static constexpr int | m_MaximalDetectorLayerNumber [2] = {12, 14} |
Maximal detector layer number. | |
static constexpr int | m_MaximalSectorNumber = 4 |
Maximal sector number. | |
static constexpr int | m_MaximalPlaneNumber = 2 |
Maximal plane number. | |
static constexpr int | m_MaximalSegmentNumber = 5 |
Maximal segment number. | |
static constexpr int | m_MaximalStripNumber = 75 |
Maximal strip number. | |
static constexpr int | m_NStripsSegment = 15 |
Number of strips in a segment. | |
static constexpr int | m_TotalChannelNumber = 15600 |
Total number of channels. | |
Private Member Functions | |
EKLMElementNumbers () | |
Constructor. | |
~EKLMElementNumbers () | |
Destructor. | |
ClassDef (EKLMElementNumbers, 3) | |
Class version. | |
EKLM element numbers.
All class members are constants, they are not stored.
Definition at line 24 of file EKLMElementNumbers.h.
enum Section |
Constants for section numbers.
Enumerator | |
---|---|
c_BackwardSection | Backward. |
c_ForwardSection | Forward. |
Definition at line 31 of file EKLMElementNumbers.h.
|
private |
|
private |
bool checkDetectorLayer | ( | int | section, |
int | layer, | ||
bool | fatalError = true |
||
) | const |
Check if detector layer number is correct (fatal error if not).
Section number must be checked separately.
[in] | section | Section number. |
[in] | layer | Layer number. |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 55 of file EKLMElementNumbers.cc.
bool checkLayer | ( | int | layer, |
bool | fatalError = true |
||
) | const |
Check if layer number is correct.
[in] | layer | Layer number. |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 43 of file EKLMElementNumbers.cc.
bool checkPlane | ( | int | plane, |
bool | fatalError = true |
||
) | const |
Check if plane number is correct (fatal error if not).
[in] | plane | Plane number. |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 83 of file EKLMElementNumbers.cc.
bool checkSection | ( | int | section, |
bool | fatalError = true |
||
) | const |
Check if section number is correct.
[in] | section | Section number. |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 32 of file EKLMElementNumbers.cc.
bool checkSector | ( | int | sector, |
bool | fatalError = true |
||
) | const |
Check if sector number is correct (fatal error if not).
[in] | sector | Sector number. |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 71 of file EKLMElementNumbers.cc.
bool checkSegment | ( | int | segment, |
bool | fatalError = true |
||
) | const |
Check if segment number is correct (fatal error if not).
[in] | segment | Segment number. |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 95 of file EKLMElementNumbers.cc.
bool checkStrip | ( | int | strip, |
bool | fatalError = true |
||
) | const |
Check if strip number is correct (fatal error if not).
[in] | strip | Strip number. |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 107 of file EKLMElementNumbers.cc.
int detectorLayerNumber | ( | int | section, |
int | layer | ||
) | const |
Get detector layer number.
[in] | section | Section number. |
[in] | layer | Layer number. |
Number is from 1 to 12 + 14 = 26.
Definition at line 119 of file EKLMElementNumbers.cc.
|
static |
Get HSLB name.
[in] | copper | Copper. |
[in] | slot | Slot. |
Definition at line 271 of file EKLMElementNumbers.cc.
int getLayerByGlobalStrip | ( | int | stripGlobal | ) |
Get layer number by global strip number.
[in] | stripGlobal | Global strip number. |
Definition at line 239 of file EKLMElementNumbers.cc.
int getMaximalDetectorLayerNumber | ( | int | section | ) | const |
Get maximal detector layer number.
[in] | section | Section number. |
Definition at line 277 of file EKLMElementNumbers.cc.
|
inlinestaticconstexpr |
Get maximal detector layer global number.
Definition at line 327 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal layer number.
Definition at line 281 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal plane global number.
Definition at line 351 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal plane number.
Definition at line 303 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal section number.
Definition at line 273 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal sector global number.
Definition at line 335 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal sector global number with KLM ordering (section, sector).
Definition at line 343 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal sector number.
Definition at line 295 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal segment global number.
Definition at line 359 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal segment number.
Definition at line 311 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal strip global number.
Definition at line 367 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal strip number.
Definition at line 319 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get number of strips in a layer.
Definition at line 375 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get number of strips in a sector.
Definition at line 383 of file EKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get number of strips in a segment.
Definition at line 391 of file EKLMElementNumbers.h.
int getPlaneByGlobalStrip | ( | int | stripGlobal | ) |
Get plane number by global strip number.
[in] | stripGlobal | Global strip number. |
Definition at line 255 of file EKLMElementNumbers.cc.
int getSectionByGlobalStrip | ( | int | stripGlobal | ) |
Get section number by global strip number.
[in] | stripGlobal | Global strip number. |
Definition at line 231 of file EKLMElementNumbers.cc.
int getSectorByGlobalStrip | ( | int | stripGlobal | ) |
Get sector number by global strip number.
[in] | stripGlobal | Global strip number. |
Definition at line 247 of file EKLMElementNumbers.cc.
int getStripByGlobalStrip | ( | int | stripGlobal | ) |
Get strip number by global strip number.
[in] | stripGlobal | Global strip number. |
Definition at line 263 of file EKLMElementNumbers.cc.
|
inlinestaticconstexpr |
Get total number of channels.
Definition at line 399 of file EKLMElementNumbers.h.
|
static |
void layerNumberToElementNumbers | ( | int | layerGlobal, |
int * | section, | ||
int * | layer | ||
) | const |
Get element numbers by detector layer global number.
[in] | layerGlobal | Layer global number. |
[out] | section | Section number. |
[out] | layer | Layer number. |
Definition at line 128 of file EKLMElementNumbers.cc.
int planeNumber | ( | int | section, |
int | layer, | ||
int | sector, | ||
int | plane | ||
) | const |
Get plane number.
[in] | section | Section number. |
[in] | layer | Layer number. |
[in] | sector | Sector number. |
[in] | plane | Plane number. |
Number is from 1 to 2*4*26 = 208.
Definition at line 169 of file EKLMElementNumbers.cc.
void planeNumberToElementNumbers | ( | int | planeGlobal, |
int * | section, | ||
int * | layer, | ||
int * | sector, | ||
int * | plane | ||
) | const |
Get element numbers by plane global number.
[in] | planeGlobal | Plane global number. |
[out] | section | Section number. |
[out] | layer | Layer number. |
[out] | sector | Sector number. |
[out] | plane | Plane number. |
Definition at line 177 of file EKLMElementNumbers.cc.
int sectorNumber | ( | int | section, |
int | layer, | ||
int | sector | ||
) | const |
Get sector number.
[in] | section | Section number. |
[in] | layer | Layer number. |
[in] | sector | Sector number. |
Number is from 1 to 4*26 = 104.
Definition at line 143 of file EKLMElementNumbers.cc.
int sectorNumberKLMOrder | ( | int | section, |
int | sector | ||
) | const |
Get sector number (KLM order of elements: section, sector, layer).
[in] | section | Section number. |
[in] | sector | Sector number. |
Number is from 1 to 2*4 = 8.
Definition at line 150 of file EKLMElementNumbers.cc.
void sectorNumberToElementNumbers | ( | int | sectorGlobal, |
int * | section, | ||
int * | layer, | ||
int * | sector | ||
) | const |
Get element numbers by sector global number.
[in] | sectorGlobal | Sector global number. |
[out] | section | Section number. |
[out] | layer | Layer number. |
[out] | sector | Sector number. |
Definition at line 157 of file EKLMElementNumbers.cc.
int segmentNumber | ( | int | section, |
int | layer, | ||
int | sector, | ||
int | plane, | ||
int | segment | ||
) | const |
Get segment number.
[in] | section | Section number. |
[in] | layer | Layer number. |
[in] | sector | Sector number. |
[in] | plane | Plane number. |
[in] | segment | Segment number. |
Number is from 1 to 5*2*4*26 = 1040.
Definition at line 189 of file EKLMElementNumbers.cc.
void segmentNumberToElementNumbers | ( | int | segmentGlobal, |
int * | section, | ||
int * | layer, | ||
int * | sector, | ||
int * | plane, | ||
int * | segment | ||
) | const |
Get element numbers by segment global number.
[in] | segmentGlobal | Segment global number. |
[out] | section | Section number. |
[out] | layer | Layer number. |
[out] | sector | Sector number. |
[out] | plane | Plane number. |
[out] | segment | Segment number. |
Definition at line 197 of file EKLMElementNumbers.cc.
int stripNumber | ( | int | section, |
int | layer, | ||
int | sector, | ||
int | plane, | ||
int | strip | ||
) | const |
Get strip number.
[in] | section | Section number. |
[in] | layer | Layer number. |
[in] | sector | Sector number. |
[in] | plane | Plane number. |
[in] | strip | Strip number. |
Number is from 1 to 75*2*4*26 = 15600.
Definition at line 210 of file EKLMElementNumbers.cc.
void stripNumberToElementNumbers | ( | int | stripGlobal, |
int * | section, | ||
int * | layer, | ||
int * | sector, | ||
int * | plane, | ||
int * | strip | ||
) | const |
Get element numbers by strip global number.
[in] | stripGlobal | Strip global number. |
[out] | section | Section number. |
[out] | layer | Layer number. |
[out] | sector | Sector number. |
[out] | plane | Plane number. |
[out] | strip | Strip number. |
Definition at line 218 of file EKLMElementNumbers.cc.
|
staticconstexprprotected |
Maximal detector layer number.
Definition at line 425 of file EKLMElementNumbers.h.
|
staticconstexprprotected |
Maximal layer number.
Definition at line 422 of file EKLMElementNumbers.h.
|
staticconstexprprotected |
Maximal plane number.
Definition at line 431 of file EKLMElementNumbers.h.
|
staticconstexprprotected |
Maximal section number.
Definition at line 419 of file EKLMElementNumbers.h.
|
staticconstexprprotected |
Maximal sector number.
Definition at line 428 of file EKLMElementNumbers.h.
|
staticconstexprprotected |
Maximal segment number.
Definition at line 434 of file EKLMElementNumbers.h.
|
staticconstexprprotected |
Maximal strip number.
Definition at line 437 of file EKLMElementNumbers.h.
|
staticconstexprprotected |
Number of strips in a segment.
Definition at line 440 of file EKLMElementNumbers.h.
|
staticconstexprprotected |
Total number of channels.
Definition at line 443 of file EKLMElementNumbers.h.