ATLAS Offline Software
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef TRIGT1CALO_CMMROI_H
5 #define TRIGT1CALO_CMMROI_H
6 
7 #include <stdint.h>
8 
10 
11 namespace LVL1 {
12 
21 class CMMRoI {
22 
23  public:
24 
25  CMMRoI();
29  int missingEtSigHits, int ex, int ey, int et,
30  int jetEtError, int sumEtError, int missingEtError,
31  int missingEtSigError, int exError, int eyError, int etError);
32 
33  ~CMMRoI();
34 
36  int jetEtHits() const;
38  int sumEtHits() const;
40  int missingEtHits() const;
42  int missingEtSigHits() const;
44  int ex() const;
46  int ey() const;
48  int et() const;
50  int jetEtError() const;
52  int sumEtError() const;
54  int missingEtError() const;
56  int missingEtSigError() const;
58  int exError() const;
60  int eyError() const;
62  int etError() const;
63 
65  uint32_t jetEtRoiWord() const;
67  uint32_t energyRoiWord0() const;
69  uint32_t energyRoiWord1() const;
71  uint32_t energyRoiWord2() const;
74 
75  private:
76 
77  // RoI word IDs
78  static const unsigned int s_jetEtWordIdVal = 0x5;
79  static const unsigned int s_wordIdVal0 = 0x4;
80  static const unsigned int s_wordIdVal1 = 0x6;
81  static const unsigned int s_wordIdVal2 = 0x5;
82  // Data locations
83  static const int s_jetEtWordIdBit = 29;
84  static const int s_wordIdBit = 28;
85  static const int s_jetEtHitsBit = 0;
86  static const int s_sumEtHitsBit = 16;
87  static const int s_missingEtHitsBit = 16;
88  static const int s_missingEtSigHitsBit = 16;
89  static const int s_energyBit = 0;
90  static const int s_jetEtParityBit = 28;
91  static const int s_parityBit = 27;
92  static const int s_overflowBit = 15;
93  // Data masks
94  static const int s_jetEtWordIdMask = 0x7;
95  static const int s_wordIdMask = 0xf;
96  static const int s_jetEtHitsMask = 0xf;
97  static const int s_sumEtHitsMask = 0xff;
98  static const int s_missingEtHitsMask = 0xff;
99  static const int s_missingEtSigHitsMask = 0xff;
100  static const int s_energyMask = 0x7fff;
101 
103  int parity(uint32_t roiWord) const;
105  int overflow(uint32_t roiWord) const;
106 
107  // RoI words
112 
113 };
114 
115 inline int CMMRoI::jetEtHits() const
116 {
118 }
119 
120 inline int CMMRoI::sumEtHits() const
121 {
123 }
124 
125 inline int CMMRoI::missingEtHits() const
126 {
128 }
129 
130 inline int CMMRoI::missingEtSigHits() const
131 {
133 }
134 
135 inline int CMMRoI::ex() const
136 {
138 }
139 
140 inline int CMMRoI::ey() const
141 {
143 }
144 
145 inline int CMMRoI::et() const
146 {
148 }
149 
150 inline int CMMRoI::jetEtError() const
151 {
152  return ((m_jetEtRoiWord >> s_jetEtParityBit) & 0x1) << 1;
153 }
154 
155 inline int CMMRoI::sumEtError() const
156 {
157  return parity(m_energyRoiWord1) << 1;
158 }
159 
160 inline int CMMRoI::missingEtError() const
161 {
162  return parity(m_energyRoiWord2) << 1;
163 }
164 
165 inline int CMMRoI::missingEtSigError() const
166 {
167  return parity(m_energyRoiWord0) << 1;
168 }
169 
170 inline int CMMRoI::exError() const
171 {
173 }
174 
175 inline int CMMRoI::eyError() const
176 {
178 }
179 
180 inline int CMMRoI::etError() const
181 {
183 }
184 
186 {
187  return m_jetEtRoiWord;
188 }
189 
191 {
192  return m_energyRoiWord0;
193 }
194 
196 {
197  return m_energyRoiWord1;
198 }
199 
201 {
202  return m_energyRoiWord2;
203 }
204 
205 inline int CMMRoI::parity(uint32_t roiWord) const
206 {
207  return (roiWord >> s_parityBit) & 0x1;
208 }
209 
211 {
212  return (roiWord >> s_overflowBit) & 0x1;
213 }
214 
215 } // end namespace
216 
217 CLASS_DEF(LVL1::CMMRoI, 187997318, 1)
218 
219 #endif
LVL1::CMMRoI::s_missingEtSigHitsMask
static const int s_missingEtSigHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:99
LVL1::CMMRoI::s_missingEtSigHitsBit
static const int s_missingEtSigHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:88
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
LVL1::CMMRoI::s_jetEtHitsMask
static const int s_jetEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:96
et
Extra patterns decribing particle interation process.
LVL1::CMMRoI::energyRoiWord2
uint32_t energyRoiWord2() const
Return packed Energy RoI word 2.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:200
LVL1::CMMRoI::m_energyRoiWord2
uint32_t m_energyRoiWord2
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:111
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::CMMRoI::exError
int exError() const
Return Ex error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:170
LVL1::CMMRoI::sumEtHits
int sumEtHits() const
Return Sum-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:120
LVL1::CMMRoI::overflow
int overflow(uint32_t roiWord) const
Return Energy overflow flag (0/1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:210
LVL1::CMMRoI::s_sumEtHitsMask
static const int s_sumEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:97
LVL1::CMMRoI::s_energyBit
static const int s_energyBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:89
LVL1::CMMRoI::s_energyMask
static const int s_energyMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:100
LVL1::CMMRoI::etError
int etError() const
Return Et error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:180
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::CMMRoI::s_wordIdVal1
static const unsigned int s_wordIdVal1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:80
LVL1::CMMRoI::m_energyRoiWord1
uint32_t m_energyRoiWord1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:110
LVL1::CMMRoI::s_missingEtHitsMask
static const int s_missingEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:98
LVL1::CMMRoI::ex
int ex() const
Return Ex.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:135
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
LVL1::CMMRoI::CMMRoI
CMMRoI()
Definition: CMMRoI.cxx:35
LVL1::CMMRoI::energyRoiWord0
uint32_t energyRoiWord0() const
Return packed Energy RoI word 0.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:190
LVL1::CMMRoI::~CMMRoI
~CMMRoI()
Definition: CMMRoI.cxx:84
LVL1::CMMRoI::jetEtError
int jetEtError() const
Return Jet-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:150
LVL1::CMMRoI::energyRoiWord1
uint32_t energyRoiWord1() const
Return packed Energy RoI word 1.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:195
LVL1::CMMRoI::sumEtError
int sumEtError() const
Return Sum-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:155
LVL1::CMMRoI::jetEtHits
int jetEtHits() const
Return Jet-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:115
LVL1::CMMRoI::s_wordIdVal2
static const unsigned int s_wordIdVal2
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:81
LVL1::CMMRoI::s_sumEtHitsBit
static const int s_sumEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:86
LVL1::CMMRoI::ey
int ey() const
Return Ey.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:140
LVL1::CMMRoI::et
int et() const
Return Et.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:145
LVL1::CMMRoI::s_overflowBit
static const int s_overflowBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:92
LVL1::CMMRoI::missingEtHits
int missingEtHits() const
Return Missing-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:125
LVL1::CMMRoI::parity
int parity(uint32_t roiWord) const
Return Energy parity error (0/1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:205
LVL1::CMMRoI::s_missingEtHitsBit
static const int s_missingEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:87
LVL1::CMMRoI::eyError
int eyError() const
Return Ey error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:175
LVL1::CMMRoI::jetEtRoiWord
uint32_t jetEtRoiWord() const
Return packed Jet-Et RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:185
LVL1::CMMRoI::s_wordIdMask
static const int s_wordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:95
LVL1::CMMRoI::s_parityBit
static const int s_parityBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:91
LVL1::CMMRoI::s_jetEtWordIdBit
static const int s_jetEtWordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:83
LVL1::CMMRoI::missingEtSigError
int missingEtSigError() const
Return Missing-ET-Sig error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:165
LVL1::CMMRoI::m_jetEtRoiWord
uint32_t m_jetEtRoiWord
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:108
LVL1::CMMRoI::s_wordIdBit
static const int s_wordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:84
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
LVL1::CMMRoI::s_jetEtWordIdVal
static const unsigned int s_jetEtWordIdVal
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:78
LVL1::CMMRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition: CMMRoI.cxx:90
LVL1::CMMRoI::missingEtError
int missingEtError() const
Return Missing-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:160
LVL1::CMMRoI::s_jetEtWordIdMask
static const int s_jetEtWordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:94
LVL1::CMMRoI::missingEtSigHits
int missingEtSigHits() const
Return Missing-ET-Sig hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:130
LVL1::CMMRoI::s_jetEtHitsBit
static const int s_jetEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:85
LVL1::CMMRoI::s_wordIdVal0
static const unsigned int s_wordIdVal0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:79
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::CMMRoI::s_jetEtParityBit
static const int s_jetEtParityBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:90
LVL1::CMMRoI
CMM RoI data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:21
LVL1::CMMRoI::m_energyRoiWord0
uint32_t m_energyRoiWord0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:109