CMS 3D CMS Logo

RPCTBMuon.h
Go to the documentation of this file.
1 #ifndef L1Trigger_RPCTBMuon_h
2 #define L1Trigger_RPCTBMuon_h
5 
6 //---------------------------------------------------------------------------
7 //output of the Pac (one LogCone),
8 //used in m_TBGhostBuster
9 //input and output of the m_TBGhostBuster
10 
17 class RPCTBMuon : public RPCMuon {
18 public:
20 
21 public:
23  RPCTBMuon();
24 
25  RPCTBMuon(int ptCode, int quality, int sign, int patternNum, unsigned short firedPlanes);
26 
27  RPCTBMuon(int ptCode, int quality, int sign, MuonBitsType muonBitsType);
28 
29  RPCTBMuon(const RPCPacMuon& pacMuon);
30 
31  int getCode() const;
32 
33  void setCode(int code);
34 
35  void setPhiAddr(int phiAddr);
36 
37  void setSectorAddr(int sectorAddr);
38 
39  void setEtaAddr(int etaAddr);
40 
41  void setAddress(int etaAddr, int phiAddr);
42 
43  void setAddress(int tbNumber, int tbTower, int phiAddr);
44 
45  void setGBData(unsigned int gbData);
46 
47  int getEtaAddr() const;
48 
49  int getPhiAddr() const;
50 
51  int getSegmentAddr() const;
52 
53  int getSectorAddr() const;
54 
55  int getContinSegmAddr() const;
56 
57  void setCodeAndPhiAddr(int code, int phiAddr);
58 
59  void setCodeAndEtaAddr(int code, int etaAddr);
60 
61  int getGBData() const;
62 
64 
65  std::string printDebugInfo(int debugFormat) const;
66 
67  std::string printExtDebugInfo(int, int, int) const;
68 
69  void setGBDataKilledFirst();
70 
71  void setGBDataKilledLast();
72 
73  bool gBDataKilledFirst() const;
74 
75  bool gBDataKilledLast() const;
76 
77  //------need to perform ghost - busting ------------
78  void kill();
79 
82  bool wasKilled() const;
83 
86  bool isLive() const;
87  //aaa
89  struct TMuonMore : public std::less<RPCTBMuon> {
90  bool operator()(const RPCTBMuon& muonL, const RPCTBMuon& muonR) const { return muonL.getCode() > muonR.getCode(); }
91  };
92 
93  unsigned int toBits(MuonBitsType muonBitsType) const;
94 
95  unsigned int toBits() const { return toBits(m_muonBitsType); }
96 
97  void fromBits(MuonBitsType muonBitsType, unsigned int value);
98 
99  std::string toString(int format) const;
100 
101 private:
103  //------ hardware signals------------------------
104  unsigned int m_EtaAddress;
105 
106  unsigned int m_PhiAddress;
107 
113  unsigned int m_GBData;
114 
115  //------- need to perform ghost - busting ---------
116  bool m_Killed;
117 
118  //------ conversion to hardware signals------------------------
119 public:
120  class PACOut {
121  private:
122  static const int m_qualBitsCnt = 3;
123  static const unsigned int m_qualBitsMask = 0x7;
124  static const int m_ptBitsCnt = 5;
125  static const unsigned int m_ptBitsMask = 0x1f;
126  static const int m_signBitsCnt = 1;
127  static const unsigned int m_signBitsMask = 0x1;
128 
129  public:
130  static unsigned int toBits(const RPCTBMuon& muon);
131  static void fromBits(RPCTBMuon& muon, unsigned int value);
132 
133  static const int getMuonBitsCnt() { return m_qualBitsCnt + m_ptBitsCnt + m_signBitsCnt; }
134  };
135  friend class PACOut;
136 
137  class TBOut {
138  private:
139  static const int m_qualBitsCnt = 3;
140  static const unsigned int m_qualBitsMask = 0x7;
141  static const int m_ptBitsCnt = 5;
142  static const unsigned int m_ptBitsMask = 0x1f;
143  static const int m_signBitsCnt = 1;
144  static const unsigned int m_signBitsMask = 0x1;
145  static const int m_phiBitsCnt = 4;
146  static const unsigned int m_phiBitsMask = 0xf;
147  static const int m_etaBitsCnt = 2;
148  static const unsigned int m_etaBitsMask = 0x3;
149  static const int m_gbDataBitsCnt = 2;
150  static const unsigned int m_gbDataBitsMask = 0x3;
151 
152  public:
153  static unsigned int toBits(const RPCTBMuon& muon);
154  static void fromBits(RPCTBMuon& muon, unsigned int value);
155  };
156  friend class TBOut;
157 
158  class TCOut {
159  private:
160  static const int m_gbDataBitsCnt = 2;
161  static const unsigned int m_gbDataBitsMask = 0x3;
162  static const int m_etaBitsCnt = 6;
163  static const unsigned int m_etaBitsMask = 0x3f;
164  static const int m_phiBitsCnt = 4;
165  static const unsigned int m_phiBitsMask = 0xf;
166  static const int m_qualBitsCnt = 3;
167  static const unsigned int m_qualBitsMask = 0x7;
168  static const int m_ptBitsCnt = 5;
169  static const unsigned int m_ptBitsMask = 0x1f;
170  static const int m_signBitsCnt = 1;
171  static const unsigned int m_signBitsMask = 0x1;
172 
173  public:
174  static unsigned int toBits(const RPCTBMuon& muon);
175  static void fromBits(RPCTBMuon& muon, unsigned int value);
176  };
177  friend class TCOut;
178 
179  class HSBOut {
180  private:
181  static const int m_signBitsCnt = 1;
182  static const unsigned int m_signBitsMask = 0x1;
183  static const int m_ptBitsCnt = 5;
184  static const unsigned int m_ptBitsMask = 0x1f;
185  static const int m_qualBitsCnt = 3;
186  static const unsigned int m_qualBitsMask = 0x7;
187  static const int m_phiBitsCnt = 7;
188  static const unsigned int m_phiBitsMask = 0x7f;
189  static const int m_etaBitsCnt = 6;
190  static const unsigned int m_etaBitsMask = 0x3f;
191 
192  public:
193  static unsigned int toBits(const RPCTBMuon& muon);
194  static void fromBits(RPCTBMuon& muon, unsigned int value);
195  };
196  friend class HSBOut;
197 
198  class FSBOut {
199  private:
200  static const int m_phiBitsCnt = 8;
201  static const unsigned int m_phiBitsMask = 0xff;
202  static const int m_ptBitsCnt = 5;
203  static const unsigned int m_ptBitsMask = 0x1f;
204  static const int m_qualBitsCnt = 3;
205  static const unsigned int m_qualBitsMask = 0x7;
206  static const int m_etaBitsCnt = 6;
207  static const unsigned int m_etaBitsMask = 0x3f;
208  static const int m_signBitsCnt = 1;
209  static const unsigned int m_signBitsMask = 0x1;
210 
211  public:
212  static unsigned int toBits(const RPCTBMuon& muon);
213  static void fromBits(RPCTBMuon& muon, unsigned int value);
214  };
215  friend class FSBOut;
216 };
217 
218 typedef std::vector<RPCTBMuon> L1RpcTBMuonsVec;
219 typedef std::vector<L1RpcTBMuonsVec> L1RpcTBMuonsVec2;
220 
221 #endif
RPCTBMuon::TCOut::m_signBitsCnt
static const int m_signBitsCnt
Definition: RPCTBMuon.h:170
RPCTBMuon::fromBits
void fromBits(MuonBitsType muonBitsType, unsigned int value)
Definition: RPCTBMuon.cc:199
RPCTBMuon
Definition: RPCTBMuon.h:17
RPCTBMuon::FSBOut::m_signBitsCnt
static const int m_signBitsCnt
Definition: RPCTBMuon.h:208
RPCTBMuon::gBDataKilledLast
bool gBDataKilledLast() const
Definition: RPCTBMuon.cc:145
RPCTBMuon::m_Killed
bool m_Killed
true means that muon was killed during GB
Definition: RPCTBMuon.h:116
RPCTBMuon::HSBOut::m_ptBitsMask
static const unsigned int m_ptBitsMask
Definition: RPCTBMuon.h:184
RPCTBMuon::getCode
int getCode() const
Combined quality and ptCode, 8 bits [7...6 m_Quality, 5...1 m_PtCode, 0 sign], used in GhoustBusters.
Definition: RPCTBMuon.cc:74
RPCTBMuon::printDebugInfo
std::string printDebugInfo(int debugFormat) const
Gives debuging info in human readable format (1) or technicall format (2)
Definition: RPCTBMuon.cc:55
RPCTBMuon::HSBOut::m_signBitsCnt
static const int m_signBitsCnt
Definition: RPCTBMuon.h:181
RPCTBMuon::TCOut::m_signBitsMask
static const unsigned int m_signBitsMask
Definition: RPCTBMuon.h:171
RPCMuon.h
RPCTBMuon::TMuonMore::operator()
bool operator()(const RPCTBMuon &muonL, const RPCTBMuon &muonR) const
Definition: RPCTBMuon.h:90
RPCTBMuon::FSBOut::fromBits
static void fromBits(RPCTBMuon &muon, unsigned int value)
Definition: RPCTBMuon.cc:367
RPCTBMuon::TCOut::m_gbDataBitsMask
static const unsigned int m_gbDataBitsMask
Definition: RPCTBMuon.h:161
RPCTBMuon::wasKilled
bool wasKilled() const
Definition: RPCTBMuon.cc:152
muon
Definition: MuonCocktails.h:17
RPCTBMuon::TBOut::m_qualBitsMask
static const unsigned int m_qualBitsMask
Definition: RPCTBMuon.h:140
RPCTBMuon::TBOut::fromBits
static void fromBits(RPCTBMuon &muon, unsigned int value)
Definition: RPCTBMuon.cc:240
RPCTBMuon::PACOut::toBits
static unsigned int toBits(const RPCTBMuon &muon)
Definition: RPCTBMuon.cc:226
RPCTBMuon::FSBOut::m_etaBitsCnt
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:206
RPCTBMuon::PACOut::getMuonBitsCnt
static const int getMuonBitsCnt()
Definition: RPCTBMuon.h:133
RPCTBMuon::TCOut::m_gbDataBitsCnt
static const int m_gbDataBitsCnt
Definition: RPCTBMuon.h:160
RPCTBMuon::HSBOut::fromBits
static void fromBits(RPCTBMuon &muon, unsigned int value)
Definition: RPCTBMuon.cc:329
RPCTBMuon::TCOut::m_phiBitsCnt
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:164
RPCTBMuon::TBOut::m_signBitsMask
static const unsigned int m_signBitsMask
Definition: RPCTBMuon.h:144
RPCTBMuon::PACOut::m_signBitsMask
static const unsigned int m_signBitsMask
Definition: RPCTBMuon.h:127
RPCTBMuon::isLive
bool isLive() const
Definition: RPCTBMuon.cc:161
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
RPCTBMuon::FSBOut::toBits
static unsigned int toBits(const RPCTBMuon &muon)
Definition: RPCTBMuon.cc:343
RPCTBMuon::getEtaAddr
int getEtaAddr() const
Definition: RPCTBMuon.cc:106
RPCTBMuon::setGBDataKilledLast
void setGBDataKilledLast()
Definition: RPCTBMuon.cc:141
RPCTBMuon::PACOut::fromBits
static void fromBits(RPCTBMuon &muon, unsigned int value)
Definition: RPCTBMuon.cc:216
RPCTBMuon::TBOut::m_qualBitsCnt
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:139
RPCTBMuon::PACOut::m_signBitsCnt
static const int m_signBitsCnt
Definition: RPCTBMuon.h:126
RPCTBMuon::mbtTCSortOut
Definition: RPCTBMuon.h:19
RPCTBMuon::TBOut::m_etaBitsCnt
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:147
RPCTBMuon::HSBOut::m_ptBitsCnt
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:183
RPCTBMuon::HSBOut::m_etaBitsMask
static const unsigned int m_etaBitsMask
Definition: RPCTBMuon.h:190
RPCTBMuon::TBOut::m_phiBitsCnt
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:145
RPCTBMuon::getPhiAddr
int getPhiAddr() const
Definition: RPCTBMuon.cc:108
L1RpcTBMuonsVec
std::vector< RPCTBMuon > L1RpcTBMuonsVec
Definition: RPCTBMuon.h:218
RPCTBMuon::TCOut::m_qualBitsMask
static const unsigned int m_qualBitsMask
Definition: RPCTBMuon.h:167
RPCTBMuon::setAddress
void setAddress(int etaAddr, int phiAddr)
Definition: RPCTBMuon.cc:94
RPCTBMuon::TBOut::m_ptBitsCnt
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:141
RPCTBMuon::TBOut::m_etaBitsMask
static const unsigned int m_etaBitsMask
Definition: RPCTBMuon.h:148
RPCTBMuon::getSectorAddr
int getSectorAddr() const
Definition: RPCTBMuon.cc:112
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:109
RPCTBMuon::FSBOut
Definition: RPCTBMuon.h:198
RPCTBMuon::setEtaAddr
void setEtaAddr(int etaAddr)
Definition: RPCTBMuon.cc:92
RPCTBMuon::TCOut::m_phiBitsMask
static const unsigned int m_phiBitsMask
Definition: RPCTBMuon.h:165
RPCTBMuon::setCode
void setCode(int code)
Sets combined code: 8 bits [7...5 m_Quality, 4...0 m_PtCode].
Definition: RPCTBMuon.cc:83
RPCTBMuon::getContinSegmAddr
int getContinSegmAddr() const
Definition: RPCTBMuon.cc:114
RPCTBMuon::MuonBitsType
MuonBitsType
Definition: RPCTBMuon.h:19
RPCTBMuon::FSBOut::m_ptBitsMask
static const unsigned int m_ptBitsMask
Definition: RPCTBMuon.h:203
RPCTBMuon::PACOut::m_ptBitsCnt
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:124
RPCTBMuon::getSegmentAddr
int getSegmentAddr() const
Definition: RPCTBMuon.cc:110
RPCTBMuon::TBOut::m_signBitsCnt
static const int m_signBitsCnt
Definition: RPCTBMuon.h:143
RPCTBMuon::HSBOut::m_qualBitsMask
static const unsigned int m_qualBitsMask
Definition: RPCTBMuon.h:186
RPCTBMuon::FSBOut::m_phiBitsMask
static const unsigned int m_phiBitsMask
Definition: RPCTBMuon.h:201
RPCTBMuon::HSBOut::toBits
static unsigned int toBits(const RPCTBMuon &muon)
Definition: RPCTBMuon.cc:310
RPCTBMuon::getGBDataBitStr
std::string getGBDataBitStr() const
Definition: RPCTBMuon.cc:128
RPCTBMuon::mbtUnset
Definition: RPCTBMuon.h:19
RPCTBMuon::gBDataKilledFirst
bool gBDataKilledFirst() const
Definition: RPCTBMuon.cc:143
RPCTBMuon::HSBOut
Definition: RPCTBMuon.h:179
RPCTBMuon::TCOut::m_etaBitsCnt
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:162
RPCTBMuon::TCOut
Definition: RPCTBMuon.h:158
RPCTBMuon::FSBOut::m_qualBitsMask
static const unsigned int m_qualBitsMask
Definition: RPCTBMuon.h:205
RPCTBMuon::TBOut::toBits
static unsigned int toBits(const RPCTBMuon &muon)
Definition: RPCTBMuon.cc:256
RPCTBMuon::FSBOut::m_phiBitsCnt
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:200
RPCTBMuon::setCodeAndEtaAddr
void setCodeAndEtaAddr(int code, int etaAddr)
Definition: RPCTBMuon.cc:121
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RPCTBMuon::HSBOut::m_etaBitsCnt
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:189
RPCTBMuon::TBOut
Definition: RPCTBMuon.h:137
RPCTBMuon::printExtDebugInfo
std::string printExtDebugInfo(int, int, int) const
RPCTBMuon::RPCTBMuon
RPCTBMuon()
Empty muon.
Definition: RPCTBMuon.cc:14
RPCTBMuon::TCOut::m_ptBitsCnt
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:168
RPCTBMuon::PACOut::m_qualBitsCnt
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:122
RPCTBMuon::HSBOut::m_signBitsMask
static const unsigned int m_signBitsMask
Definition: RPCTBMuon.h:182
RPCTBMuon::setGBData
void setGBData(unsigned int gbData)
Definition: RPCTBMuon.cc:104
RPCTBMuon::TCOut::m_etaBitsMask
static const unsigned int m_etaBitsMask
Definition: RPCTBMuon.h:163
RPCTBMuon::kill
void kill()
Definition: RPCTBMuon.cc:148
RPCTBMuon::HSBOut::m_phiBitsMask
static const unsigned int m_phiBitsMask
Definition: RPCTBMuon.h:188
RPCTBMuon::TCOut::fromBits
static void fromBits(RPCTBMuon &muon, unsigned int value)
Definition: RPCTBMuon.cc:275
RPCMuon
Definition: RPCMuon.h:15
value
Definition: value.py:1
RPCTBMuon::mbtHSBOut
Definition: RPCTBMuon.h:19
RPCTBMuon::TBOut::m_gbDataBitsMask
static const unsigned int m_gbDataBitsMask
Definition: RPCTBMuon.h:150
RPCTBMuon::toString
std::string toString(int format) const
Definition: RPCTBMuon.cc:386
RPCTBMuon::setPhiAddr
void setPhiAddr(int phiAddr)
Definition: RPCTBMuon.cc:88
RPCTBMuon::TMuonMore
Used in sorting.
Definition: RPCTBMuon.h:89
RPCTBMuon::PACOut::m_ptBitsMask
static const unsigned int m_ptBitsMask
Definition: RPCTBMuon.h:125
RPCTBMuon::m_EtaAddress
unsigned int m_EtaAddress
Definition: RPCTBMuon.h:104
RPCTBMuon::setSectorAddr
void setSectorAddr(int sectorAddr)
Definition: RPCTBMuon.cc:90
L1RpcTBMuonsVec2
std::vector< L1RpcTBMuonsVec > L1RpcTBMuonsVec2
Definition: RPCTBMuon.h:219
RPCTBMuon::FSBOut::m_qualBitsCnt
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:204
RPCTBMuon::TBOut::m_phiBitsMask
static const unsigned int m_phiBitsMask
Definition: RPCTBMuon.h:146
RPCTBMuon::HSBOut::m_qualBitsCnt
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:185
RPCTBMuon::HSBOut::m_phiBitsCnt
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:187
RPCTBMuon::FSBOut::m_etaBitsMask
static const unsigned int m_etaBitsMask
Definition: RPCTBMuon.h:207
RPCTBMuon::TCOut::m_qualBitsCnt
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:166
RPCTBMuon::m_GBData
unsigned int m_GBData
Definition: RPCTBMuon.h:113
RPCPacMuon
Definition: RPCPacMuon.h:15
RPCTBMuon::TBOut::m_ptBitsMask
static const unsigned int m_ptBitsMask
Definition: RPCTBMuon.h:142
RPCTBMuon::PACOut
Definition: RPCTBMuon.h:120
format
RPCTBMuon::mbtFSBOut
Definition: RPCTBMuon.h:19
RPCTBMuon::TCOut::m_ptBitsMask
static const unsigned int m_ptBitsMask
Definition: RPCTBMuon.h:169
RPCTBMuon::setCodeAndPhiAddr
void setCodeAndPhiAddr(int code, int phiAddr)
Definition: RPCTBMuon.cc:116
RPCTBMuon::getGBData
int getGBData() const
Definition: RPCTBMuon.cc:126
RPCPacMuon.h
RPCTBMuon::setGBDataKilledFirst
void setGBDataKilledFirst()
Definition: RPCTBMuon.cc:139
RPCTBMuon::FSBOut::m_ptBitsCnt
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:202
RPCTBMuon::mbtTBSortOut
Definition: RPCTBMuon.h:19
RPCTBMuon::FSBOut::m_signBitsMask
static const unsigned int m_signBitsMask
Definition: RPCTBMuon.h:209
RPCTBMuon::m_PhiAddress
unsigned int m_PhiAddress
Definition: RPCTBMuon.h:106
RPCTBMuon::mbtPACOut
Definition: RPCTBMuon.h:19
RPCTBMuon::TBOut::m_gbDataBitsCnt
static const int m_gbDataBitsCnt
Definition: RPCTBMuon.h:149
RPCTBMuon::TCOut::toBits
static unsigned int toBits(const RPCTBMuon &muon)
Definition: RPCTBMuon.cc:291
RPCTBMuon::toBits
unsigned int toBits() const
Definition: RPCTBMuon.h:95
RPCTBMuon::PACOut::m_qualBitsMask
static const unsigned int m_qualBitsMask
Definition: RPCTBMuon.h:123
RPCTBMuon::m_muonBitsType
MuonBitsType m_muonBitsType
Definition: RPCTBMuon.h:102