CMS 3D CMS Logo

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
ecal::raw::ElectronicsIdGPU::MIN_DCCID_EBP
static constexpr int MIN_DCCID_EBP
Definition: ElectronicsIdGPU.h:70
ecal::raw::ElectronicsIdGPU::MAX_DCCID_EBM
static constexpr int MAX_DCCID_EBM
Definition: ElectronicsIdGPU.h:69
ecal::raw::ElectronicsIdGPU::MIN_DCCID_EBM
static constexpr int MIN_DCCID_EBM
Definition: ElectronicsIdGPU.h:68
ecal::raw::ElectronicsIdGPU::kTowersInPhi
static constexpr int kTowersInPhi
so far for EndCap only :
Definition: ElectronicsIdGPU.h:52
ecal::raw::ElectronicsIdGPU::DCC_EBP
static constexpr int DCC_EBP
Definition: ElectronicsIdGPU.h:80
ecal::raw::ElectronicsIdGPU::MAX_DCCID
static constexpr uint8_t MAX_DCCID
Definition: ElectronicsIdGPU.h:55
ecal::raw::ElectronicsIdGPU::dccId
constexpr uint8_t dccId() const
get the DCC (Ecal Local DCC value not global one) id
Definition: ElectronicsIdGPU.h:35
ecal::raw::ElectronicsIdGPU
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
Definition: ElectronicsIdGPU.h:20
ecal
Definition: ElectronicsMappingGPU.h:13
ecal::raw::ElectronicsIdGPU::ElectronicsIdGPU
constexpr ElectronicsIdGPU(uint32_t id)
Definition: ElectronicsIdGPU.h:25
ecal::raw::ElectronicsIdGPU::MAX_TOWERID
static constexpr uint8_t MAX_TOWERID
Definition: ElectronicsIdGPU.h:57
ecal::raw::ElectronicsIdGPU::DCC_EBM
static constexpr int DCC_EBM
Definition: ElectronicsIdGPU.h:79
ecal::raw::ElectronicsIdGPU::stripId
constexpr uint8_t stripId() const
get the tower id
Definition: ElectronicsIdGPU.h:39
ecal::raw::ElectronicsIdGPU::MAX_CHANNELID
static constexpr uint8_t MAX_CHANNELID
Definition: ElectronicsIdGPU.h:61
ecal::raw::ElectronicsIdGPU::MIN_TOWERID
static constexpr uint8_t MIN_TOWERID
Definition: ElectronicsIdGPU.h:58
ecal::raw::ElectronicsIdGPU::MAX_STRIPID
static constexpr uint8_t MAX_STRIPID
Definition: ElectronicsIdGPU.h:59
ecal::raw::ElectronicsIdGPU::DCCID_PHI0_EBP
static constexpr int DCCID_PHI0_EBP
Definition: ElectronicsIdGPU.h:76
ecal::raw::ElectronicsIdGPU::MIN_DCCID_EEP
static constexpr int MIN_DCCID_EEP
Definition: ElectronicsIdGPU.h:72
EcalSubdetector.h
ecal::raw::ElectronicsIdGPU::linearIndex
constexpr uint32_t linearIndex() const
get the subdet
Definition: ElectronicsIdGPU.h:47
ecal::raw::ElectronicsIdGPU::operator()
constexpr uint32_t operator()()
Definition: ElectronicsIdGPU.h:31
ecal::raw::ElectronicsIdGPU::MIN_CHANNELID
static constexpr uint8_t MIN_CHANNELID
Definition: ElectronicsIdGPU.h:62
ecal::raw::ElectronicsIdGPU::MAX_DCCID_EEM
static constexpr int MAX_DCCID_EEM
Definition: ElectronicsIdGPU.h:67
ecal::raw::ElectronicsIdGPU::ElectronicsIdGPU
constexpr ElectronicsIdGPU()
Definition: ElectronicsIdGPU.h:23
ecal::raw::ElectronicsIdGPU::DCC_EEM
static constexpr int DCC_EEM
Definition: ElectronicsIdGPU.h:81
ecal::raw::ElectronicsIdGPU::MAX_DCCID_EBP
static constexpr int MAX_DCCID_EBP
Definition: ElectronicsIdGPU.h:71
ecal::raw::ElectronicsIdGPU::MIN_DCCID
static constexpr uint8_t MIN_DCCID
Definition: ElectronicsIdGPU.h:56
ecal::raw::ElectronicsIdGPU::towerId
constexpr uint8_t towerId() const
get the tower id
Definition: ElectronicsIdGPU.h:37
ecal::raw::ElectronicsIdGPU::MAX_XTALID
static constexpr uint8_t MAX_XTALID
Definition: ElectronicsIdGPU.h:63
ecal::raw::ElectronicsIdGPU::MAX_DCCID_EEP
static constexpr int MAX_DCCID_EEP
Definition: ElectronicsIdGPU.h:73
ecal::raw::ElectronicsIdGPU::xtalId
constexpr uint8_t xtalId() const
get the channel id
Definition: ElectronicsIdGPU.h:41
ecal::raw::ElectronicsIdGPU::kDCCChannelBoundary
static constexpr int kDCCChannelBoundary
Definition: ElectronicsIdGPU.h:78
ecal::raw::ElectronicsIdGPU::kCrystalsInPhi
static constexpr int kCrystalsInPhi
Definition: ElectronicsIdGPU.h:53
ecal::raw::ElectronicsIdGPU::DCCID_PHI0_EBM
static constexpr int DCCID_PHI0_EBM
Definition: ElectronicsIdGPU.h:75
ecal::raw::ElectronicsIdGPU::MIN_DCCID_EEM
static constexpr int MIN_DCCID_EEM
Definition: ElectronicsIdGPU.h:66
ecal::raw::ElectronicsIdGPU::id_
uint32_t id_
Definition: ElectronicsIdGPU.h:85
ecal::raw::ElectronicsIdGPU::rawId
constexpr uint32_t rawId() const
Definition: ElectronicsIdGPU.h:32
ecal::raw::ElectronicsIdGPU::DCC_EEP
static constexpr int DCC_EEP
Definition: ElectronicsIdGPU.h:82
ecal::raw::ElectronicsIdGPU::MIN_XTALID
static constexpr uint8_t MIN_XTALID
Definition: ElectronicsIdGPU.h:64
ecal::raw::ElectronicsIdGPU::MIN_STRIPID
static constexpr uint8_t MIN_STRIPID
Definition: ElectronicsIdGPU.h:60
ecal::raw::ElectronicsIdGPU::ElectronicsIdGPU
constexpr ElectronicsIdGPU(uint8_t const dccid, uint8_t const towerid, uint8_t const stripid, uint8_t const xtalid)
Definition: ElectronicsIdGPU.h:27