CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
ecal::raw::ElectronicsIdGPU Class Reference

Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [2:0] xtal Index starts from 1. More...

#include <ElectronicsIdGPU.h>

Public Member Functions

constexpr uint8_t dccId () const
 get the DCC (Ecal Local DCC value not global one) id More...
 
constexpr ElectronicsIdGPU ()
 
constexpr ElectronicsIdGPU (uint32_t id)
 
constexpr ElectronicsIdGPU (uint8_t const dccid, uint8_t const towerid, uint8_t const stripid, uint8_t const xtalid)
 
constexpr uint32_t linearIndex () const
 get the subdet More...
 
constexpr uint32_t operator() ()
 
constexpr uint32_t rawId () const
 
constexpr uint8_t stripId () const
 get the tower id More...
 
constexpr uint8_t towerId () const
 get the tower id More...
 
constexpr uint8_t xtalId () const
 get the channel id More...
 

Static Public Attributes

static constexpr int DCC_EBM = 10
 
static constexpr int DCC_EBP = 28
 
static constexpr int DCC_EEM = 1
 
static constexpr int DCC_EEP = 46
 
static constexpr int DCCID_PHI0_EBM = 10
 
static constexpr int DCCID_PHI0_EBP = 28
 
static constexpr int kCrystalsInPhi = 20
 
static constexpr int kDCCChannelBoundary = 17
 
static constexpr int kTowersInPhi = 4
 so far for EndCap only : More...
 
static constexpr uint8_t MAX_CHANNELID = 25
 
static constexpr uint8_t MAX_DCCID = 54
 
static constexpr int MAX_DCCID_EBM = 27
 
static constexpr int MAX_DCCID_EBP = 45
 
static constexpr int MAX_DCCID_EEM = 9
 
static constexpr int MAX_DCCID_EEP = 54
 
static constexpr uint8_t MAX_STRIPID = 5
 
static constexpr uint8_t MAX_TOWERID = 70
 
static constexpr uint8_t MAX_XTALID = 5
 
static constexpr uint8_t MIN_CHANNELID = 1
 
static constexpr uint8_t MIN_DCCID = 1
 
static constexpr int MIN_DCCID_EBM = 10
 
static constexpr int MIN_DCCID_EBP = 28
 
static constexpr int MIN_DCCID_EEM = 1
 
static constexpr int MIN_DCCID_EEP = 46
 
static constexpr uint8_t MIN_STRIPID = 1
 
static constexpr uint8_t MIN_TOWERID = 1
 
static constexpr uint8_t MIN_XTALID = 1
 

Private Attributes

uint32_t id_
 

Detailed Description

Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [2:0] xtal Index starts from 1.

Definition at line 20 of file ElectronicsIdGPU.h.

Constructor & Destructor Documentation

◆ ElectronicsIdGPU() [1/3]

constexpr ecal::raw::ElectronicsIdGPU::ElectronicsIdGPU ( )
inlineconstexpr

Default constructor – invalid value

Definition at line 23 of file ElectronicsIdGPU.h.

23 : id_{0xFFFFFFFFu} {}

◆ ElectronicsIdGPU() [2/3]

constexpr ecal::raw::ElectronicsIdGPU::ElectronicsIdGPU ( uint32_t  id)
inlineconstexpr

from raw

Definition at line 25 of file ElectronicsIdGPU.h.

25 : id_{id} {}

◆ ElectronicsIdGPU() [3/3]

constexpr ecal::raw::ElectronicsIdGPU::ElectronicsIdGPU ( uint8_t const  dccid,
uint8_t const  towerid,
uint8_t const  stripid,
uint8_t const  xtalid 
)
inlineconstexpr

Constructor from dcc,tower,channel

Definition at line 27 of file ElectronicsIdGPU.h.

28  : id_{static_cast<uint32_t>((xtalid & 0x7) | ((stripid & 0x7) << 3) | ((towerid & 0x7F) << 6) |
29  ((dccid & 0x7F) << 13))} {}

Member Function Documentation

◆ dccId()

constexpr uint8_t ecal::raw::ElectronicsIdGPU::dccId ( ) const
inlineconstexpr

