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