110 if(!this_jTowerContainer.
isValid()){
112 return StatusCode::FAILURE;
149 int fcal2Eta = 3;
int fcal2Phi = 0;
int fcal2Mod = 1100000;
150 int initialFCAL2 =
calcTowerID(fcal2Eta,fcal2Phi,fcal2Mod);
151 int fcal1Eta = 7;
int fcal1Phi = 0;
int fcal1Mod = 900000;
152 int initialFCAL1 =
calcTowerID(fcal1Eta,fcal1Phi,fcal1Mod);
153 int fcal0Eta = 11;
int fcal0Phi = 0;
int fcal0Mod = 700000;
154 int initialFCAL0 =
calcTowerID(fcal0Eta,fcal0Phi,fcal0Mod);
155 int emecEta = 28;
int emecPhi = 0;
int emecMod = 500000;
156 int initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
157 int transEta = 14;
int transPhi = 0;
int transMod = 300000;
158 int initialTRANS =
calcTowerID(transEta,transPhi,transMod);
159 int embEta = 13;
int embPhi = 0;
int embMod = 100000;
160 int initialEMB =
calcTowerID(embEta,embPhi,embMod);
165 return StatusCode::FAILURE;
168 unsigned int evtTimeStamp = Gaudi::Hive::currentContext().eventID().time_stamp();
170 uint8_t thisJFEX = 0;
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);
187 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[i][j] = 0;
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];
195 for(
int thisCol=0; thisCol<4; thisCol++){
196 for(
int thisRow=0; thisRow<rows/4; thisRow++){
198 int towerid = initialFCAL2 - (thisCol * 64) + thisRow;
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))));
208 for(
int thisCol=4; thisCol<12; thisCol++){
209 for(
int thisRow=0; thisRow<rows/4; thisRow++){
211 int towerid = initialFCAL1 - ((thisCol-4) * 64) + thisRow;
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))));
221 for(
int thisCol=12; thisCol<24; thisCol++){
222 for(
int thisRow=0; thisRow<rows/4; thisRow++){
224 int towerid = initialFCAL0 - ((thisCol-12) * 64) + thisRow;
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))));
234 for(
int thisCol=24; thisCol<28; thisCol++){
235 for(
int thisRow=0; thisRow<rows/2; thisRow++){
237 int towerid = initialEMEC - ((thisCol-24) * 64) + thisRow;
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))));
245 for(
int thisCol=28; thisCol<38; thisCol++){
246 for(
int thisRow=0; thisRow<rows; thisRow++){
248 int towerid = initialEMEC - ((thisCol-24) * 64) + thisRow;
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))));
256 for(
int thisRow = 0; thisRow < rows; thisRow++){
258 int towerid = initialTRANS + thisRow;
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))));
265 for(
int thisCol = 39; thisCol < 45; thisCol++){
266 for(
int thisRow=0; thisRow<rows; thisRow++){
268 int towerid = initialEMB - ( (thisCol-39) * 64) + thisRow;
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))));
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 <<
"]) ");
289 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
295 ATH_CHECK(
m_jFEXSimTool->ExecuteForwardASide(tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
314 emecEta = 23; emecPhi = 0; emecMod = 500000;
315 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
316 transEta = 14; transPhi = 0; transMod = 300000;
317 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
318 embEta = 13; embPhi = 0; embMod = 100000;
325 std::unordered_map<int,jTower> tmp_jTowersColl_subset_1;
333 tmp_jTowersIDs_subset_1[i][j] = 0;
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];
341 for(
int thisCol = 0; thisCol < 9; thisCol++){
342 for(
int thisRow=0; thisRow<rows; thisRow++){
344 int towerid = initialEMEC - (thisCol * 64) + thisRow;
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))));
353 for(
int thisRow = 0; thisRow < rows; thisRow++) {
355 int towerid = initialTRANS + thisRow;
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))));
363 for(
int thisCol = 10; thisCol < cols; thisCol++) {
364 for(
int thisRow=0; thisRow<rows; thisRow++) {
366 int towerid = initialEMB - ( (thisCol-10) * 64) + thisRow ;
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))));
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 <<
"]) ");
387 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
393 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_1, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
411 emecEta = 15; emecPhi = 0; emecMod = 500000;
412 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
413 transEta = 14; transPhi = 0; transMod = 300000;
414 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
415 embEta = 13; embPhi = 0; embMod = 100000;
422 std::unordered_map<int,jTower> tmp_jTowersColl_subset_2;
430 tmp_jTowersIDs_subset_2[i][j] = 0;
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];
439 for(
int thisRow=0; thisRow<rows; thisRow++) {
441 int towerid = initialEMEC + thisRow;
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))));
449 for(
int thisRow = 0; thisRow < rows; thisRow++) {
451 int towerid = initialTRANS + thisRow;
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))));
459 for(
int thisCol = 2; thisCol < cols-8; thisCol++) {
460 for(
int thisRow=0; thisRow<rows; thisRow++) {
463 int tmp_initEMB = initialEMB;
465 towerid = tmp_initEMB - ( (thisCol-2) * 64) + thisRow;
466 tmp_jTowersIDs_subset_2[thisRow][thisCol] = towerid;
468 tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
473 embEta = 0; embPhi = 0; embMod = 200000;
477 for(
int thisCol = 16; thisCol < cols; thisCol++) {
478 for(
int thisRow=0; thisRow<rows; thisRow++) {
481 int tmp_initEMB = initialEMB;
483 towerid = tmp_initEMB + ( (thisCol-16) * 64) + thisRow;
484 tmp_jTowersIDs_subset_2[thisRow][thisCol] = towerid;
486 tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
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 <<
"]) ");
504 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
512 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_2, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
530 emecEta = 15; emecPhi = 0; emecMod = 600000;
531 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
532 transEta = 14; transPhi = 0; transMod = 400000;
533 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
534 embEta = 7; embPhi = 0; embMod = 100000;
541 std::unordered_map<int,jTower> tmp_jTowersColl_subset_3;
549 tmp_jTowersIDs_subset_3[i][j] = 0;
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];
558 for(
int thisCol = 0; thisCol < 8; thisCol++){
559 for(
int thisRow=0; thisRow<rows; thisRow++){
562 int tmp_initEMB = initialEMB;
564 towerid = tmp_initEMB - ( (thisCol) * 64) + thisRow;
566 tmp_jTowersIDs_subset_3[thisRow][thisCol] = towerid;
568 tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
573 embEta = 0; embPhi = 0; embMod = 200000;
576 for(
int thisCol = 8; thisCol < 22; thisCol++){
577 for(
int thisRow=0; thisRow<rows; thisRow++){
580 int tmp_initEMB = initialEMB;
582 towerid = tmp_initEMB + ( (thisCol-8) * 64) + thisRow;
584 tmp_jTowersIDs_subset_3[thisRow][thisCol] = towerid;
586 tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
592 for(
int thisRow = 0; thisRow < rows; thisRow++){
593 int towerid = initialTRANS + thisRow;
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))));
601 for(
int thisRow=0; thisRow<rows; thisRow++){
602 int towerid = initialEMEC + + thisRow;
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))));
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 <<
"]) ");
622 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
630 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_3, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
647 emecEta = 15; emecPhi = 0; emecMod = 600000;
648 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
649 transEta = 14; transPhi = 0; transMod = 400000;
650 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
651 embEta = 0; embPhi = 0; embMod = 200000;
658 std::unordered_map<int,jTower> tmp_jTowersColl_subset_4;
666 tmp_jTowersIDs_subset_4[i][j] = 0;
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];
674 for(
int thisCol = 0; thisCol < 14; thisCol++){
675 for(
int thisRow=0; thisRow<rows; thisRow++){
676 int towerid = initialEMB + ( (thisCol) * 64) + thisRow;
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))));
684 for(
int thisRow = 0; thisRow < rows; thisRow++){
685 int towerid = initialTRANS + thisRow;
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))));
692 for(
int thisCol = 15; thisCol < cols; thisCol++){
693 for(
int thisRow=0; thisRow<rows; thisRow++){
694 int towerid = initialEMEC + ( (thisCol-15) * 64) + thisRow;
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))));
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 <<
"]) ");
715 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
723 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_4, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
740 fcal2Eta = 0; fcal2Phi = 0; fcal2Mod = 1200000;
741 initialFCAL2 =
calcTowerID(fcal2Eta,fcal2Phi,fcal2Mod);
742 fcal1Eta = 0; fcal1Phi = 0; fcal1Mod = 1000000;
743 initialFCAL1 =
calcTowerID(fcal1Eta,fcal1Phi,fcal1Mod);
744 fcal0Eta = 0; fcal0Phi = 0; fcal0Mod = 800000;
745 initialFCAL0 =
calcTowerID(fcal0Eta,fcal0Phi,fcal0Mod);
746 emecEta = 15; emecPhi = 0; emecMod = 600000;
747 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
748 transEta = 14; transPhi = 0; transMod = 400000;
749 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
750 embEta = 8; embPhi = 0; embMod = 200000;
757 std::unordered_map<int,jTower> tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2;
767 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[i][j] = 0;
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];
775 for(
int thisCol = 0; thisCol < 6; thisCol++){
776 for(
int thisRow=0; thisRow<rows; thisRow++){
777 int towerid = initialEMB + ( (thisCol) * 64) + thisRow;
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))));
786 for(
int thisRow = 0; thisRow < rows; thisRow++){
787 int towerid = initialTRANS + thisRow;
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))));
795 for(
int thisCol=7; thisCol<17; thisCol++){
796 for(
int thisRow=0; thisRow<rows; thisRow++){
798 int towerid = initialEMEC + ((thisCol-7) * 64) + thisRow;
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))));
807 for(
int thisCol=17; thisCol<21; thisCol++){
808 for(
int thisRow=0; thisRow<rows/2; thisRow++){
810 int towerid = initialEMEC + ((thisCol-7) * 64) + thisRow;
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))));
821 for(
int thisCol=21; thisCol<33; thisCol++){
822 for(
int thisRow=0; thisRow<rows/4; thisRow++){
824 int towerid = initialFCAL0 + ((thisCol-21) * 64) + thisRow;
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))));
835 for(
int thisCol=33; thisCol<41; thisCol++){
836 for(
int thisRow=0; thisRow<rows/4; thisRow++){
838 int towerid = initialFCAL1 + ((thisCol-33) * 64) + thisRow;
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))));
849 for(
int thisCol=41; thisCol<45; thisCol++){
850 for(
int thisRow=0; thisRow<rows/4; thisRow++){
852 int towerid = initialFCAL2 + ((thisCol-41) * 64) + thisRow;
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))));
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 <<
"]) ");
874 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
881 ATH_CHECK(
m_jFEXSimTool->ExecuteForwardCSide(tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
899 const int jFwdElResolution = l1Menu->thrExtraInfo().jEM().resolutionMeV();
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());
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());
917 ATH_CHECK(output_Tob_jJ.
record(std::move(tobContainer_jJ),std::move(tobAuxContainer_jJ)));
921 ATH_CHECK(output_xTob_jJ.
record(std::move(xtobContainer_jJ),std::move(xtobAuxContainer_jJ)));
925 for(
auto const & tobs: fpga) {
926 for(
size_t it = 0; it<tobs.size();it++) {
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();
939 tobDec_jJ_seedET( *(output_Tob_jJ->back()) ) = tobs.at(it)->getSeedEt();
942 xtobDec_jJ_seedET( *(output_xTob_jJ->back()) ) = tobs.at(it)->getSeedEt();
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());
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());
959 ATH_CHECK(output_Tob_jLJ.
record(std::move(tobContainer_jLJ),std::move(tobAuxContainer_jLJ)));
963 ATH_CHECK(output_xTob_jLJ.
record(std::move(xtobContainer_jLJ),std::move(xtobAuxContainer_jLJ)));
969 for(
auto const& tobs: fpga) {
970 for(
size_t it = 0; it<tobs.size();it++) {
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();
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());
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());
999 ATH_CHECK(output_Tob_jTau.
record(std::move(tobContainer_jTau),std::move(tobAuxContainer_jTau)));
1003 ATH_CHECK(output_xTob_jTau.
record(std::move(xtobContainer_jTau),std::move(xtobAuxContainer_jTau)));
1007 for(
auto const& tobs : fpga){
1008 for(
size_t it = 0; it<tobs.size();it++) {
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();
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());
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());
1039 ATH_CHECK(output_Tob_jEM.
record(std::move(tobContainer_jEM),std::move(tobAuxContainer_jEM)));
1043 ATH_CHECK(output_xTob_jEM.
record(std::move(xtobContainer_jEM),std::move(xtobAuxContainer_jEM)));
1047 const int fpga_map[4]={0,1,3,2};
1049 for(
auto &FPGA_tob : MODULE_tobs) {
1051 ATH_MSG_ERROR(
"FPGA larger than 4 in Forward electron EDM!");
1054 for(
size_t it = 0; it<FPGA_tob.size();it++) {
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();
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());
1081 ATH_CHECK(output_Tob_jTE.
record(std::move(tobContainer_jTE),std::move(tobAuxContainer_jTE)));
1085 for(
auto const& t : tobs) {
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());
1097 ATH_CHECK(output_Tob_jXE.
record(std::move(tobContainer_jXE),std::move(tobAuxContainer_jXE)));
1101 for(
auto const& t : tobs) {
1113 return StatusCode::SUCCESS;