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