CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 <cstdint>
6 
8 
19 public:
23  EcalTriggerElectronicsId(uint32_t);
25  EcalTriggerElectronicsId(int tccid, int towerid, int pseudostripid, int channelid);
26 
27  uint32_t operator()() { return EcalTriggerElectronicsId_; }
28  uint32_t rawId() const { return EcalTriggerElectronicsId_; }
29 
31  int tccId() const { return (EcalTriggerElectronicsId_ >> 13) & 0x7F; }
33  int ttId() const { return (EcalTriggerElectronicsId_ >> 6) & 0x7F; }
35  int pseudoStripId() const { return (EcalTriggerElectronicsId_ >> 3) & 0x7; }
37  int channelId() const { return (EcalTriggerElectronicsId_ & 0x7); }
39  int linearIndex() const { return (EcalTriggerElectronicsId_)&0xFFFFF; }
40 
42  int zside() const;
43 
45  EcalSubdetector subdet() const;
46 
47  static const int MAX_TCCID = 108; //To be updated with correct and final number
48  static const int MIN_TCCID = 1;
49  static const int MAX_TTID = 68;
50  static const int MIN_TTID = 1;
51  static const int MAX_PSEUDOSTRIPID = 5;
52  static const int MIN_PSEUDOSTRIPID = 1;
53  static const int MAX_CHANNELID = 5;
54  static const int MIN_CHANNELID = 1;
55 
56  static const int MIN_TCCID_EEM = 1;
57  static const int MAX_TCCID_EEM = 36;
58  static const int MIN_TCCID_EBM = 37;
59  static const int MAX_TCCID_EBM = 54;
60  static const int MIN_TCCID_EBP = 55;
61  static const int MAX_TCCID_EBP = 72;
62  static const int MIN_TCCID_EEP = 73;
63  static const int MAX_TCCID_EEP = 108;
64 
65  static const int TCCID_PHI0_EEM_IN = 1; // id of the inner TCC in EE- which contains phi=0 deg.
66  static const int TCCID_PHI0_EEM_OUT = 19; // id of the outer TCC in EE- which contains phi=0 deg.
67  static const int TCCID_PHI0_EEP_IN = 91; // id of the inner TCC in EE+ which contains phi=0 deg.
68  static const int TCCID_PHI0_EEP_OUT = 73; // id of the outer TCC in EE+ which contains phi=0 deg.
69  static const int TCCID_PHI0_EBM = 37; // id of the TCC in EB- which contains phi=0 deg.
70  static const int TCCID_PHI0_EBP = 55; // id of the TCC in EB+ which contains phi=0 deg.
71 
73  int operator==(const EcalTriggerElectronicsId& id) const {
74  return id.EcalTriggerElectronicsId_ == EcalTriggerElectronicsId_;
75  }
77  int operator!=(const EcalTriggerElectronicsId& id) const {
78  return id.EcalTriggerElectronicsId_ != EcalTriggerElectronicsId_;
79  }
81  int operator<(const EcalTriggerElectronicsId& id) const {
82  return EcalTriggerElectronicsId_ < id.EcalTriggerElectronicsId_;
83  }
84 
85 private:
87 };
88 
89 std::ostream& operator<<(std::ostream&, const EcalTriggerElectronicsId&);
90 
91 #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:167
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