CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalTriggerElectronicsId.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_ECALDETID_ECALTRIGGERELECTRONICSID_H
2 #define DATAFORMATS_ECALDETID_ECALTRIGGERELECTRONICSID_H 1
3 
4 #include <ostream>
5 #include <stdint.h>
6 
8 
9 
21 
22  public:
23 
27  EcalTriggerElectronicsId(uint32_t);
29  EcalTriggerElectronicsId(int tccid, int towerid, int pseudostripid, int channelid);
30 
31  uint32_t operator()() { return EcalTriggerElectronicsId_; }
32  uint32_t rawId() const { return EcalTriggerElectronicsId_; }
33 
35  int tccId() const { return (EcalTriggerElectronicsId_>>13)&0x7F; }
37  int ttId() const { return (EcalTriggerElectronicsId_>>6)&0x7F; }
39  int pseudoStripId() const { return (EcalTriggerElectronicsId_>>3)&0x7; }
41  int channelId() const { return (EcalTriggerElectronicsId_&0x7); }
43  int linearIndex() const { return (EcalTriggerElectronicsId_)&0xFFFFF; }
44 
46  int zside() const;
47 
49  EcalSubdetector subdet() const;
50 
51  static const int MAX_TCCID = 108; //To be updated with correct and final number
52  static const int MIN_TCCID = 1;
53  static const int MAX_TTID = 68;
54  static const int MIN_TTID = 1;
55  static const int MAX_PSEUDOSTRIPID = 5;
56  static const int MIN_PSEUDOSTRIPID = 1;
57  static const int MAX_CHANNELID = 5;
58  static const int MIN_CHANNELID = 1;
59 
60  static const int MIN_TCCID_EEM = 1;
61  static const int MAX_TCCID_EEM = 36;
62  static const int MIN_TCCID_EBM = 37;
63  static const int MAX_TCCID_EBM = 54;
64  static const int MIN_TCCID_EBP = 55;
65  static const int MAX_TCCID_EBP = 72;
66  static const int MIN_TCCID_EEP = 73;
67  static const int MAX_TCCID_EEP = 108;
68 
69  static const int TCCID_PHI0_EEM_IN = 1; // id of the inner TCC in EE- which contains phi=0 deg.
70  static const int TCCID_PHI0_EEM_OUT = 19; // id of the outer TCC in EE- which contains phi=0 deg.
71  static const int TCCID_PHI0_EEP_IN = 91; // id of the inner TCC in EE+ which contains phi=0 deg.
72  static const int TCCID_PHI0_EEP_OUT = 73; // id of the outer TCC in EE+ which contains phi=0 deg.
73  static const int TCCID_PHI0_EBM = 37; // id of the TCC in EB- which contains phi=0 deg.
74  static const int TCCID_PHI0_EBP = 55; // id of the TCC in EB+ which contains phi=0 deg.
75 
76 
78  int operator==(const EcalTriggerElectronicsId& id) const { return id.EcalTriggerElectronicsId_==EcalTriggerElectronicsId_; }
80  int operator!=(const EcalTriggerElectronicsId& id) const { return id.EcalTriggerElectronicsId_!=EcalTriggerElectronicsId_; }
82  int operator<(const EcalTriggerElectronicsId& id) const { return EcalTriggerElectronicsId_<id.EcalTriggerElectronicsId_; }
83 
84  private:
85 
87 };
88 
89 std::ostream& operator<<(std::ostream&,const EcalTriggerElectronicsId&);
90 
91 
92 #endif
int tccId() const
get the DCC (Ecal Local DCC value not global one) id
int zside() const
get the zside() +1 / -1
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
int channelId() const
get the channel id
int ttId() const
get the tower id
int linearIndex() const
get a fast, compact, unique index for linear lookups (maximum value = 1048575)
int operator<(const EcalTriggerElectronicsId &id) const
Compare the id to another id for use in a map.
int pseudoStripId() const
get the tower id
int operator!=(const EcalTriggerElectronicsId &id) const
int operator==(const EcalTriggerElectronicsId &id) const
EcalSubdetector
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
EcalSubdetector subdet() const
get the subdet