ATLAS Offline Software
Loading...
Searching...
No Matches
gFEXSysSim.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 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 // default constructor for persistency
24
25 gFEXSysSim::gFEXSysSim(const std::string& type,const std::string& name,const IInterface* parent):
26 AthAlgTool(type,name,parent)
27 {
28 declareInterface<IgFEXSysSim>(this);
29
30 }
31
32
33 //---------------- Initialisation -------------------------------------------------
34
36 {
37
39
40 ATH_CHECK(m_gFEXSimTool.retrieve());
41
42 ATH_CHECK(m_gFexRhoOutKey.initialize());
43
44 ATH_CHECK(m_gFexBlockOutKey.initialize());
45
46 ATH_CHECK(m_gFexJetOutKey.initialize());
47
48 ATH_CHECK(m_gScalarEJwojOutKey.initialize());
49
51
53
55
57
59
61
62 ATH_CHECK(m_gScalarERmsOutKey.initialize());
63
64 ATH_CHECK(m_l1MenuKey.initialize());
65
66
67
68 return StatusCode::SUCCESS;
69 }
70
71
72
74
75 m_gFEXCollection.clear();
76
77 }
78
79
80 int gFEXSysSim::calcTowerID(int eta, int phi, int nphi, int mod) const {
81
82 return ((nphi*eta) + phi + mod);
83 }
84
85
86 StatusCode gFEXSysSim::execute(gFEXOutputCollection* gFEXOutputs) {
87
88 const EventContext& ctx = Gaudi::Hive::currentContext();
89
91 if(!this_gTowerContainer.isValid()){
92 ATH_MSG_FATAL("Could not retrieve gTowerContainer " << m_gTowerContainerSGKey.key());
93 return StatusCode::FAILURE;
94 }
95
96 // remove TOBs of the previous events from the array
97 m_allgRhoTobs.clear();
98 m_allgBlockTobs.clear();
99 m_allgJetTobs.clear();
100 m_allgScalarEJwojTobs.clear();
104
105
106 // int centralNphi = 32;
107 // int forwardNphi = 16;
108
109 int fcalEta = 19; int fcalPhi = 0; int fcalMod = 900000;
110 int initialFCAL = calcTowerID(fcalEta,fcalPhi,FEXAlgoSpaceDefs::forwardNphi,fcalMod);//900304
111 int transfcalEta = 15; int transfcalPhi = 0; int transfcalMod = 700000;
112 int initialTRANSFCAL = calcTowerID(transfcalEta,transfcalPhi,FEXAlgoSpaceDefs::centralNphi,transfcalMod);//700480
113 int emecEta = 11; int emecPhi = 0; int emecMod = 500000;
114 int initialEMEC = calcTowerID(emecEta,emecPhi,FEXAlgoSpaceDefs::centralNphi,emecMod);//500384
115 int transembEta = 7; int transembPhi = 0; int transembMod = 300000;
116 int initialTRANSEMB = calcTowerID(transembEta,transembPhi,FEXAlgoSpaceDefs::centralNphi,transembMod);
117 int embEta = 6; int embPhi = 0; int embMod = 100000;
118 int initialEMB = calcTowerID(embEta,embPhi,FEXAlgoSpaceDefs::centralNphi,embMod);//100192
119
120
121 int embposEta = 0; int embposPhi = 0; int embposMod = 200000;
122 int initialposEMB = calcTowerID(embposEta,embposPhi,FEXAlgoSpaceDefs::centralNphi,embposMod);//200000
123 int transembposEta = 7; int transembposPhi = 0; int transembposMod = 400000;
124 int initialposTRANSEMB = calcTowerID(transembposEta,transembposPhi,FEXAlgoSpaceDefs::centralNphi,transembposMod);//400224
125 int emecposEta = 8; int emecposPhi = 0; int emecposMod = 600000;
126 int initialposEMEC = calcTowerID(emecposEta,emecposPhi,FEXAlgoSpaceDefs::centralNphi,emecposMod);//600256
127 int transfcalposEta = 12; int transfcalposPhi = 0; int transfcalposMod = 800000;
128 int initialposTRANSFCAL = calcTowerID(transfcalposEta,transfcalposPhi,FEXAlgoSpaceDefs::centralNphi,transfcalposMod);//800416
129 int fcalposEta = 16; int fcalposPhi = 0; int fcalposMod = 1000000;
130 int initialposFCAL = calcTowerID(fcalposEta,fcalposPhi,FEXAlgoSpaceDefs::forwardNphi,fcalposMod);//1000240
131
132
133 // Since gFEX consists of a single module, here we are just (re)assigning the gTowerID
134
135 // 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)
136 typedef std::array<std::array<int, FEXAlgoSpaceDefs::totalNeta>, FEXAlgoSpaceDefs::centralNphi> gTowersIDs;
137 gTowersIDs tmp_gTowersIDs_subset;
138
139 int rows = tmp_gTowersIDs_subset.size();
140 int cols = tmp_gTowersIDs_subset[0].size();
141
142 // set the FCAL negative part
143 for(int thisCol=0; thisCol<4; thisCol++){
144 for(int thisRow=0; thisRow<rows/2; thisRow++){
145 int towerid = initialFCAL - ((thisCol) * (FEXAlgoSpaceDefs::forwardNphi)) + thisRow;
146 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
147 }
148 }
149
150 // set the TRANSFCAL negative part (FCAL-EMEC overlap)
151 for(int thisCol=4; thisCol<8; thisCol++){
152 for(int thisRow=0; thisRow<rows; thisRow++){
153 int towerid = initialTRANSFCAL - ((thisCol-4) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
154 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
155 }
156 }
157
158 // set the EMEC negative part
159 for(int thisCol=8; thisCol<12; thisCol++){
160 for(int thisRow=0; thisRow<rows; thisRow++){
161 int towerid = initialEMEC - ((thisCol-8) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
162 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
163 }
164 }
165
166 // set the TRANSEMB (EMB-EMEC overlap) negative part
167 for(int thisRow = 0; thisRow < rows; thisRow++){
168 int thisCol = 12;
169 int towerid = initialTRANSEMB + thisRow;
170 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
171 }
172
173 // set the EMB negative part
174 for(int thisCol = 13; thisCol < 20; thisCol++){
175 for(int thisRow=0; thisRow<rows; thisRow++){
176 int towerid = initialEMB - ( (thisCol-13) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
177 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
178 }
179 }
180
181 // set the EMB positive part
182 for(int thisCol = 20; thisCol < 27; thisCol++){
183 for(int thisRow=0; thisRow<rows; thisRow++){
184 int towerid = initialposEMB + ( (thisCol-20) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
185 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
186 }
187 }
188
189 // set the TRANSEMB (EMB-EMEC overlap) positive part
190 for(int thisRow = 0; thisRow < rows; thisRow++){
191 int thisCol = 27;
192 int towerid = initialposTRANSEMB + thisRow;
193 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
194 }
195 // set the EMEC positive part
196 for(int thisCol=28; thisCol<32; thisCol++){
197 for(int thisRow=0; thisRow<rows; thisRow++){
198 int towerid = initialposEMEC + ((thisCol-28) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
199 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
200 }
201 }
202
203 // set the TRANSFCAL positive part (EMEC-FCAL overlap)
204 for(int thisCol=32; thisCol<36; thisCol++){
205 for(int thisRow=0; thisRow<rows; thisRow++){
206 int towerid = initialposTRANSFCAL + ((thisCol-32) * (FEXAlgoSpaceDefs::centralNphi)) + thisRow;
207 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
208 }
209 }
210
211 // set the FCAL positive part
212 for(int thisCol=36; thisCol<cols; thisCol++){
213 for(int thisRow=0; thisRow<rows/2; thisRow++){
214 int towerid = initialposFCAL + ((thisCol-36) * (FEXAlgoSpaceDefs::forwardNphi)) + thisRow;
215 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
216 }
217 }
218
219 if(false){
220 ATH_MSG_DEBUG("CONTENTS OF gFEX : ");
221 for (int thisRow=rows-1; thisRow>=0; thisRow--){
222 for (int thisCol=0; thisCol<cols; thisCol++){
223 int tmptowerid = tmp_gTowersIDs_subset[thisRow][thisCol];
224 const float tmptowereta = this_gTowerContainer->findTower(tmptowerid)->eta();
225 const float tmptowerphi = this_gTowerContainer->findTower(tmptowerid)->phi();
226 if(thisCol != cols-1){ ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowerphi << "][" << tmptowereta << "]) "); }
227 else { ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) |"); }
228 }
229 }
230 }
231
232 ATH_CHECK(m_gFEXSimTool->executegFEXSim(tmp_gTowersIDs_subset, gFEXOutputs));
233
234 m_allgRhoTobs = m_gFEXSimTool->getgRhoTOBs();
235 m_allgBlockTobs = m_gFEXSimTool->getgBlockTOBs();
236 m_allgJetTobs = m_gFEXSimTool->getgJetTOBs();
237
238 m_allgScalarEJwojTobs = m_gFEXSimTool->getgScalarEJwojTOBs();
239 m_allgMETComponentsJwojTobs = m_gFEXSimTool->getgMETComponentsJwojTOBs();
240 m_allgMHTComponentsJwojTobs = m_gFEXSimTool->getgMHTComponentsJwojTOBs();
241 m_allgMSTComponentsJwojTobs = m_gFEXSimTool->getgMSTComponentsJwojTOBs();
242
243 m_allgMETComponentsNoiseCutTobs = m_gFEXSimTool->getgMETComponentsNoiseCutTOBs();
244 m_allgMETComponentsRmsTobs = m_gFEXSimTool->getgMETComponentsRmsTOBs();
245 m_allgScalarENoiseCutTobs = m_gFEXSimTool->getgScalarENoiseCutTOBs();
246 m_allgScalarERmsTobs = m_gFEXSimTool->getgScalarERmsTOBs();
247
248 m_gFEXSimTool->reset();
249
250 //Makes containers for different gFEX Jet objects
251 m_gRhoContainer = std::make_unique<xAOD::gFexJetRoIContainer> ();
252 m_gRhoAuxContainer = std::make_unique<xAOD::gFexJetRoIAuxContainer> ();
253 m_gRhoContainer->setStore(m_gRhoAuxContainer.get());
254
255 m_gBlockContainer = std::make_unique<xAOD::gFexJetRoIContainer> ();
256 m_gBlockAuxContainer = std::make_unique<xAOD::gFexJetRoIAuxContainer> ();
258
259 m_gJetContainer = std::make_unique<xAOD::gFexJetRoIContainer> ();
260 m_gJetAuxContainer = std::make_unique<xAOD::gFexJetRoIAuxContainer> ();
261 m_gJetContainer->setStore(m_gJetAuxContainer.get());
262
263 //Makes containers for different gFEX Global objects (for JwoJ algorithm quantities)
264 m_gScalarEJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
265 m_gScalarEJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
267
268 m_gMETComponentsJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
269 m_gMETComponentsJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
271
272 m_gMHTComponentsJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
273 m_gMHTComponentsJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
275
276 m_gMSTComponentsJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
277 m_gMSTComponentsJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
279
280 //Makes containers for different gFEX Global objects (for Noise Cut and RMS algorithms quantities)
281 m_gMETComponentsNoiseCutContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
282 m_gMETComponentsNoiseCutAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
284
285 m_gMETComponentsRmsContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
286 m_gMETComponentsRmsAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
288
289 m_gScalarENoiseCutContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
290 m_gScalarENoiseCutAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
292
293 m_gScalarERmsContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
294 m_gScalarERmsAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
296
297
298 // Retrieve the L1 menu configuration
300 ATH_CHECK(l1Menu.isValid());
301
302 auto & thr_gJ = l1Menu->thrExtraInfo().gJ();
303 auto & thr_gLJ = l1Menu->thrExtraInfo().gLJ();
304 auto & thr_gXE = l1Menu->thrExtraInfo().gXE();
305 auto & thr_gTE = l1Menu->thrExtraInfo().gTE();
306
307 int gJ_scale = thr_gJ.resolutionMeV();
308 int gLJ_scale = thr_gLJ.resolutionMeV();
309 int gXE_scale = thr_gXE.resolutionMeV();
310 int gTE_scale = thr_gTE.resolutionMeV();
311
312
313 //iterate over all gRho Tobs and fill EDM with them
314 for(auto &tob : m_allgRhoTobs){
315 ATH_CHECK(fillgRhoEDM(tob, gJ_scale));
316 }
317 //iterate over all gBlock Tobs and fill EDM with them
318 for(auto &tob : m_allgBlockTobs){
319 ATH_CHECK(fillgBlockEDM(tob, gJ_scale));
320 }
321
322 //iterate over all gJet Tobs and fill EDM with them
323 for(auto &tob : m_allgJetTobs){
324 ATH_CHECK(fillgJetEDM(tob, gLJ_scale));
325 }
326
327 //iterate over all JwoJ scalar energy Tobs and fill EDM with them (should be only one)
328 for(auto &tob : m_allgScalarEJwojTobs){
329 ATH_CHECK(fillgScalarEJwojEDM(tob, gXE_scale, gTE_scale));
330 }
331 //iterate over all JwoJ METcomponents Tobs and fill EDM with them (should be only one)
332 for(auto &tob : m_allgMETComponentsJwojTobs){
333 ATH_CHECK(fillgMETComponentsJwojEDM(tob, gXE_scale, gXE_scale));
334 }
335 //iterate over all JwoJ MHTcomponents Tobs and fill EDM with them (should be only one)
336 for(auto &tob : m_allgMHTComponentsJwojTobs){
337 ATH_CHECK(fillgMHTComponentsJwojEDM(tob, gXE_scale, gXE_scale));
338 }
339 //iterate over all JwoJ MSTcomponents Tobs and fill EDM with them (should be only one)
340 for(auto &tob : m_allgMSTComponentsJwojTobs){
341 ATH_CHECK(fillgMSTComponentsJwojEDM(tob, gXE_scale, gXE_scale));
342 }
343
344
345 //iterate over all NoiseCut METcomponents Tobs and fill EDM with them (should be only one)
346 for(auto &tob : m_allgMETComponentsNoiseCutTobs){
347 ATH_CHECK(fillgMETComponentsNoiseCutEDM(tob, gXE_scale, gXE_scale));
348 }
349 //iterate over all RMS METcomponents Tobs and fill EDM with them (should be only one)
350 for(auto &tob : m_allgMETComponentsRmsTobs){
351 ATH_CHECK(fillgMETComponentsRmsEDM(tob, gXE_scale, gXE_scale));
352 }
353 //iterate over all NoiseCut scalar energy Tobs and fill EDM with them (should be only one)
354 for(auto &tob : m_allgScalarENoiseCutTobs){
355 ATH_CHECK(fillgScalarENoiseCutEDM(tob, gXE_scale, gTE_scale));
356 }
357 //iterate over all RMS scalar energy Tobs and fill EDM with them (should be only one)
358 for(auto &tob : m_allgScalarERmsTobs){
359 ATH_CHECK(fillgScalarERmsEDM(tob, gXE_scale, gTE_scale));
360 }
361
362
364 ATH_MSG_DEBUG(" write: " << outputgFexRhoHandle.key() << " = " << "..." );
365 ATH_CHECK(outputgFexRhoHandle.record(std::move(m_gRhoContainer),std::move(m_gRhoAuxContainer)));
366
368 ATH_MSG_DEBUG(" write: " << outputgFexBlockHandle.key() << " = " << "..." );
369 ATH_CHECK(outputgFexBlockHandle.record(std::move(m_gBlockContainer),std::move(m_gBlockAuxContainer)));
370
372 ATH_MSG_DEBUG(" write: " << outputgFexJetHandle.key() << " = " << "..." );
373 ATH_CHECK(outputgFexJetHandle.record(std::move(m_gJetContainer),std::move(m_gJetAuxContainer)));
374
375
377 ATH_MSG_DEBUG(" write: " << outputgScalarEJwojHandle.key() << " = " << "..." );
378 ATH_CHECK(outputgScalarEJwojHandle.record(std::move(m_gScalarEJwojContainer),std::move(m_gScalarEJwojAuxContainer)));
379
381 ATH_MSG_DEBUG(" write: " << outputgMETComponentsJwojHandle.key() << " = " << "..." );
382 ATH_CHECK(outputgMETComponentsJwojHandle.record(std::move(m_gMETComponentsJwojContainer),std::move(m_gMETComponentsJwojAuxContainer)));
383
385 ATH_MSG_DEBUG(" write: " << outputgMHTComponentsJwojHandle.key() << " = " << "..." );
386 ATH_CHECK(outputgMHTComponentsJwojHandle.record(std::move(m_gMHTComponentsJwojContainer),std::move(m_gMHTComponentsJwojAuxContainer)));
387
389 ATH_MSG_DEBUG(" write: " << outputgMSTComponentsJwojHandle.key() << " = " << "..." );
390 ATH_CHECK(outputgMSTComponentsJwojHandle.record(std::move(m_gMSTComponentsJwojContainer),std::move(m_gMSTComponentsJwojAuxContainer)));
391
392
394 ATH_MSG_DEBUG(" write: " << outputgMETComponentsNoiseCutHandle.key() << " = " << "..." );
395 ATH_CHECK(outputgMETComponentsNoiseCutHandle.record(std::move(m_gMETComponentsNoiseCutContainer),std::move(m_gMETComponentsNoiseCutAuxContainer)));
396
398 ATH_MSG_DEBUG(" write: " << outputgMETComponentsRmsHandle.key() << " = " << "..." );
399 ATH_CHECK(outputgMETComponentsRmsHandle.record(std::move(m_gMETComponentsRmsContainer),std::move(m_gMETComponentsRmsAuxContainer)));
400
402 ATH_MSG_DEBUG(" write: " << outputgScalarENoiseCutHandle.key() << " = " << "..." );
403 ATH_CHECK(outputgScalarENoiseCutHandle.record(std::move(m_gScalarENoiseCutContainer),std::move(m_gScalarENoiseCutAuxContainer)));
404
406 ATH_MSG_DEBUG(" write: " << outputgScalarERmsHandle.key() << " = " << "..." );
407 ATH_CHECK(outputgScalarERmsHandle.record(std::move(m_gScalarERmsContainer),std::move(m_gScalarERmsAuxContainer)));
408
409
410 return StatusCode::SUCCESS;
411 }
412
413 StatusCode gFEXSysSim::fillgRhoEDM(uint32_t tobWord, int gJ_scale){
414
415 std::unique_ptr<xAOD::gFexJetRoI> myEDM (new xAOD::gFexJetRoI());
416 m_gRhoContainer->push_back(std::move(myEDM));
417 m_gRhoContainer->back()->initialize(tobWord, gJ_scale);
418
419 return StatusCode::SUCCESS;
420 }
421
422 StatusCode gFEXSysSim::fillgBlockEDM(uint32_t tobWord, int gJ_scale){
423
424 std::unique_ptr<xAOD::gFexJetRoI> myEDM (new xAOD::gFexJetRoI());
425 m_gBlockContainer->push_back(std::move(myEDM));
426 m_gBlockContainer->back()->initialize(tobWord, gJ_scale);
427
428 return StatusCode::SUCCESS;
429 }
430
431 StatusCode gFEXSysSim::fillgJetEDM(uint32_t tobWord, int gLJ_scale){
432
433 std::unique_ptr<xAOD::gFexJetRoI> myEDM (new xAOD::gFexJetRoI());
434 m_gJetContainer->push_back(std::move(myEDM));
435 m_gJetContainer->back()->initialize(tobWord, gLJ_scale);
436
437 return StatusCode::SUCCESS;
438 }
439
440 StatusCode gFEXSysSim::fillgMETComponentsJwojEDM(uint32_t tobWord, int scale1, int scale2){
441
442 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
443 m_gMETComponentsJwojContainer->push_back(std::move(myEDM));
444 m_gMETComponentsJwojContainer->back()->initialize(tobWord, scale1, scale2);
445
446 return StatusCode::SUCCESS;
447 }
448
449 StatusCode gFEXSysSim::fillgMHTComponentsJwojEDM(uint32_t tobWord, int scale1, int scale2){
450
451 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
452 m_gMHTComponentsJwojContainer->push_back(std::move(myEDM));
453 m_gMHTComponentsJwojContainer->back()->initialize(tobWord, scale1, scale2);
454
455 return StatusCode::SUCCESS;
456 }
457
458 StatusCode gFEXSysSim::fillgMSTComponentsJwojEDM(uint32_t tobWord, int scale1, int scale2){
459
460 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
461 m_gMSTComponentsJwojContainer->push_back(std::move(myEDM));
462 m_gMSTComponentsJwojContainer->back()->initialize(tobWord, scale1, scale2);
463
464 return StatusCode::SUCCESS;
465 }
466
467 StatusCode gFEXSysSim::fillgScalarEJwojEDM(uint32_t tobWord, int scale1, int scale2){
468
469 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
470 m_gScalarEJwojContainer->push_back(std::move(myEDM));
471 m_gScalarEJwojContainer->back()->initialize(tobWord, scale1, scale2);
472
473 return StatusCode::SUCCESS;
474 }
475
476 StatusCode gFEXSysSim::fillgMETComponentsNoiseCutEDM(uint32_t tobWord, int scale1, int scale2){
477
478 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
479 m_gMETComponentsNoiseCutContainer->push_back(std::move(myEDM));
480 m_gMETComponentsNoiseCutContainer->back()->initialize(tobWord, scale1, scale2);
481
482 return StatusCode::SUCCESS;
483 }
484
485 StatusCode gFEXSysSim::fillgMETComponentsRmsEDM(uint32_t tobWord, int scale1, int scale2){
486
487 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
488 m_gMETComponentsRmsContainer->push_back(std::move(myEDM));
489 m_gMETComponentsRmsContainer->back()->initialize(tobWord, scale1, scale2);
490
491 return StatusCode::SUCCESS;
492 }
493
494 StatusCode gFEXSysSim::fillgScalarENoiseCutEDM(uint32_t tobWord, int scale1, int scale2){
495
496 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
497 m_gScalarENoiseCutContainer->push_back(std::move(myEDM));
498 m_gScalarENoiseCutContainer->back()->initialize(tobWord, scale1, scale2);
499
500 return StatusCode::SUCCESS;
501 }
502
503 StatusCode gFEXSysSim::fillgScalarERmsEDM(uint32_t tobWord, int scale1, int scale2){
504
505 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
506 m_gScalarERmsContainer->push_back(std::move(myEDM));
507 m_gScalarERmsContainer->back()->initialize(tobWord, scale1, scale2);
508
509 return StatusCode::SUCCESS;
510 }
511
512
513} // 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.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
static constexpr int centralNphi
static constexpr int forwardNphi
std::vector< uint32_t > m_allgRhoTobs
Definition gFEXSysSim.h:140
virtual StatusCode fillgMETComponentsRmsEDM(uint32_t tobWord, int scale1, int scale2) override
std::vector< uint32_t > m_allgMETComponentsNoiseCutTobs
Definition gFEXSysSim.h:149
std::vector< uint32_t > m_allgMSTComponentsJwojTobs
Definition gFEXSysSim.h:147
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gMETComponentsNoiseCutContainer
Definition gFEXSysSim.h:105
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
Definition gFEXSysSim.h:138
SG::ReadHandleKey< LVL1::gTowerContainer > m_gTowerContainerSGKey
Definition gFEXSysSim.h:122
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexJetOutKey
Definition gFEXSysSim.h:126
virtual StatusCode initialize() override
standard Athena-Algorithm method
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsJwojOutKey
Definition gFEXSysSim.h:129
std::vector< uint32_t > m_allgScalarENoiseCutTobs
Definition gFEXSysSim.h:151
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsNoiseCutOutKey
Definition gFEXSysSim.h:133
virtual StatusCode fillgMHTComponentsJwojEDM(uint32_t tobWord, int scale1, int scale2) override
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gMETComponentsJwojAuxContainer
Definition gFEXSysSim.h:97
std::unique_ptr< xAOD::gFexJetRoIAuxContainer > m_gJetAuxContainer
Definition gFEXSysSim.h:91
virtual void cleanup() override
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexRhoOutKey
Definition gFEXSysSim.h:124
std::unique_ptr< xAOD::gFexJetRoIAuxContainer > m_gRhoAuxContainer
Definition gFEXSysSim.h:85
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMHTComponentsJwojOutKey
Definition gFEXSysSim.h:130
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gScalarENoiseCutContainer
Definition gFEXSysSim.h:111
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gMETComponentsRmsContainer
Definition gFEXSysSim.h:108
std::vector< uint32_t > m_allgMHTComponentsJwojTobs
Definition gFEXSysSim.h:146
std::vector< uint32_t > m_allgMETComponentsRmsTobs
Definition gFEXSysSim.h:150
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gMSTComponentsJwojContainer
Definition gFEXSysSim.h:102
virtual StatusCode fillgRhoEDM(uint32_t tobWord, int scale) override
Create and fill a new gFexJetRoI object, and return a pointer to it.
std::vector< uint32_t > m_allgBlockTobs
Definition gFEXSysSim.h:141
std::vector< uint32_t > m_allgMETComponentsJwojTobs
Definition gFEXSysSim.h:145
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarEJwojOutKey
Definition gFEXSysSim.h:128
virtual StatusCode fillgScalarEJwojEDM(uint32_t tobWord, int scale1, int scale2) override
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarERmsOutKey
Definition gFEXSysSim.h:136
virtual StatusCode fillgScalarERmsEDM(uint32_t tobWord, int scale1, int scale2) override
virtual StatusCode execute(gFEXOutputCollection *gFEXOutputs) override
std::vector< gFEXSim * > m_gFEXCollection
Definition gFEXSysSim.h:118
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsRmsOutKey
Definition gFEXSysSim.h:134
gFEXSysSim(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
std::vector< uint32_t > m_allgJetTobs
Definition gFEXSysSim.h:142
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarENoiseCutOutKey
Definition gFEXSysSim.h:135
virtual StatusCode fillgScalarENoiseCutEDM(uint32_t tobWord, int scale1, int scale2) override
std::unique_ptr< xAOD::gFexJetRoIContainer > m_gJetContainer
Definition gFEXSysSim.h:90
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gScalarEJwojContainer
Definition gFEXSysSim.h:93
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gScalarEJwojAuxContainer
Definition gFEXSysSim.h:94
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gMHTComponentsJwojContainer
Definition gFEXSysSim.h:99
std::unique_ptr< xAOD::gFexJetRoIContainer > m_gBlockContainer
Definition gFEXSysSim.h:87
virtual StatusCode fillgJetEDM(uint32_t tobWord, int scale) override
virtual StatusCode fillgMETComponentsNoiseCutEDM(uint32_t tobWord, int scale1, int scale2) override
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gMETComponentsRmsAuxContainer
Definition gFEXSysSim.h:109
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gScalarENoiseCutAuxContainer
Definition gFEXSysSim.h:112
std::vector< uint32_t > m_allgScalarERmsTobs
Definition gFEXSysSim.h:152
std::vector< int32_t > m_allgScalarEJwojTobs
Definition gFEXSysSim.h:144
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gScalarERmsAuxContainer
Definition gFEXSysSim.h:115
virtual StatusCode fillgBlockEDM(uint32_t tobWord, int scale) override
std::unique_ptr< xAOD::gFexJetRoIAuxContainer > m_gBlockAuxContainer
Definition gFEXSysSim.h:88
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMSTComponentsJwojOutKey
Definition gFEXSysSim.h:131
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gMETComponentsNoiseCutAuxContainer
Definition gFEXSysSim.h:106
virtual StatusCode fillgMETComponentsJwojEDM(uint32_t tobWord, int scale1, int scale2) override
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexBlockOutKey
Definition gFEXSysSim.h:125
virtual StatusCode fillgMSTComponentsJwojEDM(uint32_t tobWord, int scale1, int scale2) override
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gMETComponentsJwojContainer
Definition gFEXSysSim.h:96
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gScalarERmsContainer
Definition gFEXSysSim.h:114
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gMHTComponentsJwojAuxContainer
Definition gFEXSysSim.h:100
virtual int calcTowerID(int eta, int phi, int nphi, int mod) const override
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gMSTComponentsJwojAuxContainer
Definition gFEXSysSim.h:103
ToolHandle< IgFEXSim > m_gFEXSimTool
Definition gFEXSysSim.h:120
std::unique_ptr< xAOD::gFexJetRoIContainer > m_gRhoContainer
Internal data.
Definition gFEXSysSim.h:84
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.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
std::array< std::array< int, 40 >, 32 > gTowersIDs
Definition IgFEXSim.h:20
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.