ATLAS Offline Software
Loading...
Searching...
No Matches
gFEXSysSim.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4//***************************************************************************
5// gFEXSysSim - Overall gFEX simulation
6// -------------------
7// begin : 01 04 2021
8// email : cecilia.tosciri@cern.ch
9//***************************************************************************
10
11#include "gFEXSysSim.h"
12#include "gFEXSim.h"
13#include "L1CaloFEXSim/gTower.h"
15
18
20
21namespace LVL1 {
22
23 //---------------- Initialisation -------------------------------------------------
24
26 {
27
29
30 ATH_CHECK(m_gFEXSimTool.retrieve());
31
32 ATH_CHECK(m_gFexRhoOutKey.initialize());
33
34 ATH_CHECK(m_gFexBlockOutKey.initialize());
35
36 ATH_CHECK(m_gFexJetOutKey.initialize());
37
38 ATH_CHECK(m_gScalarEJwojOutKey.initialize());
39
41
43
45
47
49
51
52 ATH_CHECK(m_gScalarERmsOutKey.initialize());
53
54 ATH_CHECK(m_l1MenuKey.initialize());
55
56 return StatusCode::SUCCESS;
57 }
58
59
60 int gFEXSysSim::calcTowerID(int eta, int phi, int nphi, int mod) const {
61
62 return ((nphi*eta) + phi + mod);
63 }
64
65
66 StatusCode gFEXSysSim::execute(const EventContext& ctx, gFEXOutputCollection* gFEXOutputs) const {
67
69 if(!this_gTowerContainer.isValid()){
70 ATH_MSG_FATAL("Could not retrieve gTowerContainer " << m_gTowerContainerSGKey.key());
71 return StatusCode::FAILURE;
72 }
73
74 // int centralNphi = 32;
75 // int forwardNphi = 16;
76
77 int fcalEta = 19; int fcalPhi = 0; int fcalMod = 900000;
78 int initialFCAL = calcTowerID(fcalEta,fcalPhi,FEXAlgoSpaceDefs::forwardNphi,fcalMod);//900304
79 int transfcalEta = 15; int transfcalPhi = 0; int transfcalMod = 700000;
80 int initialTRANSFCAL = calcTowerID(transfcalEta,transfcalPhi,FEXAlgoSpaceDefs::centralNphi,transfcalMod);//700480
81 int emecEta = 11; int emecPhi = 0; int emecMod = 500000;
82 int initialEMEC = calcTowerID(emecEta,emecPhi,FEXAlgoSpaceDefs::centralNphi,emecMod);//500384
83 int transembEta = 7; int transembPhi = 0; int transembMod = 300000;
84 int initialTRANSEMB = calcTowerID(transembEta,transembPhi,FEXAlgoSpaceDefs::centralNphi,transembMod);
85 int embEta = 6; int embPhi = 0; int embMod = 100000;
86 int initialEMB = calcTowerID(embEta,embPhi,FEXAlgoSpaceDefs::centralNphi,embMod);//100192
87
88
89 int embposEta = 0; int embposPhi = 0; int embposMod = 200000;
90 int initialposEMB = calcTowerID(embposEta,embposPhi,FEXAlgoSpaceDefs::centralNphi,embposMod);//200000
91 int transembposEta = 7; int transembposPhi = 0; int transembposMod = 400000;
92 int initialposTRANSEMB = calcTowerID(transembposEta,transembposPhi,FEXAlgoSpaceDefs::centralNphi,transembposMod);//400224
93 int emecposEta = 8; int emecposPhi = 0; int emecposMod = 600000;
94 int initialposEMEC = calcTowerID(emecposEta,emecposPhi,FEXAlgoSpaceDefs::centralNphi,emecposMod);//600256
95 int transfcalposEta = 12; int transfcalposPhi = 0; int transfcalposMod = 800000;
96 int initialposTRANSFCAL = calcTowerID(transfcalposEta,transfcalposPhi,FEXAlgoSpaceDefs::centralNphi,transfcalposMod);//800416
97 int fcalposEta = 16; int fcalposPhi = 0; int fcalposMod = 1000000;
98 int initialposFCAL = calcTowerID(fcalposEta,fcalposPhi,FEXAlgoSpaceDefs::forwardNphi,fcalposMod);//1000240
99
100
101 // Since gFEX consists of a single module, here we are just (re)assigning the gTowerID
102
103 // Defining a matrix 32x40 corresponding to the gFEX structure (32 phi x 40 eta in the most general case - forward region has 16 phi bins)
104 typedef std::array<std::array<int, FEXAlgoSpaceDefs::totalNeta>, FEXAlgoSpaceDefs::centralNphi> gTowersIDs;
105 gTowersIDs tmp_gTowersIDs_subset;
106
107 int rows = tmp_gTowersIDs_subset.size();
108 int cols = tmp_gTowersIDs_subset[0].size();
109
110 // set the FCAL negative part
111 for(int thisCol=0; thisCol<4; thisCol++){
112 for(int thisRow=0; thisRow<rows/2; thisRow++){
113 int towerid = initialFCAL - ((thisCol) * (FEXAlgoSpaceDefs::forwardNphi)) + thisRow;
114 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
115 }
116 }
117
118 // set the TRANSFCAL negative part (FCAL-EMEC overlap)
119 for(int thisCol=4; thisCol<8; thisCol++){
120 for(int thisRow=0; thisRow<rows; thisRow++){
121 int towerid = initialTRANSFCAL - ((thisCol-4) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
122 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
123 }
124 }
125
126 // set the EMEC negative part
127 for(int thisCol=8; thisCol<12; thisCol++){
128 for(int thisRow=0; thisRow<rows; thisRow++){
129 int towerid = initialEMEC - ((thisCol-8) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
130 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
131 }
132 }
133
134 // set the TRANSEMB (EMB-EMEC overlap) negative part
135 for(int thisRow = 0; thisRow < rows; thisRow++){
136 int thisCol = 12;
137 int towerid = initialTRANSEMB + thisRow;
138 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
139 }
140
141 // set the EMB negative part
142 for(int thisCol = 13; thisCol < 20; thisCol++){
143 for(int thisRow=0; thisRow<rows; thisRow++){
144 int towerid = initialEMB - ( (thisCol-13) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
145 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
146 }
147 }
148
149 // set the EMB positive part
150 for(int thisCol = 20; thisCol < 27; thisCol++){
151 for(int thisRow=0; thisRow<rows; thisRow++){
152 int towerid = initialposEMB + ( (thisCol-20) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
153 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
154 }
155 }
156
157 // set the TRANSEMB (EMB-EMEC overlap) positive part
158 for(int thisRow = 0; thisRow < rows; thisRow++){
159 int thisCol = 27;
160 int towerid = initialposTRANSEMB + thisRow;
161 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
162 }
163 // set the EMEC positive part
164 for(int thisCol=28; thisCol<32; thisCol++){
165 for(int thisRow=0; thisRow<rows; thisRow++){
166 int towerid = initialposEMEC + ((thisCol-28) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
167 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
168 }
169 }
170
171 // set the TRANSFCAL positive part (EMEC-FCAL overlap)
172 for(int thisCol=32; thisCol<36; thisCol++){
173 for(int thisRow=0; thisRow<rows; thisRow++){
174 int towerid = initialposTRANSFCAL + ((thisCol-32) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
175 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
176 }
177 }
178
179 // set the FCAL positive part
180 for(int thisCol=36; thisCol<cols; thisCol++){
181 for(int thisRow=0; thisRow<rows/2; thisRow++){
182 int towerid = initialposFCAL + ((thisCol-36) * (FEXAlgoSpaceDefs::forwardNphi)) + thisRow;
183 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
184 }
185 }
186
187 if(false){
188 ATH_MSG_DEBUG("CONTENTS OF gFEX : ");
189 for (int thisRow=rows-1; thisRow>=0; thisRow--){
190 for (int thisCol=0; thisCol<cols; thisCol++){
191 int tmptowerid = tmp_gTowersIDs_subset[thisRow][thisCol];
192 const float tmptowereta = this_gTowerContainer->findTower(tmptowerid)->eta();
193 const float tmptowerphi = this_gTowerContainer->findTower(tmptowerid)->phi();
194 if(thisCol != cols-1){ ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowerphi << "][" << tmptowereta << "]) "); }
195 else { ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) |"); }
196 }
197 }
198 }
199
200 std::vector<uint32_t> allgRhoTobs;
201 std::vector<uint32_t> allgBlockTobs;
202 std::vector<uint32_t> allgJetTobs;
203
204 std::vector<int32_t> allgScalarEJwojTobs;
205 std::vector<uint32_t> allgMETComponentsJwojTobs;
206 std::vector<uint32_t> allgMHTComponentsJwojTobs;
207 std::vector<uint32_t> allgMSTComponentsJwojTobs;
208
209 std::vector<uint32_t> allgMETComponentsNoiseCutTobs;
210 std::vector<uint32_t> allgMETComponentsRmsTobs;
211 std::vector<uint32_t> allgScalarENoiseCutTobs;
212 std::vector<uint32_t> allgScalarERmsTobs;
213
214 ATH_CHECK(m_gFEXSimTool->execute(ctx,
215 tmp_gTowersIDs_subset,
216 gFEXOutputs,
217 allgRhoTobs,
218 allgBlockTobs,
219 allgJetTobs,
220 allgScalarEJwojTobs,
221 allgMETComponentsJwojTobs,
222 allgMHTComponentsJwojTobs,
223 allgMSTComponentsJwojTobs,
224 allgMETComponentsNoiseCutTobs,
225 allgMETComponentsRmsTobs,
226 allgScalarENoiseCutTobs,
227 allgScalarERmsTobs));
228
229 //Makes containers for different gFEX Jet objects
230 std::unique_ptr< xAOD::gFexJetRoIContainer > gRhoContainer = std::make_unique<xAOD::gFexJetRoIContainer> ();
231 std::unique_ptr< xAOD::gFexJetRoIAuxContainer > gRhoAuxContainer = std::make_unique<xAOD::gFexJetRoIAuxContainer> ();
232 gRhoContainer->setStore(gRhoAuxContainer.get());
233
234 std::unique_ptr< xAOD::gFexJetRoIContainer > gBlockContainer = std::make_unique<xAOD::gFexJetRoIContainer> ();
235 std::unique_ptr< xAOD::gFexJetRoIAuxContainer > gBlockAuxContainer = std::make_unique<xAOD::gFexJetRoIAuxContainer> ();
236 gBlockContainer->setStore(gBlockAuxContainer.get());
237
238 std::unique_ptr< xAOD::gFexJetRoIContainer > gJetContainer = std::make_unique<xAOD::gFexJetRoIContainer> ();
239 std::unique_ptr< xAOD::gFexJetRoIAuxContainer > gJetAuxContainer = std::make_unique<xAOD::gFexJetRoIAuxContainer> ();
240 gJetContainer->setStore(gJetAuxContainer.get());
241
242 //Makes containers for different gFEX Global objects (for JwoJ algorithm quantities)
243 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gScalarEJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
244 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gScalarEJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
245 gScalarEJwojContainer->setStore(gScalarEJwojAuxContainer.get());
246
247 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gMETComponentsJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
248 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gMETComponentsJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
249 gMETComponentsJwojContainer->setStore(gMETComponentsJwojAuxContainer.get());
250
251 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gMHTComponentsJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
252 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gMHTComponentsJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
253 gMHTComponentsJwojContainer->setStore(gMHTComponentsJwojAuxContainer.get());
254
255 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gMSTComponentsJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
256 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gMSTComponentsJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
257 gMSTComponentsJwojContainer->setStore(gMSTComponentsJwojAuxContainer.get());
258
259 //Makes containers for different gFEX Global objects (for Noise Cut and RMS algorithms quantities)
260 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gMETComponentsNoiseCutContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
261 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gMETComponentsNoiseCutAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
262 gMETComponentsNoiseCutContainer->setStore(gMETComponentsNoiseCutAuxContainer.get());
263
264 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gMETComponentsRmsContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
265 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gMETComponentsRmsAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
266 gMETComponentsRmsContainer->setStore(gMETComponentsRmsAuxContainer.get());
267
268 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gScalarENoiseCutContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
269 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gScalarENoiseCutAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
270 gScalarENoiseCutContainer->setStore(gScalarENoiseCutAuxContainer.get());
271
272 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gScalarERmsContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
273 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gScalarERmsAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
274 gScalarERmsContainer->setStore(gScalarERmsAuxContainer.get());
275
276
277 // Retrieve the L1 menu configuration
279 ATH_CHECK(l1Menu.isValid());
280
281 auto & thr_gJ = l1Menu->thrExtraInfo().gJ();
282 auto & thr_gLJ = l1Menu->thrExtraInfo().gLJ();
283 auto & thr_gXE = l1Menu->thrExtraInfo().gXE();
284 auto & thr_gTE = l1Menu->thrExtraInfo().gTE();
285
286 int gJ_scale = thr_gJ.resolutionMeV();
287 int gLJ_scale = thr_gLJ.resolutionMeV();
288 int gXE_scale = thr_gXE.resolutionMeV();
289 int gTE_scale = thr_gTE.resolutionMeV();
290
291
292 //iterate over all gRho Tobs and fill EDM with them
293 for(auto tob : allgRhoTobs){
294 ATH_CHECK(fillgRhoEDM(gRhoContainer.get(), tob, gJ_scale));
295 }
296 //iterate over all gBlock Tobs and fill EDM with them
297 for(auto tob : allgBlockTobs){
298 ATH_CHECK(fillgBlockEDM(gBlockContainer.get(), tob, gJ_scale));
299 }
300
301 //iterate over all gJet Tobs and fill EDM with them
302 for(auto tob : allgJetTobs){
303 ATH_CHECK(fillgJetEDM(gJetContainer.get(), tob, gLJ_scale));
304 }
305
306 //iterate over all JwoJ scalar energy Tobs and fill EDM with them (should be only one)
307 for(auto tob : allgScalarEJwojTobs){
308 ATH_CHECK(fillgScalarEJwojEDM(gScalarEJwojContainer.get(), tob, gXE_scale, gTE_scale));
309 }
310 //iterate over all JwoJ METcomponents Tobs and fill EDM with them (should be only one)
311 for(auto tob : allgMETComponentsJwojTobs){
312 ATH_CHECK(fillgMETComponentsJwojEDM(gMETComponentsJwojContainer.get(), tob, gXE_scale, gXE_scale));
313 }
314 //iterate over all JwoJ MHTcomponents Tobs and fill EDM with them (should be only one)
315 for(auto tob : allgMHTComponentsJwojTobs){
316 ATH_CHECK(fillgMHTComponentsJwojEDM(gMHTComponentsJwojContainer.get(), tob, gXE_scale, gXE_scale));
317 }
318 //iterate over all JwoJ MSTcomponents Tobs and fill EDM with them (should be only one)
319 for(auto tob : allgMSTComponentsJwojTobs){
320 ATH_CHECK(fillgMSTComponentsJwojEDM(gMSTComponentsJwojContainer.get(), tob, gXE_scale, gXE_scale));
321 }
322
323 //iterate over all NoiseCut METcomponents Tobs and fill EDM with them (should be only one)
324 for(auto tob : allgMETComponentsNoiseCutTobs){
325 ATH_CHECK(fillgMETComponentsNoiseCutEDM(gMETComponentsNoiseCutContainer.get(), tob, gXE_scale, gXE_scale));
326 }
327 //iterate over all RMS METcomponents Tobs and fill EDM with them (should be only one)
328 for(auto tob : allgMETComponentsRmsTobs){
329 ATH_CHECK(fillgMETComponentsRmsEDM(gMETComponentsRmsContainer.get(), tob, gXE_scale, gXE_scale));
330 }
331 //iterate over all NoiseCut scalar energy Tobs and fill EDM with them (should be only one)
332 for(auto tob : allgScalarENoiseCutTobs){
333 ATH_CHECK(fillgScalarENoiseCutEDM(gScalarENoiseCutContainer.get(), tob, gXE_scale, gTE_scale));
334 }
335 //iterate over all RMS scalar energy Tobs and fill EDM with them (should be only one)
336 for(auto tob : allgScalarERmsTobs){
337 ATH_CHECK(fillgScalarERmsEDM(gScalarERmsContainer.get(), tob, gXE_scale, gTE_scale));
338 }
339
340
342 ATH_MSG_DEBUG(" write: " << outputgFexRhoHandle.key() << " = " << "..." );
343 ATH_CHECK(outputgFexRhoHandle.record(std::move(gRhoContainer),std::move(gRhoAuxContainer)));
344
346 ATH_MSG_DEBUG(" write: " << outputgFexBlockHandle.key() << " = " << "..." );
347 ATH_CHECK(outputgFexBlockHandle.record(std::move(gBlockContainer),std::move(gBlockAuxContainer)));
348
350 ATH_MSG_DEBUG(" write: " << outputgFexJetHandle.key() << " = " << "..." );
351 ATH_CHECK(outputgFexJetHandle.record(std::move(gJetContainer),std::move(gJetAuxContainer)));
352
354 ATH_MSG_DEBUG(" write: " << outputgScalarEJwojHandle.key() << " = " << "..." );
355 ATH_CHECK(outputgScalarEJwojHandle.record(std::move(gScalarEJwojContainer),std::move(gScalarEJwojAuxContainer)));
356
358 ATH_MSG_DEBUG(" write: " << outputgMETComponentsJwojHandle.key() << " = " << "..." );
359 ATH_CHECK(outputgMETComponentsJwojHandle.record(std::move(gMETComponentsJwojContainer),std::move(gMETComponentsJwojAuxContainer)));
360
362 ATH_MSG_DEBUG(" write: " << outputgMHTComponentsJwojHandle.key() << " = " << "..." );
363 ATH_CHECK(outputgMHTComponentsJwojHandle.record(std::move(gMHTComponentsJwojContainer),std::move(gMHTComponentsJwojAuxContainer)));
364
366 ATH_MSG_DEBUG(" write: " << outputgMSTComponentsJwojHandle.key() << " = " << "..." );
367 ATH_CHECK(outputgMSTComponentsJwojHandle.record(std::move(gMSTComponentsJwojContainer),std::move(gMSTComponentsJwojAuxContainer)));
368
370 ATH_MSG_DEBUG(" write: " << outputgMETComponentsNoiseCutHandle.key() << " = " << "..." );
371 ATH_CHECK(outputgMETComponentsNoiseCutHandle.record(std::move(gMETComponentsNoiseCutContainer),std::move(gMETComponentsNoiseCutAuxContainer)));
372
374 ATH_MSG_DEBUG(" write: " << outputgMETComponentsRmsHandle.key() << " = " << "..." );
375 ATH_CHECK(outputgMETComponentsRmsHandle.record(std::move(gMETComponentsRmsContainer),std::move(gMETComponentsRmsAuxContainer)));
376
378 ATH_MSG_DEBUG(" write: " << outputgScalarENoiseCutHandle.key() << " = " << "..." );
379 ATH_CHECK(outputgScalarENoiseCutHandle.record(std::move(gScalarENoiseCutContainer),std::move(gScalarENoiseCutAuxContainer)));
380
382 ATH_MSG_DEBUG(" write: " << outputgScalarERmsHandle.key() << " = " << "..." );
383 ATH_CHECK(outputgScalarERmsHandle.record(std::move(gScalarERmsContainer),std::move(gScalarERmsAuxContainer)));
384
385 return StatusCode::SUCCESS;
386 }
387
388 StatusCode gFEXSysSim::fillgRhoEDM(xAOD::gFexJetRoIContainer* gRhoContainer, uint32_t tobWord, int gJ_scale) const {
389
390 std::unique_ptr<xAOD::gFexJetRoI> myEDM (new xAOD::gFexJetRoI());
391 gRhoContainer->push_back(std::move(myEDM));
392 gRhoContainer->back()->initialize(tobWord, gJ_scale);
393
394 return StatusCode::SUCCESS;
395 }
396
397 StatusCode gFEXSysSim::fillgBlockEDM(xAOD::gFexJetRoIContainer* gBlockContainer, uint32_t tobWord, int gJ_scale) const {
398
399 std::unique_ptr<xAOD::gFexJetRoI> myEDM (new xAOD::gFexJetRoI());
400 gBlockContainer->push_back(std::move(myEDM));
401 gBlockContainer->back()->initialize(tobWord, gJ_scale);
402
403 return StatusCode::SUCCESS;
404 }
405
406 StatusCode gFEXSysSim::fillgJetEDM(xAOD::gFexJetRoIContainer* gJetContainer, uint32_t tobWord, int gLJ_scale) const {
407
408 std::unique_ptr<xAOD::gFexJetRoI> myEDM (new xAOD::gFexJetRoI());
409 gJetContainer->push_back(std::move(myEDM));
410 gJetContainer->back()->initialize(tobWord, gLJ_scale);
411
412 return StatusCode::SUCCESS;
413 }
414
415 StatusCode gFEXSysSim::fillgMETComponentsJwojEDM(xAOD::gFexGlobalRoIContainer* gMETComponentsJwojContainer, uint32_t tobWord, int scale1, int scale2) const {
416
417 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
418 gMETComponentsJwojContainer->push_back(std::move(myEDM));
419 gMETComponentsJwojContainer->back()->initialize(tobWord, scale1, scale2);
420
421 return StatusCode::SUCCESS;
422 }
423
424 StatusCode gFEXSysSim::fillgMHTComponentsJwojEDM(xAOD::gFexGlobalRoIContainer* gMHTComponentsJwojContainer, uint32_t tobWord, int scale1, int scale2) const {
425
426 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
427 gMHTComponentsJwojContainer->push_back(std::move(myEDM));
428 gMHTComponentsJwojContainer->back()->initialize(tobWord, scale1, scale2);
429
430 return StatusCode::SUCCESS;
431 }
432
433 StatusCode gFEXSysSim::fillgMSTComponentsJwojEDM(xAOD::gFexGlobalRoIContainer* gMSTComponentsJwojContainer, uint32_t tobWord, int scale1, int scale2) const {
434
435 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
436 gMSTComponentsJwojContainer->push_back(std::move(myEDM));
437 gMSTComponentsJwojContainer->back()->initialize(tobWord, scale1, scale2);
438
439 return StatusCode::SUCCESS;
440 }
441
442 StatusCode gFEXSysSim::fillgScalarEJwojEDM(xAOD::gFexGlobalRoIContainer* gScalarEJwojContainer, uint32_t tobWord, int scale1, int scale2) const {
443
444 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
445 gScalarEJwojContainer->push_back(std::move(myEDM));
446 gScalarEJwojContainer->back()->initialize(tobWord, scale1, scale2);
447
448 return StatusCode::SUCCESS;
449 }
450
451 StatusCode gFEXSysSim::fillgMETComponentsNoiseCutEDM(xAOD::gFexGlobalRoIContainer* gMETComponentsNoiseCutContainer, uint32_t tobWord, int scale1, int scale2) const {
452
453 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
454 gMETComponentsNoiseCutContainer->push_back(std::move(myEDM));
455 gMETComponentsNoiseCutContainer->back()->initialize(tobWord, scale1, scale2);
456
457 return StatusCode::SUCCESS;
458 }
459
460 StatusCode gFEXSysSim::fillgMETComponentsRmsEDM(xAOD::gFexGlobalRoIContainer* gMETComponentsRmsContainer, uint32_t tobWord, int scale1, int scale2) const {
461
462 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
463 gMETComponentsRmsContainer->push_back(std::move(myEDM));
464 gMETComponentsRmsContainer->back()->initialize(tobWord, scale1, scale2);
465
466 return StatusCode::SUCCESS;
467 }
468
469 StatusCode gFEXSysSim::fillgScalarENoiseCutEDM(xAOD::gFexGlobalRoIContainer* gScalarENoiseCutContainer, uint32_t tobWord, int scale1, int scale2) const {
470
471 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
472 gScalarENoiseCutContainer->push_back(std::move(myEDM));
473 gScalarENoiseCutContainer->back()->initialize(tobWord, scale1, scale2);
474
475 return StatusCode::SUCCESS;
476 }
477
478 StatusCode gFEXSysSim::fillgScalarERmsEDM(xAOD::gFexGlobalRoIContainer* gScalarERmsContainer, uint32_t tobWord, int scale1, int scale2) const {
479
480 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
481 gScalarERmsContainer->push_back(std::move(myEDM));
482 gScalarERmsContainer->back()->initialize(tobWord, scale1, scale2);
483
484 return StatusCode::SUCCESS;
485 }
486
487
488} // end of namespace bracket
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
#define scale2
#define scale1
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
const T * back() const
Access the last element in the collection as an rvalue.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
static constexpr int centralNphi
static constexpr int forwardNphi
virtual StatusCode fillgMSTComponentsJwojEDM(xAOD::gFexGlobalRoIContainer *gMSTComponentsJwojContainer, uint32_t tobWord, int scale1, int scale2) const override
virtual StatusCode fillgMHTComponentsJwojEDM(xAOD::gFexGlobalRoIContainer *gMHTComponentsJwojContainer, uint32_t tobWord, int scale1, int scale2) const override
virtual StatusCode fillgMETComponentsJwojEDM(xAOD::gFexGlobalRoIContainer *gMETComponentsJwojContainer, uint32_t tobWord, int scale1, int scale2) const override
virtual StatusCode fillgRhoEDM(xAOD::gFexJetRoIContainer *gRhoContainer, uint32_t tobWord, int scale) const override
Create and fill a new gFexJetRoI object, and return a pointer to it.
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
Definition gFEXSysSim.h:82
SG::ReadHandleKey< LVL1::gTowerContainer > m_gTowerContainerSGKey
Definition gFEXSysSim.h:81
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexJetOutKey
Definition gFEXSysSim.h:86
virtual StatusCode initialize() override
standard Athena-Algorithm method
virtual StatusCode fillgScalarERmsEDM(xAOD::gFexGlobalRoIContainer *gScalarERmsContainer, uint32_t tobWord, int scale1, int scale2) const override
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsJwojOutKey
Definition gFEXSysSim.h:89
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsNoiseCutOutKey
Definition gFEXSysSim.h:93
virtual StatusCode fillgScalarEJwojEDM(xAOD::gFexGlobalRoIContainer *gScalarEJwojContainer, uint32_t tobWord, int scale1, int scale2) const override
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexRhoOutKey
Definition gFEXSysSim.h:84
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMHTComponentsJwojOutKey
Definition gFEXSysSim.h:90
virtual StatusCode fillgMETComponentsNoiseCutEDM(xAOD::gFexGlobalRoIContainer *gMETComponentsNoiseCutContainer, uint32_t tobWord, int scale1, int scale2) const override
virtual StatusCode fillgMETComponentsRmsEDM(xAOD::gFexGlobalRoIContainer *gMETComponentsRmsContainer, uint32_t tobWord, int scale1, int scale2) const override
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarEJwojOutKey
Definition gFEXSysSim.h:88
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarERmsOutKey
Definition gFEXSysSim.h:96
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsRmsOutKey
Definition gFEXSysSim.h:94
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarENoiseCutOutKey
Definition gFEXSysSim.h:95
virtual StatusCode fillgScalarENoiseCutEDM(xAOD::gFexGlobalRoIContainer *gScalarENoiseCutContainer, uint32_t tobWord, int scale1, int scale2) const override
virtual StatusCode fillgJetEDM(xAOD::gFexJetRoIContainer *gJetContainer, uint32_t tobWord, int scale) const override
virtual StatusCode fillgBlockEDM(xAOD::gFexJetRoIContainer *gBlockContainer, uint32_t tobWord, int scale) const override
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMSTComponentsJwojOutKey
Definition gFEXSysSim.h:91
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexBlockOutKey
Definition gFEXSysSim.h:85
virtual StatusCode execute(const EventContext &ctx, gFEXOutputCollection *gFEXOutputs) const override
virtual int calcTowerID(int eta, int phi, int nphi, int mod) const override
ToolHandle< IgFEXSim > m_gFEXSimTool
Internal data.
Definition gFEXSysSim.h:79
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
void initialize(uint32_t word, int tobEtScaleOne, int tobEtScaleTwo=0)
Initialise the object with its properties.
void initialize(uint32_t word, int tobEtScale)
Initialise the object with its most important properties: only the word for gFEX.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
std::array< std::array< int, 40 >, 32 > gTowersIDs
Definition IgFEXSim.h:20
gFexGlobalRoIContainer_v1 gFexGlobalRoIContainer
gFexJetRoI_v1 gFexJetRoI
Define the latest version of the gFexJetRoI class.
Definition gFexJetRoI.h:16
gFexGlobalRoI_v1 gFexGlobalRoI
Define the latest version of the eFexEMRoI class.
gFexJetRoIContainer_v1 gFexJetRoIContainer