CMS 3D CMS Logo

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
EcalTriggerElectronicsId::MIN_TCCID_EEM
static const int MIN_TCCID_EEM
Definition: EcalTriggerElectronicsId.h:56
EcalTriggerElectronicsId::operator==
int operator==(const EcalTriggerElectronicsId &id) const
Definition: EcalTriggerElectronicsId.h:73
EcalTriggerElectronicsId
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
Definition: EcalTriggerElectronicsId.h:18
EcalTriggerElectronicsId::MAX_TCCID_EBP
static const int MAX_TCCID_EBP
Definition: EcalTriggerElectronicsId.h:61
EcalTriggerElectronicsId::tccId
int tccId() const
get the DCC (Ecal Local DCC value not global one) id
Definition: EcalTriggerElectronicsId.h:31
EcalTriggerElectronicsId::EcalTriggerElectronicsId_
uint32_t EcalTriggerElectronicsId_
Definition: EcalTriggerElectronicsId.h:86
EcalTriggerElectronicsId::TCCID_PHI0_EEP_IN
static const int TCCID_PHI0_EEP_IN
Definition: EcalTriggerElectronicsId.h:67
EcalTriggerElectronicsId::operator()
uint32_t operator()()
Definition: EcalTriggerElectronicsId.h:27
EcalTriggerElectronicsId::MIN_TCCID_EBP
static const int MIN_TCCID_EBP
Definition: EcalTriggerElectronicsId.h:60
EcalTriggerElectronicsId::EcalTriggerElectronicsId
EcalTriggerElectronicsId()
Definition: EcalTriggerElectronicsId.cc:6
EcalSubdetector
EcalSubdetector
Definition: EcalSubdetector.h:10
EcalTriggerElectronicsId::TCCID_PHI0_EEM_IN
static const int TCCID_PHI0_EEM_IN
Definition: EcalTriggerElectronicsId.h:65
EcalTriggerElectronicsId::MAX_CHANNELID
static const int MAX_CHANNELID
Definition: EcalTriggerElectronicsId.h:53
EcalTriggerElectronicsId::ttId
int ttId() const
get the tower id
Definition: EcalTriggerElectronicsId.h:33
EcalTriggerElectronicsId::MIN_TCCID_EEP
static const int MIN_TCCID_EEP
Definition: EcalTriggerElectronicsId.h:62
operator<<
std::ostream & operator<<(std::ostream &, const EcalTriggerElectronicsId &)
Definition: EcalTriggerElectronicsId.cc:40
EcalTriggerElectronicsId::MAX_TCCID
static const int MAX_TCCID
Definition: EcalTriggerElectronicsId.h:47
EcalTriggerElectronicsId::MIN_CHANNELID
static const int MIN_CHANNELID
Definition: EcalTriggerElectronicsId.h:54
EcalTriggerElectronicsId::MAX_TCCID_EBM
static const int MAX_TCCID_EBM
Definition: EcalTriggerElectronicsId.h:59
EcalTriggerElectronicsId::zside
int zside() const
get the zside() +1 / -1
Definition: EcalTriggerElectronicsId.cc:19
EcalTriggerElectronicsId::operator<
int operator<(const EcalTriggerElectronicsId &id) const
Compare the id to another id for use in a map.
Definition: EcalTriggerElectronicsId.h:81
EcalSubdetector.h
EcalTriggerElectronicsId::MIN_TCCID_EBM
static const int MIN_TCCID_EBM
Definition: EcalTriggerElectronicsId.h:58
EcalTriggerElectronicsId::pseudoStripId
int pseudoStripId() const
get the tower id
Definition: EcalTriggerElectronicsId.h:35
EcalTriggerElectronicsId::MIN_TCCID
static const int MIN_TCCID
Definition: EcalTriggerElectronicsId.h:48
EcalTriggerElectronicsId::subdet
EcalSubdetector subdet() const
get the subdet
Definition: EcalTriggerElectronicsId.cc:32
EcalTriggerElectronicsId::channelId
int channelId() const
get the channel id
Definition: EcalTriggerElectronicsId.h:37
EcalTriggerElectronicsId::operator!=
int operator!=(const EcalTriggerElectronicsId &id) const
Definition: EcalTriggerElectronicsId.h:77
EcalTriggerElectronicsId::MAX_TTID
static const int MAX_TTID
Definition: EcalTriggerElectronicsId.h:49
EcalTriggerElectronicsId::MIN_TTID
static const int MIN_TTID
Definition: EcalTriggerElectronicsId.h:50
EcalTriggerElectronicsId::MAX_PSEUDOSTRIPID
static const int MAX_PSEUDOSTRIPID
Definition: EcalTriggerElectronicsId.h:51
EcalTriggerElectronicsId::MIN_PSEUDOSTRIPID
static const int MIN_PSEUDOSTRIPID
Definition: EcalTriggerElectronicsId.h:52
EcalTriggerElectronicsId::MAX_TCCID_EEM
static const int MAX_TCCID_EEM
Definition: EcalTriggerElectronicsId.h:57
EcalTriggerElectronicsId::TCCID_PHI0_EBM
static const int TCCID_PHI0_EBM
Definition: EcalTriggerElectronicsId.h:69
EcalTriggerElectronicsId::TCCID_PHI0_EEM_OUT
static const int TCCID_PHI0_EEM_OUT
Definition: EcalTriggerElectronicsId.h:66
EcalTriggerElectronicsId::linearIndex
int linearIndex() const
get a fast, compact, unique index for linear lookups (maximum value = 1048575)
Definition: EcalTriggerElectronicsId.h:39
EcalTriggerElectronicsId::MAX_TCCID_EEP
static const int MAX_TCCID_EEP
Definition: EcalTriggerElectronicsId.h:63
EcalTriggerElectronicsId::rawId
uint32_t rawId() const
Definition: EcalTriggerElectronicsId.h:28
EcalTriggerElectronicsId::TCCID_PHI0_EEP_OUT
static const int TCCID_PHI0_EEP_OUT
Definition: EcalTriggerElectronicsId.h:68
EcalTriggerElectronicsId::TCCID_PHI0_EBP
static const int TCCID_PHI0_EBP
Definition: EcalTriggerElectronicsId.h:70