 |
Belle II Software
release-05-01-25
|
12 #include <klm/dataobjects/bklm/BKLMElementNumbers.h>
15 #include <rawdata/dataobjects/RawCOPPERFormat.h>
28 int section,
int sector,
int layer,
int plane,
int strip)
39 uint16_t channel,
int* section,
int* sector,
int* layer,
int* plane,
50 int section,
int sector,
int layer,
int plane)
63 uint16_t planeGlobal,
int* section,
int* sector,
int* layer,
int* plane)
82 uint16_t module,
int* section,
int* sector,
int* layer)
102 int layerGlobal = layer;
109 int section,
int sector,
int layer,
int plane)
148 B2FATAL(
"Invalid BKLM section number: " << section <<
".");
158 B2FATAL(
"Invalid BKLM sector number: " << sector <<
".");
168 B2FATAL(
"Invalid BKLM layer number: " << layer <<
".");
178 B2FATAL(
"Invalid BKLM plane number: " << plane <<
".");
185 int section,
int sector,
int layer,
int plane,
int strip,
bool fatalError)
187 if (strip < 1 || strip >
getNStrips(section, sector, layer, plane)) {
189 B2FATAL(
"Invalid BKLM channel number: section = " << section <<
", sector = " << sector <<
", layer = " << layer <<
", plane = " <<
190 plane <<
", strip = " << strip <<
".");
205 char hslb =
'a' + slot - 1;
206 return "700" + std::to_string(copper - BKLM_ID) + hslb;
static constexpr int m_MaximalSectorNumber
Maximal sector number (1-based).
static uint16_t planeNumber(int section, int sector, int layer, int plane)
Get plane number.
static uint16_t sectorNumber(int section, int sector)
Get sector number.
static constexpr int BKLM_STRIP_BIT
Bit position for strip-1 [0..47].
static bool checkChannelNumber(int section, int sector, int layer, int plane, int strip, bool fatalError=true)
Check channel number.
static bool checkLayer(int layer, bool fatalError=true)
Check if layer number is correct.
static constexpr int BKLM_PLANE_BIT
Bit position for plane-1 [0..1].
static std::string getHSLBName(int copper, int slot)
Get HSLB name.
@ c_ForwardSection
Forward.
static constexpr int BKLM_LAYER_BIT
Bit position for layer-1 [0..14]; 0 is innermost.
@ c_ChimneySector
Chimney sector: BB3 in 1-based notation; BB2 in 0-based notation.
static constexpr int BKLM_SECTOR_MASK
Bit mask for sector-1 [0..7].
static void layerGlobalNumberToElementNumbers(int layerGlobal, int *section, int *sector, int *layer)
Get element numbers by layer global number (0-based).
static constexpr int BKLM_PLANE_MASK
Bit mask for plane-1 [0..1]; 0 is inner-plane and phiReadout plane,.
static constexpr int BKLM_SECTION_BIT
Bit position for detector end [0..1]; forward is 0.
~BKLMElementNumbers()
Destructor.
@ c_BackwardSection
Backward.
Abstract base class for different kinds of events.
static constexpr int BKLM_LAYER_MASK
Bit mask for layer-1 [0..15]; 0 is innermost and 14 is outermost.
BKLMElementNumbers()
Constructor.
static void channelNumberToElementNumbers(uint16_t channel, int *section, int *sector, int *layer, int *plane, int *strip)
Get element numbers by channel number.
static bool checkSector(int sector, bool fatalError=true)
Check if sector number is correct.
static constexpr int m_MaximalLayerNumber
Maximal layer number (1-based).
static bool checkPlane(int plane, bool fatalError=true)
Check if plane number is correct.
static constexpr int BKLM_SECTION_MASK
Bit mask for detector end [0..1]; forward is 0.
static int layerGlobalNumber(int section, int sector, int layer)
Get layer global number.
static bool checkSection(int section, bool fatalError=true)
Check if section number is correct.
static constexpr int BKLM_SECTOR_BIT
Bit position for sector-1 [0..7].
static constexpr int BKLM_STRIP_MASK
Bit mask for strip-1 [0..47].
static void moduleNumberToElementNumbers(uint16_t module, int *section, int *sector, int *layer)
Get element numbers by module number.
static uint16_t channelNumber(int section, int sector, int layer, int plane, int strip)
Get channel number.
static constexpr int m_MaximalPlaneNumber
Maximal plane number (0-based).
static int getNStrips(int section, int sector, int layer, int plane)
Get number of strips.
static void planeNumberToElementNumbers(uint16_t planeGlobal, int *section, int *sector, int *layer, int *plane)
Get element numbers by plane number.
static uint16_t moduleNumber(int section, int sector, int layer, bool fatalError=true)
Get module number.