CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ElectronicsIdGPU.h
Go to the documentation of this file.
1 #ifndef EventFilter_EcalRawToDigi_interface_ElectronicsIdGPU_h
2 #define EventFilter_EcalRawToDigi_interface_ElectronicsIdGPU_h
3 
4 #include <cstdint>
5 
7 
8 namespace ecal {
9  namespace raw {
10 
21  public:
23  constexpr ElectronicsIdGPU() : id_{0xFFFFFFFFu} {}
25  constexpr ElectronicsIdGPU(uint32_t id) : id_{id} {}
27  constexpr ElectronicsIdGPU(uint8_t const dccid, uint8_t const towerid, uint8_t const stripid, uint8_t const xtalid)
28  : id_{static_cast<uint32_t>((xtalid & 0x7) | ((stripid & 0x7) << 3) | ((towerid & 0x7F) << 6) |
29  ((dccid & 0x7F) << 13))} {}
30 
31  constexpr uint32_t operator()() { return id_; }
32  constexpr uint32_t rawId() const { return id_; }
33 
35  constexpr uint8_t dccId() const { return (id_ >> 13) & 0x7F; }
37  constexpr uint8_t towerId() const { return (id_ >> 6) & 0x7F; }
39  constexpr uint8_t stripId() const { return (id_ >> 3) & 0x7; }
41  constexpr uint8_t xtalId() const { return (id_ & 0x7); }
42 
44  //EcalSubdetector subdet() const;
45 
47  constexpr uint32_t linearIndex() const { return id_ & 0x3FFFFF; }
48 
50  //int channelId() const; // xtal id between 1 and 25
51 
52  static constexpr int kTowersInPhi = 4; // see EBDetId
53  static constexpr int kCrystalsInPhi = 20; // see EBDetId
54 
55  static constexpr uint8_t MAX_DCCID = 54; //To be updated with correct and final number
56  static constexpr uint8_t MIN_DCCID = 1;
57  static constexpr uint8_t MAX_TOWERID = 70;
58  static constexpr uint8_t MIN_TOWERID = 1;
59  static constexpr uint8_t MAX_STRIPID = 5;
60  static constexpr uint8_t MIN_STRIPID = 1;
61  static constexpr uint8_t MAX_CHANNELID = 25;
62  static constexpr uint8_t MIN_CHANNELID = 1;
63  static constexpr uint8_t MAX_XTALID = 5;
64  static constexpr uint8_t MIN_XTALID = 1;
65 
66  static constexpr int MIN_DCCID_EEM = 1;
67  static constexpr int MAX_DCCID_EEM = 9;
68  static constexpr int MIN_DCCID_EBM = 10;
69  static constexpr int MAX_DCCID_EBM = 27;
70  static constexpr int MIN_DCCID_EBP = 28;
71  static constexpr int MAX_DCCID_EBP = 45;
72  static constexpr int MIN_DCCID_EEP = 46;
73  static constexpr int MAX_DCCID_EEP = 54;
74 
75  static constexpr int DCCID_PHI0_EBM = 10;
76  static constexpr int DCCID_PHI0_EBP = 28;
77 
78  static constexpr int kDCCChannelBoundary = 17;
79  static constexpr int DCC_EBM = 10; // id of the DCC in EB- which contains phi=0 deg.
80  static constexpr int DCC_EBP = 28; // id of the DCC in EB+ which contains phi=0 deg.
81  static constexpr int DCC_EEM = 1; // id of the DCC in EE- which contains phi=0 deg.
82  static constexpr int DCC_EEP = 46; // id of the DCC in EE+ which contains phi=0 deg.
83 
84  private:
85  uint32_t id_;
86  };
87 
88  } // namespace raw
89 } // namespace ecal
90 
91 #endif // EventFilter_EcalRawToDigi_interface_ElectronicsIdGPU_h
constexpr uint8_t towerId() const
get the tower id
static constexpr int MAX_DCCID_EBM
static constexpr int MAX_DCCID_EEM
constexpr ElectronicsIdGPU(uint32_t id)
static constexpr uint8_t MIN_TOWERID
static constexpr uint8_t MIN_STRIPID
constexpr uint32_t operator()()
static constexpr uint8_t MAX_DCCID
constexpr uint32_t linearIndex() const
get the subdet
static constexpr int DCC_EEM
static constexpr int MIN_DCCID_EEM
constexpr ElectronicsIdGPU(uint8_t const dccid, uint8_t const towerid, uint8_t const stripid, uint8_t const xtalid)
static constexpr int MIN_DCCID_EBP
constexpr uint8_t xtalId() const
get the channel id
static constexpr int MAX_DCCID_EBP
static constexpr int MIN_DCCID_EBM
static constexpr uint8_t MAX_CHANNELID
static constexpr uint8_t MIN_XTALID
static constexpr uint8_t MIN_DCCID
constexpr uint8_t dccId() const
get the DCC (Ecal Local DCC value not global one) id
static constexpr uint8_t MIN_CHANNELID
static constexpr uint8_t MAX_XTALID
static constexpr int kDCCChannelBoundary
static constexpr uint8_t MAX_TOWERID
static constexpr int DCC_EBM
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
static constexpr int DCCID_PHI0_EBM
constexpr uint8_t stripId() const
get the tower id
static constexpr int kTowersInPhi
so far for EndCap only :
static constexpr int DCC_EBP
static constexpr int MIN_DCCID_EEP
constexpr uint32_t rawId() const
static constexpr int MAX_DCCID_EEP
static constexpr uint8_t MAX_STRIPID
static constexpr int DCCID_PHI0_EBP
static constexpr int kCrystalsInPhi
static constexpr int DCC_EEP