ATLAS Offline Software
TrigMissingET_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 // Implement the MissingET trigger object.
7 
8 // System include(s):
9 #include <vector>
10 #include <string>
11 #include <stdexcept>
12 
13 // EDM include(s):
15 
16 // Local include(s):
18 
19 namespace xAOD {
20 
21  // Default ctor
23  : SG::AuxElement() {
24 
25  }
26 
27  // Simple accessor functions for the "default variable" access pattern
28 
33  setSumEt)
37  setRoiWord)
38 
39  //
40  // Accessors used by multiple functions:
41  //
42  static const SG::AuxElement::Accessor< std::vector< std::string > >
43  nameAcc( "nameOfComponent" );
44  static const SG::AuxElement::Accessor< std::vector< float > >
45  exAcc( "exComponent" );
46  static const SG::AuxElement::Accessor< std::vector< float > >
47  eyAcc( "eyComponent" );
48  static const SG::AuxElement::Accessor< std::vector< float > >
49  ezAcc( "ezComponent" );
50  static const SG::AuxElement::Accessor< std::vector< float > >
51  sumEtAcc( "sumEtComponent" );
52  static const SG::AuxElement::Accessor< std::vector< float > >
53  sumEAcc( "sumEComponent" );
54  static const SG::AuxElement::Accessor< std::vector< float > >
55  calib0Acc( "calib0Component" );
56  static const SG::AuxElement::Accessor< std::vector< float > >
57  calib1Acc( "calib1Component" );
58  static const SG::AuxElement::Accessor< std::vector< float > >
59  sumOfSignsAcc( "sumOfSignsComponent" );
60  static const SG::AuxElement::Accessor< std::vector< short > >
61  statusAcc( "statusComponent" );
62  static const SG::AuxElement::Accessor< std::vector< unsigned short > >
63  usedchannelsAcc( "usedChannelsComponent" );
64 
65  // Define a component name
67  defineComponents( const std::vector< std::string >& componentNames ) {
68 
69  // Make sure that we aren't killing off something that already exists
70  if( !nameAcc( *this ).empty()) {
71  throw std::runtime_error( "Attempt to redefine component list for "
72  "xAOD::TrigMissingET object" );
73  }
74 
75  // Assign the component names:
76  nameAcc( *this ) = componentNames;
77 
78  // Initialise all the variables:
79  exAcc( *this ).resize( componentNames.size(), 0.0 );
80  eyAcc( *this ).resize( componentNames.size(), 0.0 );
81  ezAcc( *this ).resize( componentNames.size(), 0.0 );
82  sumEtAcc( *this ).resize( componentNames.size(), 0.0 );
83  sumEAcc( *this ).resize( componentNames.size(), 0.0 );
84  calib0Acc( *this ).resize( componentNames.size(), 0.0 );
85  calib1Acc( *this ).resize( componentNames.size(), 1.0 );
86  sumOfSignsAcc( *this ).resize( componentNames.size(), 1.0 );
87  statusAcc( *this ).resize( componentNames.size(), 0 );
88  usedchannelsAcc( *this ).resize( componentNames.size(), 1 );
89 
90 
91  return;
92  }
93 
94  // Store the name of the component
96  const std::string& str ) {
97 
98  nameAcc( *this ).at( index ) = str;
99  return;
100  }
101 
102  // Give back the number of components
104  return nameAcc( *this ).size();
105  }
106 
107  const std::string&
108  TrigMissingET_v1::nameOfComponent( unsigned int index ) const {
109 
110  return nameAcc( *this ).at( index );
111  }
112 
113  void TrigMissingET_v1::setExComponent( unsigned int index, float val ) {
114 
115  exAcc( *this ).at( index ) = val;
116  return;
117  }
118 
119  float TrigMissingET_v1::exComponent( unsigned int index ) const {
120 
121  return exAcc( *this ).at( index );
122  }
123 
124  void TrigMissingET_v1::setEyComponent( unsigned int index, float val ) {
125 
126  eyAcc( *this ).at( index ) = val;
127  return;
128  }
129 
130  float TrigMissingET_v1::eyComponent( unsigned int index ) const {
131 
132  return eyAcc( *this ).at( index );
133  }
134 
135  void TrigMissingET_v1::setEzComponent( unsigned int index, float val ) {
136 
137  ezAcc( *this ).at( index ) = val;
138  return;
139  }
140 
141  float TrigMissingET_v1::ezComponent( unsigned int index ) const {
142 
143  return ezAcc( *this ).at( index );
144  }
145 
146  void TrigMissingET_v1::setSumEtComponent( unsigned int index, float val ) {
147 
148  sumEtAcc( *this ).at( index ) = val;
149  return;
150  }
151 
152  float TrigMissingET_v1::sumEtComponent( unsigned int index ) const {
153 
154  return sumEtAcc( *this ).at( index );
155  }
156 
157  void TrigMissingET_v1::setSumEComponent( unsigned int index, float val ) {
158 
159  sumEAcc( *this ).at( index ) = val;
160  return;
161  }
162 
163  float TrigMissingET_v1::sumEComponent( unsigned int index ) const {
164 
165  return sumEAcc( *this ).at( index );
166  }
167 
168  void TrigMissingET_v1::setCalib0Component( unsigned int index, float val ) {
169 
170  calib0Acc( *this ).at( index ) = val;
171  return;
172  }
173 
174  float TrigMissingET_v1::calib0Component( unsigned int index ) const {
175 
176  return calib0Acc( *this ).at( index );
177  }
178 
179  void TrigMissingET_v1::setCalib1Component( unsigned int index, float val ) {
180 
181  calib1Acc( *this ).at( index ) = val;
182  return;
183  }
184 
185  float TrigMissingET_v1::calib1Component( unsigned int index ) const {
186 
187  return calib1Acc( *this ).at( index );
188  }
189 
190  void TrigMissingET_v1::setSumOfSignsComponent( unsigned int index, float val ) {
191 
192  sumOfSignsAcc( *this ).at( index ) = val;
193  return;
194  }
195 
196  float TrigMissingET_v1::sumOfSignsComponent( unsigned int index ) const {
197 
198  return sumOfSignsAcc( *this ).at( index );
199  }
200 
201  void TrigMissingET_v1::setStatusComponent( unsigned int index, float val ) {
202 
203  statusAcc( *this ).at( index ) = val;
204  return;
205  }
206 
207  short TrigMissingET_v1::statusComponent( unsigned int index ) const {
208 
209  return statusAcc( *this ).at( index );
210  }
211 
213 
214  usedchannelsAcc( *this ).at( index ) = val;
215  return;
216  }
217 
218  unsigned short TrigMissingET_v1::usedChannelsComponent( unsigned int index ) const {
219 
220  return usedchannelsAcc( *this ).at( index );
221  }
222 
223 
224 } // namespace xAOD
xAOD::AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
xAOD::TrigMissingET_v1::exComponent
float exComponent(unsigned int index) const
Get the x component fo the energy of a component.
Definition: TrigMissingET_v1.cxx:119
xAOD::TrigMissingET_v1::sumEComponent
float sumEComponent(unsigned int index) const
Get SumE.
Definition: TrigMissingET_v1.cxx:163
xAOD::TrigMissingET_v1::setEzComponent
void setEzComponent(unsigned int index, float value)
Set the z component fo the energy of a component.
Definition: TrigMissingET_v1.cxx:135
xAOD::TrigMissingET_v1::setSumOfSignsComponent
void setSumOfSignsComponent(unsigned int index, float value)
Set SumOfSigns.
Definition: TrigMissingET_v1.cxx:190
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
AuxStoreAccessorMacros.h
xAOD::TrigMissingET_v1::statusComponent
short statusComponent(unsigned int index) const
Get Status.
Definition: TrigMissingET_v1.cxx:207
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::TrigMissingET_v1::setCalib0Component
void setCalib0Component(unsigned int index, float value)
Set Calib0.
Definition: TrigMissingET_v1.cxx:168
index
Definition: index.py:1
xAOD::TrigMissingET_v1::setExComponent
void setExComponent(unsigned int index, float value)
Set the x component fo the energy of a component.
Definition: TrigMissingET_v1.cxx:113
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
TrigMissingET_v1.h
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
xAOD::TrigMissingET_v1::sumOfSignsComponent
float sumOfSignsComponent(unsigned int index) const
Get SumOfSigns.
Definition: TrigMissingET_v1.cxx:196
xAOD::TrigMissingET_v1::setNameOfComponent
void setNameOfComponent(unsigned int index, const std::string &str)
Set the name of a component.
Definition: TrigMissingET_v1.cxx:95
xAOD::TrigMissingET_v1::setStatusComponent
void setStatusComponent(unsigned int index, float value)
Set Status.
Definition: TrigMissingET_v1.cxx:201
JetVar::Accessor
SG::AuxElement::Accessor< T > Accessor
Definition: JetVariable.h:31
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
vector
Definition: MultiHisto.h:13
xAOD::TrigMissingET_v1::calib0Component
float calib0Component(unsigned int index) const
Get Calib0.
Definition: TrigMissingET_v1.cxx:174
master.flag
bool flag
Definition: master.py:29
xAOD::TrigMissingET_v1::setSumEtComponent
void setSumEtComponent(unsigned int index, float value)
Set SumEt.
Definition: TrigMissingET_v1.cxx:146
xAOD::TrigMissingET_v1::sumEtComponent
float sumEtComponent(unsigned int index) const
Get SumEt.
Definition: TrigMissingET_v1.cxx:152
xAOD::TrigMissingET_v1::ezComponent
float ezComponent(unsigned int index) const
Get the z component fo the energy of a component.
Definition: TrigMissingET_v1.cxx:141
HLT::setFlag
void setFlag(TrigPassFlags *flags, const T *obj, const CONTAINER *container, const std::vector< bool > &flag)
Set the flag at index position.
Definition: TrigPassFlags.h:121
xAOD::str
std::string str(const TrigT2MbtsBits_v1 &trigT2MbtsBits)
Definition: TrigT2MbtsBits_v1.cxx:37
xAOD::TrigMissingET_v1::setSumEComponent
void setSumEComponent(unsigned int index, float value)
Set SumE.
Definition: TrigMissingET_v1.cxx:157
xAOD::TrigMissingET_v1::setCalib1Component
void setCalib1Component(unsigned int index, float value)
Set Calib1.
Definition: TrigMissingET_v1.cxx:179
xAOD::TrigMissingET_v1::calib1Component
float calib1Component(unsigned int index) const
Get Calib1.
Definition: TrigMissingET_v1.cxx:185
xAOD::TrigMissingET_v1::setUsedChannelsComponent
void setUsedChannelsComponent(unsigned int index, float value)
Set used Channels.
Definition: TrigMissingET_v1.cxx:212
xAOD::TrigMissingET_v1::usedChannelsComponent
unsigned short usedChannelsComponent(unsigned int index) const
Get used Channels.
Definition: TrigMissingET_v1.cxx:218
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
xAOD::TrigMissingET_v1
Class holding the Missing ET trigger fex results.
Definition: TrigMissingET_v1.h:32
xAOD::TrigMissingET_v1::setEyComponent
void setEyComponent(unsigned int index, float value)
Set the y component fo the energy of a component.
Definition: TrigMissingET_v1.cxx:124
xAOD::TrigMissingET_v1::eyComponent
float eyComponent(unsigned int index) const
Get the y component fo the energy of a component.
Definition: TrigMissingET_v1.cxx:130
xAOD::TrigMissingET_v1::TrigMissingET_v1
TrigMissingET_v1()
Defaut constructor.
Definition: TrigMissingET_v1.cxx:22
str
Definition: BTagTrackIpAccessor.cxx:11
xAOD::TrigMissingET_v1::getNumberOfComponents
unsigned int getNumberOfComponents() const
Get the number of components.
Definition: TrigMissingET_v1.cxx:103
xAOD::TrigMissingET_v1::nameOfComponent
const std::string & nameOfComponent(unsigned int index) const
Get the name of a component.
Definition: TrigMissingET_v1.cxx:108