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

KLM element numbers. More...

#include <KLMElementNumbers.h>

Collaboration diagram for KLMElementNumbers:

Public Types

enum  Subdetector {
  c_BKLM = 1 ,
  c_EKLM = 2
}
 Subdetector constants. More...
 

Public Member Functions

KLMChannelNumber channelNumber (int subdetector, int section, int sector, int layer, int plane, int strip) const
 Get channel number. More...
 
KLMChannelNumber channelNumberBKLM (int section, int sector, int layer, int plane, int strip) const
 Get channel number for BKLM. More...
 
KLMChannelNumber channelNumberBKLM (int bklmChannel) const
 Get channel number for BKLM. More...
 
KLMChannelNumber channelNumberEKLM (int section, int sector, int layer, int plane, int strip) const
 Get channel number for EKLM. More...
 
KLMChannelNumber channelNumberEKLM (int eklmStrip) const
 Get channel number for EKLM. More...
 
bool isBKLMChannel (KLMChannelNumber channel) const
 Determine whether a given channel is in BKLM. More...
 
bool isEKLMChannel (KLMChannelNumber channel) const
 Determine whether a given channel is in EKLM. More...
 
int localChannelNumberBKLM (KLMChannelNumber channel) const
 Get local BKLM channel number. More...
 
int localChannelNumberEKLM (KLMChannelNumber channel) const
 Get local EKLM channel number. More...
 
void channelNumberToElementNumbers (KLMChannelNumber channel, int *subdetector, int *section, int *sector, int *layer, int *plane, int *strip) const
 Get element numbers by channel number. More...
 
KLMPlaneNumber planeNumber (int subdetector, int section, int sector, int layer, int plane) const
 Get plane number. More...
 
KLMPlaneNumber planeNumberBKLM (int section, int sector, int layer, int plane) const
 Get plane number for BKLM. More...
 
KLMPlaneNumber planeNumberEKLM (int section, int sector, int layer, int plane) const
 Get channel number for EKLM. More...
 
KLMModuleNumber moduleNumber (int subdetector, int section, int sector, int layer) const
 Get module number. More...
 
KLMModuleNumber moduleNumberBKLM (int section, int sector, int layer) const
 Get module number for BKLM. More...
 
KLMModuleNumber moduleNumberEKLM (int section, int sector, int layer) const
 Get module number for EKLM. More...
 
KLMModuleNumber moduleNumberByChannel (KLMChannelNumber channel) const
 Get module number by channel number. More...
 
void moduleNumberToElementNumbers (KLMModuleNumber module, int *subdetector, int *section, int *sector, int *layer) const
 Get element numbers by module number. More...
 
unsigned int getNChannelsModule (KLMModuleNumber module) const
 Get number of channels in module. More...
 
KLMSectorNumber sectorNumberBKLM (int section, int sector) const
 Get sector number for BKLM. More...
 
KLMSectorNumber sectorNumberEKLM (int section, int sector) const
 Get sector number for EKLM. More...
 
int getExtrapolationLayer (int subdetector, int layer) const
 Get extrapolation layer number (BKLM - from 1 to 15, EKLM - from 16 to 29). More...
 
int getMinimalPlaneNumber (int subdetector) const
 Get minimal plane number. More...
 
std::string getSectorDAQName (int subdetector, int section, int sector) const
 Get DAQ name for a given sector. More...
 

Static Public Member Functions

static const KLMElementNumbersInstance ()
 Instantiation.
 
static constexpr int getMaximalExtrapolationLayer ()
 Get maximal extrapolation layer.
 
static constexpr int getTotalModuleNumber ()
 Get total number of modules.
 
static constexpr int getMaximalPlaneNumber ()
 Get maximal plane number.
 
static constexpr int getTotalChannelNumber ()
 Get total number of channels.
 

Private Member Functions

 KLMElementNumbers ()
 Constructor.
 
 ~KLMElementNumbers ()
 Destructor.
 

Private Attributes

const EKLMElementNumbersm_eklmElementNumbers
 EKLM element numbers.
 

Static Private Attributes

static constexpr uint16_t m_BKLMOffset = 0x8000
 BKLM offset.
 

Detailed Description

KLM element numbers.

Definition at line 28 of file KLMElementNumbers.h.

Member Enumeration Documentation

◆ Subdetector

Subdetector constants.

Enumerator
c_BKLM 

BKLM.

c_EKLM 

EKLM.

Definition at line 35 of file KLMElementNumbers.h.

