ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef TRIGT1CALO_CMXROI_H
5#define TRIGT1CALO_CMXROI_H
6
7#include <stdint.h>
8#include <vector>
9
11
12namespace LVL1 {
13
21
22class CMXRoI {
23
24 public:
25
26 enum SumType { NORMAL = 0, MASKED = 1 };
27
28 CMXRoI();
29 CMXRoI(uint32_t roiWord0, uint32_t roiWord1, uint32_t roiWord2,
30 uint32_t roiWord3, uint32_t roiWord4, uint32_t roiWord5);
31 CMXRoI(unsigned int ex, unsigned int ey, unsigned int et,
32 int exError, int eyError, int etError,
33 unsigned int sumEtHits, unsigned int missingEtHits,
34 unsigned int missingEtSigHits,
35 unsigned int exM, unsigned int eyM, unsigned int etM,
36 int exErrorM, int eyErrorM, int etErrorM,
37 unsigned int sumEtHitsM, unsigned int missingEtHitsM);
38
39 ~CMXRoI();
40
42 unsigned int ex(SumType type = NORMAL) const;
44 unsigned int ey(SumType type = NORMAL) const;
46 unsigned int et(SumType type = NORMAL) const;
48 int exError(SumType type = NORMAL) const;
50 int eyError(SumType type = NORMAL) const;
52 int etError(SumType type = NORMAL) const;
54 unsigned int sumEtHits(SumType type = NORMAL) const;
56 unsigned int missingEtHits(SumType type = NORMAL) const;
58 unsigned int missingEtSigHits() const;
59
61 uint32_t roiWord(int word) const;
63 unsigned int exWord(SumType type = NORMAL) const;
65 unsigned int eyWord(SumType type = NORMAL) const;
67 unsigned int etWord(SumType type = NORMAL) const;
69 bool setRoiWord(uint32_t roiWord);
70
71 private:
72
73 // RoI word IDs
74 static const int s_wordIdVal0 = 0x4;
75 static const int s_wordIdVal1 = 0x6;
76 static const int s_wordIdVal2 = 0x5;
77 // Data locations
78 static const int s_wordIdBit = 28;
79 static const int s_sumEtHitsBit = 16;
80 static const int s_missingEtHitsBit = 16;
81 static const int s_missingEtSigHitsBit = 16;
82 static const int s_energyBit = 0;
83 static const int s_overflowBit = 15;
84 static const int s_sumTypeBit = 26;
85 // Data masks
86 static const int s_wordIdMask = 0xf;
87 static const int s_sumEtHitsMask = 0xff;
88 static const int s_missingEtHitsMask = 0xff;
89 static const int s_missingEtSigHitsMask = 0xff;
90 static const int s_energyMask = 0x7fff;
91 static const int s_overflowMask = 0x1;
92 static const int s_sumTypeMask = 0x1;
93 // RoI word array offsets
94 static const int s_exOffset = 0;
95 static const int s_eyOffset = 2;
96 static const int s_etOffset = 4;
97 static const int s_maxRoiWords = 6;
98
99 // RoI words
100 std::vector<uint32_t> m_roiWords;
101
102};
103
104inline unsigned int CMXRoI::ex(SumType type) const
105{
107}
108
109inline unsigned int CMXRoI::ey(SumType type) const
110{
112}
113
114inline unsigned int CMXRoI::et(SumType type) const
115{
117}
118
119inline int CMXRoI::exError(SumType type) const
120{
122}
123
124inline int CMXRoI::eyError(SumType type) const
125{
127}
128
129inline int CMXRoI::etError(SumType type) const
130{
132}
133
134inline unsigned int CMXRoI::sumEtHits(SumType type) const
135{
137}
138
139inline unsigned int CMXRoI::missingEtHits(SumType type) const
140{
142}
143
148
149inline uint32_t CMXRoI::roiWord(int word) const
150{
151 return (word < s_maxRoiWords) ? m_roiWords[word] : 0;
152}
153
154inline unsigned int CMXRoI::exWord(SumType type) const
155{
156 return m_roiWords[s_exOffset+type];
157}
158
159inline unsigned int CMXRoI::eyWord(SumType type) const
160{
161 return m_roiWords[s_eyOffset+type];
162}
163
164inline unsigned int CMXRoI::etWord(SumType type) const
165{
166 return m_roiWords[s_etOffset+type];
167}
168
169} // end namespace
170
171CLASS_DEF(LVL1::CMXRoI, 133156981, 1)
172
173#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
unsigned int eyWord(SumType type=NORMAL) const
Return Ey RoI word.
int eyError(SumType type=NORMAL) const
Return Ey error flags (bit 0 Overflow)
unsigned int missingEtHits(SumType type=NORMAL) const
Return Missing-ET hits.
unsigned int sumEtHits(SumType type=NORMAL) const
Return Sum-ET hits.
unsigned int exWord(SumType type=NORMAL) const
Return Ex RoI word.
unsigned int missingEtSigHits() const
Return Missing-ET-Sig hits.
unsigned int ex(SumType type=NORMAL) const
Return Ex.
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition CMXRoI.cxx:115
int exError(SumType type=NORMAL) const
Return Ex error flags (bit 0 Overflow)
int etError(SumType type=NORMAL) const
Return Et error flags (bit 0 Overflow)
unsigned int et(SumType type=NORMAL) const
Return Et.
unsigned int etWord(SumType type=NORMAL) const
Return ET RoI word.
uint32_t roiWord(int word) const
Return packed Energy RoI word (0-5)
unsigned int ey(SumType type=NORMAL) const
Return Ey.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Extra patterns decribing particle interation process.