ATLAS Offline Software
Loading...
Searching...
No Matches
gFexGlobalRoI_v1.cxx
Go to the documentation of this file.
1
2/*
3 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4*/
5
6
7// System include(s):
8#include <stdexcept>
9
10// xAOD include(s):
12
13// Local include(s):
15
16namespace xAOD {
17
19
24
38
39
42 setWord )
44 setScaleOne )
46 setScaleTwo )
48 setStatusOne )
50 setStatusTwo )
52 setSaturated )
54 setGlobalType )
56 setQuantityOne )
58 setQuantityTwo )
59
60
62
63
65 int gFexGlobalRoI_v1::unpackType() const {
66 auto tobID = (word() >> s_tobIDBit) & s_tobIDMask;
67 if (tobID == 0 ) return gNull;
68 else if (tobID == 1 ) return gScalar;
69 else if (tobID == 2 ) return gMET;
70 else if (tobID == 3 ) return gMHT;
71 else if (tobID == 4 ) return gMST;
72 else return -999;
73 }
74
75 bool gFexGlobalRoI_v1::isgScalar() const {
76 return globalType() == gScalar;
77 }
78
79 bool gFexGlobalRoI_v1::isgMET() const {
80 return globalType() == gMET;
81 }
82
83 bool gFexGlobalRoI_v1::isgMHT() const {
84 return globalType() == gMHT;
85 }
86
87 bool gFexGlobalRoI_v1::isgMST() const {
88 return globalType() == gMST;
89 }
90
91
92
93 unsigned int gFexGlobalRoI_v1::unpackStatusOne() const{
94 return (word() >> s_statusOneBit) & s_statusOneMask;
95 }
96
97 unsigned int gFexGlobalRoI_v1::unpackStatusTwo() const{
98 return (word() >> s_statusTwoBit) & s_statusTwoMask;
99 }
100
101 unsigned int gFexGlobalRoI_v1::unpackSaturated() const{
102 return (word() >> s_saturBit) & s_saturMask;
103 }
104
105
108 int16_t quantity = (word() >> s_quantityOneBit) & s_quantityOneMask;
109 int SIGNMASK = 0x0800;
110 int EXTENDS = 0xF000;
111 if ((globalType() != gNull) && (globalType() != gScalar)){
112 if( (SIGNMASK & quantity ) ) {
113 quantity = ( EXTENDS | quantity);
114 }
115 }
116 return quantity;
117 }
118
120 int16_t quantity = (word() >> s_quantityTwoBit) & s_quantityTwoMask;
121 int SIGNMASK = 0x0800;
122 int EXTENDS = 0xF000;
123 if ((globalType() != gNull) && (globalType() != gScalar)){
124 if( (SIGNMASK & quantity ) ) {
125 quantity = ( EXTENDS | quantity);
126 }
127 }
128 return quantity;
129
130 }
131
132
134
138 if (globalType() != gNull){
139 return quantityOne()*tobEtScaleOne();
140 }
141 return -999;
142 }
146 if (globalType() != gNull){
147 return quantityTwo()*tobEtScaleOne();
148 }
149
150 return -999;
151 }
154 float gFexGlobalRoI_v1::SumEt() const {
155 if (globalType() == gScalar ){
156 return quantityTwo()*tobEtScaleOne();
157 }
158 return -999;
159 }
160
161
162
163
164
165
166
167
168} // namespace xAOD
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
AuxElement()
Default constructor.
Class describing properties of a LVL1 gFEX global Trigger Object (TOB) in the xAOD format.
unsigned int unpackStatusTwo() const
retrieves the Status info for Quantity 1 from the 32-bit word
static const int s_statusOneBit
float METquantityTwo() const
floating point value (GeV, TOB scale)
void setWord(uint32_t value)
Set the "raw" 32-bit words describing the object candidate.
static const int s_quantityOneBit
@ gScalar
indicaes a null value (should be accompanied by a Status=0)
@ gMST
MET hard term components (MHTx, MHTy)
@ gMET
scalar values (MET, SumET))
@ gMHT
MET components (METx, METy)
int16_t quantityOne() const
TOB ET (decoded from TOB, stored for convenience)
int16_t quantityTwo() const
retrieves the Et index from the 32-bit word
static const int s_quantityTwoMask
static const int s_saturMask
void setQuantityTwo(int16_t value)
getter for integer ET on TOB scale (3.2 GeV/count)
int tobEtScaleOne() const
static const int s_statusTwoBit
static const int s_quantityTwoBit
int tobEtScaleTwo() const
int16_t unpackQuantityOne() const
setter for the above
int16_t unpackQuantityTwo() const
setter for the above
float METquantityOne() const
retrieves the Et index from the 32-bit word
unsigned int unpackStatusOne() const
void setStatusOne(uint8_t value)
static const int s_statusOneMask
static const int s_saturBit
Constants used in converting to ATLAS units.
void setSaturated(uint8_t value)
int globalType() const
retrieves the energy saturation status from the 32-bit word
bool isgScalar() const
Identification of object type with flags.
static const int s_statusTwoMask
unsigned int unpackSaturated() const
void initialize(uint32_t word, int tobEtScaleOne, int tobEtScaleTwo=0)
Initialise the object with its properties.
gFexGlobalRoI_v1()
Default constructor.
static const int s_quantityOneMask
void setQuantityOne(int16_t value)
getter for integer ET on TOB scale (3.2 GeV/count)
void setScaleOne(int value)
Set the "raw" 32-bit words describing the object candidate.
uint32_t word() const
The "raw" 32-bit word describing the object candidate.
void setGlobalType(int type)
void setStatusTwo(uint8_t value)
float SumEt() const
floating point value (GeV, TOB scale)
void setScaleTwo(int value)
Set the "raw" 32-bit words describing the object candidate.
void setWord(uint32_t)
Forward declaration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setScaleOne setStatusOne setSaturated quantityOne
setScaleOne setStatusOne saturated
setScaleOne setStatusOne setSaturated int16_t
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
setScaleOne statusOne
setEventNumber uint32_t