35  {
36 
38  c_BKLM = 1,
39 
41  c_EKLM = 2,
42 
43  };

Member Function Documentation

◆ channelNumber()

KLMChannelNumber channelNumber ( int  subdetector,
int  section,
int  sector,
int  layer,
int  plane,
int  strip 
) const

Get channel number.

Parameters
[in]subdetectorSundetector.
[in]sectionSection.
[in]sectorSector.
[in]layerLayer.
[in]planePlane.
[in]stripStrip.

Definition at line 35 of file KLMElementNumbers.cc.

38 {
39  switch (subdetector) {
40  case c_BKLM:
41  return channelNumberBKLM(section, sector, layer, plane, strip);
42  case c_EKLM:
43  return channelNumberEKLM(section, sector, layer, plane, strip);
44  }
45  B2FATAL("Incorrect subdetector number: " << subdetector);
46 }
KLMChannelNumber channelNumberBKLM(int section, int sector, int layer, int plane, int strip) const
Get channel number for BKLM.
KLMChannelNumber channelNumberEKLM(int section, int sector, int layer, int plane, int strip) const
Get channel number for EKLM.

◆ channelNumberBKLM() [1/2]

KLMChannelNumber channelNumberBKLM ( int  bklmChannel) const

Get channel number for BKLM.

Parameters
[in]bklmChannelBKLM channel.

Definition at line 57 of file KLMElementNumbers.cc.

◆ channelNumberBKLM() [2/2]

KLMChannelNumber channelNumberBKLM ( int  section,
int  sector,
int  layer,
int  plane,
int  strip 
) const

Get channel number for BKLM.

Parameters
[in]sectionForward (1) or backward (0) BKLM.
[in]sectorSector (1-based).
[in]layerLayer (1-based).
[in]planePlane (0-based).
[in]stripStrip (1-based).

Definition at line 48 of file KLMElementNumbers.cc.

◆ channelNumberEKLM() [1/2]

KLMChannelNumber channelNumberEKLM ( int  eklmStrip) const

Get channel number for EKLM.

Parameters
[in]eklmStripEKLM strip number.

Definition at line 75 of file KLMElementNumbers.cc.

◆ channelNumberEKLM() [2/2]

KLMChannelNumber channelNumberEKLM ( int  section,
int  sector,
int  layer,
int  plane,
int  strip 
) const

Get channel number for EKLM.

Parameters
[in]sectionSection number.
[in]sectorSector number.
[in]layerLayer number.
[in]planePlane number.
[in]stripStrip number.

Definition at line 62 of file KLMElementNumbers.cc.

◆ channelNumberToElementNumbers()

void channelNumberToElementNumbers ( KLMChannelNumber  channel,
int *  subdetector,
int *  section,
int *  sector,
int *  layer,
int *  plane,
int *  strip 
) const

Get element numbers by channel number.

Parameters
[in]channelKLM channel number.
[out]subdetectorSubdetector.
[out]sectionSection.
[out]sectorSector.
[out]layerLayer.
[out]planePlane.
[out]stripStrip.

Definition at line 104 of file KLMElementNumbers.cc.

◆ getExtrapolationLayer()

int getExtrapolationLayer ( int  subdetector,
int  layer 
) const

Get extrapolation layer number (BKLM - from 1 to 15, EKLM - from 16 to 29).

Parameters
[in]subdetectorSubdetector.
[in]layerLayer.

Definition at line 246 of file KLMElementNumbers.cc.

◆ getMinimalPlaneNumber()

int getMinimalPlaneNumber ( int  subdetector) const

Get minimal plane number.

Parameters
[in]subdetectorSubdetector.

Definition at line 254 of file KLMElementNumbers.cc.

◆ getNChannelsModule()

unsigned int getNChannelsModule ( KLMModuleNumber  module) const

Get number of channels in module.

Parameters
[in]moduleKLM module number.

Definition at line 216 of file KLMElementNumbers.cc.

◆ getSectorDAQName()

std::string getSectorDAQName ( int  subdetector,
int  section,
int  sector 
) const

Get DAQ name for a given sector.

Parameters
[in]subdetectorSubdetector.
[in]sectionSection.
[in]sectorSector.

Definition at line 262 of file KLMElementNumbers.cc.

◆ isBKLMChannel()

bool isBKLMChannel ( KLMChannelNumber  channel) const

Determine whether a given channel is in BKLM.

This function also works for modules amd sectors.

Parameters
[in]channelKLM channel number.

Definition at line 80 of file KLMElementNumbers.cc.

◆ isEKLMChannel()

bool isEKLMChannel ( KLMChannelNumber  channel) const

Determine whether a given channel is in EKLM.

This function also works for modules amd sectors.

Parameters
[in]channelKLM channel number.

Definition at line 85 of file KLMElementNumbers.cc.

◆ localChannelNumberBKLM()

int localChannelNumberBKLM ( KLMChannelNumber  channel) const

Get local BKLM channel number.

This function also works for modules amd sectors.

Parameters
[in]channelKLM channel number.

Definition at line 90 of file KLMElementNumbers.cc.

◆ localChannelNumberEKLM()

int localChannelNumberEKLM ( KLMChannelNumber  channel) const

Get local EKLM channel number.

This function also works for modules amd sectors.

Parameters
[in]channelKLM channel number.

Definition at line 97 of file KLMElementNumbers.cc.

◆ moduleNumber()

KLMModuleNumber moduleNumber ( int  subdetector,
int  section,
int  sector,
int  layer 
) const

Get module number.

Parameters
[in]subdetectorSubdetector.
[in]sectionSection.
[in]sectorSector (1-based).
[in]layerLayer (1-based).

Definition at line 156 of file KLMElementNumbers.cc.

◆ moduleNumberBKLM()

KLMModuleNumber moduleNumberBKLM ( int  section,
int  sector,
int  layer 
) const

Get module number for BKLM.

Parameters
[in]sectionForward (1) or backward (0) BKLM.
[in]sectorSector (1-based).
[in]layerLayer (1-based).

Definition at line 165 of file KLMElementNumbers.cc.

◆ moduleNumberByChannel()

KLMModuleNumber moduleNumberByChannel ( KLMChannelNumber  channel) const

Get module number by channel number.

Parameters
[in]channelChannel.

Definition at line 185 of file KLMElementNumbers.cc.

◆ moduleNumberEKLM()

KLMModuleNumber moduleNumberEKLM ( int  section,
int  sector,
int  layer 
) const

Get module number for EKLM.

Parameters
[in]sectionSection number.
[in]sectorSector number.
[in]layerLayer number.

Definition at line 173 of file KLMElementNumbers.cc.

◆ moduleNumberToElementNumbers()

void moduleNumberToElementNumbers ( KLMModuleNumber  module,
int *  subdetector,
int *  section,
int *  sector,
int *  layer 
) const

Get element numbers by module number.

Parameters
[in]moduleKLM module number.
[out]subdetectorSubdetector.
[out]sectionSection.
[out]sectorSector.
[out]layerLayer.

Definition at line 194 of file KLMElementNumbers.cc.

◆ planeNumber()

KLMPlaneNumber planeNumber ( int  subdetector,
int  section,
int  sector,
int  layer,
int  plane 
) const

Get plane number.

Parameters
[in]subdetectorSubdetector.
[in]sectionSection.
[in]sectorSector.
[in]layerLayer.
[in]planePlane.

Definition at line 126 of file KLMElementNumbers.cc.

◆ planeNumberBKLM()

KLMPlaneNumber planeNumberBKLM ( int  section,
int  sector,
int  layer,
int  plane 
) const

Get plane number for BKLM.

Parameters
[in]sectionForward (1) or backward (0) BKLM.
[in]sectorSector (1-based).
[in]layerLayer (1-based).
[in]planePlane (0-based).

Definition at line 135 of file KLMElementNumbers.cc.

◆ planeNumberEKLM()

KLMPlaneNumber planeNumberEKLM ( int  section,
int  sector,
int  layer,
int  plane 
) const

Get channel number for EKLM.

Parameters
[in]sectionSection number.
[in]sectorSector number.
[in]layerLayer number.
[in]planePlane number.

Definition at line 143 of file KLMElementNumbers.cc.

◆ sectorNumberBKLM()

KLMSectorNumber sectorNumberBKLM ( int  section,
int  sector 
) const

Get sector number for BKLM.

Parameters
[in]sectionForward (1) or backward (0) BKLM.
[in]sectorSector (1-based).

Definition at line 230 of file KLMElementNumbers.cc.

◆ sectorNumberEKLM()

KLMSectorNumber sectorNumberEKLM ( int  section,
int  sector 
) const

Get sector number for EKLM.

Parameters
[in]sectionSection number.
[in]sectorSector number.

Definition at line 238 of file KLMElementNumbers.cc.


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