ATLAS Offline Software
TgcL1RawData.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "MuonRDO/TgcL1RawData.h"
6 #include "GaudiKernel/MsgStream.h"
7 
9  uint16_t subDetectorId,
10  uint16_t rodId,
11  uint16_t sswId,
12  uint16_t slbId,
13  uint16_t l1Id,
14  uint16_t bcId)
15 {
16  m_bcTag = bcTag;
18  m_rodId = rodId;
19  m_sswId = sswId;
20  m_slbId = slbId;
21  m_l1Id = l1Id;
22  m_bcId = bcId;
24  m_bitpos = 0;
25  m_tracklet = 0;
26  m_adjacent = false;
27  m_type = TYPE_HIPT;
28  m_forward = false;
29  m_index = 0;
30  m_pos = 0;
31  m_delta = 0;
32  m_inner = 0;
33  m_segment = 0;
34  m_subMatrix = 0;
35  m_sector = 0;
36  m_chip = 0;
37  m_hipt = false;
38  m_hitId = 0;
39  m_hsub = 0;
40  m_strip = false;
41  m_cand3plus = false;
42  m_muplus = false;
43  m_threshold = 0;
44  m_overlap = false;
45  m_veto = false;
46  m_roi = 0;
47 }
48 
50  uint16_t subDetectorId,
51  uint16_t srodId,
52  uint16_t l1Id,
53  uint16_t bcId)
54 {
55  m_bcTag = bcTag;
57  m_srodId = srodId;
58  m_l1Id = l1Id;
59  m_bcId = bcId;
60  m_bitpos = 0;
61  m_tracklet = 0;
62  m_adjacent = false;
64  m_forward = false;
65  m_index = 0;
66  m_pos = 0;
67  m_delta = 0;
68  m_inner = 0;
69  m_segment = 0;
70  m_subMatrix = 0;
71  m_sector = 0;
72  m_chip = 0;
73  m_hipt = false;
74  m_hitId = 0;
75  m_hsub = 0;
76  m_strip = false;
77  m_cand3plus = false;
78  m_muplus = false;
79  m_threshold = 0;
80  m_overlap = false;
81  m_veto = false;
82  m_roi = 0;
83 }
84 
85 // Constructor for Trigger Coincidence
87  uint16_t subDetectorId,
88  uint16_t srodId,
89  uint16_t l1Id,
90  uint16_t bcId,
91  uint16_t type,
93  uint16_t pos,
94  int16_t delta)
95 {
97  setType(type);
98  m_index = index;
99  m_pos = pos;
100  m_delta = delta;
101 }
102 
103 // Tracklets ( ROD ) *** For output from TrigT1TGC ***
105  uint16_t subDetectorId,
106  uint16_t rodId,
107  uint16_t sswId,
108  uint16_t slbId,
109  uint16_t l1Id,
110  uint16_t bcId,
111  SlbType slbType,
112  int16_t delta,
113  uint16_t seg,
114  uint16_t sub,
115  uint16_t rphi)
116 {
119  m_slbType = slbType;
120  m_delta = delta;
121  m_segment = seg;
122  m_subMatrix = sub;
123  m_pos = rphi;
124 }
125 
126 // High pT
128  uint16_t subDetectorId,
129  uint16_t srodId,
130  uint16_t l1Id,
131  uint16_t bcId,
132  bool strip,
133  bool forward,
134  uint16_t sector,
135  uint16_t chip,
136  uint16_t index,
137  bool hipt,
138  uint16_t hitId,
139  uint16_t sub,
140  int16_t delta,
141  uint16_t inner
142  )
143 {
145  m_type = TYPE_HIPT;
146  m_strip = strip;
147  m_forward = forward;
148  m_sector = sector;
149  m_chip = chip;
150  m_index = index;
151  m_hipt = hipt;
152  m_hitId = hitId;
153  m_hsub = sub;
154  m_delta = delta;
155  m_inner = inner;
156 }
157 
158 // New Sector logic
159 // RoI
161  uint16_t subDetectorId,
162  uint16_t srodId,
163  uint16_t l1Id,
164  uint16_t bcId,
165  bool forward,
166  uint16_t sector,
167  uint16_t innerflag,
168  uint16_t coinflag,
169  bool muplus,
171  uint16_t roi)
172 {
175  m_forward = forward;
176  m_sector = sector;
177  m_innerflag = innerflag;
178  m_coinflag = coinflag;
179  m_muplus = muplus;
181  m_roi = roi;
182 }
183 
184 // NSW
186  uint16_t subDetectorId,
187  uint16_t srodId,
188  uint16_t l1Id,
189  uint16_t bcId,
190  bool forward,
191  uint16_t sector,
192  uint16_t nsweta,
193  uint16_t nswphi,
194  uint16_t nswcand,
195  uint16_t nswdtheta,
196  uint16_t nswphires,
197  uint16_t nswlowres,
198  uint16_t nswid)
199 {
202  m_forward = forward;
203  m_sector = sector;
204  m_nsweta = nsweta;
205  m_nswphi = nswphi;
206  m_nswcand = nswcand;
207  m_nswdtheta = nswdtheta;
208  m_nswphires = nswphires;
209  m_nswlowres = nswlowres;
210  m_nswid = nswid;
211 }
212 
213 // RPC BIS78
215  uint16_t subDetectorId,
216  uint16_t srodId,
217  uint16_t l1Id,
218  uint16_t bcId,
219  bool forward,
220  uint16_t sector,
221  uint16_t rpceta,
222  uint16_t rpcphi,
223  uint16_t rpcflag,
224  uint16_t rpcdeta,
225  uint16_t rpcdphi)
226 {
229  m_forward = forward;
230  m_sector = sector;
231  m_rpceta = rpceta;
232  m_rpcphi = rpcphi;
233  m_rpcflag = rpcflag;
234  m_rpcdeta = rpcdeta;
235  m_rpcdphi = rpcdphi;
236 }
237 
238 // EIFI
240  uint16_t subDetectorId,
241  uint16_t srodId,
242  uint16_t l1Id,
243  uint16_t bcId,
244  bool forward,
245  uint16_t sector,
246  uint16_t ei,
247  uint16_t fi,
248  uint16_t cid)
249 {
252  m_forward = forward;
253  m_sector = sector;
254  m_ei = ei;
255  m_fi = fi;
256  m_cid = cid;
257 }
258 
259 // TMDB
261  uint16_t subDetectorId,
262  uint16_t srodId,
263  uint16_t l1Id,
264  uint16_t bcId,
265  bool forward,
266  uint16_t sector,
267  uint16_t mod,
268  uint16_t bcid)
269 {
272  m_forward = forward;
273  m_sector = sector;
274  m_tmdbmod = mod;
275  m_tmdbbcid = bcid;
276 }
277 
278 
280 {
281  switch (type)
282  {
283  case 3: m_type = TYPE_HIPT; break;
284  case 5: m_type = TYPE_NSL_ROI; break;
285  case 6: m_type = TYPE_NSL_NSW; break;
286  case 7: m_type = TYPE_NSL_RPC; break;
287  case 8: m_type = TYPE_NSL_EIFI; break;
288  case 9: m_type = TYPE_NSL_TMDB; break;
289  default: m_type = TYPE_UNKNOWN; break;
290  }
291 }
292 
294 {
295  switch (type)
296  {
297  case TYPE_HIPT: return "High pT"; break;
298  case TYPE_NSL_ROI: return "TGC RoI"; break;
299  default: return "";
300  }
301 }
302 
303 template <class stream>
305 {
306  sl << "TgcL1RawData " << data.typeName()
307  << ", bcTag=" << data.bcTag()
308  << ", l1Id=" << data.l1Id()
309  << ", bcId=" << data.bcId()
310  << ", subDetectorId=" << data.subDetectorId()
311  << ", srodId=" << data.srodId();
312  switch (data.type())
313  {
315  sl << ", strip=" << data.isStrip()
316  << ", forward=" << data.isForward()
317  << ", sector=" << data.sector()
318  << ", chip=" << data.chip()
319  << ", cand=" << data.index()
320  << ", hipt=" << data.isHipt()
321  << ", hitId=" << data.hitId()
322  << ", hsub=" << data.hsub()
323  << ", delta=" << data.delta()
324  << ", inner=" << data.inner();
325  break;
327  sl
328  << ", forward=" << data.isForward()
329  << ", sector=" << data.sector()
330  << ", sign=" << data.isMuplus()
331  << ", threshold=" << data.threshold()
332  << ", overlap=" << data.isOverlap()
333  << ", veto=" << data.isVeto()
334  << ", roi=" << data.roi();
335  break;
336  default:
337  break;
338  }
339  return sl;
340 }
341 
342 MsgStream& operator<<(MsgStream& sl, const TgcL1RawData& data)
343 {
344  return dump(sl, data);
345 }
346 
347 std::ostream& operator<<(std::ostream& sl, const TgcL1RawData& data)
348 {
349  return dump(sl, data);
350 }
TgcL1RawData::m_forward
bool m_forward
Definition: TgcL1RawData.h:369
TgcL1RawData::TYPE_NSL_RPC
@ TYPE_NSL_RPC
Definition: TgcL1RawData.h:42
TgcL1RawData::m_coinflag
uint16_t m_coinflag
Definition: TgcL1RawData.h:398
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
TgcL1RawData::TYPE_NSL_ROI
@ TYPE_NSL_ROI
Definition: TgcL1RawData.h:40
TgcL1RawData::m_bitpos
uint16_t m_bitpos
Definition: TgcL1RawData.h:357
TgcL1RawData::m_tmdbbcid
uint16_t m_tmdbbcid
Definition: TgcL1RawData.h:424
SiliconTech::strip
@ strip
dump
stream & dump(stream &sl, const TgcL1RawData &data)
Definition: TgcL1RawData.cxx:304
TgcL1RawData::hitId
uint16_t hitId() const
Definition: TgcL1RawData.h:275
TgcL1RawData::bcTag
uint16_t bcTag() const
Definition: TgcL1RawData.h:181
TgcL1RawData::m_delta
int16_t m_delta
Definition: TgcL1RawData.h:376
TgcL1RawData::TYPE_TRACKLET
@ TYPE_TRACKLET
Definition: TgcL1RawData.h:38
TgcL1RawData::m_roi
uint16_t m_roi
Definition: TgcL1RawData.h:396
TgcL1RawData::TYPE_NSL_EIFI
@ TYPE_NSL_EIFI
Definition: TgcL1RawData.h:43
TgcL1RawData::delta
int16_t delta() const
Definition: TgcL1RawData.h:247
TgcL1RawData::subDetectorId
uint16_t subDetectorId() const
Definition: TgcL1RawData.h:194
index
Definition: index.py:1
TgcL1RawData::m_hipt
bool m_hipt
Definition: TgcL1RawData.h:383
TgcL1RawData::m_sector
uint16_t m_sector
Definition: TgcL1RawData.h:381
TgcL1RawData::m_slbType
SlbType m_slbType
Definition: TgcL1RawData.h:351
TgcL1RawData::m_cand3plus
bool m_cand3plus
Definition: TgcL1RawData.h:391
TgcL1RawData::m_chip
uint16_t m_chip
Definition: TgcL1RawData.h:382
TgcL1RawData::SLB_TYPE_UNKNOWN
@ SLB_TYPE_UNKNOWN
Definition: TgcL1RawData.h:33
TgcL1RawData::m_veto
bool m_veto
Definition: TgcL1RawData.h:395
TgcL1RawData::DataType
DataType
Definition: TgcL1RawData.h:37
TgcL1RawData::m_ei
uint16_t m_ei
Definition: TgcL1RawData.h:418
TgcL1RawData::m_overlap
bool m_overlap
Definition: TgcL1RawData.h:394
TgcL1RawData::srodId
uint16_t srodId() const
Definition: TgcL1RawData.h:210
TgcL1RawData::m_rpcphi
uint16_t m_rpcphi
Definition: TgcL1RawData.h:412
TgcL1RawData::m_strip
bool m_strip
Definition: TgcL1RawData.h:386
TgcL1RawData::m_muplus
bool m_muplus
Definition: TgcL1RawData.h:392
TgcL1RawData::m_nsweta
uint16_t m_nsweta
Definition: TgcL1RawData.h:401
xAOD::int16_t
setScaleOne setStatusOne setSaturated int16_t
Definition: gFexGlobalRoI_v1.cxx:55
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
TgcL1RawData::m_tmdbmod
uint16_t m_tmdbmod
Definition: TgcL1RawData.h:423
TgcL1RawData::m_index
uint16_t m_index
Definition: TgcL1RawData.h:372
TgcL1RawData::m_nswid
uint16_t m_nswid
Definition: TgcL1RawData.h:408
TgcL1RawData::threshold
uint16_t threshold() const
Definition: TgcL1RawData.h:295
TgcL1RawData::m_bcId
uint16_t m_bcId
Definition: TgcL1RawData.h:349
TgcL1RawData::sswId
uint16_t sswId() const
Definition: TgcL1RawData.h:202
TgcL1RawData::m_pos
uint16_t m_pos
Definition: TgcL1RawData.h:375
TgcL1RawData::l1Id
uint16_t l1Id() const
Definition: TgcL1RawData.h:185
TgcL1RawData::inner
uint16_t inner() const
Definition: TgcL1RawData.h:251
TgcL1RawData.h
TgcL1RawData::sector
uint16_t sector() const
Definition: TgcL1RawData.h:263
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
TgcL1RawData::TYPE_NSL_TMDB
@ TYPE_NSL_TMDB
Definition: TgcL1RawData.h:44
operator<<
MsgStream & operator<<(MsgStream &sl, const TgcL1RawData &data)
Overload of << operator for MsgStream for debug output.
Definition: TgcL1RawData.cxx:342
TgcL1RawData
An unit object of TGC SROD output.
Definition: TgcL1RawData.h:21
TgcL1RawData::m_adjacent
bool m_adjacent
Definition: TgcL1RawData.h:362
TgcL1RawData::type
DataType type() const
Definition: TgcL1RawData.h:214
TgcL1RawData::m_nswphires
uint16_t m_nswphires
Definition: TgcL1RawData.h:406
TgcL1RawData::clear
void clear(uint16_t bcTag, uint16_t subDetectorId, uint16_t srodId, uint16_t l1Id, uint16_t bcId)
Definition: TgcL1RawData.cxx:49
TgcL1RawData::roi
uint16_t roi() const
Definition: TgcL1RawData.h:307
TgcL1RawData::m_nswdtheta
uint16_t m_nswdtheta
Definition: TgcL1RawData.h:405
TgcL1RawData::m_l1Id
uint16_t m_l1Id
Definition: TgcL1RawData.h:348
TgcL1RawData::m_nswlowres
uint16_t m_nswlowres
Definition: TgcL1RawData.h:407
TgcL1RawData::TYPE_NSL_NSW
@ TYPE_NSL_NSW
Definition: TgcL1RawData.h:41
TgcL1RawData::m_threshold
uint16_t m_threshold
Definition: TgcL1RawData.h:393
TgcL1RawData::m_fi
uint16_t m_fi
Definition: TgcL1RawData.h:419
TgcL1RawData::m_rodId
uint16_t m_rodId
Definition: TgcL1RawData.h:342
TgcL1RawData::m_hitId
uint16_t m_hitId
Definition: TgcL1RawData.h:384
bcId
uint16_t bcId(uint32_t data)
Definition: TgcByteStreamData.h:326
TgcL1RawData::SlbType
SlbType
Definition: TgcL1RawData.h:26
TgcL1RawData::m_cid
uint16_t m_cid
Definition: TgcL1RawData.h:420
TgcL1RawData::m_sswId
uint16_t m_sswId
Definition: TgcL1RawData.h:343
TgcL1RawData::m_innerflag
uint16_t m_innerflag
Definition: TgcL1RawData.h:397
threshold
Definition: chainparser.cxx:74
TgcL1RawData::typeName
std::string typeName() const
Definition: TgcL1RawData.h:314
TgcL1RawData::m_subDetectorId
uint16_t m_subDetectorId
Definition: TgcL1RawData.h:341
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
TgcL1RawData::slbId
uint16_t slbId() const
Definition: TgcL1RawData.h:206
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
TgcL1RawData::m_srodId
uint16_t m_srodId
Definition: TgcL1RawData.h:345
TgcL1RawData::chip
uint16_t chip() const
Definition: TgcL1RawData.h:267
TgcL1RawData::m_nswcand
uint16_t m_nswcand
Definition: TgcL1RawData.h:404
TgcL1RawData::m_rpcdphi
uint16_t m_rpcdphi
Definition: TgcL1RawData.h:415
TgcL1RawData::m_rpceta
uint16_t m_rpceta
Definition: TgcL1RawData.h:411
TgcL1RawData::TYPE_HIPT
@ TYPE_HIPT
Definition: TgcL1RawData.h:39
TgcL1RawData::m_nswphi
uint16_t m_nswphi
Definition: TgcL1RawData.h:402
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TgcL1RawData::m_segment
uint16_t m_segment
Definition: TgcL1RawData.h:377
TgcL1RawData::bcId
uint16_t bcId() const
Definition: TgcL1RawData.h:189
bcTag
unsigned bcTag(unsigned bcBitMap)
Definition: TgcByteStreamData.h:359
TgcL1RawData::m_slbId
uint16_t m_slbId
Definition: TgcL1RawData.h:344
TgcL1RawData::m_hsub
uint16_t m_hsub
Definition: TgcL1RawData.h:385
checkFileSG.fi
fi
Definition: checkFileSG.py:65
TgcL1RawData::m_subMatrix
uint16_t m_subMatrix
Definition: TgcL1RawData.h:378
TgcL1RawData::m_bcTag
uint16_t m_bcTag
Definition: TgcL1RawData.h:338
TgcL1RawData::setType
void setType(uint16_t type)
Definition: TgcL1RawData.cxx:279
TgcL1RawData::m_rpcdeta
uint16_t m_rpcdeta
Definition: TgcL1RawData.h:414
TgcL1RawData::m_rpcflag
uint16_t m_rpcflag
Definition: TgcL1RawData.h:413
TgcL1RawData::TgcL1RawData
TgcL1RawData()
Definition: TgcL1RawData.h:49
TgcL1RawData::m_inner
uint16_t m_inner
Definition: TgcL1RawData.h:387
TgcL1RawData::m_tracklet
uint16_t m_tracklet
Definition: TgcL1RawData.h:360
TgcL1RawData::rodId
uint16_t rodId() const
Definition: TgcL1RawData.h:198
TgcL1RawData::m_type
DataType m_type
Definition: TgcL1RawData.h:368
TgcL1RawData::index
uint16_t index() const
Definition: TgcL1RawData.h:239
hipt
bool hipt
Definition: globals.cxx:29
TgcL1RawData::TYPE_UNKNOWN
@ TYPE_UNKNOWN
Definition: TgcL1RawData.h:45