Belle II Software development
|
BKLM element numbers. More...
#include <BKLMElementNumbers.h>
Public Types | |
enum | Section { c_BackwardSection = 0 , c_ForwardSection = 1 } |
Constants for section numbers. More... | |
enum | Sector { c_ChimneySector = 3 } |
Constants for sector numbers. More... | |
enum | Layer { c_FirstRPCLayer = 3 } |
Constants for layer numbers. More... | |
enum | Plane { c_ZPlane = 0 , c_PhiPlane = 1 } |
Constants for plane numbers. More... | |
Public Member Functions | |
BKLMElementNumbers () | |
Constructor. | |
~BKLMElementNumbers () | |
Destructor. | |
Static Public Member Functions | |
static KLMChannelNumber | channelNumber (int section, int sector, int layer, int plane, int strip) |
Get channel number. | |
static void | channelNumberToElementNumbers (KLMChannelNumber channel, int *section, int *sector, int *layer, int *plane, int *strip) |
Get element numbers by channel number. | |
static KLMPlaneNumber | planeNumber (int section, int sector, int layer, int plane) |
Get plane number. | |
static void | planeNumberToElementNumbers (KLMPlaneNumber planeGlobal, int *section, int *sector, int *layer, int *plane) |
Get element numbers by plane number. | |
static KLMModuleNumber | moduleNumber (int section, int sector, int layer, bool fatalError=true) |
Get module number. | |
static void | moduleNumberToElementNumbers (KLMModuleNumber module, int *section, int *sector, int *layer) |
Get element numbers by module number. | |
static KLMSectorNumber | sectorNumber (int section, int sector) |
Get sector number. | |
static int | layerGlobalNumber (int section, int sector, int layer) |
Get layer global number. | |
static int | getNStrips (int section, int sector, int layer, int plane) |
Get number of strips. | |
static bool | checkSection (int section, bool fatalError=true) |
Check if section number is correct. | |
static bool | checkSector (int sector, bool fatalError=true) |
Check if sector number is correct. | |
static bool | checkLayer (int layer, bool fatalError=true) |
Check if layer number is correct. | |
static bool | checkPlane (int plane, bool fatalError=true) |
Check if plane number is correct. | |
static bool | checkChannelNumber (int section, int sector, int layer, int plane, int strip, bool fatalError=true) |
Check channel number. | |
static std::string | getHSLBName (int copper, int slot) |
Get HSLB name. | |
static constexpr int | getMaximalSectionNumber () |
Get maximal section number (0-based). | |
static constexpr int | getMaximalSectorNumber () |
Get maximal sector number (1-based). | |
static constexpr int | getMaximalLayerNumber () |
Get maximal layer number (1-based). | |
static constexpr int | getMaximalPlaneNumber () |
Get maximal plane number (0-based). | |
static constexpr int | getMaximalSectorGlobalNumber () |
Get maximal sector global number. | |
static constexpr int | getMaximalLayerGlobalNumber () |
Get maximal layer global number. | |
static constexpr int | getTotalChannelNumber () |
Get total number of channels. | |
static void | layerGlobalNumberToElementNumbers (int layerGlobal, int *section, int *sector, int *layer) |
Get element numbers by layer global number (0-based). | |
static int | getSectionByModule (int module) |
Get section number by module identifier. | |
static int | getSectorByModule (int module) |
Get sector number by module identifier. | |
static int | getLayerByModule (int module) |
Get layer number by module identifier. | |
static int | getPlaneByModule (int module) |
Get plane number (0 = z, 1 = phi) by module identifier. | |
static int | getStripByModule (int module) |
Get strip number by module identifier. | |
static void | setSectionInModule (int &module, int section) |
Set section number in module identifier. | |
static void | setSectorInModule (int &module, int sector) |
Set sector number in module identifier. | |
static void | setLayerInModule (int &module, int layer) |
Set layer number in module identifier. | |
static void | setPlaneInModule (int &module, int plane) |
Set plane number in module identifier. | |
static void | setStripInModule (int &module, int strip) |
Set strip number in module identifier. | |
static uint16_t | getModuleByModule (int module) |
Get module number by module identifier (the input identifier may contain other data). | |
static uint16_t | getChannelByModule (int module) |
Get channel number by module identifier. | |
static bool | hitsFromSameModule (int module1, int module2) |
Check whether the hits are from the same module. | |
static bool | hitsFromSamePlane (int module1, int module2) |
Check whether the hits are from the same plane. | |
static bool | hitsFromSameChannel (int module1, int module2) |
Check whether the hits are from the same channel. | |
Static Protected Attributes | |
static constexpr int | m_MaximalSectionNumber = 1 |
Maximal section number (0-based). | |
static constexpr int | m_MaximalSectorNumber = 8 |
Maximal sector number (1-based). | |
static constexpr int | m_MaximalLayerNumber = 15 |
Maximal layer number (1-based). | |
static constexpr int | m_MaximalPlaneNumber = 1 |
Maximal plane number (0-based). | |
static constexpr int | m_TotalChannelNumber = 21978 |
Total number of channels (1-based). | |
static constexpr int | BKLM_STRIP_BIT = 0 |
Bit position for strip-1 [0..47]. | |
static constexpr int | BKLM_PLANE_BIT = 6 |
Bit position for plane-1 [0..1]. | |
static constexpr int | BKLM_LAYER_BIT = 7 |
Bit position for layer-1 [0..14]; 0 is innermost. | |
static constexpr int | BKLM_SECTOR_BIT = 11 |
Bit position for sector-1 [0..7]. | |
static constexpr int | BKLM_SECTION_BIT = 14 |
Bit position for detector end [0..1]; forward is 0. | |
static constexpr int | BKLM_STRIP_MASK = (63 << BKLM_STRIP_BIT) |
Bit mask for strip-1 [0..47]. | |
static constexpr int | BKLM_PLANE_MASK = (1 << BKLM_PLANE_BIT) |
Bit mask for plane-1 [0..1]; 0 is inner-plane and phiReadout plane,. | |
static constexpr int | BKLM_LAYER_MASK = (15 << BKLM_LAYER_BIT) |
Bit mask for layer-1 [0..15]; 0 is innermost and 14 is outermost. | |
static constexpr int | BKLM_SECTOR_MASK = (7 << BKLM_SECTOR_BIT) |
Bit mask for sector-1 [0..7]. | |
static constexpr int | BKLM_SECTION_MASK = (1 << BKLM_SECTION_BIT) |
Bit mask for detector end [0..1]; forward is 0. | |
static constexpr int | BKLM_MODULEID_MASK |
Bit mask for module identifier. | |
static constexpr int | BKLM_MODULESTRIPID_MASK |
Bit mask for module-and-strip identifier. | |
BKLM element numbers.
Definition at line 27 of file BKLMElementNumbers.h.
enum Layer |
Constants for layer numbers.
Enumerator | |
---|---|
c_FirstRPCLayer | First RPC layer. |
Definition at line 61 of file BKLMElementNumbers.h.
enum Plane |
Constants for plane numbers.
Enumerator | |
---|---|
c_ZPlane | Z. |
c_PhiPlane | Phi. |
Definition at line 71 of file BKLMElementNumbers.h.
enum Section |
Constants for section numbers.
Enumerator | |
---|---|
c_BackwardSection | Backward. |
c_ForwardSection | Forward. |
Definition at line 34 of file BKLMElementNumbers.h.
enum Sector |
Constants for sector numbers.
Enumerator | |
---|---|
c_ChimneySector | Chimney sector: BB3 in 1-based notation; BB2 in 0-based notation. |
Definition at line 47 of file BKLMElementNumbers.h.
~BKLMElementNumbers | ( | ) |
|
static |
Get channel number.
[in] | section | Section (0-based). |
[in] | sector | Sector (1-based). |
[in] | layer | Layer (1-based). |
[in] | plane | Plane (0-based). |
[in] | strip | Strip (1-based). |
Definition at line 25 of file BKLMElementNumbers.cc.
|
static |
Get element numbers by channel number.
[in] | channel | Channel number. |
[out] | section | Section (0-based). |
[out] | sector | Sector (1-based). |
[out] | layer | Layer (1-based). |
[out] | plane | Plane (0-based). |
[out] | strip | Strip (1-based). |
Definition at line 36 of file BKLMElementNumbers.cc.
|
static |
Check channel number.
[in] | section | Section (0-based). |
[in] | sector | Sector (1-based). |
[in] | layer | Layer (1-based). |
[in] | plane | Plane (0-based). |
[in] | strip | Strip (1-based). |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 183 of file BKLMElementNumbers.cc.
|
static |
Check if layer number is correct.
[in] | layer | Layer (1-based) |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 163 of file BKLMElementNumbers.cc.
|
static |
Check if plane number is correct.
[in] | plane | Plane (0-based) |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 173 of file BKLMElementNumbers.cc.
|
static |
Check if section number is correct.
[in] | section | Section (0-based). |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 143 of file BKLMElementNumbers.cc.
|
static |
Check if sector number is correct.
[in] | sector | Sector (1-based) |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 153 of file BKLMElementNumbers.cc.
|
inlinestatic |
Get channel number by module identifier.
Definition at line 395 of file BKLMElementNumbers.h.
|
static |
Get HSLB name.
[in] | copper | Copper. |
[in] | slot | Slot. |
Definition at line 202 of file BKLMElementNumbers.cc.
|
inlinestatic |
Get layer number by module identifier.
Definition at line 312 of file BKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal layer global number.
Definition at line 271 of file BKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal layer number (1-based).
Definition at line 247 of file BKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal plane number (0-based).
Definition at line 255 of file BKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal section number (0-based).
Definition at line 231 of file BKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal sector global number.
Definition at line 263 of file BKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get maximal sector number (1-based).
Definition at line 239 of file BKLMElementNumbers.h.
|
inlinestatic |
Get module number by module identifier (the input identifier may contain other data).
Definition at line 387 of file BKLMElementNumbers.h.
|
static |
Get number of strips.
[in] | section | Section (0-based). |
[in] | sector | Sector (1-based). |
[in] | layer | Layer (1-based). |
[in] | plane | Plane (0-based). |
Definition at line 107 of file BKLMElementNumbers.cc.
|
inlinestatic |
Get plane number (0 = z, 1 = phi) by module identifier.
Definition at line 320 of file BKLMElementNumbers.h.
|
inlinestatic |
Get section number by module identifier.
Definition at line 296 of file BKLMElementNumbers.h.
|
inlinestatic |
Get sector number by module identifier.
Definition at line 304 of file BKLMElementNumbers.h.
|
inlinestatic |
Get strip number by module identifier.
Definition at line 328 of file BKLMElementNumbers.h.
|
inlinestaticconstexpr |
Get total number of channels.
Definition at line 279 of file BKLMElementNumbers.h.
|
inlinestatic |
Check whether the hits are from the same channel.
Definition at line 420 of file BKLMElementNumbers.h.
|
inlinestatic |
Check whether the hits are from the same module.
Definition at line 403 of file BKLMElementNumbers.h.
|
inlinestatic |
Check whether the hits are from the same plane.
Definition at line 411 of file BKLMElementNumbers.h.
|
static |
Get layer global number.
[in] | section | Section (0-based). |
[in] | sector | Sector (1-based). |
[in] | layer | Layer (1-based). |
Definition at line 96 of file BKLMElementNumbers.cc.
|
static |
Get element numbers by layer global number (0-based).
[in] | layerGlobal | Layer global number. |
[out] | section | Section (0-based). |
[out] | sector | Sector (1-based). |
[out] | layer | Layer (1-based). |
Definition at line 195 of file BKLMElementNumbers.cc.
|
static |
Get module number.
[in] | section | Section (0-based). |
[in] | sector | Sector (1-based). |
[in] | layer | Layer (1-based). |
[in] | fatalError | Issue fatal error (default) or not. |
Definition at line 69 of file BKLMElementNumbers.cc.
|
static |
Get element numbers by module number.
[in] | module | Module. |
[out] | section | Section (0-based). |
[out] | sector | Sector (1-based). |
[out] | layer | Layer (1-based). |
Definition at line 80 of file BKLMElementNumbers.cc.
|
static |
Get plane number.
[in] | section | Section (0-based). |
[in] | sector | Sector (1-based). |
[in] | layer | Layer (1-based). |
[in] | plane | Plane (0-based). |
Definition at line 47 of file BKLMElementNumbers.cc.
|
static |
Get element numbers by plane number.
[in] | planeGlobal | Plane number. |
[out] | section | Section (0-based). |
[out] | sector | Sector (1-based). |
[out] | layer | Layer (1-based). |
[out] | plane | Plane (0-based). |
Definition at line 60 of file BKLMElementNumbers.cc.
|
static |
Get sector number.
[in] | section | Section (0-based). |
[in] | sector | Sector (1-based). |
Definition at line 88 of file BKLMElementNumbers.cc.
|
inlinestatic |
Set layer number in module identifier.
[in,out] | module | Module identifier. |
[in] | layer | Layer identifier. |
Definition at line 358 of file BKLMElementNumbers.h.
|
inlinestatic |
Set plane number in module identifier.
Definition at line 368 of file BKLMElementNumbers.h.
|
inlinestatic |
Set section number in module identifier.
[in,out] | module | Module identifier. |
[in] | section | Section. |
Definition at line 338 of file BKLMElementNumbers.h.
|
inlinestatic |
Set sector number in module identifier.
Definition at line 348 of file BKLMElementNumbers.h.
|
inlinestatic |
Set strip number in module identifier.
[in,out] | module | Module identifier. |
[in] | strip | Strip. |
Definition at line 378 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit position for layer-1 [0..14]; 0 is innermost.
Definition at line 452 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit mask for layer-1 [0..15]; 0 is innermost and 14 is outermost.
Definition at line 470 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit mask for module identifier.
Definition at line 482 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit mask for module-and-strip identifier.
Definition at line 486 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit position for plane-1 [0..1].
0 is inner-plane and phiReadout plane.
Definition at line 449 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit mask for plane-1 [0..1]; 0 is inner-plane and phiReadout plane,.
Definition at line 467 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit position for detector end [0..1]; forward is 0.
Definition at line 461 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit mask for detector end [0..1]; forward is 0.
Definition at line 479 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit position for sector-1 [0..7].
0 is on the +x axis and 2 is on the +y axis
Definition at line 458 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit mask for sector-1 [0..7].
0 is on the +x axis and 2 is on the +y axis.
Definition at line 476 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit position for strip-1 [0..47].
Definition at line 443 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit mask for strip-1 [0..47].
Definition at line 464 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Maximal layer number (1-based).
Definition at line 434 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Maximal plane number (0-based).
Definition at line 437 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Maximal section number (0-based).
Definition at line 428 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Maximal sector number (1-based).
Definition at line 431 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Total number of channels (1-based).
Definition at line 440 of file BKLMElementNumbers.h.