get the DCC (Ecal Local DCC value not global one) id

Definition at line 35 of file ElectronicsIdGPU.h.

35 { return (id_ >> 13) & 0x7F; }

References id_.

◆ linearIndex()

constexpr uint32_t ecal::raw::ElectronicsIdGPU::linearIndex ( ) const
inlineconstexpr

get the subdet

get a fast, compact, unique index for linear lookups (maximum value = 4194303)

Definition at line 47 of file ElectronicsIdGPU.h.

47 { return id_ & 0x3FFFFF; }

References id_.

◆ operator()()

constexpr uint32_t ecal::raw::ElectronicsIdGPU::operator() ( )
inlineconstexpr

Definition at line 31 of file ElectronicsIdGPU.h.

31 { return id_; }

References id_.

◆ rawId()

constexpr uint32_t ecal::raw::ElectronicsIdGPU::rawId ( ) const
inlineconstexpr

Definition at line 32 of file ElectronicsIdGPU.h.

32 { return id_; }

References id_.

◆ stripId()

constexpr uint8_t ecal::raw::ElectronicsIdGPU::stripId ( ) const
inlineconstexpr

get the tower id

Definition at line 39 of file ElectronicsIdGPU.h.

39 { return (id_ >> 3) & 0x7; }

References id_.

◆ towerId()

constexpr uint8_t ecal::raw::ElectronicsIdGPU::towerId ( ) const
inlineconstexpr

get the tower id

Definition at line 37 of file ElectronicsIdGPU.h.

37 { return (id_ >> 6) & 0x7F; }

References id_.

◆ xtalId()

constexpr uint8_t ecal::raw::ElectronicsIdGPU::xtalId ( ) const
inlineconstexpr

get the channel id

Definition at line 41 of file ElectronicsIdGPU.h.

41 { return (id_ & 0x7); }

References id_.

Member Data Documentation

◆ DCC_EBM

constexpr int ecal::raw::ElectronicsIdGPU::DCC_EBM = 10
staticconstexpr

Definition at line 79 of file ElectronicsIdGPU.h.

◆ DCC_EBP

constexpr int ecal::raw::ElectronicsIdGPU::DCC_EBP = 28
staticconstexpr

Definition at line 80 of file ElectronicsIdGPU.h.

◆ DCC_EEM

constexpr int ecal::raw::ElectronicsIdGPU::DCC_EEM = 1
staticconstexpr

Definition at line 81 of file ElectronicsIdGPU.h.

◆ DCC_EEP

constexpr int ecal::raw::ElectronicsIdGPU::DCC_EEP = 46
staticconstexpr

Definition at line 82 of file ElectronicsIdGPU.h.

◆ DCCID_PHI0_EBM

constexpr int ecal::raw::ElectronicsIdGPU::DCCID_PHI0_EBM = 10
staticconstexpr

Definition at line 75 of file ElectronicsIdGPU.h.

◆ DCCID_PHI0_EBP

constexpr int ecal::raw::ElectronicsIdGPU::DCCID_PHI0_EBP = 28
staticconstexpr

Definition at line 76 of file ElectronicsIdGPU.h.

◆ id_

uint32_t ecal::raw::ElectronicsIdGPU::id_
private

Definition at line 85 of file ElectronicsIdGPU.h.

Referenced by dccId(), linearIndex(), operator()(), rawId(), stripId(), towerId(), and xtalId().

◆ kCrystalsInPhi

constexpr int ecal::raw::ElectronicsIdGPU::kCrystalsInPhi = 20
staticconstexpr

Definition at line 53 of file ElectronicsIdGPU.h.

◆ kDCCChannelBoundary

constexpr int ecal::raw::ElectronicsIdGPU::kDCCChannelBoundary = 17
staticconstexpr

Definition at line 78 of file ElectronicsIdGPU.h.

◆ kTowersInPhi

constexpr int ecal::raw::ElectronicsIdGPU::kTowersInPhi = 4
staticconstexpr

so far for EndCap only :

Definition at line 52 of file ElectronicsIdGPU.h.

