ATLAS Offline Software
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 
10 #include "AthenaKernel/CLASS_DEF.h"
11 
12 namespace LVL1 {
13 
22 class 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,
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;
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 
104 inline unsigned int CMXRoI::ex(SumType type) const
105 {
107 }
108 
109 inline unsigned int CMXRoI::ey(SumType type) const
110 {
112 }
113 
114 inline unsigned int CMXRoI::et(SumType type) const
115 {
117 }
118 
119 inline int CMXRoI::exError(SumType type) const
120 {
122 }
123 
124 inline int CMXRoI::eyError(SumType type) const
125 {
127 }
128 
129 inline int CMXRoI::etError(SumType type) const
130 {
132 }
133 
134 inline unsigned int CMXRoI::sumEtHits(SumType type) const
135 {
137 }
138 
139 inline unsigned int CMXRoI::missingEtHits(SumType type) const
140 {
142 }
143 
144 inline unsigned int CMXRoI::missingEtSigHits() const
145 {
147 }
148 
149 inline uint32_t CMXRoI::roiWord(int word) const
150 {
151  return (word < s_maxRoiWords) ? m_roiWords[word] : 0;
152 }
153 
154 inline unsigned int CMXRoI::exWord(SumType type) const
155 {
156  return m_roiWords[s_exOffset+type];
157 }
158 
159 inline unsigned int CMXRoI::eyWord(SumType type) const
160 {
161  return m_roiWords[s_eyOffset+type];
162 }
163 
164 inline unsigned int CMXRoI::etWord(SumType type) const
165 {
166  return m_roiWords[s_etOffset+type];
167 }
168 
169 } // end namespace
170 
171 CLASS_DEF(LVL1::CMXRoI, 133156981, 1)
172 
173 #endif
et
Extra patterns decribing particle interation process.
LVL1::CMXRoI::s_energyBit
static const int s_energyBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:82
LVL1::CMXRoI::s_wordIdBit
static const int s_wordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:78
LVL1::CMXRoI::s_sumEtHitsMask
static const int s_sumEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:87
LVL1::CMXRoI::s_maxRoiWords
static const int s_maxRoiWords
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:97
LVL1::CMXRoI::missingEtHits
unsigned int missingEtHits(SumType type=NORMAL) const
Return Missing-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:139
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::CMXRoI::s_sumTypeBit
static const int s_sumTypeBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:84
LVL1::CMXRoI
CMX RoI data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:22
LVL1::CMXRoI::s_etOffset
static const int s_etOffset
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:96
LVL1::CMXRoI::eyError
int eyError(SumType type=NORMAL) const
Return Ey error flags (bit 0 Overflow)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:124
LVL1::CMXRoI::s_missingEtSigHitsMask
static const int s_missingEtSigHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:89
LVL1::CMXRoI::s_wordIdVal0
static const int s_wordIdVal0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:74
LVL1::CMXRoI::NORMAL
@ NORMAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:26
LVL1::CMXRoI::etWord
unsigned int etWord(SumType type=NORMAL) const
Return ET RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:164
LVL1::CMXRoI::s_wordIdVal2
static const int s_wordIdVal2
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:76
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::CMXRoI::etError
int etError(SumType type=NORMAL) const
Return Et error flags (bit 0 Overflow)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:129
LVL1::CMXRoI::~CMXRoI
~CMXRoI()
Definition: CMXRoI.cxx:109
LVL1::CMXRoI::s_missingEtSigHitsBit
static const int s_missingEtSigHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:81
LVL1::CMXRoI::SumType
SumType
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:26
LVL1::CMXRoI::s_overflowBit
static const int s_overflowBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:83
LVL1::CMXRoI::s_eyOffset
static const int s_eyOffset
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:95
LVL1::CMXRoI::exWord
unsigned int exWord(SumType type=NORMAL) const
Return Ex RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:154
LVL1::CMXRoI::ex
unsigned int ex(SumType type=NORMAL) const
Return Ex.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:104
LVL1::CMXRoI::s_sumTypeMask
static const int s_sumTypeMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:92
LVL1::CMXRoI::s_energyMask
static const int s_energyMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:90
LVL1::CMXRoI::s_wordIdMask
static const int s_wordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:86
LVL1::CMXRoI::ey
unsigned int ey(SumType type=NORMAL) const
Return Ey.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:109
LVL1::CMXRoI::exError
int exError(SumType type=NORMAL) const
Return Ex error flags (bit 0 Overflow)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:119
LVL1::CMXRoI::s_missingEtHitsMask
static const int s_missingEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:88
LVL1::CMXRoI::s_overflowMask
static const int s_overflowMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:91
xAOD::roiWord3
setRoIWord1 roiWord3
Definition: EnergySumRoI_v2.cxx:87
LVL1::CMXRoI::sumEtHits
unsigned int sumEtHits(SumType type=NORMAL) const
Return Sum-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:134
LVL1::CMXRoI::MASKED
@ MASKED
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:26
LVL1::CMXRoI::eyWord
unsigned int eyWord(SumType type=NORMAL) const
Return Ey RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:159
LVL1::CMXRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition: CMXRoI.cxx:115
LVL1::CMXRoI::s_wordIdVal1
static const int s_wordIdVal1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:75
LVL1::CMXRoI::s_exOffset
static const int s_exOffset
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:94
xAOD::roiWord5
setRoIWord1 setRoIWord3 roiWord5
Definition: EnergySumRoI_v2.cxx:91
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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::CMXRoI::s_sumEtHitsBit
static const int s_sumEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:79
LVL1::CMXRoI::m_roiWords
std::vector< uint32_t > m_roiWords
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:100
LVL1::CMXRoI::s_missingEtHitsBit
static const int s_missingEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:80
LVL1::CMXRoI::roiWord
uint32_t roiWord(int word) const
Return packed Energy RoI word (0-5)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:149
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::CMXRoI::et
unsigned int et(SumType type=NORMAL) const
Return Et.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:114
xAOD::roiWord1
roiWord1
Definition: EnergySumRoI_v1.cxx:49
LVL1::CMXRoI::CMXRoI
CMXRoI()
Definition: CMXRoI.cxx:36
LVL1::CMXRoI::missingEtSigHits
unsigned int missingEtSigHits() const
Return Missing-ET-Sig hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:144