10#include <klm/dataobjects/KLMChannelIndex.h>
13#include <klm/dataobjects/bklm/BKLMElementNumbers.h>
14#include <klm/dataobjects/eklm/EKLMElementNumbers.h>
19 m_IndexLevel(indexLevel),
33 int subdetector,
int section,
int sector,
int layer,
int plane,
int strip,
35 m_IndexLevel(indexLevel),
36 m_Subdetector(subdetector),
222 switch (indexLevel) {
264 switch (indexLevel) {
324 if (
m_Strip != index.getStrip())
328 if (
m_Plane != index.getPlane())
332 if (
m_Layer != index.getLayer())
354 if (
m_Strip != index.getStrip())
358 if (
m_Plane != index.getPlane())
362 if (
m_Layer != index.getLayer())
static constexpr int getMaximalLayerNumber()
Get maximal layer number (1-based).
static constexpr int getMaximalSectorNumber()
Get maximal sector number (1-based).
static constexpr int getMaximalSectionNumber()
Get maximal section number (0-based).
static constexpr int getMaximalPlaneNumber()
Get maximal plane number (0-based).
static int getNStrips(int section, int sector, int layer, int plane)
Get number of strips.
int getMaximalDetectorLayerNumber(int section) const
Get maximal detector layer number.
static constexpr int getMaximalStripNumber()
Get maximal strip number.
static constexpr int getMaximalSectorNumber()
Get maximal sector number.
static constexpr int getMaximalSectionNumber()
Get maximal section number.
int segmentNumber(int section, int layer, int sector, int plane, int segment) const
Get segment number.
static constexpr int getMaximalPlaneNumber()
Get maximal plane number.
void segmentNumberToElementNumbers(int segmentGlobal, int *section, int *layer, int *sector, int *plane, int *segment) const
Get element numbers by segment global number.
static constexpr int getMaximalSegmentNumber()
Get maximal segment number.
KLMChannelIndex & endEKLM()
Last channel for EKLM.
KLMChannelIndex beginBKLM()
First channel for BKLM.
const KLMElementNumbers * m_ElementNumbers
KLM element numbers.
KLMChannelIndex & operator*()
Operator *.
KLMChannelIndex & operator++()
Operator ++.
const EKLMElementNumbers * m_eklmElementNumbers
EKLM element numbers.
int getEKLMSegmentNumber() const
Get EKLM segment number.
KLMModuleNumber getKLMModuleNumber() const
Get KLM module number.
IndexLevel
Index level (loop over KLM elements at the specified level).
@ c_IndexLevelSection
Section.
@ c_IndexLevelSector
Sector.
@ c_IndexLevelLayer
Layer.
@ c_IndexLevelSubdetector
Subdetector (BKLM or EKLM).
@ c_IndexLevelStrip
Strip.
@ c_IndexLevelPlane
Plane.
KLMChannelIndex & increment()
Increment (to use in Python).
void setEKLMSegment(int segment)
Set EKLM segment.
KLMChannelNumber getKLMChannelNumber() const
Get KLM channel number.
bool operator==(const KLMChannelIndex &index) const
Operator ==.
int m_NStripsPlane
Number of strips in current plane.
bool operator!=(const KLMChannelIndex &index) const
Operator !=.
bool m_UseEKLMSegments
Iterate over EKLM segments instead of strips.
~KLMChannelIndex()
Destructor.
void setIndexLevel(enum IndexLevel indexLevel)
Set index level.
KLMSectorNumber getKLMSectorNumber() const
Get KLM sector number.
void useEKLMSegments(bool useSegments=true)
Iterate over EKLM segments instead of strips.
int m_Subdetector
Subdetector.
KLMChannelIndex & endBKLM()
Last channel for BKLM.
KLMChannelIndex(enum IndexLevel indexLevel=c_IndexLevelStrip)
Constructor.
void setNStripsPlane()
Set number of strips in the current plane.
KLMChannelIndex beginEKLM()
First channel for EKLM.
enum IndexLevel m_IndexLevel
Index level.
void setKLMModule(KLMModuleNumber module)
Set KLM module.
KLMPlaneNumber getKLMPlaneNumber() const
Get KLM plane number.
KLMSectorNumber sectorNumberEKLM(int section, int sector) const
Get sector number for EKLM.
KLMChannelNumber channelNumberBKLM(int section, int sector, int layer, int plane, int strip) const
Get channel number for BKLM.
KLMPlaneNumber planeNumberEKLM(int section, int sector, int layer, int plane) const
Get channel number for EKLM.
void moduleNumberToElementNumbers(KLMModuleNumber module, int *subdetector, int *section, int *sector, int *layer) const
Get element numbers by module number.
KLMPlaneNumber planeNumberBKLM(int section, int sector, int layer, int plane) const
Get plane number for BKLM.
KLMModuleNumber moduleNumberBKLM(int section, int sector, int layer) const
Get module number for BKLM.
KLMSectorNumber sectorNumberBKLM(int section, int sector) const
Get sector number for BKLM.
KLMModuleNumber moduleNumberEKLM(int section, int sector, int layer) const
Get module number for EKLM.
KLMChannelNumber channelNumberEKLM(int section, int sector, int layer, int plane, int strip) const
Get channel number for EKLM.
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.