ATLAS Offline Software
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 
12 #include "L1CaloFEXSim/gFEXSim.h"
13 #include "L1CaloFEXSim/gTower.h"
15 
16 #include "StoreGate/WriteHandle.h"
17 #include "StoreGate/ReadHandle.h"
18 
20 
21 namespace LVL1 {
22 
23  // default constructor for persistency
24 
25  gFEXSysSim::gFEXSysSim(const std::string& type,const std::string& name,const IInterface* 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 
60  ATH_CHECK(m_gScalarENoiseCutOutKey.initialize());
61 
62  ATH_CHECK(m_gScalarERmsOutKey.initialize());
63 
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 
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> ();
257  m_gBlockContainer->setStore(m_gBlockAuxContainer.get());
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 
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 
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 
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 
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 
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 
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 
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 
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 
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 
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
LVL1::gFEXSysSim::m_allgScalarENoiseCutTobs
std::vector< uint32_t > m_allgScalarENoiseCutTobs
Definition: gFEXSysSim.h:151
LVL1::gFEXSysSim::cleanup
virtual void cleanup() override
Definition: gFEXSysSim.cxx:73
LVL1::FEXAlgoSpaceDefs::forwardNphi
constexpr static int forwardNphi
Definition: FEXAlgoSpaceDefs.h:149
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
scale2
#define scale2
Definition: JetAttributeHisto.cxx:42
LVL1::FEXAlgoSpaceDefs::centralNphi
constexpr static int centralNphi
Definition: FEXAlgoSpaceDefs.h:148
LVL1::gFEXSysSim::m_allgMETComponentsJwojTobs
std::vector< uint32_t > m_allgMETComponentsJwojTobs
Definition: gFEXSysSim.h:145
LVL1::gFEXSysSim::fillgMHTComponentsJwojEDM
virtual StatusCode fillgMHTComponentsJwojEDM(uint32_t tobWord, int scale1, int scale2) override
Definition: gFEXSysSim.cxx:449
LVL1::gFEXSysSim::m_gScalarERmsContainer
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gScalarERmsContainer
Definition: gFEXSysSim.h:114
LVL1::gFEXSysSim::m_gMETComponentsJwojContainer
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gMETComponentsJwojContainer
Definition: gFEXSysSim.h:96
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::gFEXSysSim::m_gFEXCollection
std::vector< gFEXSim * > m_gFEXCollection
Definition: gFEXSysSim.h:118
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
gTowerContainer.h
LVL1::gFEXSysSim::m_gMETComponentsNoiseCutAuxContainer
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gMETComponentsNoiseCutAuxContainer
Definition: gFEXSysSim.h:106
LVL1::gFEXSysSim::fillgScalarENoiseCutEDM
virtual StatusCode fillgScalarENoiseCutEDM(uint32_t tobWord, int scale1, int scale2) override
Definition: gFEXSysSim.cxx:494
TrigConf::L1Menu::thrExtraInfo
const L1ThrExtraInfo & thrExtraInfo() const
Access to extra info for threshold types.
Definition: L1Menu.cxx:307
TrigConf::L1ThrExtraInfo::gXE
const L1ThrExtraInfo_gXE & gXE() const
Definition: L1ThrExtraInfo.cxx:178
LVL1::gTower::phi
float phi() const
Definition: gTower.h:69
xAOD::gFexGlobalRoI_v1
Class describing properties of a LVL1 gFEX global Trigger Object (TOB) in the xAOD format.
Definition: gFexGlobalRoI_v1.h:25
LVL1::gFEXSysSim::m_gMHTComponentsJwojOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMHTComponentsJwojOutKey
Definition: gFEXSysSim.h:130
LVL1::gFEXSysSim::fillgScalarERmsEDM
virtual StatusCode fillgScalarERmsEDM(uint32_t tobWord, int scale1, int scale2) override
Definition: gFEXSysSim.cxx:503
LVL1::gFEXSysSim::m_gMETComponentsNoiseCutContainer
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gMETComponentsNoiseCutContainer
Definition: gFEXSysSim.h:105
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
LVL1::gFEXSysSim::fillgMETComponentsJwojEDM
virtual StatusCode fillgMETComponentsJwojEDM(uint32_t tobWord, int scale1, int scale2) override
Definition: gFEXSysSim.cxx:440
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::gFEXSysSim::fillgScalarEJwojEDM
virtual StatusCode fillgScalarEJwojEDM(uint32_t tobWord, int scale1, int scale2) override
Definition: gFEXSysSim.cxx:467
LVL1::gFEXSysSim::m_gScalarENoiseCutAuxContainer
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gScalarENoiseCutAuxContainer
Definition: gFEXSysSim.h:112
LVL1::gFEXSysSim::m_allgRhoTobs
std::vector< uint32_t > m_allgRhoTobs
Definition: gFEXSysSim.h:140
LVL1::gFEXSysSim::m_gFexRhoOutKey
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexRhoOutKey
Definition: gFEXSysSim.h:124
LVL1::gFEXOutputCollection
Definition: gFEXOutputCollection.h:22
LVL1::gFEXSysSim::m_allgMSTComponentsJwojTobs
std::vector< uint32_t > m_allgMSTComponentsJwojTobs
Definition: gFEXSysSim.h:147
LVL1::gFEXSysSim::m_gMHTComponentsJwojAuxContainer
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gMHTComponentsJwojAuxContainer
Definition: gFEXSysSim.h:100
WriteHandle.h
Handle class for recording to StoreGate.
beamspotnt.cols
list cols
Definition: bin/beamspotnt.py:1114
LVL1::gFEXSysSim::m_gBlockContainer
std::unique_ptr< xAOD::gFexJetRoIContainer > m_gBlockContainer
Definition: gFEXSysSim.h:87
LVL1::gFEXSysSim::m_gMETComponentsRmsOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsRmsOutKey
Definition: gFEXSysSim.h:134
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
LVL1::gFEXSysSim::m_gScalarERmsOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarERmsOutKey
Definition: gFEXSysSim.h:136
LVL1::gFEXSysSim::m_allgBlockTobs
std::vector< uint32_t > m_allgBlockTobs
Definition: gFEXSysSim.h:141
LVL1::gFEXSysSim::m_gScalarEJwojOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarEJwojOutKey
Definition: gFEXSysSim.h:128
TrigConf::L1ThrExtraInfo::gLJ
const L1ThrExtraInfo_gLJ & gLJ() const
Definition: L1ThrExtraInfo.cxx:163
LVL1::gFEXSysSim::calcTowerID
virtual int calcTowerID(int eta, int phi, int nphi, int mod) const override
Definition: gFEXSysSim.cxx:80
LVL1::gFEXSysSim::m_gRhoAuxContainer
std::unique_ptr< xAOD::gFexJetRoIAuxContainer > m_gRhoAuxContainer
Definition: gFEXSysSim.h:85
LVL1::gFEXSysSim::m_allgScalarERmsTobs
std::vector< uint32_t > m_allgScalarERmsTobs
Definition: gFEXSysSim.h:152
LVL1::gFEXSysSim::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition: gFEXSysSim.cxx:35
LVL1::gFEXSysSim::m_gMSTComponentsJwojOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMSTComponentsJwojOutKey
Definition: gFEXSysSim.h:131
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
LVL1::gFEXSysSim::m_gMETComponentsJwojAuxContainer
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gMETComponentsJwojAuxContainer
Definition: gFEXSysSim.h:97
LVL1::gFEXSysSim::m_allgMHTComponentsJwojTobs
std::vector< uint32_t > m_allgMHTComponentsJwojTobs
Definition: gFEXSysSim.h:146
xAOD::gFexJetRoI_v1
Class describing properties of a LVL1 gFEX jet Trigger Object (TOB) in the xAOD format.
Definition: gFexJetRoI_v1.h:25
LVL1::gFEXSysSim::m_gMSTComponentsJwojContainer
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gMSTComponentsJwojContainer
Definition: gFEXSysSim.h:102
LVL1::gFEXSysSim::m_gMETComponentsJwojOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsJwojOutKey
Definition: gFEXSysSim.h:129
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::gFEXSysSim::fillgMSTComponentsJwojEDM
virtual StatusCode fillgMSTComponentsJwojEDM(uint32_t tobWord, int scale1, int scale2) override
Definition: gFEXSysSim.cxx:458
LVL1::gFEXSysSim::execute
virtual StatusCode execute(gFEXOutputCollection *gFEXOutputs) override
Definition: gFEXSysSim.cxx:86
LVL1::gFEXSysSim::fillgBlockEDM
virtual StatusCode fillgBlockEDM(uint32_t tobWord, int scale) override
Definition: gFEXSysSim.cxx:422
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::gFEXSysSim::fillgMETComponentsNoiseCutEDM
virtual StatusCode fillgMETComponentsNoiseCutEDM(uint32_t tobWord, int scale1, int scale2) override
Definition: gFEXSysSim.cxx:476
beamspotnt.rows
list rows
Definition: bin/beamspotnt.py:1112
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
gFEXSysSim.h
LVL1::gFEXSysSim::m_l1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
Definition: gFEXSysSim.h:138
FEXAlgoSpaceDefs.h
LVL1::gFEXSysSim::gFEXSysSim
gFEXSysSim(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
Definition: gFEXSysSim.cxx:25
LVL1::gFEXSysSim::m_gScalarEJwojContainer
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gScalarEJwojContainer
Definition: gFEXSysSim.h:93
LVL1::gFEXSysSim::m_gMSTComponentsJwojAuxContainer
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gMSTComponentsJwojAuxContainer
Definition: gFEXSysSim.h:103
LVL1::gFEXSysSim::m_gMETComponentsRmsAuxContainer
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gMETComponentsRmsAuxContainer
Definition: gFEXSysSim.h:109
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
TrigConf::name
Definition: HLTChainList.h:35
LVL1::gFEXSysSim::m_gScalarENoiseCutOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarENoiseCutOutKey
Definition: gFEXSysSim.h:135
LVL1::gTower::eta
float eta() const
Definition: gTower.h:68
LVL1::gFEXSysSim::m_gMHTComponentsJwojContainer
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gMHTComponentsJwojContainer
Definition: gFEXSysSim.h:99
LVL1::gFEXSysSim::m_gFexBlockOutKey
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexBlockOutKey
Definition: gFEXSysSim.h:125
LVL1::gFEXSysSim::m_gTowerContainerSGKey
SG::ReadHandleKey< LVL1::gTowerContainer > m_gTowerContainerSGKey
Definition: gFEXSysSim.h:122
TrigConf::L1ThrExtraInfoBase::resolutionMeV
unsigned int resolutionMeV() const
Definition: L1ThresholdBase.h:101
SG::VarHandleBase::key
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:64
LVL1::gFEXSysSim::m_gJetAuxContainer
std::unique_ptr< xAOD::gFexJetRoIAuxContainer > m_gJetAuxContainer
Definition: gFEXSysSim.h:91
LVL1::gFEXSysSim::fillgJetEDM
virtual StatusCode fillgJetEDM(uint32_t tobWord, int scale) override
Definition: gFEXSysSim.cxx:431
LVL1::gFEXSysSim::m_allgMETComponentsNoiseCutTobs
std::vector< uint32_t > m_allgMETComponentsNoiseCutTobs
Definition: gFEXSysSim.h:149
LVL1::gFEXSysSim::m_gScalarEJwojAuxContainer
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gScalarEJwojAuxContainer
Definition: gFEXSysSim.h:94
LVL1::gFEXSysSim::m_gMETComponentsNoiseCutOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsNoiseCutOutKey
Definition: gFEXSysSim.h:133
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
LVL1::gFEXSysSim::m_gScalarENoiseCutContainer
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gScalarENoiseCutContainer
Definition: gFEXSysSim.h:111
LVL1::gFEXSysSim::fillgMETComponentsRmsEDM
virtual StatusCode fillgMETComponentsRmsEDM(uint32_t tobWord, int scale1, int scale2) override
Definition: gFEXSysSim.cxx:485
LVL1::gFEXSysSim::m_allgMETComponentsRmsTobs
std::vector< uint32_t > m_allgMETComponentsRmsTobs
Definition: gFEXSysSim.h:150
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrigConf::L1ThrExtraInfo::gTE
const L1ThrExtraInfo_gTE & gTE() const
Definition: L1ThrExtraInfo.cxx:183
LVL1::gFEXSysSim::m_gMETComponentsRmsContainer
std::unique_ptr< xAOD::gFexGlobalRoIContainer > m_gMETComponentsRmsContainer
Definition: gFEXSysSim.h:108
LVL1::gFEXSysSim::m_gFexJetOutKey
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexJetOutKey
Definition: gFEXSysSim.h:126
LVL1::gTowersIDs
std::array< std::array< int, 40 >, 32 > gTowersIDs
Definition: IgFEXSim.h:20
LVL1::gFEXSysSim::m_gScalarERmsAuxContainer
std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > m_gScalarERmsAuxContainer
Definition: gFEXSysSim.h:115
LVL1::gFEXSysSim::m_gBlockAuxContainer
std::unique_ptr< xAOD::gFexJetRoIAuxContainer > m_gBlockAuxContainer
Definition: gFEXSysSim.h:88
scale1
#define scale1
Definition: JetAttributeHisto.cxx:41
LVL1::gFEXSysSim::fillgRhoEDM
virtual StatusCode fillgRhoEDM(uint32_t tobWord, int scale) override
Create and fill a new gFexJetRoI object, and return a pointer to it.
Definition: gFEXSysSim.cxx:413
ReadHandle.h
Handle class for reading from StoreGate.
AthAlgTool
Definition: AthAlgTool.h:26
LVL1::gFEXSysSim::m_gRhoContainer
std::unique_ptr< xAOD::gFexJetRoIContainer > m_gRhoContainer
Internal data.
Definition: gFEXSysSim.h:84
gTower.h
LVL1::gFEXSysSim::m_gJetContainer
std::unique_ptr< xAOD::gFexJetRoIContainer > m_gJetContainer
Definition: gFEXSysSim.h:90
LVL1::gFEXSysSim::m_gFEXSimTool
ToolHandle< IgFEXSim > m_gFEXSimTool
Definition: gFEXSysSim.h:120
LVL1::gFEXSysSim::m_allgJetTobs
std::vector< uint32_t > m_allgJetTobs
Definition: gFEXSysSim.h:142
TrigConf::L1ThrExtraInfo::gJ
const L1ThrExtraInfo_gJ & gJ() const
Definition: L1ThrExtraInfo.cxx:158
LVL1::gFEXSysSim::m_allgScalarEJwojTobs
std::vector< uint32_t > m_allgScalarEJwojTobs
Definition: gFEXSysSim.h:144
gFEXSim.h
LVL1::gTowerContainer::findTower
const LVL1::gTower * findTower(int towerID) const
fast find method given identifier.
Definition: gTowerContainer.cxx:36