12#include <klm/dataobjects/KLMElementNumberDefinitions.h>
100 int plane,
int strip);
112 KLMChannelNumber channel,
int* section,
int* sector,
int* layer,
int* plane,
134 KLMPlaneNumber planeGlobal,
int* section,
int* sector,
int* layer,
145 bool fatalError =
true);
179 static int getNStrips(
int section,
int sector,
int layer,
int plane);
186 static bool checkSection(
int section,
bool fatalError =
true);
193 static bool checkSector(
int sector,
bool fatalError =
true);
200 static bool checkLayer(
int layer,
bool fatalError =
true);
207 static bool checkPlane(
int plane,
bool fatalError =
true);
219 int section,
int sector,
int layer,
int plane,
int strip,
bool fatalError =
true);
226 static std::string
getHSLBName(
int copper,
int slot);
350 module = (module & (~BKLM_SECTOR_MASK)) | ((sector - 1) <<
BKLM_SECTOR_BIT);
360 module = (module & (~BKLM_LAYER_MASK)) | ((layer - 1) <<
BKLM_LAYER_BIT);
370 module = (module & (~BKLM_PLANE_MASK)) | (plane <<
BKLM_PLANE_BIT);
380 module = (module & (~BKLM_STRIP_MASK)) | ((strip - 1) <<
BKLM_STRIP_BIT);
414 return (module1 & mask) == (module2 & mask);
static void planeNumberToElementNumbers(KLMPlaneNumber planeGlobal, int *section, int *sector, int *layer, int *plane)
Get element numbers by plane number.
static constexpr int BKLM_STRIP_BIT
Bit position for strip-1 [0..47].
static bool hitsFromSameChannel(int module1, int module2)
Check whether the hits are from the same channel.
static void channelNumberToElementNumbers(KLMChannelNumber channel, int *section, int *sector, int *layer, int *plane, int *strip)
Get element numbers by channel number.
static void setStripInModule(int &module, int strip)
Set strip number in module identifier.
Sector
Constants for sector numbers.
@ c_ChimneySector
Chimney sector: BB3 in 1-based notation; BB2 in 0-based notation.
static constexpr int getMaximalLayerGlobalNumber()
Get maximal layer global number.
static int getSectorByModule(int module)
Get sector number by module identifier.
static void setLayerInModule(int &module, int layer)
Set layer number in module identifier.
static uint16_t getModuleByModule(int module)
Get module number by module identifier (the input identifier may contain other data).
static constexpr int BKLM_MODULESTRIPID_MASK
Bit mask for module-and-strip identifier.
static constexpr int m_MaximalPlaneNumber
Maximal plane number (0-based).
static constexpr int m_MaximalSectionNumber
Maximal section number (0-based).
static KLMPlaneNumber planeNumber(int section, int sector, int layer, int plane)
Get plane number.
static uint16_t getChannelByModule(int module)
Get channel number by module identifier.
static int getStripByModule(int module)
Get strip number by module identifier.
static constexpr int BKLM_PLANE_BIT
Bit position for plane-1 [0..1].
static bool checkSector(int sector, bool fatalError=true)
Check if sector number is correct.
static bool checkSection(int section, bool fatalError=true)
Check if section number is correct.
BKLMElementNumbers()
Constructor.
static constexpr int getTotalChannelNumber()
Get total number of channels.
static bool checkChannelNumber(int section, int sector, int layer, int plane, int strip, bool fatalError=true)
Check channel number.
static void setSectionInModule(int &module, int section)
Set section number in module identifier.
static constexpr int BKLM_SECTOR_MASK
Bit mask for sector-1 [0..7].
static KLMChannelNumber channelNumber(int section, int sector, int layer, int plane, int strip)
Get channel number.
static bool checkLayer(int layer, bool fatalError=true)
Check if layer number is correct.
static int getPlaneByModule(int module)
Get plane number (0 = z, 1 = phi) by module identifier.
static void layerGlobalNumberToElementNumbers(int layerGlobal, int *section, int *sector, int *layer)
Get element numbers by layer global number (0-based).
static bool checkPlane(int plane, bool fatalError=true)
Check if plane number is correct.
static constexpr int BKLM_LAYER_MASK
Bit mask for layer-1 [0..15]; 0 is innermost and 14 is outermost.
static constexpr int BKLM_MODULEID_MASK
Bit mask for module identifier.
static KLMSectorNumber sectorNumber(int section, int sector)
Get sector number.
Layer
Constants for layer numbers.
@ c_FirstRPCLayer
First RPC layer.
static constexpr int getMaximalLayerNumber()
Get maximal layer number (1-based).
static constexpr int BKLM_PLANE_MASK
Bit mask for plane-1 [0..1]; 0 is inner-plane and phiReadout plane,.
static int getLayerByModule(int module)
Get layer number by module identifier.
Section
Constants for section numbers.
@ c_ForwardSection
Forward.
@ c_BackwardSection
Backward.
static int getSectionByModule(int module)
Get section number by module identifier.
static std::string getHSLBName(int copper, int slot)
Get HSLB name.
static constexpr int BKLM_SECTOR_BIT
Bit position for sector-1 [0..7].
static constexpr int BKLM_SECTION_BIT
Bit position for detector end [0..1]; forward is 0.
static constexpr int getMaximalSectorNumber()
Get maximal sector number (1-based).
static constexpr int BKLM_SECTION_MASK
Bit mask for detector end [0..1]; forward is 0.
static constexpr int m_MaximalSectorNumber
Maximal sector number (1-based).
static KLMModuleNumber moduleNumber(int section, int sector, int layer, bool fatalError=true)
Get module number.
static bool hitsFromSameModule(int module1, int module2)
Check whether the hits are from the same module.
static constexpr int getMaximalSectionNumber()
Get maximal section number (0-based).
static constexpr int m_MaximalLayerNumber
Maximal layer number (1-based).
static bool hitsFromSamePlane(int module1, int module2)
Check whether the hits are from the same plane.
static void moduleNumberToElementNumbers(KLMModuleNumber module, int *section, int *sector, int *layer)
Get element numbers by module number.
static constexpr int m_TotalChannelNumber
Total number of channels (1-based).
static constexpr int getMaximalSectorGlobalNumber()
Get maximal sector global number.
~BKLMElementNumbers()
Destructor.
static constexpr int getMaximalPlaneNumber()
Get maximal plane number (0-based).
static void setSectorInModule(int &module, int sector)
Set sector number in module identifier.
static int layerGlobalNumber(int section, int sector, int layer)
Get layer global number.
static constexpr int BKLM_LAYER_BIT
Bit position for layer-1 [0..14]; 0 is innermost.
static constexpr int BKLM_STRIP_MASK
Bit mask for strip-1 [0..47].
static void setPlaneInModule(int &module, int plane)
Set plane number in module identifier.
static int getNStrips(int section, int sector, int layer, int plane)
Get number of strips.
uint16_t KLMSectorNumber
Sector number.
uint16_t KLMChannelNumber
Channel number.
uint16_t KLMModuleNumber
Module number.
uint16_t KLMPlaneNumber
Plane number.
Abstract base class for different kinds of events.