ATLAS Offline Software
jFEXSysSim.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 //***************************************************************************
6 // jFEXSysSim - description
7 // -------------------
8 // begin : 19 10 2020
9 // email : jacob.julian.kempster@cern.ch alison.elliot@cern.ch
10 // ***************************************************************************/
11 
12 
14 #include "L1CaloFEXSim/jFEXSim.h"
15 #include "L1CaloFEXSim/jTower.h"
21 
22 #include "StoreGate/WriteHandle.h"
23 #include "StoreGate/ReadHandle.h"
24 #include "GaudiKernel/ServiceHandle.h"
25 
29 
33 
34 #include "xAODTrigger/jFexTauRoI.h"
37 
41 
43 
44 #include <ctime>
45 
46 namespace LVL1 {
47 
48 
49  // default constructor for persistency
50 
51  jFEXSysSim::jFEXSysSim(const std::string& type,const std::string& name,const IInterface* parent):
53  {
54  declareInterface<IjFEXSysSim>(this);
55 
56  }
57 
58 
60  //jFEXSysSim::~jFEXSysSim()
61  //{
62  //}
63 
64  //================ Initialisation =================================================
65 
67  {
68 
70 
71  ATH_CHECK( m_DBToolKey.initialize() );
72  ATH_CHECK(m_jFEXSimTool.retrieve() );
73 
74  // TOBs Key
75  ATH_CHECK(m_TobOutKey_jJ.initialize());
76  ATH_CHECK(m_TobOutKey_jLJ.initialize());
77  ATH_CHECK(m_TobOutKey_jTau.initialize());
78  ATH_CHECK(m_TobOutKey_jEM.initialize());
79  ATH_CHECK(m_TobOutKey_jTE.initialize());
80  ATH_CHECK(m_TobOutKey_jXE.initialize());
81 
82  // xTOBs Key
83  ATH_CHECK(m_xTobOutKey_jJ.initialize());
84  ATH_CHECK(m_xTobOutKey_jLJ.initialize());
85  ATH_CHECK(m_xTobOutKey_jTau.initialize());
86  ATH_CHECK(m_xTobOutKey_jEM.initialize());
87 
88  // Decorations
89  ATH_CHECK(m_TobDecorKey_jJ_seedET.initialize());
90  ATH_CHECK(m_xTobDecorKey_jJ_seedET.initialize());
91 
93 
94  return StatusCode::SUCCESS;
95  }
96 
97  //================ Finalisation =================================================
98 
100  {
101  return StatusCode::SUCCESS;
102  }
103 
104 
105  void jFEXSysSim::init() const {
106 
107  }
108 
110 
111  m_jFEXCollection.clear();
112  m_jTowersColl.clear();
113 
114  }
115 
116 
117  int jFEXSysSim::calcTowerID(int eta, int phi, int mod) const {
118 
119  return ((64*eta) + phi + mod);
120  }
121 
123 
125  if(!this_jTowerContainer.isValid()){
126  ATH_MSG_ERROR("Could not retrieve jTowerContainer " << m_jTowerContainerSGKey.key());
127  return StatusCode::FAILURE;
128  }
129 
130  m_allSmallRJetTobs.clear();
131  m_allLargeRJetTobs.clear();
132  m_alltauTobs.clear();
133  m_allfwdElTobs.clear();
134  m_allMetTobs.clear();
135  m_allsumEtTobs.clear();
136  // We need to split the towers into 6 blocks in eta and 4 blocks in phi.
137 
138  // boundaries in eta: -2.5, -1.6, -0.8, 0.0, 0.8, 1.6, 2.5
139  // Written explicitly:
140  // -2.5 -> -0.8 (in reality this will be -4.9 to -0.8 , but we're ignoring the forward region for the time being...) [core is -4.9 to -1.6]
141  // -2.4 -> -0.0 [core is -1.6 to -0.8]
142  // -1.6 -> 0.8 [core is -0.8 to -0.0]
143  // -0.8 -> 1.6 [core is [0.0 to 0.8]
144  // 0.0 -> 2.4 [core is 0.8 to 1.6]
145  // 0.8 -> 2.5 (in reality this will be 0.8 to 4.9 , but we're ignoring the forward region for the time being...) [core is 1.6 to 4.9]
146 
147  //----------------------------------------------WRONG! THE FPGAs SPLIT IN PHI, NOT THE FEXs------------------------------------------------
148  // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
149  // boundaries in phi: 0.0, 1.6, 3.2, 4.8, 6.4
150  // Written explicitly:
151  // 5.6 -> 2.4 [core is 0.0 to 1.6]
152  // 0.8 -> 4.0 [core is 1.6 to 3.2]
153  // 2.4 -> 5.6 [core is 3.2 to 4.8]
154  // 4.0 -> 0.8 [core is 4.8 to 6.4]
155  // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
156  //----------------------------------------------WRONG! THE FPGAs SPLIT IN PHI, NOT THE FEXs------------------------------------------------
157 
158  //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
159  // C-SIDE NEGATIVE JFEX
160  // LEFT-MOST
161  // -4.9 to -0.8 [core is -4.9 to -1.6]
162  // DO THE LEFT-MOST (NEGATIVE ETA) JFEX FIRST
163  //id_modifier + phi + (64 * eta)
164  int fcal2Eta = 3; int fcal2Phi = 0; int fcal2Mod = 1100000;
165  int initialFCAL2 = calcTowerID(fcal2Eta,fcal2Phi,fcal2Mod); //1100192
166  int fcal1Eta = 7; int fcal1Phi = 0; int fcal1Mod = 900000;
167  int initialFCAL1 = calcTowerID(fcal1Eta,fcal1Phi,fcal1Mod); //900448
168  int fcal0Eta = 11; int fcal0Phi = 0; int fcal0Mod = 700000;
169  int initialFCAL0 = calcTowerID(fcal0Eta,fcal0Phi,fcal0Mod); //700704
170  int emecEta = 28; int emecPhi = 0; int emecMod = 500000;
171  int initialEMEC = calcTowerID(emecEta,emecPhi,emecMod); //501792
172  int transEta = 14; int transPhi = 0; int transMod = 300000;
173  int initialTRANS = calcTowerID(transEta,transPhi,transMod); //300896;
174  int embEta = 13; int embPhi = 0; int embMod = 100000;
175  int initialEMB = calcTowerID(embEta,embPhi,embMod); //100832
176 
178  if (!myDBTool.isValid()){
179  ATH_MSG_ERROR("Not able to read " << m_DBToolKey );
180  return StatusCode::FAILURE;
181  }
182 
183  unsigned int evtTimeStamp = Gaudi::Hive::currentContext().eventID().time_stamp();
184 
185  uint8_t thisJFEX = 0;
186  // jFEX 0
187  thisJFEX = 0;
188 
189  // let's work fully out to in (sort of)
190  // Let's go with FCAL2 first
191  // decide which subset of towers (and therefore supercells) should go to the jFEX
192  std::unordered_map<int,jTower> tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL;
193  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.reserve(1600);
194 
195  // let's try doing this with an array initially just containing tower IDs.
196  int tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL [2*FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width];
197 
198  // zero the matrix out
199  for (int i = 0; i<2*FEXAlgoSpaceDefs::jFEX_algoSpace_height; i++){
200  for (int j = 0; j<FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width; j++){
201  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[i][j] = 0;
202  }
203  }
204 
205  int rows = sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL / sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[0];
206  int cols = sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[0] / sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[0][0];
207 
208  // set the FCAL2 part
209  for(int thisCol=0; thisCol<4; thisCol++){
210  for(int thisRow=0; thisRow<rows/4; thisRow++){
211 
212  int towerid = initialFCAL2 - (thisCol * 64) + thisRow;
213 
214  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
215  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
216 
217  }
218  }
219  //---
220  // Let's go with FCAL1
221  // set the FCAL1 part
222  for(int thisCol=4; thisCol<12; thisCol++){
223  for(int thisRow=0; thisRow<rows/4; thisRow++){
224 
225  int towerid = initialFCAL1 - ((thisCol-4) * 64) + thisRow;
226 
227  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
228  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
229 
230  }
231  }
232  //---
233  // Let's go with FCAL0
234  // set the FCAL0 part
235  for(int thisCol=12; thisCol<24; thisCol++){
236  for(int thisRow=0; thisRow<rows/4; thisRow++){
237 
238  int towerid = initialFCAL0 - ((thisCol-12) * 64) + thisRow;
239 
240  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
241  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
242 
243  }
244  }
245  //---
246  // decide which subset of towers (and therefore supercells) should go to the jFEX
247  // set the next EMEC part
248  for(int thisCol=24; thisCol<28; thisCol++){
249  for(int thisRow=0; thisRow<rows/2; thisRow++){
250 
251  int towerid = initialEMEC - ((thisCol-24) * 64) + thisRow;
252 
253  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
254  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
255 
256  }
257  }
258  // set the EMEC part
259  for(int thisCol=28; thisCol<38; thisCol++){
260  for(int thisRow=0; thisRow<rows; thisRow++){
261 
262  int towerid = initialEMEC - ((thisCol-24) * 64) + thisRow; //note special case -24 rather than -28, this *is* deliberate
263 
264  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
265  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
266 
267  }
268  }
269  // set the TRANS part
270  for(int thisRow = 0; thisRow < rows; thisRow++){
271 
272  int towerid = initialTRANS + thisRow;
273 
274  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][38] = towerid;
275  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
276 
277  }
278  // set the EMB part
279  for(int thisCol = 39; thisCol < 45; thisCol++){
280  for(int thisRow=0; thisRow<rows; thisRow++){
281 
282  int towerid = initialEMB - ( (thisCol-39) * 64) + thisRow;
283 
284  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
285  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
286 
287  }
288  }
289 
290  if (msgLvl(MSG::DEBUG)) {
291  ATH_MSG_DEBUG("CONTENTS OF jFEX " << thisJFEX << " :");
292  for (int thisRow=rows-1; thisRow>=0; thisRow--) {
293  for (int thisCol=0; thisCol<cols; thisCol++) {
294  int tmptowerid = tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol];
295  if(tmptowerid == 0 ) continue;
296  const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
297  const float tmptowereta = tmptower->iEta();
298  const float tmptowerphi = tmptower->iPhi();
299  if(thisCol != cols-1) {
300  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowerphi << "][" << tmptowereta << "]) ");
301  }
302  else {
303  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) |");
304  }
305  }
306  }
307  }
308  m_jFEXSimTool->init(thisJFEX);
309  ATH_CHECK(m_jFEXSimTool->ExecuteForwardASide(tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
310 
311  m_allSmallRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getSmallRJetTOBs() ) ));
312  m_allLargeRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getLargeRJetTOBs() ) ));
313  m_alltauTobs.insert( std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getTauTOBs() ) ));
314  m_allfwdElTobs.insert( std::unordered_map<uint8_t, std::vector<std::vector<std::vector<uint32_t>>> >::value_type(thisJFEX,(m_jFEXSimTool->getFwdElTOBs() ) ));
315 
316  m_allsumEtTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getSumEtTOBs() ) ));
317  m_allMetTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getMetTOBs() ) ));
318  m_jFEXSimTool->reset();
319 
320  //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
321 
322  //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
323  // C-SIDE NEGATIVE JFEX
324  // INNER-LEFT
325  // -2.4 -> -0.0 [core is -1.6 to -0.8]
326  // DO THE INNER-LEFT (NEGATIVE ETA) JFEX SECOND
327  //id_modifier + phi + (64 * eta)
328  emecEta = 23; emecPhi = 0; emecMod = 500000;
329  initialEMEC = calcTowerID(emecEta,emecPhi,emecMod); //500472;
330  transEta = 14; transPhi = 0; transMod = 300000;
331  initialTRANS = calcTowerID(transEta,transPhi,transMod); //300896;
332  embEta = 13; embPhi = 0; embMod = 100000;
333  initialEMB = calcTowerID(embEta,embPhi,embMod); //100832
334 
335  // jFEX 1
336  thisJFEX = 1;
337 
338  // decide which subset of towers (and therefore supercells) should go to the jFEX
339  std::unordered_map<int,jTower> tmp_jTowersColl_subset_1;
340 
341  // let's try doing this with an array initially just containing tower IDs.
343 
344  // zero the matrix out
345  for (int i = 0; i<2*FEXAlgoSpaceDefs::jFEX_algoSpace_height; i++){
346  for (int j = 0; j<FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width; j++){
347  tmp_jTowersIDs_subset_1[i][j] = 0;
348  }
349  }
350 
351  rows = sizeof tmp_jTowersIDs_subset_1 / sizeof tmp_jTowersIDs_subset_1[0];
352  cols = sizeof tmp_jTowersIDs_subset_1[0] / sizeof tmp_jTowersIDs_subset_1[0][0];
353 
354  // set the EMEC part
355  for(int thisCol = 0; thisCol < 9; thisCol++){
356  for(int thisRow=0; thisRow<rows; thisRow++){
357 
358  int towerid = initialEMEC - (thisCol * 64) + thisRow;
359 
360  tmp_jTowersIDs_subset_1[thisRow][thisCol] = towerid;
361  tmp_jTowersColl_subset_1.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
362 
363  }
364  }
365 
366  // set the TRANS part
367  for(int thisRow = 0; thisRow < rows; thisRow++) {
368 
369  int towerid = initialTRANS + thisRow;
370 
371  tmp_jTowersIDs_subset_1[thisRow][9] = towerid;
372  tmp_jTowersColl_subset_1.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
373 
374  }
375 
376  // set the EMB part
377  for(int thisCol = 10; thisCol < cols; thisCol++) {
378  for(int thisRow=0; thisRow<rows; thisRow++) {
379 
380  int towerid = initialEMB - ( (thisCol-10) * 64) + thisRow ;
381 
382  tmp_jTowersIDs_subset_1[thisRow][thisCol] = towerid;
383  tmp_jTowersColl_subset_1.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
384 
385  }
386  }
387 
388  if (msgLvl(MSG::DEBUG)) {
389  ATH_MSG_DEBUG("CONTENTS OF jFEX " << thisJFEX << " :");
390  for (int thisRow=rows-1; thisRow>=0; thisRow--) {
391  for (int thisCol=0; thisCol<cols; thisCol++) {
392  int tmptowerid = tmp_jTowersIDs_subset_1[thisRow][thisCol];
393  if(tmptowerid == 0) continue;
394  const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
395  const float tmptowereta = tmptower->iEta();
396  const float tmptowerphi = tmptower->iPhi();
397  if(thisCol != cols-1) {
398  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowerphi << "][" << tmptowereta << "]) ");
399  }
400  else {
401  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) |");
402  }
403  }
404  }
405  }
406  m_jFEXSimTool->init(thisJFEX);
407  ATH_CHECK(m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_1, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
408 
409  m_allSmallRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getSmallRJetTOBs() ) ));
410  m_allLargeRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getLargeRJetTOBs() ) ));
411  m_alltauTobs.insert( std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getTauTOBs() ) ));
412 
413  m_allsumEtTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getSumEtTOBs() ) ));
414  m_allMetTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getMetTOBs() ) ));
415  m_jFEXSimTool->reset();
416 
417  //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
418 
419  //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
420  // C-SIDE NEGATIVE JFEXs
421  // CENTRAL-LEFT
422  // -1.6 -> 0.8 [core is -0.8 to -0.0]
423  // DO THE CENTRAL-LEFT JFEXs (NEGATIVE ETA) THIRD
424  //id_modifier + phi + (64 * eta)
425  emecEta = 15; emecPhi = 0; emecMod = 500000;
426  initialEMEC = calcTowerID(emecEta,emecPhi,emecMod); //500960;
427  transEta = 14; transPhi = 0; transMod = 300000;
428  initialTRANS = calcTowerID(transEta,transPhi,transMod); //300896;
429  embEta = 13; embPhi = 0; embMod = 100000;
430  initialEMB = calcTowerID(embEta,embPhi,embMod); //100832
431 
432  // jFEX 2
433  thisJFEX = 2;
434 
435  // decide which subset of towers (and therefore supercells) should go to the jFEX
436  std::unordered_map<int,jTower> tmp_jTowersColl_subset_2;
437 
438  // doing this with an array initially just containing tower IDs.
440 
441  // zero the matrix out
442  for (int i = 0; i<2*FEXAlgoSpaceDefs::jFEX_algoSpace_height; i++) {
443  for (int j = 0; j<FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width; j++) {
444  tmp_jTowersIDs_subset_2[i][j] = 0;
445  }
446  }
447 
448 
449  rows = sizeof tmp_jTowersIDs_subset_2 / sizeof tmp_jTowersIDs_subset_2[0];
450  cols = sizeof tmp_jTowersIDs_subset_2[0] / sizeof tmp_jTowersIDs_subset_2[0][0];
451 
452  // set the EMEC part
453  for(int thisRow=0; thisRow<rows; thisRow++) {
454 
455  int towerid = initialEMEC /*- (thisCol * 64)*/ + thisRow;
456 
457  tmp_jTowersIDs_subset_2[thisRow][0] = towerid;
458  tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
459 
460  }
461 
462  // set the TRANS part
463  for(int thisRow = 0; thisRow < rows; thisRow++) {
464 
465  int towerid = initialTRANS + thisRow;
466 
467  tmp_jTowersIDs_subset_2[thisRow][1] = towerid;
468  tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
469 
470  }
471 
472  // set the negative EMB part
473  for(int thisCol = 2; thisCol < cols-8; thisCol++) {
474  for(int thisRow=0; thisRow<rows; thisRow++) {
475  int towerid = -1;
476 
477  int tmp_initEMB = initialEMB;
478 
479  towerid = tmp_initEMB - ( (thisCol-2) * 64) + thisRow;
480  tmp_jTowersIDs_subset_2[thisRow][thisCol] = towerid;
481 
482  tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
483 
484  }
485  }
486 
487  embEta = 0; embPhi = 0; embMod = 200000;
488  initialEMB = calcTowerID(embEta,embPhi,embMod); //200000
489 
490  // set the positive EMB part
491  for(int thisCol = 16; thisCol < cols; thisCol++) {
492  for(int thisRow=0; thisRow<rows; thisRow++) {
493  int towerid = -1;
494 
495  int tmp_initEMB = initialEMB;
496 
497  towerid = tmp_initEMB + ( (thisCol-16) * 64) + thisRow;
498  tmp_jTowersIDs_subset_2[thisRow][thisCol] = towerid;
499 
500  tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
501 
502  }
503  }
504 
505  if (msgLvl(MSG::DEBUG)) {
506  ATH_MSG_DEBUG("CONTENTS OF jFEX " << thisJFEX << " :");
507  for (int thisRow=rows-1; thisRow>=0; thisRow--) {
508  for (int thisCol=0; thisCol<cols; thisCol++) {
509  int tmptowerid = tmp_jTowersIDs_subset_2[thisRow][thisCol];
510  if(tmptowerid == 0) continue;
511  const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
512  const float tmptowereta = tmptower->iEta();
513  const float tmptowerphi = tmptower->iPhi();
514  if(thisCol != cols-1) {
515  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) ");
516  }
517  else {
518  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) |");
519  }
520  }
521  }
522  }
523 
524  //tool use instead
525  m_jFEXSimTool->init(thisJFEX);
526  ATH_CHECK(m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_2, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
527 
528  m_allSmallRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getSmallRJetTOBs() ) ));
529  m_allLargeRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getLargeRJetTOBs() ) ));
530  m_alltauTobs.insert( std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getTauTOBs() ) ));
531 
532  m_allsumEtTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getSumEtTOBs() ) ));
533  m_allMetTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getMetTOBs() ) ));
534  m_jFEXSimTool->reset();
535 
536  //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
537 
538  //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
539  // A-SIDE POSITIVE JFEXs
540  // CENTRAL-RIGHT JFEXs
541  // -0.8 -> 1.6 [core is [0.0 to 0.8]
542  // DO THE CENTRAL-RIGHT JFEXs (POSITIVE ETA) FOURTH
543  //id_modifier + phi + (64 * eta)
544  emecEta = 15; emecPhi = 0; emecMod = 600000;
545  initialEMEC = calcTowerID(emecEta,emecPhi,emecMod); //600960;
546  transEta = 14; transPhi = 0; transMod = 400000;
547  initialTRANS = calcTowerID(transEta,transPhi,transMod); //400896;
548  embEta = 7; embPhi = 0; embMod = 100000;
549  initialEMB = calcTowerID(embEta,embPhi,embMod); //100448
550 
551  // jFEX 3
552  thisJFEX = 3;
553 
554  // decide which subset of towers (and therefore supercells) should go to the jFEX
555  std::unordered_map<int,jTower> tmp_jTowersColl_subset_3;
556 
557  // doing this with an array initially just containing tower IDs.
559 
560  // zero the matrix out
561  for (int i = 0; i<2*FEXAlgoSpaceDefs::jFEX_algoSpace_height; i++){
562  for (int j = 0; j<FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width; j++){
563  tmp_jTowersIDs_subset_3[i][j] = 0;
564  }
565  }
566 
567 
568  rows = sizeof tmp_jTowersIDs_subset_3 / sizeof tmp_jTowersIDs_subset_3[0];
569  cols = sizeof tmp_jTowersIDs_subset_3[0] / sizeof tmp_jTowersIDs_subset_3[0][0];
570 
571  // set the negative EMB part
572  for(int thisCol = 0; thisCol < 8; thisCol++){
573  for(int thisRow=0; thisRow<rows; thisRow++){
574  int towerid = -1;
575 
576  int tmp_initEMB = initialEMB;
577 
578  towerid = tmp_initEMB - ( (thisCol) * 64) + thisRow;
579 
580  tmp_jTowersIDs_subset_3[thisRow][thisCol] = towerid;
581 
582  tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
583 
584  }
585  }
586 
587  embEta = 0; embPhi = 0; embMod = 200000;
588  initialEMB = calcTowerID(embEta,embPhi,embMod); //200000
589  // set the positive EMB part
590  for(int thisCol = 8; thisCol < 22; thisCol++){
591  for(int thisRow=0; thisRow<rows; thisRow++){
592  int towerid = -1;
593 
594  int tmp_initEMB = initialEMB;
595 
596  towerid = tmp_initEMB + ( (thisCol-8) * 64) + thisRow;
597 
598  tmp_jTowersIDs_subset_3[thisRow][thisCol] = towerid;
599 
600  tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
601 
602  }
603  }
604 
605  // set the TRANS part
606  for(int thisRow = 0; thisRow < rows; thisRow++){
607  int towerid = initialTRANS + thisRow;
608 
609  tmp_jTowersIDs_subset_3[thisRow][22] = towerid;
610  tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
611 
612  }
613 
614  // set the EMEC part
615  for(int thisRow=0; thisRow<rows; thisRow++){
616  int towerid = initialEMEC + /*( (thisCol-8) * 64)*/ + thisRow;
617 
618  tmp_jTowersIDs_subset_3[thisRow][23] = towerid;
619  tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
620 
621  }
622 
623  if (msgLvl(MSG::DEBUG)) {
624  ATH_MSG_DEBUG("CONTENTS OF jFEX " << thisJFEX << " :");
625  for (int thisRow=rows-1; thisRow>=0; thisRow--) {
626  for (int thisCol=0; thisCol<cols; thisCol++) {
627  int tmptowerid = tmp_jTowersIDs_subset_3[thisRow][thisCol];
628  if(tmptowerid == 0) continue;
629  const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
630  const float tmptowereta = tmptower->iEta();
631  const float tmptowerphi = tmptower->iPhi();
632  if(thisCol != cols-1) {
633  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) ");
634  }
635  else {
636  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) |");
637  }
638  }
639  }
640  }
641 
642  //tool use instead
643  m_jFEXSimTool->init(thisJFEX);
644  ATH_CHECK(m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_3, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
645 
646  m_allSmallRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getSmallRJetTOBs() ) ));
647  m_allLargeRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getLargeRJetTOBs() ) ));
648  m_alltauTobs.insert( std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getTauTOBs() ) ));
649 
650  m_allsumEtTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getSumEtTOBs() ) ));
651  m_allMetTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getMetTOBs() ) ));
652  m_jFEXSimTool->reset();
653 
654  //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
655 
656  //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
657  // A-SIDE POSITIVE JFEXs
658  // INNER-RIGHT JFEXs
659  // 0.0 -> 2.4 [core is 0.8 to 1.6]
660  // DO THE INNER-RIGHT JFEXs (POSITIVE ETA) FIFTH
661  emecEta = 15; emecPhi = 0; emecMod = 600000;
662  initialEMEC = calcTowerID(emecEta,emecPhi,emecMod); //600960;
663  transEta = 14; transPhi = 0; transMod = 400000;
664  initialTRANS = calcTowerID(transEta,transPhi,transMod); //400896;
665  embEta = 0; embPhi = 0; embMod = 200000;
666  initialEMB = calcTowerID(embEta,embPhi,embMod); //200000;
667 
668  // jFEX 4
669  thisJFEX = 4;
670 
671  // decide which subset of towers (and therefore supercells) should go to the jFEX
672  std::unordered_map<int,jTower> tmp_jTowersColl_subset_4;
673 
674  // doing this with an array initially just containing tower IDs.
676 
677  // zero the matrix out
678  for (int i = 0; i<2*FEXAlgoSpaceDefs::jFEX_algoSpace_height; i++){
679  for (int j = 0; j<FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width; j++){
680  tmp_jTowersIDs_subset_4[i][j] = 0;
681  }
682  }
683 
684  rows = sizeof tmp_jTowersIDs_subset_4 / sizeof tmp_jTowersIDs_subset_4[0];
685  cols = sizeof tmp_jTowersIDs_subset_4[0] / sizeof tmp_jTowersIDs_subset_4[0][0];
686 
687  // set the EMB part
688  for(int thisCol = 0; thisCol < 14; thisCol++){
689  for(int thisRow=0; thisRow<rows; thisRow++){
690  int towerid = initialEMB + ( (thisCol) * 64) + thisRow;
691 
692  tmp_jTowersIDs_subset_4[thisRow][thisCol] = towerid;
693  tmp_jTowersColl_subset_4.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
694 
695  }
696  }
697  // set the TRANS part
698  for(int thisRow = 0; thisRow < rows; thisRow++){
699  int towerid = initialTRANS + thisRow;
700 
701  tmp_jTowersIDs_subset_4[thisRow][14] = towerid;
702  tmp_jTowersColl_subset_4.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
703 
704  }
705  // set the EMEC part
706  for(int thisCol = 15; thisCol < cols; thisCol++){
707  for(int thisRow=0; thisRow<rows; thisRow++){
708  int towerid = initialEMEC + ( (thisCol-15) * 64) + thisRow;
709 
710  tmp_jTowersIDs_subset_4[thisRow][thisCol] = towerid;
711  tmp_jTowersColl_subset_4.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
712 
713  }
714  }
715 
716  if (msgLvl(MSG::DEBUG)) {
717  ATH_MSG_DEBUG("CONTENTS OF jFEX " << thisJFEX << " :");
718  for (int thisRow=rows-1; thisRow>=0; thisRow--) {
719  for (int thisCol=0; thisCol<cols; thisCol++) {
720  int tmptowerid = tmp_jTowersIDs_subset_4[thisRow][thisCol];
721  if(tmptowerid == 0) continue;
722  const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
723  const float tmptowereta = tmptower->iEta();
724  const float tmptowerphi = tmptower->iPhi();
725  if(thisCol != cols-1) {
726  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) ");
727  }
728  else {
729  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) |");
730  }
731  }
732  }
733  }
734 
735  //tool use instead
736  m_jFEXSimTool->init(thisJFEX);
737  ATH_CHECK(m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_4, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
738 
739  m_allSmallRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getSmallRJetTOBs() ) ));
740  m_allLargeRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getLargeRJetTOBs() ) ));
741  m_alltauTobs.insert( std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getTauTOBs() ) ));
742 
743  m_allsumEtTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getSumEtTOBs() ) ));
744  m_allMetTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getMetTOBs() ) ));
745  m_jFEXSimTool->reset();
746  //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
747 
748  //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
749  // A-SIDE POSITIVE JFEXs
750  // RIGHT-MOST
751  // 0.8 -> 2.5 (in reality this will be 0.8 to 4.9 , but we're ignoring the forward region for the time being...) [core is 1.6 to 4.9]
752  // DO THE RIGHT-MOST (POSITIVE ETA) JFEXs SIXTH
753  //id_modifier + phi + (64 * eta)
754  fcal2Eta = 0; fcal2Phi = 0; fcal2Mod = 1200000;
755  initialFCAL2 = calcTowerID(fcal2Eta,fcal2Phi,fcal2Mod); //1200000
756  fcal1Eta = 0; fcal1Phi = 0; fcal1Mod = 1000000;
757  initialFCAL1 = calcTowerID(fcal1Eta,fcal1Phi,fcal1Mod); //1000000
758  fcal0Eta = 0; fcal0Phi = 0; fcal0Mod = 800000;
759  initialFCAL0 = calcTowerID(fcal0Eta,fcal0Phi,fcal0Mod); //800000
760  emecEta = 15; emecPhi = 0; emecMod = 600000;
761  initialEMEC = calcTowerID(emecEta,emecPhi,emecMod); //600960;
762  transEta = 14; transPhi = 0; transMod = 400000;
763  initialTRANS = calcTowerID(transEta,transPhi,transMod); //400896;
764  embEta = 8; embPhi = 0; embMod = 200000;
765  initialEMB = calcTowerID(embEta,embPhi,embMod); //200512;
766 
767  // jFEX 5
768  thisJFEX = 5;
769 
770  // decide which subset of towers (and therefore supercells) should go to the jFEX
771  std::unordered_map<int,jTower> tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2;
772 
773  // let's try doing this with an array initially just containing tower IDs.
774  int tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2 [2*FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width];
775 
776  // zero the matrix out
777  for (int i = 0; i<2*FEXAlgoSpaceDefs::jFEX_algoSpace_height; i++){
778  for (int j = 0; j<FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width; j++){
779  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[i][j] = 0;
780  }
781  }
782 
783  rows = sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2 / sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[0];
784  cols = sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[0] / sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[0][0];
785 
786  // set the EMB part
787  for(int thisCol = 0; thisCol < 6; thisCol++){
788  for(int thisRow=0; thisRow<rows; thisRow++){
789  int towerid = initialEMB + ( (thisCol) * 64) + thisRow;
790 
791  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
792  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
793 
794  }
795  }
796 
797  // set the TRANS part
798  for(int thisRow = 0; thisRow < rows; thisRow++){
799  int towerid = initialTRANS + thisRow;
800 
801  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][6] = towerid;
802  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
803 
804  }
805 
806  // set the EMEC part
807  for(int thisCol=7; thisCol<17; thisCol++){
808  for(int thisRow=0; thisRow<rows; thisRow++){
809 
810  int towerid = initialEMEC + ((thisCol-7) * 64) + thisRow;
811 
812  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
813  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
814 
815  }
816  }
817 
818  // set the next EMEC part
819  for(int thisCol=17; thisCol<21; thisCol++){
820  for(int thisRow=0; thisRow<rows/2; thisRow++){
821 
822  int towerid = initialEMEC + ((thisCol-7) * 64) + thisRow; //note special case -7 rather than -17, this *is* deliberate
823 
824  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
825  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
826 
827  }
828  }
829 
830  //-----
831  // Let's go with FCAL0
832  // set the FCAL0 part
833  for(int thisCol=21; thisCol<33; thisCol++){
834  for(int thisRow=0; thisRow<rows/4; thisRow++){
835 
836  int towerid = initialFCAL0 + ((thisCol-21) * 64) + thisRow;
837 
838  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
839  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
840 
841  }
842  }
843 
844  //---
845  // Let's go with FCAL1
846  // set the FCAL1 part
847  for(int thisCol=33; thisCol<41; thisCol++){
848  for(int thisRow=0; thisRow<rows/4; thisRow++){
849 
850  int towerid = initialFCAL1 + ((thisCol-33) * 64) + thisRow;
851 
852  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
853  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
854 
855  }
856  }
857 
858  //---
859  // Let's go with FCAL2
860  // set the FCAL2 part
861  for(int thisCol=41; thisCol<45; thisCol++){
862  for(int thisRow=0; thisRow<rows/4; thisRow++){
863 
864  int towerid = initialFCAL2 + ((thisCol-41) * 64) + thisRow;
865 
866  tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
867  tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
868 
869  }
870  }
871  //---
872 
873  if (msgLvl(MSG::DEBUG)) {
874  ATH_MSG_DEBUG("CONTENTS OF jFEX " << thisJFEX << " :");
875  for (int thisRow=rows-1; thisRow>=0; thisRow--) {
876  for (int thisCol=0; thisCol<cols; thisCol++) {
877  int tmptowerid = tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol];
878  if(tmptowerid == 0) continue;
879  const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
880  const float tmptowereta = tmptower->iEta();
881  const float tmptowerphi = tmptower->iPhi();
882  if(thisCol != cols-1) {
883  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowerphi << "][" << tmptowereta << "]) ");
884  }
885  else {
886  ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) |");
887  }
888  }
889  }
890  }
891 
892  m_jFEXSimTool->init(thisJFEX);
893  ATH_CHECK(m_jFEXSimTool->ExecuteForwardCSide(tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
894 
895  m_allSmallRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getSmallRJetTOBs() ) ));
896  m_allLargeRJetTobs.insert(std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getLargeRJetTOBs() ) ));
897  m_alltauTobs.insert( std::unordered_map<uint8_t, std::vector< std::vector<std::unique_ptr<jFEXTOB>> > >::value_type(thisJFEX,(m_jFEXSimTool->getTauTOBs() ) ));
898  m_allfwdElTobs.insert( std::unordered_map<uint8_t, std::vector<std::vector<std::vector<uint32_t>>> >::value_type(thisJFEX,(m_jFEXSimTool->getFwdElTOBs() ) ));
899 
900  m_allsumEtTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getSumEtTOBs() ) ));
901  m_allMetTobs.insert(std::unordered_map<uint8_t, std::vector<std::unique_ptr<jFEXTOB>> >::value_type(thisJFEX,(m_jFEXSimTool->getMetTOBs() ) ));
902  m_jFEXSimTool->reset();
903 
904 
905  //-----------------------------------------------------FILLING EDMs--------------------------------------------------------------------------------
906 
907  //Reading the Trigger menu to send the jFEX Resolution to the EDMs
908 
910 
911  const int jFwdElResolution = l1Menu->thrExtraInfo().jEM().resolutionMeV();
912 
913  //---SRJet EDM
914  auto tobContainer_jJ = std::make_unique<xAOD::jFexSRJetRoIContainer> ();
915  std::unique_ptr< xAOD::jFexSRJetRoIAuxContainer > tobAuxContainer_jJ = std::make_unique<xAOD::jFexSRJetRoIAuxContainer> ();
916  tobContainer_jJ->setStore(tobAuxContainer_jJ.get());
917 
919 
920  auto xtobContainer_jJ = std::make_unique<xAOD::jFexSRJetRoIContainer> ();
921  std::unique_ptr< xAOD::jFexSRJetRoIAuxContainer > xtobAuxContainer_jJ = std::make_unique<xAOD::jFexSRJetRoIAuxContainer> ();
922  xtobContainer_jJ->setStore(xtobAuxContainer_jJ.get());
923 
925 
926 
928  ATH_MSG_DEBUG(" write: " << output_Tob_jJ.key() << " = " << "..." );
929  ATH_CHECK(output_Tob_jJ.record(std::move(tobContainer_jJ),std::move(tobAuxContainer_jJ)));
930 
932  ATH_MSG_DEBUG(" write: " << output_xTob_jJ.key() << " = " << "..." );
933  ATH_CHECK(output_xTob_jJ.record(std::move(xtobContainer_jJ),std::move(xtobAuxContainer_jJ)));
934 
935  // iterate over all SRJEt Tobs and fill EDM with them m_allSmallRJetTobs
936  for( auto const& [jfex, fpga] : m_allSmallRJetTobs ) {
937  for(auto const & tobs: fpga) {
938  for(size_t it = 0; it<tobs.size();it++) {
939  float_t eta = -99;
940  float_t phi = -99;
941  char istob = 0;
942  if(tobs.at(it)->getWord() != 0) {
943  eta = (this_jTowerContainer->findTower( tobs.at(it)->getTTID() ))->centreEta();
944  phi = (this_jTowerContainer->findTower( tobs.at(it)->getTTID() ))->centrephi_toPI();
945  }
946 
947  // Just sending 7 SRjets to L1Topo and HLT chain
948  if(it<7){
949  istob = 1;
950  ATH_CHECK(fillSRJetEDM(tobs.at(it), istob, eta, phi, output_Tob_jJ));
951  tobDec_jJ_seedET( *(output_Tob_jJ->back()) ) = tobs.at(it)->getSeedEt();
952  }
953  ATH_CHECK(fillSRJetEDM(tobs.at(it), istob, eta, phi, output_xTob_jJ));
954  xtobDec_jJ_seedET( *(output_xTob_jJ->back()) ) = tobs.at(it)->getSeedEt();
955  }
956  }
957  }
958 
959  //---LRJet EDM
960  auto tobContainer_jLJ = std::make_unique<xAOD::jFexLRJetRoIContainer> ();
961  std::unique_ptr< xAOD::jFexLRJetRoIAuxContainer > tobAuxContainer_jLJ = std::make_unique<xAOD::jFexLRJetRoIAuxContainer> ();
962  tobContainer_jLJ->setStore(tobAuxContainer_jLJ.get());
963 
964  auto xtobContainer_jLJ = std::make_unique<xAOD::jFexLRJetRoIContainer> ();
965  std::unique_ptr< xAOD::jFexLRJetRoIAuxContainer > xtobAuxContainer_jLJ = std::make_unique<xAOD::jFexLRJetRoIAuxContainer> ();
966  xtobContainer_jLJ->setStore(xtobAuxContainer_jLJ.get());
967 
968 
970  ATH_MSG_DEBUG(" write: " << output_Tob_jLJ.key() << " = " << "..." );
971  ATH_CHECK(output_Tob_jLJ.record(std::move(tobContainer_jLJ),std::move(tobAuxContainer_jLJ)));
972 
974  ATH_MSG_DEBUG(" write: " << output_xTob_jLJ.key() << " = " << "..." );
975  ATH_CHECK(output_xTob_jLJ.record(std::move(xtobContainer_jLJ),std::move(xtobAuxContainer_jLJ)));
976 
977  // iterate over all LRJEt Tobs and fill EDM with them
978  for(auto const& [jfex, fpga] : m_allLargeRJetTobs ) {
979  for(auto const& tobs: fpga) {
980  for(size_t it = 0; it<tobs.size();it++) {
981  float_t eta = -99;
982  float_t phi = -99;
983  char istob = 0;
984  if(tobs.at(it)->getWord() != 0) {
985  eta = (this_jTowerContainer->findTower( tobs.at(it)->getTTID() ))->centreEta();
986  phi = (this_jTowerContainer->findTower( tobs.at(it)->getTTID() ))->centrephi_toPI();
987  }
988 
989  // Just sending 1 LRjets to L1Topo and HLT chain
990  if(it<1){
991  istob=1;
992  ATH_CHECK(fillLRJetEDM(tobs.at(it), istob, eta, phi, output_Tob_jLJ));
993  }
994  ATH_CHECK(fillLRJetEDM(tobs.at(it), istob, eta, phi, output_xTob_jLJ));
995  }
996  }
997  }
998  //---Tau EDM
999  auto tobContainer_jTau = std::make_unique<xAOD::jFexTauRoIContainer> ();
1000  std::unique_ptr< xAOD::jFexTauRoIAuxContainer > tobAuxContainer_jTau = std::make_unique<xAOD::jFexTauRoIAuxContainer> ();
1001  tobContainer_jTau->setStore(tobAuxContainer_jTau.get());
1002 
1003  auto xtobContainer_jTau = std::make_unique<xAOD::jFexTauRoIContainer> ();
1004  std::unique_ptr< xAOD::jFexTauRoIAuxContainer > xtobAuxContainer_jTau = std::make_unique<xAOD::jFexTauRoIAuxContainer> ();
1005  xtobContainer_jTau->setStore(xtobAuxContainer_jTau.get());
1006 
1008  ATH_MSG_DEBUG(" write: " << output_Tob_jTau.key() << " = " << "..." );
1009  ATH_CHECK(output_Tob_jTau.record(std::move(tobContainer_jTau),std::move(tobAuxContainer_jTau)));
1010 
1012  ATH_MSG_DEBUG(" write: " << output_xTob_jTau.key() << " = " << "..." );
1013  ATH_CHECK(output_xTob_jTau.record(std::move(xtobContainer_jTau),std::move(xtobAuxContainer_jTau)));
1014 
1015  //iterate over all Tau Tobs and fill EDM with
1016  for( auto const& [jfex, fpga] : m_alltauTobs ) {
1017  for(auto const& tobs : fpga){
1018  for(size_t it = 0; it<tobs.size();it++) {
1019  float_t eta = -99;
1020  float_t phi = -99;
1021  char istob = 0;
1022  if(tobs.at(it)->getWord() != 0){
1023  eta = (this_jTowerContainer->findTower( tobs.at(it)->getTTID() ))->centreEta();
1024  phi = (this_jTowerContainer->findTower( tobs.at(it)->getTTID() ))->centrephi_toPI();
1025  }
1026 
1027  // Just sending 6 Taus to L1Topo and HLT chain
1028  if(it<6){
1029  istob=1;
1030  ATH_CHECK(fillTauEDM(tobs.at(it), istob, eta, phi, output_Tob_jTau));
1031  }
1032  ATH_CHECK(fillTauEDM(tobs.at(it), istob, eta, phi, output_xTob_jTau));
1033  }
1034  }
1035 
1036  }
1037 
1038  //---Forward Elec EDM
1039  auto tobContainer_jEM = std::make_unique<xAOD::jFexFwdElRoIContainer> ();
1040  std::unique_ptr< xAOD::jFexFwdElRoIAuxContainer > tobAuxContainer_jEM = std::make_unique<xAOD::jFexFwdElRoIAuxContainer> ();
1041  tobContainer_jEM->setStore(tobAuxContainer_jEM.get());
1042 
1043  auto xtobContainer_jEM = std::make_unique<xAOD::jFexFwdElRoIContainer> ();
1044  std::unique_ptr< xAOD::jFexFwdElRoIAuxContainer > xtobAuxContainer_jEM = std::make_unique<xAOD::jFexFwdElRoIAuxContainer> ();
1045  xtobContainer_jEM->setStore(xtobAuxContainer_jEM.get());
1046 
1048  ATH_MSG_DEBUG(" write: " << output_Tob_jEM.key() << " = " << "..." );
1049  ATH_CHECK(output_Tob_jEM.record(std::move(tobContainer_jEM),std::move(tobAuxContainer_jEM)));
1050 
1052  ATH_MSG_DEBUG(" write: " << output_xTob_jEM.key() << " = " << "..." );
1053  ATH_CHECK(output_xTob_jEM.record(std::move(xtobContainer_jEM),std::move(xtobAuxContainer_jEM)));
1054 
1055  //iterate over all Forward Elec Tobs and fill EDM
1056  for( auto const& [jfex, MODULE_tobs] : m_allfwdElTobs ) {
1057  const int fpga_map[4]={0,1,3,2}; // No FPGA info available in FWD EL TOB
1058  uint8_t fpgaNum =0;
1059  for(auto &FPGA_tob : MODULE_tobs) {
1060  if (fpgaNum>3) {
1061  ATH_MSG_ERROR("FPGA larger than 4 in Forward electron EDM!");
1062  continue;
1063  }
1064  for(size_t it = 0; it<FPGA_tob.size();it++) {
1065  float_t eta = -99;
1066  float_t phi = -99;
1067  char istob = 0;
1068  if(FPGA_tob.at(it).at(1) != 0) {
1069  eta = (this_jTowerContainer->findTower(FPGA_tob.at(it).at(1)))->centreEta();
1070  phi = (this_jTowerContainer->findTower(FPGA_tob.at(it).at(1)))->centrephi_toPI();
1071  }
1072 
1073  if(it<5){
1074  istob=1;
1075  ATH_CHECK(fillFwdElEDM(jfex,fpga_map[fpgaNum], FPGA_tob.at(it).at(0),istob, jFwdElResolution, eta, phi, output_Tob_jEM));
1076  }
1077  ATH_CHECK(fillFwdElEDM(jfex,fpga_map[fpgaNum], FPGA_tob.at(it).at(0),istob, jFwdElResolution, eta, phi, output_xTob_jEM));
1078  }
1079  fpgaNum++;
1080  }
1081 
1082  }
1083 
1084  //---SumET EDM
1085  auto tobContainer_jTE = std::make_unique<xAOD::jFexSumETRoIContainer> ();
1086  std::unique_ptr< xAOD::jFexSumETRoIAuxContainer > tobAuxContainer_jTE = std::make_unique<xAOD::jFexSumETRoIAuxContainer> ();
1087  tobContainer_jTE->setStore(tobAuxContainer_jTE.get());
1088 
1090  ATH_MSG_DEBUG(" write: " << output_Tob_jTE.key() << " = " << "..." );
1091  ATH_CHECK(output_Tob_jTE.record(std::move(tobContainer_jTE),std::move(tobAuxContainer_jTE)));
1092 
1093  for( auto const& [jfex, tobs] : m_allsumEtTobs ) {
1094 
1095  for(auto const& t : tobs) {
1096  ATH_CHECK(fillSumEtEDM(t, output_Tob_jTE));
1097  }
1098  }
1099 
1100  //---MET EDM
1101  auto tobContainer_jXE = std::make_unique<xAOD::jFexMETRoIContainer> ();
1102  std::unique_ptr< xAOD::jFexMETRoIAuxContainer > tobAuxContainer_jXE = std::make_unique<xAOD::jFexMETRoIAuxContainer> ();
1103  tobContainer_jXE->setStore(tobAuxContainer_jXE.get());
1104 
1106  ATH_MSG_DEBUG(" write: " << output_Tob_jXE.key() << " = " << "..." );
1107  ATH_CHECK(output_Tob_jXE.record(std::move(tobContainer_jXE),std::move(tobAuxContainer_jXE)));
1108 
1109  for( auto const& [jfex, tobs] : m_allMetTobs ) {
1110 
1111  for(auto const& t : tobs) {
1112  ATH_CHECK(fillMetEDM(t, output_Tob_jXE));
1113  }
1114  }
1115 
1116 
1117 
1118  //Send TOBs to bytestream?
1119  // ToDo
1120  // To implement
1121  // {--Implement--}
1122 
1123  return StatusCode::SUCCESS;
1124 
1125  }
1126 
1127 
1128  StatusCode jFEXSysSim::fillSRJetEDM(const std::unique_ptr<jFEXTOB>& internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle<xAOD::jFexSRJetRoIContainer_v1> &jContainer) const {
1129 
1130  xAOD::jFexSRJetRoI* my_EDM = new xAOD::jFexSRJetRoI();
1131  jContainer->push_back( my_EDM );
1132 
1133  my_EDM->initialize(internalTob->getjFex(), internalTob->getFpga(), internalTob->getWord(), istob, internalTob->getRes(), eta, phi);
1134 
1135  ATH_MSG_DEBUG(" setting SRJet jFEX Number: " << +my_EDM->jFexNumber() << " et: " << my_EDM->et() << " eta: " << my_EDM->eta() <<" / "<< eta << " phi: " << my_EDM->phi()<<" / "<< phi );
1136 
1137  return StatusCode::SUCCESS;
1138  }
1139 
1140 
1141  StatusCode jFEXSysSim::fillTauEDM(const std::unique_ptr<jFEXTOB>& internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexTauRoIContainer > &jContainer) const {
1142 
1143  xAOD::jFexTauRoI* my_EDM = new xAOD::jFexTauRoI();
1144  jContainer->push_back( my_EDM );
1145 
1146  my_EDM->initialize(internalTob->getjFex(), internalTob->getFpga(), internalTob->getWord(), istob, internalTob->getRes(), eta, phi);
1147 
1148  ATH_MSG_DEBUG(" setting tau jFEX Number: " << +my_EDM->jFexNumber() << " et: " << my_EDM->et() << " eta: " << my_EDM->eta() <<" / "<< eta << " phi: " << my_EDM->phi()<<" / "<< phi );
1149 
1150  return StatusCode::SUCCESS;
1151  }
1152 
1153  StatusCode jFEXSysSim::fillFwdElEDM(uint8_t jFexNum,uint8_t fpgaNumber, uint32_t tobWord, char istob, int resolution, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexFwdElRoIContainer > &jContainer) const {
1154 
1155  xAOD::jFexFwdElRoI* my_EDM = new xAOD::jFexFwdElRoI();
1156  jContainer->push_back( my_EDM );
1157 
1158  my_EDM->initialize(jFexNum, fpgaNumber, tobWord ,istob , resolution, eta, phi);
1159 
1160  ATH_MSG_DEBUG(" setting Forward Elec jFEX Number: " << +my_EDM->jFexNumber() << " et: " << my_EDM->et() << " eta: " << my_EDM->eta() <<" / "<< eta << " phi: " << my_EDM->phi()<<" / "<< phi );
1161 
1162  return StatusCode::SUCCESS;
1163  }
1164 
1165  StatusCode jFEXSysSim::fillLRJetEDM(const std::unique_ptr<jFEXTOB>& internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexLRJetRoIContainer > &jContainer) const {
1166 
1167  xAOD::jFexLRJetRoI* my_EDM = new xAOD::jFexLRJetRoI();
1168  jContainer->push_back( my_EDM );
1169 
1170  my_EDM->initialize(internalTob->getjFex(), internalTob->getFpga(), internalTob->getWord(), istob, internalTob->getRes(), eta, phi);
1171 
1172  ATH_MSG_DEBUG(" setting LRJet jFEX Number: " << +my_EDM->jFexNumber() << " et: " << my_EDM->et() << " eta: " << my_EDM->eta() <<" / "<< eta << " phi: " << my_EDM->phi()<<" / "<< phi );
1173 
1174  return StatusCode::SUCCESS;
1175  }
1176 
1177  StatusCode jFEXSysSim::fillSumEtEDM(const std::unique_ptr<jFEXTOB>& internalTob, SG::WriteHandle< xAOD::jFexSumETRoIContainer > &jContainer) const {
1178 
1179  xAOD::jFexSumETRoI* my_EDM = new xAOD::jFexSumETRoI();
1180  jContainer->push_back( my_EDM );
1181 
1182  my_EDM->initialize(internalTob->getjFex(), internalTob->getFpga(), internalTob->getWord(), internalTob->getRes());
1183 
1184  ATH_MSG_DEBUG(" setting SumET jFEX Number: " << +my_EDM->jFexNumber() << " Et_up: " << my_EDM->tobEt_upper() << " Et_down: " << my_EDM->tobEt_lower() << " sat_up: " << my_EDM->tobSat_upper()<< " sat_low: " << my_EDM->tobSat_lower());
1185 
1186  return StatusCode::SUCCESS;
1187  }
1188 
1189  StatusCode jFEXSysSim::fillMetEDM(const std::unique_ptr<jFEXTOB>& internalTob, SG::WriteHandle< xAOD::jFexMETRoIContainer > &jContainer) const {
1190 
1191  xAOD::jFexMETRoI* my_EDM = new xAOD::jFexMETRoI();
1192  jContainer->push_back( my_EDM );
1193 
1194  my_EDM->initialize(internalTob->getjFex(), internalTob->getFpga(), internalTob->getWord(), internalTob->getRes());
1195 
1196  ATH_MSG_DEBUG(" setting MET jFEX Number: " << +my_EDM->jFexNumber() << " Et_x: " << my_EDM->tobEx() << " Et_y: " << my_EDM->tobEy() << " sat: " << my_EDM->tobSat()<< " res: " << my_EDM->tobRes() );
1197 
1198  return StatusCode::SUCCESS;
1199  }
1200 
1201 
1202 
1203 } // end of namespace bracket
LVL1::jFEXSysSim::fillLRJetEDM
StatusCode fillLRJetEDM(const std::unique_ptr< jFEXTOB > &internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexLRJetRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1165
jFexFwdElRoIContainer.h
xAOD::jFexTauRoI_v1
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Definition: jFexTauRoI_v1.h:23
LVL1::jFEXSysSim::m_TobOutKey_jJ
SG::WriteHandleKey< xAOD::jFexSRJetRoIContainer > m_TobOutKey_jJ
Definition: jFEXSysSim.h:94
xAOD::jFexSRJetRoI_v1
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Definition: jFexSRJetRoI_v1.h:23
LVL1::jFEXSysSim::m_allLargeRJetTobs
std::unordered_map< uint8_t, std::vector< std::vector< std::unique_ptr< jFEXTOB > > > > m_allLargeRJetTobs
Definition: jFEXSysSim.h:119
LVL1::jFEXSysSim::fillMetEDM
StatusCode fillMetEDM(const std::unique_ptr< jFEXTOB > &internalTob, SG::WriteHandle< xAOD::jFexMETRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1189
TrigConf::L1ThrExtraInfo::jEM
const L1ThrExtraInfo_jEM & jEM() const
Definition: L1ThrExtraInfo.cxx:128
xAOD::jFexTauRoI_v1::eta
float eta() const
xAOD::jFexTauRoI_v1::jFexNumber
uint8_t jFexNumber() const
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
LVL1::jTower::iEta
int iEta() const
Get coordinates of tower.
Definition: jTower.cxx:169
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
jFexLRJetRoI.h
xAOD::jFexLRJetRoI_v1::eta
float eta() const
LVL1::FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width
constexpr static int jFEX_thin_algoSpace_width
Definition: FEXAlgoSpaceDefs.h:26
xAOD::jFexLRJetRoI
jFexLRJetRoI_v1 jFexLRJetRoI
Define the latest version of the jFexLRJetRoI class
Definition: jFexLRJetRoI.h:13
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle< LVL1::jTowerContainer >
jFEXSim.h
xAOD::jFexFwdElRoI_v1::eta
float eta() const
LVL1::jFEXSysSim::m_allSmallRJetTobs
std::unordered_map< uint8_t, std::vector< std::vector< std::unique_ptr< jFEXTOB > > > > m_allSmallRJetTobs
Definition: jFEXSysSim.h:118
LVL1::jFEXSysSim::m_jFEXSimTool
ToolHandle< IjFEXSim > m_jFEXSimTool
Definition: jFEXSysSim.h:87
TrigConf::L1Menu::thrExtraInfo
const L1ThrExtraInfo & thrExtraInfo() const
Access to extra info for threshold types.
Definition: L1Menu.cxx:307
LVL1::jFEXSysSim::m_alltauTobs
std::unordered_map< uint8_t, std::vector< std::vector< std::unique_ptr< jFEXTOB > > > > m_alltauTobs
Definition: jFEXSysSim.h:117
xAOD::jFexFwdElRoI_v1::jFexNumber
uint8_t jFexNumber() const
Additional info (initialization)
skel.it
it
Definition: skel.GENtoEVGEN.py:396
xAOD::jFexFwdElRoI_v1::phi
float phi() const
jFEXSysSim.h
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:206
xAOD::jFexLRJetRoI_v1::jFexNumber
uint8_t jFexNumber() const
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
LVL1::jTowerContainer::findTower
const LVL1::jTower * findTower(int towerID) const
fast find method given identifier.
Definition: jTowerContainer.cxx:31
xAOD::jFexLRJetRoI_v1::et
unsigned int et() const
Methods that require combining results or applying scales.
Definition: jFexLRJetRoI_v1.cxx:139
jFexLRJetRoIAuxContainer.h
xAOD::jFexSRJetRoI_v1::eta
float eta() const
xAOD::jFexSRJetRoI_v1::phi
float phi() const
LVL1::FEXAlgoSpaceDefs::jFEX_algoSpace_height
constexpr static int jFEX_algoSpace_height
Definition: FEXAlgoSpaceDefs.h:27
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
xAOD::jFexMETRoI_v1::initialize
void initialize(uint8_t jFexNumber, uint8_t fpgaNumber, uint32_t tobWord, int resolution)
In future initialze the xTOB as well, word1.
Definition: jFexMETRoI_v1.cxx:20
xAOD::jFexTauRoI_v1::et
unsigned int et() const
Methods that require combining results or applying scales.
Definition: jFexTauRoI_v1.cxx:114
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::jFEXSysSim::m_l1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
Definition: jFEXSysSim.h:91
Dedxcorrection::resolution
double resolution[nGasTypes][nParametersResolution]
Definition: TRT_ToT_Corrections.h:46
jFexTauRoIContainer.h
jFexTauRoIAuxContainer.h
LVL1::jFEXSysSim::m_xTobDecorKey_jJ_seedET
SG::WriteDecorHandleKey< xAOD::jFexSRJetRoIContainer > m_xTobDecorKey_jJ_seedET
Definition: jFEXSysSim.h:109
xAOD::jFexMETRoI_v1::jFexNumber
uint8_t jFexNumber() const
LVL1::jFEXSysSim::jFEXSysSim
jFEXSysSim(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
Definition: jFEXSysSim.cxx:51
xAOD::jFexMETRoI_v1
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Definition: jFexMETRoI_v1.h:22
jFEXOutputCollection.h
jFexFwdElRoI.h
LVL1::jFEXSysSim::m_TobOutKey_jEM
SG::WriteHandleKey< xAOD::jFexFwdElRoIContainer > m_TobOutKey_jEM
Definition: jFEXSysSim.h:97
LVL1::jFEXSysSim::calcTowerID
virtual int calcTowerID(int eta, int phi, int mod) const override
Definition: jFEXSysSim.cxx:117
LVL1::jFEXSysSim::m_jTowersColl
std::unordered_map< int, jTower > m_jTowersColl
Definition: jFEXSysSim.h:113
xAOD::jFexMETRoI_v1::tobSat
uint8_t tobSat() const
xAOD::jFexTauRoI_v1::initialize
void initialize(uint8_t jFexNumber, uint8_t fpgaNumber, uint32_t tobWord, char istob, int resolution, float_t eta, float_t phi)
In future initialze the EDM.
Definition: jFexTauRoI_v1.cxx:21
WriteHandle.h
Handle class for recording to StoreGate.
jFexLRJetRoIContainer.h
beamspotnt.cols
list cols
Definition: bin/beamspotnt.py:1114
LVL1::jFEXSysSim::m_jTowerContainerSGKey
SG::ReadHandleKey< LVL1::jTowerContainer > m_jTowerContainerSGKey
Definition: jFEXSysSim.h:89
LVL1::jFEXSysSim::execute
virtual StatusCode execute(jFEXOutputCollection *inputOutputCollection) override
Definition: jFEXSysSim.cxx:122
xAOD::jFexLRJetRoI_v1
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Definition: jFexLRJetRoI_v1.h:23
jFexSRJetRoI.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::jFexSumETRoI_v1::initialize
void initialize(uint8_t jFexNumber, uint8_t fpgaNumber, uint32_t tobWord, int resolution)
In future initialze the xTOB as well, word1.
Definition: jFexSumETRoI_v1.cxx:20
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
xAOD::jFexLRJetRoI_v1::initialize
void initialize(uint8_t jFexNumber, uint8_t fpgaNumber, uint32_t tobWord, char istob, int resolution, float_t eta, float_t phi)
In future initialze the EDM.
Definition: jFexLRJetRoI_v1.cxx:40
lumiFormat.i
int i
Definition: lumiFormat.py:85
jFexSRJetRoIContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::jFexMETRoI_v1::tobEy
int tobEy() const
LVL1::jFEXSysSim::m_xTobOutKey_jEM
SG::WriteHandleKey< xAOD::jFexFwdElRoIContainer > m_xTobOutKey_jEM
Definition: jFEXSysSim.h:105
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::jFexMETRoI_v1::tobRes
uint8_t tobRes() const
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
LVL1::jFEXSysSim::fillSRJetEDM
StatusCode fillSRJetEDM(const std::unique_ptr< jFEXTOB > &internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexSRJetRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1128
LVL1::FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width
constexpr static int jFEX_wide_algoSpace_width
Definition: FEXAlgoSpaceDefs.h:25
xAOD::jFexMETRoI_v1::tobEx
int tobEx() const
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloCell_SuperCell_ID.h
Helper class for offline supercell identifiers.
LVL1::jFEXSysSim::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition: jFEXSysSim.cxx:66
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::jFexSRJetRoI
jFexSRJetRoI_v1 jFexSRJetRoI
Define the latest version of the jFexSRJetRoI class
Definition: jFexSRJetRoI.h:14
LVL1::jTower::iPhi
int iPhi() const
Return global phi index.
Definition: jTower.cxx:174
xAOD::jFexTauRoI_v1::phi
float phi() const
LVL1::jFEXSysSim::m_allMetTobs
std::unordered_map< uint8_t, std::vector< std::unique_ptr< jFEXTOB > > > m_allMetTobs
Definition: jFEXSysSim.h:121
beamspotnt.rows
list rows
Definition: bin/beamspotnt.py:1112
LVL1::jFEXOutputCollection
Definition: jFEXOutputCollection.h:23
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
FEXAlgoSpaceDefs.h
xAOD::jFexSumETRoI_v1::tobSat_lower
uint8_t tobSat_lower() const
DataVector::back
const T * back() const
Access the last element in the collection as an rvalue.
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
TrigConf::name
Definition: HLTChainList.h:35
LVL1::jFEXSysSim::m_xTobOutKey_jJ
SG::WriteHandleKey< xAOD::jFexSRJetRoIContainer > m_xTobOutKey_jJ
Definition: jFEXSysSim.h:102
LVL1::jFEXSysSim::m_TobOutKey_jTE
SG::WriteHandleKey< xAOD::jFexSumETRoIContainer > m_TobOutKey_jTE
Definition: jFEXSysSim.h:98
jTowerContainer.h
LVL1::jFEXSysSim::fillTauEDM
StatusCode fillTauEDM(const std::unique_ptr< jFEXTOB > &internalTob, char istob, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexTauRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1141
LVL1::jFEXSysSim::m_xTobOutKey_jLJ
SG::WriteHandleKey< xAOD::jFexLRJetRoIContainer > m_xTobOutKey_jLJ
Definition: jFEXSysSim.h:103
LVL1::jFEXSysSim::init
virtual void init() const override
Definition: jFEXSysSim.cxx:105
xAOD::jFexFwdElRoI_v1::initialize
void initialize(uint8_t jFexNumber, uint8_t fpgaNumber, uint32_t tobWord, char istob, int resolution, float_t eta, float_t phi)
initialze the EDM
Definition: jFexFwdElRoI_v1.cxx:30
TrigConf::L1ThrExtraInfoBase::resolutionMeV
unsigned int resolutionMeV() const
Definition: L1ThresholdBase.h:101
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAOD::jFexSumETRoI_v1
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Definition: jFexSumETRoI_v1.h:22
LVL1::jFEXSysSim::fillSumEtEDM
StatusCode fillSumEtEDM(const std::unique_ptr< jFEXTOB > &internalTob, SG::WriteHandle< xAOD::jFexSumETRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1177
xAOD::jFexFwdElRoI
jFexFwdElRoI_v1 jFexFwdElRoI
Define the latest version of the jFexFwdElJetRoI class
Definition: jFexFwdElRoI.h:13
CaloCellContainer.h
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
xAOD::jFexFwdElRoI_v1::et
unsigned int et() const
Methods that require combining results or applying scales.
Definition: jFexFwdElRoI_v1.cxx:151
LVL1::jFEXSysSim::m_jFEXCollection
std::vector< jFEXSim * > m_jFEXCollection
Internal data.
Definition: jFEXSysSim.h:83
xAOD::jFexSRJetRoI_v1::initialize
void initialize(uint8_t jFexNumber, uint8_t fpgaNumber, uint32_t tobWord, char istob, int resolution, float_t eta, float_t phi)
In future initialze the EDM.
Definition: jFexSRJetRoI_v1.cxx:38
xAOD::jFexSumETRoI_v1::jFexNumber
uint8_t jFexNumber() const
jFexFwdElRoIAuxContainer.h
xAOD::jFexSumETRoI_v1::tobEt_upper
uint16_t tobEt_upper() const
LVL1::jFEXSysSim::m_TobOutKey_jXE
SG::WriteHandleKey< xAOD::jFexMETRoIContainer > m_TobOutKey_jXE
Definition: jFEXSysSim.h:99
LVL1::jFEXSysSim::m_TobOutKey_jLJ
SG::WriteHandleKey< xAOD::jFexLRJetRoIContainer > m_TobOutKey_jLJ
Definition: jFEXSysSim.h:95
LVL1::jFEXSysSim::cleanup
virtual void cleanup() override
Definition: jFEXSysSim.cxx:109
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::jFEXSysSim::m_TobDecorKey_jJ_seedET
SG::WriteDecorHandleKey< xAOD::jFexSRJetRoIContainer > m_TobDecorKey_jJ_seedET
Definition: jFEXSysSim.h:108
LVL1::jFEXSysSim::m_allfwdElTobs
std::unordered_map< uint8_t, std::vector< std::vector< std::vector< uint32_t > > > > m_allfwdElTobs
Definition: jFEXSysSim.h:115
xAOD::jFexLRJetRoI_v1::phi
float phi() const
jFexTauRoI.h
xAOD::jFexMETRoI
jFexMETRoI_v1 jFexMETRoI
Define the latest version of the jFexMETRoI class
Definition: jFexMETRoI.h:13
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
LVL1::jFEXSysSim::finalize
virtual StatusCode finalize() override
standard Athena-Algorithm method
Definition: jFEXSysSim.cxx:99
LVL1::jFEXSysSim::m_DBToolKey
SG::ReadCondHandleKey< jFEXDBCondData > m_DBToolKey
Definition: jFEXSysSim.h:85
LVL1::jTower
The jTower class is an interface object for jFEX trigger algorithms The purposes are twofold:
Definition: jTower.h:40
xAOD::jFexTauRoI
jFexTauRoI_v1 jFexTauRoI
Define the latest version of the jFexSRJetRoI class
Definition: jFexTauRoI.h:13
CaloIdManager.h
xAOD::jFexSumETRoI
jFexSumETRoI_v1 jFexSumETRoI
Define the latest version of the jFexSumETJetRoI class
Definition: jFexSumETRoI.h:13
xAOD::jFexSRJetRoI_v1::jFexNumber
uint8_t jFexNumber() const
LVL1::jFEXSysSim::fillFwdElEDM
StatusCode fillFwdElEDM(uint8_t jFexNum, uint8_t fpgaNumber, uint32_t tobWord, char istob, int resolution, float_t eta, float_t phi, SG::WriteHandle< xAOD::jFexFwdElRoIContainer > &jContainer) const
Definition: jFEXSysSim.cxx:1153
ReadHandle.h
Handle class for reading from StoreGate.
AthAlgTool
Definition: AthAlgTool.h:26
LVL1::jFEXSysSim::m_xTobOutKey_jTau
SG::WriteHandleKey< xAOD::jFexTauRoIContainer > m_xTobOutKey_jTau
Definition: jFEXSysSim.h:104
xAOD::jFexSumETRoI_v1::tobSat_upper
uint8_t tobSat_upper() const
LVL1::jFEXSysSim::m_allsumEtTobs
std::unordered_map< uint8_t, std::vector< std::unique_ptr< jFEXTOB > > > m_allsumEtTobs
Definition: jFEXSysSim.h:120
value_type
Definition: EDM_MasterSearch.h:11
xAOD::jFexSumETRoI_v1::tobEt_lower
uint16_t tobEt_lower() const
jTower.h
LVL1::jFEXSysSim::m_TobOutKey_jTau
SG::WriteHandleKey< xAOD::jFexTauRoIContainer > m_TobOutKey_jTau
Definition: jFEXSysSim.h:96
xAOD::jFexFwdElRoI_v1
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Definition: jFexFwdElRoI_v1.h:23
jFexSRJetRoIAuxContainer.h
xAOD::jFexSRJetRoI_v1::et
unsigned int et() const
Methods that require combining results or applying scales.
Definition: jFexSRJetRoI_v1.cxx:138