95 if(!this_jTowerContainer.
isValid()){
97 return StatusCode::FAILURE;
134 int fcal2Eta = 3;
int fcal2Phi = 0;
int fcal2Mod = 1100000;
135 int initialFCAL2 =
calcTowerID(fcal2Eta,fcal2Phi,fcal2Mod);
136 int fcal1Eta = 7;
int fcal1Phi = 0;
int fcal1Mod = 900000;
137 int initialFCAL1 =
calcTowerID(fcal1Eta,fcal1Phi,fcal1Mod);
138 int fcal0Eta = 11;
int fcal0Phi = 0;
int fcal0Mod = 700000;
139 int initialFCAL0 =
calcTowerID(fcal0Eta,fcal0Phi,fcal0Mod);
140 int emecEta = 28;
int emecPhi = 0;
int emecMod = 500000;
141 int initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
142 int transEta = 14;
int transPhi = 0;
int transMod = 300000;
143 int initialTRANS =
calcTowerID(transEta,transPhi,transMod);
144 int embEta = 13;
int embPhi = 0;
int embMod = 100000;
145 int initialEMB =
calcTowerID(embEta,embPhi,embMod);
150 return StatusCode::FAILURE;
153 unsigned int evtTimeStamp = ctx.eventID().time_stamp();
155 uint8_t thisJFEX = 0;
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);
172 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[i][j] = 0;
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];
180 for(
int thisCol=0; thisCol<4; thisCol++){
181 for(
int thisRow=0; thisRow<rows/4; thisRow++){
183 int towerid = initialFCAL2 - (thisCol * 64) + thisRow;
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))));
193 for(
int thisCol=4; thisCol<12; thisCol++){
194 for(
int thisRow=0; thisRow<rows/4; thisRow++){
196 int towerid = initialFCAL1 - ((thisCol-4) * 64) + thisRow;
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))));
206 for(
int thisCol=12; thisCol<24; thisCol++){
207 for(
int thisRow=0; thisRow<rows/4; thisRow++){
209 int towerid = initialFCAL0 - ((thisCol-12) * 64) + thisRow;
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))));
219 for(
int thisCol=24; thisCol<28; thisCol++){
220 for(
int thisRow=0; thisRow<rows/2; thisRow++){
222 int towerid = initialEMEC - ((thisCol-24) * 64) + thisRow;
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))));
230 for(
int thisCol=28; thisCol<38; thisCol++){
231 for(
int thisRow=0; thisRow<rows; thisRow++){
233 int towerid = initialEMEC - ((thisCol-24) * 64) + thisRow;
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))));
241 for(
int thisRow = 0; thisRow < rows; thisRow++){
243 int towerid = initialTRANS + thisRow;
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))));
250 for(
int thisCol = 39; thisCol < 45; thisCol++){
251 for(
int thisRow=0; thisRow<rows; thisRow++){
253 int towerid = initialEMB - ( (thisCol-39) * 64) + thisRow;
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))));
261 if (msgLvl(MSG::DEBUG)) {
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 <<
"]) ");
274 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
280 ATH_CHECK(
m_jFEXSimTool->ExecuteForwardASide(tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
299 emecEta = 23; emecPhi = 0; emecMod = 500000;
300 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
301 transEta = 14; transPhi = 0; transMod = 300000;
302 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
303 embEta = 13; embPhi = 0; embMod = 100000;
310 std::unordered_map<int,jTower> tmp_jTowersColl_subset_1;
318 tmp_jTowersIDs_subset_1[i][j] = 0;
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];
326 for(
int thisCol = 0; thisCol < 9; thisCol++){
327 for(
int thisRow=0; thisRow<rows; thisRow++){
329 int towerid = initialEMEC - (thisCol * 64) + thisRow;
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))));
338 for(
int thisRow = 0; thisRow < rows; thisRow++) {
340 int towerid = initialTRANS + thisRow;
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))));
348 for(
int thisCol = 10; thisCol < cols; thisCol++) {
349 for(
int thisRow=0; thisRow<rows; thisRow++) {
351 int towerid = initialEMB - ( (thisCol-10) * 64) + thisRow ;
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))));
359 if (msgLvl(MSG::DEBUG)) {
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 <<
"]) ");
372 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
378 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_1, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
396 emecEta = 15; emecPhi = 0; emecMod = 500000;
397 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
398 transEta = 14; transPhi = 0; transMod = 300000;
399 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
400 embEta = 13; embPhi = 0; embMod = 100000;
407 std::unordered_map<int,jTower> tmp_jTowersColl_subset_2;
415 tmp_jTowersIDs_subset_2[i][j] = 0;
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];
424 for(
int thisRow=0; thisRow<rows; thisRow++) {
426 int towerid = initialEMEC + thisRow;
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))));
434 for(
int thisRow = 0; thisRow < rows; thisRow++) {
436 int towerid = initialTRANS + thisRow;
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))));
444 for(
int thisCol = 2; thisCol < cols-8; thisCol++) {
445 for(
int thisRow=0; thisRow<rows; thisRow++) {
448 int tmp_initEMB = initialEMB;
450 towerid = tmp_initEMB - ( (thisCol-2) * 64) + thisRow;
451 tmp_jTowersIDs_subset_2[thisRow][thisCol] = towerid;
453 tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
458 embEta = 0; embPhi = 0; embMod = 200000;
462 for(
int thisCol = 16; thisCol < cols; thisCol++) {
463 for(
int thisRow=0; thisRow<rows; thisRow++) {
466 int tmp_initEMB = initialEMB;
468 towerid = tmp_initEMB + ( (thisCol-16) * 64) + thisRow;
469 tmp_jTowersIDs_subset_2[thisRow][thisCol] = towerid;
471 tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
476 if (msgLvl(MSG::DEBUG)) {
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 <<
"]) ");
489 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
497 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_2, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
515 emecEta = 15; emecPhi = 0; emecMod = 600000;
516 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
517 transEta = 14; transPhi = 0; transMod = 400000;
518 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
519 embEta = 7; embPhi = 0; embMod = 100000;
526 std::unordered_map<int,jTower> tmp_jTowersColl_subset_3;
534 tmp_jTowersIDs_subset_3[i][j] = 0;
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];
543 for(
int thisCol = 0; thisCol < 8; thisCol++){
544 for(
int thisRow=0; thisRow<rows; thisRow++){
547 int tmp_initEMB = initialEMB;
549 towerid = tmp_initEMB - ( (thisCol) * 64) + thisRow;
551 tmp_jTowersIDs_subset_3[thisRow][thisCol] = towerid;
553 tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
558 embEta = 0; embPhi = 0; embMod = 200000;
561 for(
int thisCol = 8; thisCol < 22; thisCol++){
562 for(
int thisRow=0; thisRow<rows; thisRow++){
565 int tmp_initEMB = initialEMB;
567 towerid = tmp_initEMB + ( (thisCol-8) * 64) + thisRow;
569 tmp_jTowersIDs_subset_3[thisRow][thisCol] = towerid;
571 tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
577 for(
int thisRow = 0; thisRow < rows; thisRow++){
578 int towerid = initialTRANS + thisRow;
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))));
586 for(
int thisRow=0; thisRow<rows; thisRow++){
587 int towerid = initialEMEC + + thisRow;
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))));
594 if (msgLvl(MSG::DEBUG)) {
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 <<
"]) ");
607 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
615 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_3, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
632 emecEta = 15; emecPhi = 0; emecMod = 600000;
633 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
634 transEta = 14; transPhi = 0; transMod = 400000;
635 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
636 embEta = 0; embPhi = 0; embMod = 200000;
643 std::unordered_map<int,jTower> tmp_jTowersColl_subset_4;
651 tmp_jTowersIDs_subset_4[i][j] = 0;
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];
659 for(
int thisCol = 0; thisCol < 14; thisCol++){
660 for(
int thisRow=0; thisRow<rows; thisRow++){
661 int towerid = initialEMB + ( (thisCol) * 64) + thisRow;
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))));
669 for(
int thisRow = 0; thisRow < rows; thisRow++){
670 int towerid = initialTRANS + thisRow;
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))));
677 for(
int thisCol = 15; thisCol < cols; thisCol++){
678 for(
int thisRow=0; thisRow<rows; thisRow++){
679 int towerid = initialEMEC + ( (thisCol-15) * 64) + thisRow;
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))));
687 if (msgLvl(MSG::DEBUG)) {
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 <<
"]) ");
700 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
708 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_4, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
725 fcal2Eta = 0; fcal2Phi = 0; fcal2Mod = 1200000;
726 initialFCAL2 =
calcTowerID(fcal2Eta,fcal2Phi,fcal2Mod);
727 fcal1Eta = 0; fcal1Phi = 0; fcal1Mod = 1000000;
728 initialFCAL1 =
calcTowerID(fcal1Eta,fcal1Phi,fcal1Mod);
729 fcal0Eta = 0; fcal0Phi = 0; fcal0Mod = 800000;
730 initialFCAL0 =
calcTowerID(fcal0Eta,fcal0Phi,fcal0Mod);
731 emecEta = 15; emecPhi = 0; emecMod = 600000;
732 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
733 transEta = 14; transPhi = 0; transMod = 400000;
734 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
735 embEta = 8; embPhi = 0; embMod = 200000;
742 std::unordered_map<int,jTower> tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2;
752 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[i][j] = 0;
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];
760 for(
int thisCol = 0; thisCol < 6; thisCol++){
761 for(
int thisRow=0; thisRow<rows; thisRow++){
762 int towerid = initialEMB + ( (thisCol) * 64) + thisRow;
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))));
771 for(
int thisRow = 0; thisRow < rows; thisRow++){
772 int towerid = initialTRANS + thisRow;
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))));
780 for(
int thisCol=7; thisCol<17; thisCol++){
781 for(
int thisRow=0; thisRow<rows; thisRow++){
783 int towerid = initialEMEC + ((thisCol-7) * 64) + thisRow;
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))));
792 for(
int thisCol=17; thisCol<21; thisCol++){
793 for(
int thisRow=0; thisRow<rows/2; thisRow++){
795 int towerid = initialEMEC + ((thisCol-7) * 64) + thisRow;
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))));
806 for(
int thisCol=21; thisCol<33; thisCol++){
807 for(
int thisRow=0; thisRow<rows/4; thisRow++){
809 int towerid = initialFCAL0 + ((thisCol-21) * 64) + thisRow;
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))));
820 for(
int thisCol=33; thisCol<41; thisCol++){
821 for(
int thisRow=0; thisRow<rows/4; thisRow++){
823 int towerid = initialFCAL1 + ((thisCol-33) * 64) + thisRow;
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))));
834 for(
int thisCol=41; thisCol<45; thisCol++){
835 for(
int thisRow=0; thisRow<rows/4; thisRow++){
837 int towerid = initialFCAL2 + ((thisCol-41) * 64) + thisRow;
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))));
846 if (msgLvl(MSG::DEBUG)) {
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 <<
"]) ");
859 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
866 ATH_CHECK(
m_jFEXSimTool->ExecuteForwardCSide(tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
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() ) ));
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() ) ));
884 const int jFwdElResolution = l1Menu->thrExtraInfo().jEM().resolutionMeV();
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());
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());
902 ATH_CHECK(output_Tob_jJ.
record(std::move(tobContainer_jJ),std::move(tobAuxContainer_jJ)));
906 ATH_CHECK(output_xTob_jJ.
record(std::move(xtobContainer_jJ),std::move(xtobAuxContainer_jJ)));
910 for(
auto const & tobs: fpga) {
911 for(
size_t it = 0; it<tobs.size();it++) {
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();
924 tobDec_jJ_seedET( *(output_Tob_jJ->back()) ) = tobs.at(it)->getSeedEt();
927 xtobDec_jJ_seedET( *(output_xTob_jJ->back()) ) = tobs.at(it)->getSeedEt();
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());
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());
944 ATH_CHECK(output_Tob_jLJ.
record(std::move(tobContainer_jLJ),std::move(tobAuxContainer_jLJ)));
948 ATH_CHECK(output_xTob_jLJ.
record(std::move(xtobContainer_jLJ),std::move(xtobAuxContainer_jLJ)));
954 for(
auto const& tobs: fpga) {
955 for(
size_t it = 0; it<tobs.size();it++) {
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();
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());
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());
984 ATH_CHECK(output_Tob_jTau.
record(std::move(tobContainer_jTau),std::move(tobAuxContainer_jTau)));
988 ATH_CHECK(output_xTob_jTau.
record(std::move(xtobContainer_jTau),std::move(xtobAuxContainer_jTau)));
992 for(
auto const& tobs : fpga){
993 for(
size_t it = 0; it<tobs.size();it++) {
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();
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());
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());
1024 ATH_CHECK(output_Tob_jEM.
record(std::move(tobContainer_jEM),std::move(tobAuxContainer_jEM)));
1028 ATH_CHECK(output_xTob_jEM.
record(std::move(xtobContainer_jEM),std::move(xtobAuxContainer_jEM)));
1032 const int fpga_map[4]={0,1,3,2};
1034 for(
auto &FPGA_tob : MODULE_tobs) {
1036 ATH_MSG_ERROR(
"FPGA larger than 4 in Forward electron EDM!");
1039 for(
size_t it = 0; it<FPGA_tob.size();it++) {
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();
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());
1066 ATH_CHECK(output_Tob_jTE.
record(std::move(tobContainer_jTE),std::move(tobAuxContainer_jTE)));
1070 for(
auto const& t : tobs) {
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());
1082 ATH_CHECK(output_Tob_jXE.
record(std::move(tobContainer_jXE),std::move(tobAuxContainer_jXE)));
1086 for(
auto const& t : tobs) {
1098 return StatusCode::SUCCESS;