CMS 3D CMS Logo

EcalElectronicsId.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_ECALDETID_ECALELECTRONICSID_H
2 #define DATAFORMATS_ECALDETID_ECALELECTRONICSID_H 1
3 
4 #include <ostream>
5 #include <cstdint>
6 
8 
19 public:
23  EcalElectronicsId(uint32_t);
25  EcalElectronicsId(int dccid, int towerid, int stripid, int xtalid);
26 
27  uint32_t operator()() { return EcalElectronicsId_; }
28  uint32_t rawId() const { return EcalElectronicsId_; }
29 
31  int dccId() const { return (EcalElectronicsId_ >> 13) & 0x7F; }
33  int towerId() const { return (EcalElectronicsId_ >> 6) & 0x7F; }
35  int stripId() const { return (EcalElectronicsId_ >> 3) & 0x7; }
37  int xtalId() const { return (EcalElectronicsId_ & 0x7); }
38 
40  int zside() const;
41 
43  EcalSubdetector subdet() const;
44 
46  int linearIndex() const { return (EcalElectronicsId_)&0x3FFFFF; }
47 
49  int channelId() const; // xtal id between 1 and 25
50 
51  static const int MAX_DCCID = 54; //To be updated with correct and final number
52  static const int MIN_DCCID = 1;
53  static const int MAX_TOWERID = 70;
54  static const int MIN_TOWERID = 1;
55  static const int MAX_STRIPID = 5;
56  static const int MIN_STRIPID = 1;
57  static const int MAX_CHANNELID = 25;
58  static const int MIN_CHANNELID = 1;
59  static const int MAX_XTALID = 5;
60  static const int MIN_XTALID = 1;
61 
62  static const int MIN_DCCID_EEM = 1;
63  static const int MAX_DCCID_EEM = 9;
64  static const int MIN_DCCID_EBM = 10;
65  static const int MAX_DCCID_EBM = 27;
66  static const int MIN_DCCID_EBP = 28;
67  static const int MAX_DCCID_EBP = 45;
68  static const int MIN_DCCID_EEP = 46;
69  static const int MAX_DCCID_EEP = 54;
70 
71  static const int DCCID_PHI0_EBM = 10;
72  static const int DCCID_PHI0_EBP = 28;
73 
74  static const int kDCCChannelBoundary = 17;
75  static const int DCC_EBM = 10; // id of the DCC in EB- which contains phi=0 deg.
76  static const int DCC_EBP = 28; // id of the DCC in EB+ which contains phi=0 deg.
77  static const int DCC_EEM = 1; // id of the DCC in EE- which contains phi=0 deg.
78  static const int DCC_EEP = 46; // id of the DCC in EE+ which contains phi=0 deg.
79 
81  int operator==(const EcalElectronicsId& id) const { return id.EcalElectronicsId_ == EcalElectronicsId_; }
83  int operator!=(const EcalElectronicsId& id) const { return id.EcalElectronicsId_ != EcalElectronicsId_; }
85  int operator<(const EcalElectronicsId& id) const { return EcalElectronicsId_ < id.EcalElectronicsId_; }
86 
87 private:
89 };
90 
91 std::ostream& operator<<(std::ostream&, const EcalElectronicsId&);
92 
93 #endif
static const int MAX_DCCID_EBM
static const int MAX_XTALID
int zside() const
zside = +1 or -1
std::ostream & operator<<(std::ostream &, const EcalElectronicsId &)
static const int MIN_TOWERID
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
static const int MIN_CHANNELID
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
static const int MIN_STRIPID
static const int MIN_DCCID
static const int MIN_XTALID
int operator<(const EcalElectronicsId &id) const
Compare the id to another id for use in a map.
static const int MAX_DCCID_EBP
int towerId() const
get the tower id
static const int MAX_DCCID
static const int MIN_DCCID_EBM
int channelId() const
so far for EndCap only :
static const int DCC_EEP
static const int MAX_TOWERID
static const int DCCID_PHI0_EBM
static const int MAX_DCCID_EEM
EcalSubdetector subdet() const
get the subdet
static const int DCC_EEM
uint32_t rawId() const
static const int MAX_STRIPID
int stripId() const
get the tower id
int linearIndex() const
get a fast, compact, unique index for linear lookups (maximum value = 4194303)
int xtalId() const
get the channel id
static const int MIN_DCCID_EBP
static const int MAX_DCCID_EEP
static const int kDCCChannelBoundary
int operator==(const EcalElectronicsId &id) const
static const int MAX_CHANNELID
static const int DCCID_PHI0_EBP
static const int DCC_EBP
int operator!=(const EcalElectronicsId &id) const
static const int DCC_EBM
EcalSubdetector
static const int MIN_DCCID_EEM
static const int MIN_DCCID_EEP