◆ MAX_CHANNELID

constexpr uint8_t ecal::raw::ElectronicsIdGPU::MAX_CHANNELID = 25
staticconstexpr

Definition at line 61 of file ElectronicsIdGPU.h.

◆ MAX_DCCID

constexpr uint8_t ecal::raw::ElectronicsIdGPU::MAX_DCCID = 54
staticconstexpr

Definition at line 55 of file ElectronicsIdGPU.h.

◆ MAX_DCCID_EBM

constexpr int ecal::raw::ElectronicsIdGPU::MAX_DCCID_EBM = 27
staticconstexpr

Definition at line 69 of file ElectronicsIdGPU.h.

◆ MAX_DCCID_EBP

constexpr int ecal::raw::ElectronicsIdGPU::MAX_DCCID_EBP = 45
staticconstexpr

Definition at line 71 of file ElectronicsIdGPU.h.

◆ MAX_DCCID_EEM

constexpr int ecal::raw::ElectronicsIdGPU::MAX_DCCID_EEM = 9
staticconstexpr

Definition at line 67 of file ElectronicsIdGPU.h.

◆ MAX_DCCID_EEP

constexpr int ecal::raw::ElectronicsIdGPU::MAX_DCCID_EEP = 54
staticconstexpr

Definition at line 73 of file ElectronicsIdGPU.h.

◆ MAX_STRIPID

constexpr uint8_t ecal::raw::ElectronicsIdGPU::MAX_STRIPID = 5
staticconstexpr

Definition at line 59 of file ElectronicsIdGPU.h.

◆ MAX_TOWERID

constexpr uint8_t ecal::raw::ElectronicsIdGPU::MAX_TOWERID = 70
staticconstexpr

Definition at line 57 of file ElectronicsIdGPU.h.

◆ MAX_XTALID

constexpr uint8_t ecal::raw::ElectronicsIdGPU::MAX_XTALID = 5
staticconstexpr

Definition at line 63 of file ElectronicsIdGPU.h.

◆ MIN_CHANNELID

constexpr uint8_t ecal::raw::ElectronicsIdGPU::MIN_CHANNELID = 1
staticconstexpr

Definition at line 62 of file ElectronicsIdGPU.h.

◆ MIN_DCCID

constexpr uint8_t ecal::raw::ElectronicsIdGPU::MIN_DCCID = 1
staticconstexpr

Definition at line 56 of file ElectronicsIdGPU.h.

◆ MIN_DCCID_EBM

constexpr int ecal::raw::ElectronicsIdGPU::MIN_DCCID_EBM = 10
staticconstexpr

Definition at line 68 of file ElectronicsIdGPU.h.

◆ MIN_DCCID_EBP

constexpr int ecal::raw::ElectronicsIdGPU::MIN_DCCID_EBP = 28
staticconstexpr

Definition at line 70 of file ElectronicsIdGPU.h.

◆ MIN_DCCID_EEM

constexpr int ecal::raw::ElectronicsIdGPU::MIN_DCCID_EEM = 1
staticconstexpr

Definition at line 66 of file ElectronicsIdGPU.h.

◆ MIN_DCCID_EEP

constexpr int ecal::raw::ElectronicsIdGPU::MIN_DCCID_EEP = 46
staticconstexpr

Definition at line 72 of file ElectronicsIdGPU.h.

◆ MIN_STRIPID

constexpr uint8_t ecal::raw::ElectronicsIdGPU::MIN_STRIPID = 1
staticconstexpr

Definition at line 60 of file ElectronicsIdGPU.h.

◆ MIN_TOWERID

constexpr uint8_t ecal::raw::ElectronicsIdGPU::MIN_TOWERID = 1
staticconstexpr

Definition at line 58 of file ElectronicsIdGPU.h.

◆ MIN_XTALID

constexpr uint8_t ecal::raw::ElectronicsIdGPU::MIN_XTALID = 1
staticconstexpr

Definition at line 64 of file ElectronicsIdGPU.h.

ecal::raw::ElectronicsIdGPU::id_
uint32_t id_
Definition: ElectronicsIdGPU.h:85