![]() |
Belle II Software
release-05-02-19
|
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 uint16_t | channelNumber (int section, int sector, int layer, int plane, int strip) |
Get channel number. More... | |
static void | channelNumberToElementNumbers (uint16_t channel, int *section, int *sector, int *layer, int *plane, int *strip) |
Get element numbers by channel number. More... | |
static uint16_t | planeNumber (int section, int sector, int layer, int plane) |
Get plane number. More... | |
static void | planeNumberToElementNumbers (uint16_t planeGlobal, int *section, int *sector, int *layer, int *plane) |
Get element numbers by plane number. More... | |
static uint16_t | moduleNumber (int section, int sector, int layer, bool fatalError=true) |
Get module number. More... | |
static void | moduleNumberToElementNumbers (uint16_t module, int *section, int *sector, int *layer) |
Get element numbers by module number. More... | |
static uint16_t | sectorNumber (int section, int sector) |
Get sector number. More... | |
static int | layerGlobalNumber (int section, int sector, int layer) |
Get layer global number. More... | |
static int | getNStrips (int section, int sector, int layer, int plane) |
Get number of strips. More... | |
static bool | checkSection (int section, bool fatalError=true) |
Check if section number is correct. More... | |
static bool | checkSector (int sector, bool fatalError=true) |
Check if sector number is correct. More... | |
static bool | checkLayer (int layer, bool fatalError=true) |
Check if layer number is correct. More... | |
static bool | checkPlane (int plane, bool fatalError=true) |
Check if plane number is correct. More... | |
static bool | checkChannelNumber (int section, int sector, int layer, int plane, int strip, bool fatalError=true) |
Check channel number. More... | |
static std::string | getHSLBName (int copper, int slot) |
Get HSLB name. More... | |
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). More... | |
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. More... | |
static void | setSectorInModule (int &module, int sector) |
Set sector number in module identifier. More... | |
static void | setLayerInModule (int &module, int layer) |
Set layer number in module identifier. More... | |
static void | setPlaneInModule (int &module, int plane) |
Set plane number in module identifier. More... | |
static void | setStripInModule (int &module, int strip) |
Set strip number in module identifier. More... | |
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]. More... | |
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]. More... | |
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]. More... | |
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. More... | |
static constexpr int | BKLM_MODULESTRIPID_MASK |
Bit mask for module-and-strip identifier. More... | |
BKLM element numbers.
Definition at line 34 of file BKLMElementNumbers.h.
enum Layer |
Constants for layer numbers.
Enumerator | |
---|---|
c_FirstRPCLayer | First RPC layer. |
Definition at line 68 of file BKLMElementNumbers.h.
enum Plane |
Constants for plane numbers.
Enumerator | |
---|---|
c_ZPlane | Z. |
c_PhiPlane | Phi. |
Definition at line 78 of file BKLMElementNumbers.h.
enum Section |
Constants for section numbers.
Enumerator | |
---|---|
c_BackwardSection | Backward. |
c_ForwardSection | Forward. |
Definition at line 41 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 54 of file BKLMElementNumbers.h.
|
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 27 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 38 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 184 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 164 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 174 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 144 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 154 of file BKLMElementNumbers.cc.
|
static |
Get HSLB name.
[in] | copper | Copper. |
[in] | slot | Slot. |
Definition at line 203 of file BKLMElementNumbers.cc.
|
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 108 of file BKLMElementNumbers.cc.
|
static |
Get layer global number.
[in] | section | Section (0-based). |
[in] | sector | Sector (1-based). |
[in] | layer | Layer (1-based). |
Definition at line 97 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 196 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 71 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 81 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 49 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 62 of file BKLMElementNumbers.cc.
|
static |
Get sector number.
[in] | section | Section (0-based). |
[in] | sector | Sector (1-based). |
Definition at line 89 of file BKLMElementNumbers.cc.
|
inlinestatic |
Set layer number in module identifier.
[in,out] | module | Module identifier. |
[in] | layer | Layer identifier. |
Definition at line 362 of file BKLMElementNumbers.h.
|
inlinestatic |
Set plane number in module identifier.
Definition at line 372 of file BKLMElementNumbers.h.
|
inlinestatic |
Set section number in module identifier.
[in,out] | module | Module identifier. |
[in] | section | Section. |
Definition at line 342 of file BKLMElementNumbers.h.
|
inlinestatic |
Set sector number in module identifier.
Definition at line 352 of file BKLMElementNumbers.h.
|
inlinestatic |
Set strip number in module identifier.
[in,out] | module | Module identifier. |
[in] | strip | Strip. |
Definition at line 382 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit mask for module identifier.
Definition at line 486 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit mask for module-and-strip identifier.
Definition at line 490 of file BKLMElementNumbers.h.
|
staticconstexprprotected |
Bit position for plane-1 [0..1].
0 is inner-plane and phiReadout plane.
Definition at line 453 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 462 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 480 of file BKLMElementNumbers.h.