CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <stdint.h>
6 
8 
9 
21 
22  public:
23 
27  EcalElectronicsId(uint32_t);
29  EcalElectronicsId(int dccid, int towerid, int stripid, int xtalid);
30 
31  uint32_t operator()() { return EcalElectronicsId_; }
32  uint32_t rawId() const { return EcalElectronicsId_; }
33 
35  int dccId() const { return (EcalElectronicsId_>>13)&0x7F; }
37  int towerId() const { return (EcalElectronicsId_>>6)&0x7F; }
39  int stripId() const { return (EcalElectronicsId_>>3)&0x7; }
41  int xtalId() const { return (EcalElectronicsId_&0x7); }
42 
44  int zside() const;
45 
47  EcalSubdetector subdet() const;
48 
50  int linearIndex() const { return (EcalElectronicsId_)&0x3FFFFF; }
51 
53  int channelId() const; // xtal id between 1 and 25
54 
55  static const int MAX_DCCID = 54; //To be updated with correct and final number
56  static const int MIN_DCCID = 1;
57  static const int MAX_TOWERID = 70;
58  static const int MIN_TOWERID = 1;
59  static const int MAX_STRIPID = 5;
60  static const int MIN_STRIPID = 1;
61  static const int MAX_CHANNELID = 25;
62  static const int MIN_CHANNELID = 1;
63  static const int MAX_XTALID = 5;
64  static const int MIN_XTALID = 1;
65 
66  static const int MIN_DCCID_EEM = 1;
67  static const int MAX_DCCID_EEM = 9;
68  static const int MIN_DCCID_EBM = 10;
69  static const int MAX_DCCID_EBM = 27;
70  static const int MIN_DCCID_EBP = 28;
71  static const int MAX_DCCID_EBP = 45;
72  static const int MIN_DCCID_EEP = 46;
73  static const int MAX_DCCID_EEP = 54;
74 
75  static const int DCCID_PHI0_EBM = 10;
76  static const int DCCID_PHI0_EBP = 28;
77 
78  static const int kDCCChannelBoundary = 17;
79  static const int DCC_EBM = 10; // id of the DCC in EB- which contains phi=0 deg.
80  static const int DCC_EBP = 28; // id of the DCC in EB+ which contains phi=0 deg.
81  static const int DCC_EEM = 1; // id of the DCC in EE- which contains phi=0 deg.
82  static const int DCC_EEP = 46; // id of the DCC in EE+ which contains phi=0 deg.
83 
84 
86  int operator==(const EcalElectronicsId& id) const { return id.EcalElectronicsId_==EcalElectronicsId_; }
88  int operator!=(const EcalElectronicsId& id) const { return id.EcalElectronicsId_!=EcalElectronicsId_; }
90  int operator<(const EcalElectronicsId& id) const { return EcalElectronicsId_<id.EcalElectronicsId_; }
91 
92  private:
93 
95 };
96 
97 std::ostream& operator<<(std::ostream&,const EcalElectronicsId&);
98 
99 
100 #endif
static const int MAX_DCCID_EBM
static const int MAX_XTALID
int xtalId() const
get the channel id
static const int MIN_TOWERID
int stripId() const
get the tower id
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 operator!=(const EcalElectronicsId &id) const
static const int MIN_STRIPID
static const int MIN_DCCID
static const int MIN_XTALID
int towerId() const
get the tower id
int linearIndex() const
get a fast, compact, unique index for linear lookups (maximum value = 4194303)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
static const int MAX_DCCID_EBP
static const int MAX_DCCID
static const int MIN_DCCID_EBM
static const int DCC_EEP
static const int MAX_TOWERID
static const int DCCID_PHI0_EBM
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
static const int MAX_DCCID_EEM
EcalSubdetector subdet() const
get the subdet
uint32_t rawId() const
int zside() const
zside = +1 or -1
static const int DCC_EEM
int operator==(const EcalElectronicsId &id) const
static const int MAX_STRIPID
static const int MIN_DCCID_EBP
static const int MAX_DCCID_EEP
static const int kDCCChannelBoundary
int operator<(const EcalElectronicsId &id) const
Compare the id to another id for use in a map.
static const int MAX_CHANNELID
static const int DCCID_PHI0_EBP
static const int DCC_EBP
static const int DCC_EBM
EcalSubdetector
static const int MIN_DCCID_EEM
int channelId() const
so far for EndCap only :
static const int MIN_DCCID_EEP