ATLAS Offline Software
HelpersPhase1.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGT1MUCTPIBITS_HELPERSPHASE1_H
6 #define TRIGT1MUCTPIBITS_HELPERSPHASE1_H
7 
8 #include "MuCTPI_Bits.h"
9 #include <array>
10 #include <vector>
11 #include <string_view>
12 #include <iostream>
13 
14 namespace LVL1::MuCTPIBits {
15  // Helper types
18 
19  // Mapping of the six RPC indexes into the 15 TGC indexes
20  const uint32_t RPCtoTGC_pt_map[7] = {0, 2, 4, 6, 8, 10, 12};
21 
22  // Status data word error definitions
23  static constexpr std::array<std::string_view,16> DataStatusWordErrors = {
24  "Event number mismatch between MSPA and TRP in the central time slice",
25  "Event number mismatch between MSPC and TRP in the central time slice",
26  "Event number mismatch between MSPA and MSPC in any time slice",
27  "BCID mismatch between TRP and MSPA in the central time slice",
28  "BCID mismatch between TRP and MSPC in the central time slice",
29  "BCID mismatch between MSPA and MSPC in any time slice",
30  "MSPA multiplicity LVDS link CRC error in any time slice",
31  "MSPC multiplicity LVDS link CRC error in any time slice",
32  "Sector logic error flag set on any of the 104 MSPA sectors",
33  "Sector logic error flag set on any of the 104 MSPC sectors",
34  "Error flag set in any of the muon candidates in the event after zero-supression",
35  "CRC error on the MSPA DAQ link (in any time slice)",
36  "CRC error on the MSPC DAQ link (in any time slice)",
37  "TriggerType reception timeout error",
38  "MSPA DAQ link input FIFO full flag (cleared at EOF)",
39  "MSPC DAQ link input FIFO full flag (cleared at EOF)"
40  };
41 
42  // Helper functions
44  inline constexpr uint32_t maskedWord(uint32_t word, uint32_t shift, uint32_t mask) {
45  return ((word >> shift) & mask);
46  }
47 
49  inline constexpr uint32_t maskedWord(uint64_t word, uint32_t shift, uint32_t mask) {
50  return ((word >> shift) & mask);
51  }
52 
54  inline constexpr uint32_t buildWord(uint32_t value, uint32_t shift, uint32_t mask) {
55  return ((value & mask) << shift);
56  }
57 
59  inline constexpr bool wordEquals(uint32_t word, uint32_t shift, uint32_t mask, uint32_t value) {
60  return maskedWord(word, shift, mask) == value;
61  }
62 
64  inline constexpr WordType getWordType(uint32_t word) {
65  if (wordEquals(word, RUN3_TIMESLICE_MULT_WORD_ID_SHIFT, RUN3_TIMESLICE_MULT_WORD_ID_MASK, RUN3_TIMESLICE_MULT_WORD_ID_VAL)) {
66  if (wordEquals(word, RUN3_TIMESLICE_MULT_WORD_NUM_SHIFT, RUN3_TIMESLICE_MULT_WORD_NUM_MASK, RUN3_TIMESLICE_WORD_NUM_VAL)) {
67  return WordType::Timeslice;
68  }
70  } else if (wordEquals(word, RUN3_CAND_WORD_ID_SHIFT, RUN3_CAND_WORD_ID_MASK, RUN3_CAND_WORD_ID_VAL)) {
71  return WordType::Candidate;
72  } else if (wordEquals(word, RUN3_TOPO_WORD_ID_SHIFT, RUN3_TOPO_WORD_ID_MASK, RUN3_TOPO_WORD_ID_VAL)) {
73  return WordType::Topo;
74  } else if (wordEquals(word, RUN3_STATUS_WORD_ID_SHIFT, RUN3_STATUS_WORD_ID_MASK, RUN3_STATUS_WORD_ID_VAL)) {
75  return WordType::Status;
76  }
77  return WordType::Undefined;
78  }
79 
81  inline constexpr auto timesliceHeader(uint32_t word) {
82  struct {
83  uint32_t bcid{0};
84  uint32_t tobCount{0};
85  uint32_t candCount{0};
86  } header;
87  header.bcid = maskedWord(word, RUN3_TIMESLICE_BCID_SHIFT, RUN3_TIMESLICE_BCID_MASK);
88  header.tobCount = maskedWord(word, RUN3_TIMESLICE_NTOB_SHIFT, RUN3_TIMESLICE_NTOB_MASK);
89  header.candCount = maskedWord(word, RUN3_TIMESLICE_NCAND_SHIFT, RUN3_TIMESLICE_NCAND_MASK);
90  return header;
91  }
92 
94  inline constexpr uint32_t timesliceHeader(uint32_t bcid, uint32_t tobCount, uint32_t candCount) {
95  uint32_t word{0};
96  word |= buildWord(RUN3_TIMESLICE_MULT_WORD_ID_VAL, RUN3_TIMESLICE_MULT_WORD_ID_SHIFT, RUN3_TIMESLICE_MULT_WORD_ID_MASK);
97  word |= buildWord(RUN3_TIMESLICE_WORD_NUM_VAL, RUN3_TIMESLICE_MULT_WORD_NUM_SHIFT, RUN3_TIMESLICE_MULT_WORD_NUM_MASK);
98  word |= buildWord(bcid, RUN3_TIMESLICE_BCID_SHIFT, RUN3_TIMESLICE_BCID_MASK);
99  word |= buildWord(tobCount, RUN3_TIMESLICE_NTOB_SHIFT, RUN3_TIMESLICE_NTOB_MASK);
100  word |= buildWord(candCount, RUN3_TIMESLICE_NCAND_SHIFT, RUN3_TIMESLICE_NCAND_MASK);
101  return word;
102  }
103 
105  inline constexpr auto topoHeader(uint32_t word) {
106  struct {
107  bool flag0{0};
108  bool flag1{0};
109  bool flag2{0};
110  bool flag3{0};
111  uint32_t pt{0};
112  uint32_t etacode{0};
113  uint32_t phicode{0};
114  uint32_t barrel_eta_lookup{0};
115  uint32_t barrel_phi_lookup{0};
116  uint32_t hemi{0};
117  uint32_t det{0};
118  uint32_t sec{0};
119  uint32_t roi{0};
120  } header;
121  header.flag0 = maskedWord(word, RUN3_TOPO_WORD_FLAGS_SHIFT, 0x1); //20
122  header.flag1 = maskedWord(word, RUN3_TOPO_WORD_FLAGS_SHIFT+1, 0x1); //21
123  header.flag2 = maskedWord(word, RUN3_TOPO_WORD_FLAGS_SHIFT+2, 0x1); //22
124  header.flag3 = maskedWord(word, RUN3_TOPO_WORD_FLAGS_SHIFT+3, 0x1); //23
125  header.pt = maskedWord(word, RUN3_TOPO_WORD_PT_SHIFT, RUN3_TOPO_WORD_PT_MASK);
126  header.etacode = maskedWord(word, RUN3_TOPO_WORD_ETA_SHIFT, RUN3_TOPO_WORD_ETA_MASK);
127  header.phicode = maskedWord(word, RUN3_TOPO_WORD_PHI_SHIFT, RUN3_TOPO_WORD_PHI_MASK);
128  // HEMISPHERE 0: C-side (-) / 1: A-side (-)
129  header.hemi = maskedWord(word, RUN3_TOPO_WORD_HEMI_SHIFT, RUN3_TOPO_WORD_HEMI_MASK);
130  // Barrel: 00 - EC: 1X - FW: 01 - see: https://indico.cern.ch/event/864390/contributions/3642129/attachments/1945776/3234220/ctp_topo_encoding.pdf
131  header.det = maskedWord(word, RUN3_TOPO_WORD_DET_SHIFT, RUN3_TOPO_WORD_DET_MASK);
132  // set EC to 2 instead of sometimes 3 - see above why
133  if (header.det > 2) header.det = 2;
134  // Decode Barrel:
135  if (header.det == 0){
136  header.sec = header.phicode >> 3;
137  header.barrel_eta_lookup = (header.etacode >> 1) & 0xf;
138  header.barrel_phi_lookup = header.phicode & 0x7;
139  }
140  // FWD
141  else if (header.det == 1){
142  header.sec = header.phicode >> 3 ;
143  header.roi = ((header.etacode & 0x1f) << 2) | ((header.phicode >> 1) & 0x3) ;
144  }
145  // EC
146  else if (header.det == 2){
147  header.sec = header.phicode >> 2 ;
148  header.roi = ((header.etacode & 0x3f) << 2) | (header.phicode & 0x3) ;
149  }
150  return header;
151  }
152 
154  inline constexpr uint32_t multiplicityWordNumber(uint32_t word) {
155  return maskedWord(word, RUN3_TIMESLICE_MULT_WORD_NUM_SHIFT, RUN3_TIMESLICE_MULT_WORD_NUM_MASK);
156  }
157 
159  inline constexpr std::array<uint32_t,3> multiplicityWords(uint64_t multiplicity, uint32_t triggerBits, bool overflow) {
160  std::array<uint32_t,3> words{}; // zero-initialised
161  for (uint32_t iWord=0; iWord<words.size(); ++iWord) {
162  words[iWord] |= buildWord(RUN3_TIMESLICE_MULT_WORD_ID_VAL, RUN3_TIMESLICE_MULT_WORD_ID_SHIFT, RUN3_TIMESLICE_MULT_WORD_ID_MASK);
163  words[iWord] |= buildWord(iWord+1, RUN3_TIMESLICE_MULT_WORD_NUM_SHIFT, RUN3_TIMESLICE_MULT_WORD_NUM_MASK);
164  }
165  words[0] |= maskedWord(multiplicity, RUN3_MULTIPLICITY_PART1_SHIFT, RUN3_MULTIPLICITY_PART1_MASK);
166  words[1] |= maskedWord(multiplicity, RUN3_MULTIPLICITY_PART2_SHIFT, RUN3_MULTIPLICITY_PART2_MASK);
167  words[2] |= maskedWord(multiplicity, RUN3_MULTIPLICITY_PART3_SHIFT, RUN3_MULTIPLICITY_PART3_MASK);
168  words[2] |= maskedWord(triggerBits, RUN3_MULTIPLICITY_TRIGBITS_SHIFT, RUN3_MULTIPLICITY_TRIGBITS_MASK);
169  words[2] |= maskedWord(static_cast<uint32_t>(overflow), RUN3_MULTIPLICITY_OVERFLOW_SHIFT, RUN3_MULTIPLICITY_OVERFLOW_MASK);
170  return words;
171  }
172 
174  inline constexpr SubsysID getSubsysID(uint32_t word) {
175  if (wordEquals(word, RUN3_SUBSYS_ADDRESS_EC_SHIFT, RUN3_SUBSYS_ADDRESS_EC_MASK, RUN3_SUBSYS_ADDRESS_EC_VAL)) {
176  return SubsysID::Endcap;
177  } else if (wordEquals(word, RUN3_SUBSYS_ADDRESS_BAFW_SHIFT, RUN3_SUBSYS_ADDRESS_BAFW_MASK, RUN3_SUBSYS_ADDRESS_FW_VAL)) {
178  return SubsysID::Forward;
179  } else if (wordEquals(word, RUN3_SUBSYS_ADDRESS_BAFW_SHIFT, RUN3_SUBSYS_ADDRESS_BAFW_MASK, RUN3_SUBSYS_ADDRESS_BA_VAL)) {
180  return SubsysID::Barrel;
181  }
182  return SubsysID::Undefined;
183  }
184 
186  inline std::vector<size_t> getDataStatusWordErrors(uint32_t word) {
187  uint16_t status = maskedWord(word, RUN3_STATUS_WORD_SHIFT, RUN3_STATUS_WORD_MASK);
188  if (status==0) return {};
189  std::vector<size_t> errors;
190  for (size_t bit=0; bit<DataStatusWordErrors.size(); ++bit) {
191  if (wordEquals(status, bit, 1u, 1u)) {
192  errors.push_back(bit);
193  }
194  }
195  return errors;
196  }
197 
200  uint32_t word = buildWord(RUN3_STATUS_WORD_ID_VAL, RUN3_STATUS_WORD_ID_SHIFT, RUN3_STATUS_WORD_ID_MASK);
201  word |= status;
202  return word;
203  }
208  };
209  struct Multiplicity {
210  bool nswMon = false;
211  bool candOverflow = false;
212  std::vector<uint32_t> cnt = {};
214  };
215  struct Candidate {
216  bool side = false;//C=0 A=1
219  uint32_t pt{0}; //1-15
220  // RPC pT in the cand word is a number between 1 and 6. Needs to be mapped between 1 and 15
224  float eta{0.};
225  float phi{0.};
226  bool errorFlag = false;
227  bool vetoFlag = false;
228  bool sectorFlag_gtN = false;//BA: gt2, EC/FW: gt4
229  bool sectorFlag_nswMon = false;//EC/FW only
230  bool candFlag_phiOverlap = false;//BA only
231  bool candFlag_gt1CandRoi = false;//BA only
232  bool candFlag_GoodMF = false;//EC/FW only
233  bool candFlag_InnerCoin = false;//EC/FW only
234  bool candFlag_BW23 = false;//EC/FW only
235  bool candFlag_Charge = false;//EC/FW only
237  {
238  errorFlag = maskedWord(word, RUN3_CAND_WORD_SECTORERRORFLAG_SHIFT, RUN3_CAND_WORD_SECTORERRORFLAG_MASK);
239  type = getSubsysID(word);
240  side = maskedWord(word, RUN3_SUBSYS_HEMISPHERE_SHIFT, RUN3_SUBSYS_HEMISPHERE_MASK);
241  vetoFlag = maskedWord(word, RUN3_CAND_WORD_VETO_SHIFT, RUN3_CAND_WORD_VETO_MASK);
242  sectorFlag_gtN = maskedWord(word, RUN3_CAND_WORD_SECTORFLAGS_GTN_SHIFT, RUN3_CAND_WORD_SECTORFLAGS_GTN_MASK);
243  pt = maskedWord(word, RUN3_CAND_WORD_PT_SHIFT, RUN3_CAND_WORD_PT_MASK);
244  mappedPt = maskedWord(word, RUN3_CAND_WORD_PT_SHIFT, RUN3_CAND_WORD_PT_MASK);
245  roi = maskedWord(word, RUN3_CAND_WORD_ROI_SHIFT, RUN3_CAND_WORD_ROI_MASK);
246  sectorFlag_nswMon = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_NSWMON_SHIFT, RUN3_CAND_WORD_CANDFLAGS_NSWMON_MASK); // for BA is zero
247  if(type==SubsysID::Endcap) {
248  candFlag_GoodMF = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_GOODMF_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_GOODMF_MASK);
249  candFlag_InnerCoin = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_INNERCOIN_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_INNERCOIN_MASK);
250  candFlag_BW23 = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_BW23_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_BW23_MASK);
251  candFlag_Charge = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_CHARGE_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_CHARGE_MASK);
252  num = maskedWord(word, RUN3_CAND_SECTORID_SHIFT, ENDCAP_SECTORID_MASK);
253  subsystem = 1;
254  }
255  else if(type==SubsysID::Barrel)
256  {
257  candFlag_phiOverlap = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_BA_PHIOVERLAP_SHIFT, RUN3_CAND_WORD_CANDFLAGS_BA_PHIOVERLAP_MASK);
258  candFlag_gt1CandRoi = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_BA_GT1ROI_SHIFT, RUN3_CAND_WORD_CANDFLAGS_BA_GT1ROI_MASK);
259  subsystem = 0;
260  num = maskedWord(word, RUN3_CAND_SECTORID_SHIFT, BARREL_SECTORID_MASK);//same as FW
261  }
262  else
263  {
264  candFlag_GoodMF = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_GOODMF_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_GOODMF_MASK);
265  candFlag_InnerCoin = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_INNERCOIN_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_INNERCOIN_MASK);
266  candFlag_BW23 = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_BW23_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_BW23_MASK);
267  candFlag_Charge = maskedWord(word, RUN3_CAND_WORD_CANDFLAGS_ECFW_CHARGE_SHIFT, RUN3_CAND_WORD_CANDFLAGS_ECFW_CHARGE_MASK);
268  num = maskedWord(word, RUN3_CAND_SECTORID_SHIFT, BARREL_SECTORID_MASK);//same as FW
269  subsystem = 2;
270  }
271  }
272  void print() const//this function has only debug purposes
273  {
274  std::cout << "Muon word content (cand): ";
275  std::cout << (side?"Side A, ":"Side C, ");
276  if(type == SubsysID::Barrel)
277  std::cout << "BA" << num << " ";
278  else
279  std::cout << (type==SubsysID::Forward?"FW":"EC") << num << " ";
280  std::cout << "Eta = " << eta << " ";
281  std::cout << "Phi = " << phi << " ";
282  std::cout << "pT = " << pt << " "; //Remember the internal mapping. RPC has 6 thresholds and TGC has 15.
283  std::cout << "mappedPt = " << mappedPt << " ";
284  std::cout << "CF: ";
285  if(type != SubsysID::Barrel) {
286  std::cout << " GMF: " << (candFlag_GoodMF?"1":"0");
287  std::cout << " InC: " << (candFlag_InnerCoin?"1":"0");
288  std::cout << " -BW: " << (candFlag_BW23?"1":"0");
289  std::cout << " Chg: " << (candFlag_Charge?"1":"0");
290  }
291  else {
292  std::cout << " PhO: " << (candFlag_phiOverlap?"1":"0");
293  std::cout << " 1Ro: " << (candFlag_gt1CandRoi?"1":"0");
294  }
295  std::cout << " SF: " << std::endl;
296  if(type != SubsysID::Barrel) {
297  std::cout << " NSM: " << (sectorFlag_nswMon?"1":"0");
298  std::cout << " 4SL: " << (sectorFlag_gtN?"1":"0");
299  }
300  else {
301  std::cout << " 2SL: " << (sectorFlag_gtN?"1":"0");
302  }
303  std::cout << " Veto = " << (vetoFlag?"1":"0") << " ";
304  std::cout << std::endl;
305  }
306  };
307  struct TopoTOB {
308  bool side = false;//C=0 A=1
309  uint32_t pt{0};//1-15
318  float etaDecoded{0.};
319  float phiDecoded{0.};
320  bool candFlag_GoodMF = false;//EC/FW only
321  bool candFlag_InnerCoin = false;//EC/FW only
322  bool candFlag_BW23 = false;//EC/FW only
323  bool candFlag_Charge = false;//EC/FW only
324  void setTopoRoI()
325  {
326  // BA
327  if (det == 0){
328  sec = phiRaw >> 3;
329  barrel_eta_lookup = (etaRaw >> 1) & 0xf;
330  barrel_phi_lookup = phiRaw & 0x7;
331  }
332  // FWD
333  else if (det == 1){
334  sec = phiRaw >> 3 ;
335  roi = ((etaRaw & 0x1f) << 2) | ((phiRaw >> 1) & 0x3) ;
336  }
337  // EC
338  else if (det == 2){
339  sec = phiRaw >> 2 ;
340  roi = ((etaRaw & 0x3f) << 2) | (phiRaw & 0x3) ;
341  }
342  }
344  {
345  side = maskedWord(word, RUN3_TOPO_WORD_HEMI_SHIFT, RUN3_TOPO_WORD_HEMI_MASK);
346  det = maskedWord(word, RUN3_TOPO_WORD_DET_SHIFT, RUN3_TOPO_WORD_DET_MASK);
347  pt = maskedWord(word, RUN3_TOPO_WORD_PT_SHIFT, RUN3_TOPO_WORD_PT_MASK);
348  // Barrel:00 - EC:1X - FW:01 - see: https://indico.cern.ch/event/864390/contributions/3642129/attachments/1945776/3234220/ctp_topo_encoding.pdf
349  // set EC to 2 instead of sometimes 3 - see above why
350  if(det > 2) det = 2;
351  if(det == 0) subsystem = 0;
352  else if(det == 1) subsystem = 2;
353  else if(det == 2) subsystem = 1;
354  candFlag_GoodMF = maskedWord(word, RUN3_TOPO_WORD_CANDFLAGS_ECFW_GOODMF_SHIFT, RUN3_TOPO_WORD_CANDFLAGS_ECFW_GOODMF_MASK);
355  candFlag_InnerCoin = maskedWord(word, RUN3_TOPO_WORD_CANDFLAGS_ECFW_INNERCOIN_SHIFT, RUN3_TOPO_WORD_CANDFLAGS_ECFW_INNERCOIN_MASK);
356  candFlag_BW23 = maskedWord(word, RUN3_TOPO_WORD_CANDFLAGS_ECFW_BW23_SHIFT, RUN3_TOPO_WORD_CANDFLAGS_ECFW_BW23_MASK);
357  candFlag_Charge = maskedWord(word, RUN3_TOPO_WORD_CANDFLAGS_ECFW_CHARGE_SHIFT, RUN3_TOPO_WORD_CANDFLAGS_ECFW_CHARGE_MASK);
358  etaRaw = maskedWord(word, RUN3_TOPO_WORD_ETA_SHIFT, RUN3_TOPO_WORD_ETA_MASK);
359  phiRaw = maskedWord(word, RUN3_TOPO_WORD_PHI_SHIFT, RUN3_TOPO_WORD_PHI_MASK);
360  setTopoRoI();
361  }
362  void print() const //this function is just for debug purposes
363  {
364  std::cout << "Muon word content (TOB) : ";
365  std::cout << (side?"Side A, ":"Side C, ");
366  if(det == 0)
367  std::cout << "BA" << sec << " ";
368  else
369  std::cout << (det==1?"FW":"EC") << sec << " ";
370  std::cout << "Eta = " << etaDecoded << " ";
371  std::cout << "Phi = " << phiDecoded << " ";
372  std::cout << "pT = " << pt << std::endl;
373  std::cout << "CF:";
374  if(det == 1 || det == 2) {
375  std::cout << " GMF: " << (candFlag_GoodMF?"1":"0");
376  std::cout << " InC: " << (candFlag_InnerCoin?"1":"0");
377  std::cout << " -BW: " << (candFlag_BW23?"1":"0");
378  std::cout << " Chg: " << (candFlag_Charge?"1":"0");
379  }
380  std::cout << std::endl;
381  }
382  };
383 
384  struct Slice {
387  std::vector<Candidate> cand = {};
388  std::vector<TopoTOB> tob = {};
389  };
390 
391 } // namespace LVL1::MuCTPIBits
392 
393 #endif // TRIGT1MUCTPIBITS_HELPERSPHASE1_H
LVL1::MuCTPIBits::Multiplicity
Definition: HelpersPhase1.h:209
LVL1::MuCTPIBits::WordType
WordType
Definition: HelpersPhase1.h:16
LVL1::MuCTPIBits::Candidate::candFlag_phiOverlap
bool candFlag_phiOverlap
Definition: HelpersPhase1.h:230
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
LVL1::MuCTPIBits::TopoTOB::etaDecoded
float etaDecoded
Definition: HelpersPhase1.h:318
LVL1::MuCTPIBits::TopoTOB::barrel_phi_lookup
uint32_t barrel_phi_lookup
Definition: HelpersPhase1.h:314
LVL1::MuCTPIBits::Multiplicity::cnt
std::vector< uint32_t > cnt
Definition: HelpersPhase1.h:212
LVL1::MuCTPIBits::WordType::Candidate
@ Candidate
LVL1::MuCTPIBits::Candidate::candFlag_InnerCoin
bool candFlag_InnerCoin
Definition: HelpersPhase1.h:233
LVL1::MuCTPIBits::getDataStatusWordErrors
std::vector< size_t > getDataStatusWordErrors(uint32_t word)
Decode the data status word (returns a vector of bit indices for the errors set - empty if no errors)
Definition: HelpersPhase1.h:186
LVL1::MuCTPIBits::getWordType
constexpr WordType getWordType(uint32_t word)
Determine the type of a MUCTPI ROD word.
Definition: HelpersPhase1.h:64
LVL1::MuCTPIBits::Candidate::vetoFlag
bool vetoFlag
Definition: HelpersPhase1.h:227
LVL1::MuCTPIBits::TopoTOB::TopoTOB
TopoTOB(uint32_t word)
Definition: HelpersPhase1.h:343
LVL1::MuCTPIBits::TopoTOB::print
void print() const
Definition: HelpersPhase1.h:362
header
Definition: hcg.cxx:526
LVL1::MuCTPIBits::TopoTOB::barrel_eta_lookup
uint32_t barrel_eta_lookup
Definition: HelpersPhase1.h:313
LVL1::MuCTPIBits::maskedWord
constexpr uint32_t maskedWord(uint32_t word, uint32_t shift, uint32_t mask)
Extract sub-word from 32-bit word by applying a shift and a mask.
Definition: HelpersPhase1.h:44
LVL1::MuCTPIBits::Candidate::sectorFlag_gtN
bool sectorFlag_gtN
Definition: HelpersPhase1.h:228
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
LVL1::MuCTPIBits::Candidate::candFlag_GoodMF
bool candFlag_GoodMF
Definition: HelpersPhase1.h:232
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::MuCTPIBits::TopoTOB::candFlag_BW23
bool candFlag_BW23
Definition: HelpersPhase1.h:322
TRTCalib_Extractor.det
det
Definition: TRTCalib_Extractor.py:36
LVL1::MuCTPIBits::SubsysID::MAX
@ MAX
LVL1::MuCTPIBits::Candidate::roi
uint32_t roi
Definition: HelpersPhase1.h:222
LVL1::MuCTPIBits::TopoTOB::phiRaw
uint32_t phiRaw
Definition: HelpersPhase1.h:311
LVL1::MuCTPIBits::Candidate::type
SubsysID type
Definition: HelpersPhase1.h:217
LVL1::MuCTPIBits::SubsysID::Undefined
@ Undefined
LVL1::MuCTPIBits::buildWord
constexpr uint32_t buildWord(uint32_t value, uint32_t shift, uint32_t mask)
Extract sub-word from 32-bit word by applying a shift and a mask.
Definition: HelpersPhase1.h:54
test_pyathena.pt
pt
Definition: test_pyathena.py:11
LVL1::MuCTPIBits::Candidate::Candidate
Candidate(uint32_t word)
Definition: HelpersPhase1.h:236
LVL1::MuCTPIBits::Candidate::eta
float eta
Definition: HelpersPhase1.h:224
LVL1::MuCTPIBits::TopoTOB::side
bool side
Definition: HelpersPhase1.h:308
athena.value
value
Definition: athena.py:124
LVL1::MuCTPIBits::TopoTOB::subsystem
uint32_t subsystem
Definition: HelpersPhase1.h:317
LVL1::MuCTPIBits::Candidate::subsystem
uint32_t subsystem
Definition: HelpersPhase1.h:223
LVL1::MuCTPIBits::TopoTOB::candFlag_Charge
bool candFlag_Charge
Definition: HelpersPhase1.h:323
LVL1::MuCTPIBits::Candidate::phi
float phi
Definition: HelpersPhase1.h:225
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
LVL1::MuCTPIBits::Candidate::side
bool side
Definition: HelpersPhase1.h:216
LVL1::MuCTPIBits::Slice::cand
std::vector< Candidate > cand
Definition: HelpersPhase1.h:387
LVL1::MuCTPIBits::Slice::tob
std::vector< TopoTOB > tob
Definition: HelpersPhase1.h:388
LVL1::MuCTPIBits::wordEquals
constexpr bool wordEquals(uint32_t word, uint32_t shift, uint32_t mask, uint32_t value)
Compare a sub-word of a 32-bit word to an expected value.
Definition: HelpersPhase1.h:59
LVL1::MuCTPIBits::TimesliceHeader::candCount
uint16_t candCount
Definition: HelpersPhase1.h:207
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
LVL1::MuCTPIBits::WordType::Topo
@ Topo
LVL1::MuCTPIBits::Slice::mlt
Multiplicity mlt
Definition: HelpersPhase1.h:386
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
LVL1::MuCTPIBits::Candidate::candFlag_BW23
bool candFlag_BW23
Definition: HelpersPhase1.h:234
LVL1::MuCTPIBits::SubsysID::Endcap
@ Endcap
LVL1::MuCTPIBits::TopoTOB::candFlag_InnerCoin
bool candFlag_InnerCoin
Definition: HelpersPhase1.h:321
LVL1::MuCTPIBits::Multiplicity::candOverflow
bool candOverflow
Definition: HelpersPhase1.h:211
LVL1::MuCTPIBits::multiplicityWordNumber
constexpr uint32_t multiplicityWordNumber(uint32_t word)
Decode the index of the multitpicity word, which is 1, 2, or 3.
Definition: HelpersPhase1.h:154
LVL1::MuCTPIBits::Slice::nCand
uint32_t nCand
Definition: HelpersPhase1.h:385
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
LVL1::MuCTPIBits::Candidate::sectorFlag_nswMon
bool sectorFlag_nswMon
Definition: HelpersPhase1.h:229
LVL1::MuCTPIBits::SubsysID::Forward
@ Forward
LVL1::MuCTPIBits::Candidate::pt
uint32_t pt
Definition: HelpersPhase1.h:219
LVL1::MuCTPIBits::topoHeader
constexpr auto topoHeader(uint32_t word)
Decode topo word :
Definition: HelpersPhase1.h:105
LVL1::MuCTPIBits::TopoTOB::phiDecoded
float phiDecoded
Definition: HelpersPhase1.h:319
LVL1::MuCTPIBits::Slice::nTOB
uint32_t nTOB
Definition: HelpersPhase1.h:385
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
LVL1::MuCTPIBits::Candidate
Definition: HelpersPhase1.h:215
LVL1::MuCTPIBits::multiplicityWords
constexpr std::array< uint32_t, 3 > multiplicityWords(uint64_t multiplicity, uint32_t triggerBits, bool overflow)
Encode the multiplicity words.
Definition: HelpersPhase1.h:159
LVL1::MuCTPIBits::dataStatusWord
constexpr uint32_t dataStatusWord(uint16_t status)
Encode the data status word.
Definition: HelpersPhase1.h:199
LVL1::MuCTPIBits::Candidate::candFlag_gt1CandRoi
bool candFlag_gt1CandRoi
Definition: HelpersPhase1.h:231
LVL1::MuCTPIBits::TimesliceHeader::tobCount
uint16_t tobCount
Definition: HelpersPhase1.h:206
LVL1::MuCTPIBits::timesliceHeader
constexpr auto timesliceHeader(uint32_t word)
Decode timeslice word.
Definition: HelpersPhase1.h:81
LVL1::MuCTPIBits::Candidate::candFlag_Charge
bool candFlag_Charge
Definition: HelpersPhase1.h:235
LVL1::MuCTPIBits::TopoTOB::det
uint32_t det
Definition: HelpersPhase1.h:315
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
LVL1::MuCTPIBits::getSubsysID
constexpr SubsysID getSubsysID(uint32_t word)
Decode the subsys ID from RoI candidate word.
Definition: HelpersPhase1.h:174
MuCTPI_Bits.h
LVL1::MuCTPIBits::TopoTOB
Definition: HelpersPhase1.h:307
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
LVL1::MuCTPIBits::WordType::Multiplicity
@ Multiplicity
LVL1::MuCTPIBits::Candidate::mappedPt
uint32_t mappedPt
Definition: HelpersPhase1.h:221
LVL1::MuCTPIBits::WordType::Status
@ Status
LVL1::MuCTPIBits::WordType::MAX
@ MAX
LVL1::MuCTPIBits::RPCtoTGC_pt_map
const uint32_t RPCtoTGC_pt_map[7]
Definition: HelpersPhase1.h:20
LVL1::MuCTPIBits::TopoTOB::candFlag_GoodMF
bool candFlag_GoodMF
Definition: HelpersPhase1.h:320
LVL1::MuCTPIBits::Multiplicity::bits
uint64_t bits
Definition: HelpersPhase1.h:213
LVL1::MuCTPIBits::TopoTOB::setTopoRoI
void setTopoRoI()
Definition: HelpersPhase1.h:324
LVL1::MuCTPIBits::SubsysID
SubsysID
Definition: HelpersPhase1.h:17
LVL1::MuCTPIBits::Slice
Definition: HelpersPhase1.h:384
LVL1::MuCTPIBits::TimesliceHeader::bcid
uint16_t bcid
Definition: HelpersPhase1.h:205
LVL1::MuCTPIBits::TimesliceHeader
Definition: HelpersPhase1.h:204
LVL1::MuCTPIBits::WordType::Undefined
@ Undefined
LVL1::MuCTPIBits::TopoTOB::etaRaw
uint32_t etaRaw
Definition: HelpersPhase1.h:310
LVL1::MuCTPIBits
Definition: HelpersPhase1.h:14
LVL1::MuCTPIBits::Candidate::num
uint32_t num
Definition: HelpersPhase1.h:218
merge.status
status
Definition: merge.py:17
LVL1::MuCTPIBits::WordType::Timeslice
@ Timeslice
makeTOC.header
header
Definition: makeTOC.py:28
checkFileSG.words
words
Definition: checkFileSG.py:76
LVL1::MuCTPIBits::SubsysID::Barrel
@ Barrel
LVL1::MuCTPIBits::Candidate::errorFlag
bool errorFlag
Definition: HelpersPhase1.h:226
LVL1::MuCTPIBits::Candidate::print
void print() const
Definition: HelpersPhase1.h:272
LVL1::MuCTPIBits::TopoTOB::sec
uint32_t sec
Definition: HelpersPhase1.h:316
LVL1::MuCTPIBits::Slice::bcid
uint32_t bcid
Definition: HelpersPhase1.h:385
LVL1::MuCTPIBits::TopoTOB::roi
uint32_t roi
Definition: HelpersPhase1.h:312
LVL1::MuCTPIBits::TopoTOB::pt
uint32_t pt
Definition: HelpersPhase1.h:309
LVL1::MuCTPIBits::Multiplicity::nswMon
bool nswMon
Definition: HelpersPhase1.h:210