Belle II Software  release-08-01-10
KLMChannelIndex Class Reference

KLM channel index. More...

#include <KLMChannelIndex.h>

Collaboration diagram for KLMChannelIndex:

Public Types

enum  IndexLevel {
  c_IndexLevelSubdetector = 1 ,
  c_IndexLevelSection = 2 ,
  c_IndexLevelSector = 3 ,
  c_IndexLevelLayer = 4 ,
  c_IndexLevelPlane = 5 ,
  c_IndexLevelStrip = 6
}
 Index level (loop over KLM elements at the specified level). More...
 

Public Member Functions

 KLMChannelIndex (enum IndexLevel indexLevel=c_IndexLevelStrip)
 Constructor. More...
 
 KLMChannelIndex (int subdetector, int section, int sector, int layer, int plane, int strip, enum IndexLevel indexLevel=c_IndexLevelStrip)
 Constructor. More...
 
 ~KLMChannelIndex ()
 Destructor.
 
void setIndexLevel (enum IndexLevel indexLevel)
 Set index level. More...
 
void useEKLMSegments (bool useSegments=true)
 Iterate over EKLM segments instead of strips. More...
 
void setKLMModule (KLMModuleNumber module)
 Set KLM module. More...
 
void setEKLMSegment (int segment)
 Set EKLM segment. More...
 
int getSubdetector () const
 Get subdetector.
 
int getSection () const
 Get section.
 
int getSector () const
 Get sector.
 
int getLayer () const
 Get layer.
 
int getPlane () const
 Get plane.
 
int getStrip () const
 Get strip.
 
KLMChannelNumber getKLMChannelNumber () const
 Get KLM channel number.
 
KLMPlaneNumber getKLMPlaneNumber () const
 Get KLM plane number.
 
KLMModuleNumber getKLMModuleNumber () const
 Get KLM module number.
 
KLMSectorNumber getKLMSectorNumber () const
 Get KLM sector number.
 
int getEKLMSegmentNumber () const
 Get EKLM segment number.
 
KLMChannelIndex beginBKLM ()
 First channel for BKLM.
 
KLMChannelIndexendBKLM ()
 Last channel for BKLM.
 
KLMChannelIndex beginEKLM ()
 First channel for EKLM.
 
KLMChannelIndexendEKLM ()
 Last channel for EKLM.
 
KLMChannelIndex begin ()
 First channel.
 
KLMChannelIndexend ()
 Last channel.
 
KLMChannelIndexoperator++ ()
 Operator ++.
 
KLMChannelIndexincrement ()
 Increment (to use in Python).
 
bool operator== (const KLMChannelIndex &index) const
 Operator ==.
 
bool operator!= (const KLMChannelIndex &index) const
 Operator !=.
 
KLMChannelIndexoperator* ()
 Operator *.
 

Protected Member Functions

void setNStripsPlane ()
 Set number of strips in the current plane.
 
void increment (enum IndexLevel indexLevel)
 Increment the index.
 

Protected Attributes

enum IndexLevel m_IndexLevel
 Index level.
 
int m_Subdetector
 Subdetector.
 
int m_Section
 Section.
 
int m_Sector
 Sector.
 
int m_Layer
 Layer.
 
int m_Plane
 Plane.
 
int m_Strip
 Strip.
 
bool m_UseEKLMSegments = false
 Iterate over EKLM segments instead of strips.
 
int m_NStripsPlane
 Number of strips in current plane.
 
const KLMElementNumbersm_ElementNumbers
 KLM element numbers.
 
const EKLMElementNumbersm_eklmElementNumbers
 EKLM element numbers.
 

Detailed Description

KLM channel index.

Definition at line 23 of file KLMChannelIndex.h.

Member Enumeration Documentation

◆ IndexLevel

enum IndexLevel

Index level (loop over KLM elements at the specified level).

Enumerator
c_IndexLevelSubdetector 

Subdetector (BKLM or EKLM).

c_IndexLevelSection 

Section.

c_IndexLevelSector 

Sector.

c_IndexLevelLayer 

Layer.

c_IndexLevelPlane 

Plane.

c_IndexLevelStrip 

Strip.

Definition at line 30 of file KLMChannelIndex.h.

30  {
31 
34 
37 
40 
43 
46 
49 
50  };
@ c_IndexLevelSubdetector
Subdetector (BKLM or EKLM).

Constructor & Destructor Documentation

◆ KLMChannelIndex() [1/2]

KLMChannelIndex ( enum IndexLevel  indexLevel = c_IndexLevelStrip)
explicit

Constructor.

Parameters
[in]indexLevelIndex level.

Definition at line 18 of file KLMChannelIndex.cc.

18  :
19  m_IndexLevel(indexLevel),
21  m_Section(0),
22  m_Sector(1),
23  m_Layer(1),
24  m_Plane(0),
25  m_Strip(1),
28 {
30 }
static const EKLMElementNumbers & Instance()
Instantiation.
const KLMElementNumbers * m_ElementNumbers
KLM element numbers.
const EKLMElementNumbers * m_eklmElementNumbers
EKLM element numbers.
int m_Subdetector
Subdetector.
void setNStripsPlane()
Set number of strips in the current plane.
enum IndexLevel m_IndexLevel
Index level.
static const KLMElementNumbers & Instance()
Instantiation.

◆ KLMChannelIndex() [2/2]

KLMChannelIndex ( int  subdetector,
int  section,
int  sector,
int  layer,
int  plane,
int  strip,
enum IndexLevel  indexLevel = c_IndexLevelStrip 
)

Constructor.

Parameters
[in]subdetectorSubdetector.
[in]sectionSection.
[in]sectorSector.
[in]layerLayer.
[in]planePlane.
[in]stripStrip.
[in]indexLevelIndex level.

Definition at line 32 of file KLMChannelIndex.cc.

Member Function Documentation

◆ setEKLMSegment()

void setEKLMSegment ( int  segment)

Set EKLM segment.

Parameters
[in]segmentSegment.

Definition at line 134 of file KLMChannelIndex.cc.

◆ setIndexLevel()

void setIndexLevel ( enum IndexLevel  indexLevel)

Set index level.

If the index level is increased, then the index is set to the first element of the higher-order level.

Definition at line 65 of file KLMChannelIndex.cc.

◆ setKLMModule()

void setKLMModule ( KLMModuleNumber  module)

Set KLM module.

Parameters
[in]moduleModule.

Definition at line 121 of file KLMChannelIndex.cc.

◆ useEKLMSegments()

void useEKLMSegments ( bool  useSegments = true)

Iterate over EKLM segments instead of strips.

Turning this on does not make sense for BKLM, in this case the iteration would still be performed over BKLM strips. Make sure that the iteration is performed for EKLM only, e. g. by using beginEKLM() and endEKLM().

Definition at line 115 of file KLMChannelIndex.cc.


The documentation for this class was generated from the following files: