Belle II Software  release-05-02-19
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

uint16_t channelNumber (int subdetector, int section, int sector, int layer, int plane, int strip) const
 Get channel number. More...
 
uint16_t channelNumberBKLM (int section, int sector, int layer, int plane, int strip) const
 Get channel number for BKLM. More...
 
uint16_t channelNumberBKLM (int bklmChannel) const
 Get channel number for BKLM. More...
 
uint16_t channelNumberEKLM (int section, int sector, int layer, int plane, int strip) const
 Get channel number for EKLM. More...
 
uint16_t channelNumberEKLM (int eklmStrip) const
 Get channel number for EKLM. More...
 
bool isBKLMChannel (uint16_t channel) const
 Determine whether a given channel is in BKLM. More...
 
bool isEKLMChannel (uint16_t channel) const
 Determine whether a given channel is in EKLM. More...
 
int localChannelNumberBKLM (uint16_t channel) const
 Get local BKLM channel number. More...
 
int localChannelNumberEKLM (uint16_t channel) const
 Get local EKLM channel number. More...
 
void channelNumberToElementNumbers (uint16_t channel, int *subdetector, int *section, int *sector, int *layer, int *plane, int *strip) const
 Get element numbers by channel number. More...
 
uint16_t planeNumberBKLM (int section, int sector, int layer, int plane) const
 Get plane number for BKLM. More...
 
uint16_t planeNumberEKLM (int section, int sector, int layer, int plane) const
 Get channel number for EKLM. More...
 
uint16_t moduleNumber (int subdetector, int section, int sector, int layer) const
 Get module number. More...
 
uint16_t moduleNumberBKLM (int section, int sector, int layer) const
 Get module number for BKLM. More...
 
uint16_t moduleNumberEKLM (int section, int sector, int layer) const
 Get module number for EKLM. More...
 
uint16_t moduleNumberByChannel (uint16_t channel) const
 Get module number by channel number. More...
 
void moduleNumberToElementNumbers (uint16_t module, int *subdetector, int *section, int *sector, int *layer) const
 Get element numbers by module number. More...
 
unsigned int getNChannelsModule (uint16_t module) const
 Get number of channels in module. More...
 
uint16_t sectorNumberBKLM (int section, int sector) const
 Get sector number for BKLM. More...
 
uint16_t 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 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 37 of file KLMElementNumbers.h.

Member Enumeration Documentation

◆ Subdetector

Subdetector constants.

Enumerator
c_BKLM 

BKLM.

c_EKLM 

EKLM.

Definition at line 44 of file KLMElementNumbers.h.

235  {

Member Function Documentation

◆ channelNumber()

uint16_t 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 37 of file KLMElementNumbers.cc.

40 {
41  switch (subdetector) {
42  case c_BKLM:
43  return channelNumberBKLM(section, sector, layer, plane, strip);
44  case c_EKLM:
45  return channelNumberEKLM(section, sector, layer, plane, strip);
46  }
47  B2FATAL("Incorrect subdetector number: " << subdetector);
48 }

◆ channelNumberBKLM() [1/2]

uint16_t channelNumberBKLM ( int  bklmChannel) const

Get channel number for BKLM.

Parameters
[in]bklmChannelBKLM channel.

Definition at line 59 of file KLMElementNumbers.cc.

◆ channelNumberBKLM() [2/2]

uint16_t 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 50 of file KLMElementNumbers.cc.

◆ channelNumberEKLM() [1/2]

uint16_t channelNumberEKLM ( int  eklmStrip) const

Get channel number for EKLM.

Parameters
[in]eklmStripEKLM strip number.

Definition at line 77 of file KLMElementNumbers.cc.

◆ channelNumberEKLM() [2/2]

uint16_t 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 64 of file KLMElementNumbers.cc.

◆ channelNumberToElementNumbers()

void channelNumberToElementNumbers ( uint16_t  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 106 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 236 of file KLMElementNumbers.cc.

◆ getMinimalPlaneNumber()

int getMinimalPlaneNumber ( int  subdetector) const

Get minimal plane number.

Parameters
[in]subdetectorSubdetector.

Definition at line 244 of file KLMElementNumbers.cc.

◆ getNChannelsModule()

unsigned int getNChannelsModule ( uint16_t  module) const

Get number of channels in module.

Parameters
[in]moduleKLM module number.

Definition at line 208 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 252 of file KLMElementNumbers.cc.

◆ isBKLMChannel()

bool isBKLMChannel ( uint16_t  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 82 of file KLMElementNumbers.cc.

◆ isEKLMChannel()

bool isEKLMChannel ( uint16_t  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 87 of file KLMElementNumbers.cc.

◆ localChannelNumberBKLM()

int localChannelNumberBKLM ( uint16_t  channel) const

Get local BKLM channel number.

This function also works for modules amd sectors.

Parameters
[in]channelKLM channel number.

Definition at line 92 of file KLMElementNumbers.cc.

◆ localChannelNumberEKLM()

int localChannelNumberEKLM ( uint16_t  channel) const

Get local EKLM channel number.

This function also works for modules amd sectors.

Parameters
[in]channelKLM channel number.

Definition at line 99 of file KLMElementNumbers.cc.

◆ moduleNumber()

uint16_t 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 149 of file KLMElementNumbers.cc.

◆ moduleNumberBKLM()

uint16_t 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 158 of file KLMElementNumbers.cc.

◆ moduleNumberByChannel()

uint16_t moduleNumberByChannel ( uint16_t  channel) const

Get module number by channel number.

Parameters
[in]channelChannel.

Definition at line 178 of file KLMElementNumbers.cc.

◆ moduleNumberEKLM()

uint16_t 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 166 of file KLMElementNumbers.cc.

◆ moduleNumberToElementNumbers()

void moduleNumberToElementNumbers ( uint16_t  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 186 of file KLMElementNumbers.cc.

◆ planeNumberBKLM()

uint16_t 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 128 of file KLMElementNumbers.cc.

◆ planeNumberEKLM()

uint16_t 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 136 of file KLMElementNumbers.cc.

◆ sectorNumberBKLM()

uint16_t 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 222 of file KLMElementNumbers.cc.

◆ sectorNumberEKLM()

uint16_t sectorNumberEKLM ( int  section,
int  sector 
) const

Get sector number for EKLM.

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

Definition at line 229 of file KLMElementNumbers.cc.


The documentation for this class was generated from the following files:
Belle2::KLMElementNumbers::c_EKLM
@ c_EKLM
EKLM.
Definition: KLMElementNumbers.h:50
Belle2::KLMElementNumbers::channelNumberBKLM
uint16_t channelNumberBKLM(int section, int sector, int layer, int plane, int strip) const
Get channel number for BKLM.
Definition: KLMElementNumbers.cc:50
Belle2::KLMElementNumbers::c_BKLM
@ c_BKLM
BKLM.
Definition: KLMElementNumbers.h:47
Belle2::KLMElementNumbers::channelNumberEKLM
uint16_t channelNumberEKLM(int section, int sector, int layer, int plane, int strip) const
Get channel number for EKLM.
Definition: KLMElementNumbers.cc:64