ATLAS Offline Software
Loading...
Searching...
No Matches
JetEnergyRoI.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
5
10
11using namespace std;
12using namespace LVL1;
13
14namespace ROIB {
15
16 JetEnergyRoI::JetEnergyRoI( uint32_t RoIWord )
17 : m_roIWord( RoIWord )
18 {
19 }
20
25
31
32 uint32_t JetEnergyRoI::roIWord() const {
33 return m_roIWord;
34 }
35
36 unsigned int JetEnergyRoI::jetRoIVersion() const {
37 int type = BitOp::getValue( &m_roIWord, 0xe0000000 );
38
39 if (type == TrigT1CaloDefs::Run1JetType) return 1;
40 else if (type == TrigT1CaloDefs::Run2JetType) return 2;
41
42 return 999;
43 }
44
64
65 unsigned int JetEnergyRoI::electronicsID() const {
67 return 9999;
68 else {
69 return BitOp::getValue( &m_roIWord, 0x1ff10000 );
70 }
71 }
72
73 vector< unsigned int > JetEnergyRoI::thresholds() const {
74 vector< unsigned int > returnVec;
76 returnVec.push_back( 9999 );
77 else if ( jetRoIVersion() > 1 ) returnVec.push_back( 0 );
78 else {
80 returnVec.push_back( static_cast< unsigned int >( BitOp::isSet( &m_roIWord, i ) ) );
81 }
82 return returnVec;
83 }
84
85 unsigned int JetEnergyRoI::etLarge() const {
86 if (jetRoIVersion() < 2) return 0;
87 else return BitOp::getValue( &m_roIWord, 0x3ff );
88 }
89
90 unsigned int JetEnergyRoI::etSmall() const {
91 if (jetRoIVersion() < 2) return 0;
92 else return BitOp::getValue( &m_roIWord, 0x7fc00 );
93 }
94
95 unsigned int JetEnergyRoI::jetEt() const {
97 return 9999;
98 else {
99 return BitOp::getValue( &m_roIWord, 0x0000000f );
100 }
101 }
102
103 unsigned int JetEnergyRoI::energyX() const {
105 return 9999;
106 else {
107 return BitOp::getValue( &m_roIWord, 0x0000ffff );
108 }
109 }
110
111 unsigned int JetEnergyRoI::energyY() const {
113 return 9999;
114 else {
115 return BitOp::getValue( &m_roIWord, 0x0000ffff );
116 }
117 }
118
119 unsigned int JetEnergyRoI::energySum() const {
121 return 9999;
122 else {
123 return BitOp::getValue( &m_roIWord, 0x0000ffff );
124 }
125 }
126
127 unsigned int JetEnergyRoI::etSumType() const {
131 return 0;
132 else {
133 return BitOp::getValue( &m_roIWord, 0x04000000 );
134 }
135 }
136
137 vector< unsigned int > JetEnergyRoI::etSumThresholds() const {
138 vector< unsigned int > returnVec;
140 returnVec.push_back( 9999 );
141 else {
142 const unsigned int result = BitOp::getValue( &m_roIWord, 0x00ff0000 );
143 for ( unsigned int i = 0;i < TrigT1CaloDefs::numOfSumEtThresholds;i++ )
144 returnVec.push_back( static_cast< unsigned int >( BitOp::isSet( &result, i ) ) );
145 }
146 return returnVec;
147 }
148
149 vector< unsigned int > JetEnergyRoI::etMissThresholds() const {
150 vector< unsigned int > returnVec;
151
153 returnVec.push_back( 9999 );
154 else {
155 const unsigned int result = BitOp::getValue( &m_roIWord, 0x00ff0000 );
156 for ( unsigned int i = 0;i < TrigT1CaloDefs::numOfMissingEtThresholds;i++ )
157 returnVec.push_back( static_cast< unsigned int >( BitOp::isSet( &result, i ) ) );
158 }
159 return returnVec;
160 }
161
162 vector< unsigned int > JetEnergyRoI::metSigThresholds() const {
163 vector< unsigned int > returnVec;
165 returnVec.push_back( 9999 );
166 else {
167 const unsigned int result = BitOp::getValue( &m_roIWord, 0x00ff0000 );
168 for ( unsigned int i = 0;i < TrigT1CaloDefs::numOfMEtSigThresholds;i++ )
169 returnVec.push_back( static_cast< unsigned int >( BitOp::isSet( &result, i ) ) );
170 }
171 return returnVec;
172 }
173
174
175} // namespace ROIB
static unsigned int getValue(const unsigned int *uintValue, const unsigned int mask)
get the value in the input word represented by a bit pattern given as a bitmask
Definition BitOp.cxx:47
static bool isSet(const unsigned int *uintValue, int bit)
Check if a the given bit in the given unsigned int or int value is set.
Definition BitOp.h:47
static unsigned int UpdateJetEnergyRoI(unsigned int RoIWord)
Method to update Jet/Energy RoI word.
static const unsigned int numOfSumEtThresholds
static const unsigned int numOfMEtSigThresholds
static const unsigned int numOfMissingEtThresholds
static const unsigned int numOfJetThresholds
static const unsigned int numOfFwdJetThresholds
unsigned int jetRoIVersion() const
Jet RoI version (Run 1 or Run 2)
unsigned int energyX() const
Method returning Ex, Ey, and Esum.
unsigned int etLarge() const
Methods returning the jet ET cluster values for Run 2 RoIs.
unsigned int roIType() const
Method returning the RoI type (jet, energy, jet-Et)
unsigned int etSmall() const
std::vector< unsigned int > thresholds() const
Method returning the list of passed thresholds.
std::vector< unsigned int > metSigThresholds() const
std::vector< unsigned int > etSumThresholds() const
Method returning patterns for passed etsum and etmiss threhsolds.
unsigned int electronicsID() const
Method returning electronics address.
unsigned int etSumType() const
Eta range for MET/SumET RoIs (0 = full, 1 = restricted)
uint32_t roIWord() const
Method returning the RoI word.
unsigned int energySum() const
unsigned int energyY() const
std::vector< unsigned int > etMissThresholds() const
unsigned int jetEt() const
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Namespace of the LVL1 RoIB simulation.
STL namespace.