121 if(!this_jTowerContainer.isValid()){
123 return StatusCode::FAILURE;
160 int fcal2Eta = 3;
int fcal2Phi = 0;
int fcal2Mod = 1100000;
161 int initialFCAL2 =
calcTowerID(fcal2Eta,fcal2Phi,fcal2Mod);
162 int fcal1Eta = 7;
int fcal1Phi = 0;
int fcal1Mod = 900000;
163 int initialFCAL1 =
calcTowerID(fcal1Eta,fcal1Phi,fcal1Mod);
164 int fcal0Eta = 11;
int fcal0Phi = 0;
int fcal0Mod = 700000;
165 int initialFCAL0 =
calcTowerID(fcal0Eta,fcal0Phi,fcal0Mod);
166 int emecEta = 28;
int emecPhi = 0;
int emecMod = 500000;
167 int initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
168 int transEta = 14;
int transPhi = 0;
int transMod = 300000;
169 int initialTRANS =
calcTowerID(transEta,transPhi,transMod);
170 int embEta = 13;
int embPhi = 0;
int embMod = 100000;
171 int initialEMB =
calcTowerID(embEta,embPhi,embMod);
176 return StatusCode::FAILURE;
179 unsigned int evtTimeStamp = Gaudi::Hive::currentContext().eventID().time_stamp();
188 std::unordered_map<int,jTower> tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL;
189 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.reserve(1600);
197 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[
i][j] = 0;
201 int rows =
sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL /
sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[0];
202 int cols =
sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[0] /
sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[0][0];
205 for(
int thisCol=0; thisCol<4; thisCol++){
206 for(
int thisRow=0; thisRow<
rows/4; thisRow++){
208 int towerid = initialFCAL2 - (thisCol * 64) + thisRow;
210 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
211 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
218 for(
int thisCol=4; thisCol<12; thisCol++){
219 for(
int thisRow=0; thisRow<
rows/4; thisRow++){
221 int towerid = initialFCAL1 - ((thisCol-4) * 64) + thisRow;
223 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
224 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
231 for(
int thisCol=12; thisCol<24; thisCol++){
232 for(
int thisRow=0; thisRow<
rows/4; thisRow++){
234 int towerid = initialFCAL0 - ((thisCol-12) * 64) + thisRow;
236 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
237 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
244 for(
int thisCol=24; thisCol<28; thisCol++){
245 for(
int thisRow=0; thisRow<
rows/2; thisRow++){
247 int towerid = initialEMEC - ((thisCol-24) * 64) + thisRow;
249 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
250 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
255 for(
int thisCol=28; thisCol<38; thisCol++){
256 for(
int thisRow=0; thisRow<
rows; thisRow++){
258 int towerid = initialEMEC - ((thisCol-24) * 64) + thisRow;
260 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
261 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
266 for(
int thisRow = 0; thisRow <
rows; thisRow++){
268 int towerid = initialTRANS + thisRow;
270 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][38] = towerid;
271 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
275 for(
int thisCol = 39; thisCol < 45; thisCol++){
276 for(
int thisRow=0; thisRow<
rows; thisRow++){
278 int towerid = initialEMB - ( (thisCol-39) * 64) + thisRow;
280 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol] = towerid;
281 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
288 for (
int thisRow=
rows-1; thisRow>=0; thisRow--) {
289 for (
int thisCol=0; thisCol<
cols; thisCol++) {
290 int tmptowerid = tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL[thisRow][thisCol];
291 if(tmptowerid == 0 )
continue;
292 const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
293 const float tmptowereta = tmptower->
iEta();
294 const float tmptowerphi = tmptower->
iPhi();
295 if(thisCol !=
cols-1) {
296 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowerphi <<
"][" << tmptowereta <<
"]) ");
299 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
305 ATH_CHECK(
m_jFEXSimTool->ExecuteForwardASide(tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
324 emecEta = 23; emecPhi = 0; emecMod = 500000;
325 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
326 transEta = 14; transPhi = 0; transMod = 300000;
327 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
328 embEta = 13; embPhi = 0; embMod = 100000;
335 std::unordered_map<int,jTower> tmp_jTowersColl_subset_1;
343 tmp_jTowersIDs_subset_1[
i][j] = 0;
347 rows =
sizeof tmp_jTowersIDs_subset_1 /
sizeof tmp_jTowersIDs_subset_1[0];
348 cols =
sizeof tmp_jTowersIDs_subset_1[0] /
sizeof tmp_jTowersIDs_subset_1[0][0];
351 for(
int thisCol = 0; thisCol < 9; thisCol++){
352 for(
int thisRow=0; thisRow<
rows; thisRow++){
354 int towerid = initialEMEC - (thisCol * 64) + thisRow;
356 tmp_jTowersIDs_subset_1[thisRow][thisCol] = towerid;
357 tmp_jTowersColl_subset_1.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
363 for(
int thisRow = 0; thisRow <
rows; thisRow++) {
365 int towerid = initialTRANS + thisRow;
367 tmp_jTowersIDs_subset_1[thisRow][9] = towerid;
368 tmp_jTowersColl_subset_1.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
373 for(
int thisCol = 10; thisCol <
cols; thisCol++) {
374 for(
int thisRow=0; thisRow<
rows; thisRow++) {
376 int towerid = initialEMB - ( (thisCol-10) * 64) + thisRow ;
378 tmp_jTowersIDs_subset_1[thisRow][thisCol] = towerid;
379 tmp_jTowersColl_subset_1.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
386 for (
int thisRow=
rows-1; thisRow>=0; thisRow--) {
387 for (
int thisCol=0; thisCol<
cols; thisCol++) {
388 int tmptowerid = tmp_jTowersIDs_subset_1[thisRow][thisCol];
389 if(tmptowerid == 0)
continue;
390 const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
391 const float tmptowereta = tmptower->
iEta();
392 const float tmptowerphi = tmptower->
iPhi();
393 if(thisCol !=
cols-1) {
394 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowerphi <<
"][" << tmptowereta <<
"]) ");
397 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
403 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_1, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
421 emecEta = 15; emecPhi = 0; emecMod = 500000;
422 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
423 transEta = 14; transPhi = 0; transMod = 300000;
424 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
425 embEta = 13; embPhi = 0; embMod = 100000;
432 std::unordered_map<int,jTower> tmp_jTowersColl_subset_2;
440 tmp_jTowersIDs_subset_2[
i][j] = 0;
445 rows =
sizeof tmp_jTowersIDs_subset_2 /
sizeof tmp_jTowersIDs_subset_2[0];
446 cols =
sizeof tmp_jTowersIDs_subset_2[0] /
sizeof tmp_jTowersIDs_subset_2[0][0];
449 for(
int thisRow=0; thisRow<
rows; thisRow++) {
451 int towerid = initialEMEC + thisRow;
453 tmp_jTowersIDs_subset_2[thisRow][0] = towerid;
454 tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
459 for(
int thisRow = 0; thisRow <
rows; thisRow++) {
461 int towerid = initialTRANS + thisRow;
463 tmp_jTowersIDs_subset_2[thisRow][1] = towerid;
464 tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
469 for(
int thisCol = 2; thisCol <
cols-8; thisCol++) {
470 for(
int thisRow=0; thisRow<
rows; thisRow++) {
473 int tmp_initEMB = initialEMB;
475 towerid = tmp_initEMB - ( (thisCol-2) * 64) + thisRow;
476 tmp_jTowersIDs_subset_2[thisRow][thisCol] = towerid;
478 tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
483 embEta = 0; embPhi = 0; embMod = 200000;
487 for(
int thisCol = 16; thisCol <
cols; thisCol++) {
488 for(
int thisRow=0; thisRow<
rows; thisRow++) {
491 int tmp_initEMB = initialEMB;
493 towerid = tmp_initEMB + ( (thisCol-16) * 64) + thisRow;
494 tmp_jTowersIDs_subset_2[thisRow][thisCol] = towerid;
496 tmp_jTowersColl_subset_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
503 for (
int thisRow=
rows-1; thisRow>=0; thisRow--) {
504 for (
int thisCol=0; thisCol<
cols; thisCol++) {
505 int tmptowerid = tmp_jTowersIDs_subset_2[thisRow][thisCol];
506 if(tmptowerid == 0)
continue;
507 const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
508 const float tmptowereta = tmptower->
iEta();
509 const float tmptowerphi = tmptower->
iPhi();
510 if(thisCol !=
cols-1) {
511 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) ");
514 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
522 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_2, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
540 emecEta = 15; emecPhi = 0; emecMod = 600000;
541 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
542 transEta = 14; transPhi = 0; transMod = 400000;
543 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
544 embEta = 7; embPhi = 0; embMod = 100000;
551 std::unordered_map<int,jTower> tmp_jTowersColl_subset_3;
559 tmp_jTowersIDs_subset_3[
i][j] = 0;
564 rows =
sizeof tmp_jTowersIDs_subset_3 /
sizeof tmp_jTowersIDs_subset_3[0];
565 cols =
sizeof tmp_jTowersIDs_subset_3[0] /
sizeof tmp_jTowersIDs_subset_3[0][0];
568 for(
int thisCol = 0; thisCol < 8; thisCol++){
569 for(
int thisRow=0; thisRow<
rows; thisRow++){
572 int tmp_initEMB = initialEMB;
574 towerid = tmp_initEMB - ( (thisCol) * 64) + thisRow;
576 tmp_jTowersIDs_subset_3[thisRow][thisCol] = towerid;
578 tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
583 embEta = 0; embPhi = 0; embMod = 200000;
586 for(
int thisCol = 8; thisCol < 22; thisCol++){
587 for(
int thisRow=0; thisRow<
rows; thisRow++){
590 int tmp_initEMB = initialEMB;
592 towerid = tmp_initEMB + ( (thisCol-8) * 64) + thisRow;
594 tmp_jTowersIDs_subset_3[thisRow][thisCol] = towerid;
596 tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
602 for(
int thisRow = 0; thisRow <
rows; thisRow++){
603 int towerid = initialTRANS + thisRow;
605 tmp_jTowersIDs_subset_3[thisRow][22] = towerid;
606 tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
611 for(
int thisRow=0; thisRow<
rows; thisRow++){
612 int towerid = initialEMEC + + thisRow;
614 tmp_jTowersIDs_subset_3[thisRow][23] = towerid;
615 tmp_jTowersColl_subset_3.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
621 for (
int thisRow=
rows-1; thisRow>=0; thisRow--) {
622 for (
int thisCol=0; thisCol<
cols; thisCol++) {
623 int tmptowerid = tmp_jTowersIDs_subset_3[thisRow][thisCol];
624 if(tmptowerid == 0)
continue;
625 const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
626 const float tmptowereta = tmptower->
iEta();
627 const float tmptowerphi = tmptower->
iPhi();
628 if(thisCol !=
cols-1) {
629 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) ");
632 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
640 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_3, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
657 emecEta = 15; emecPhi = 0; emecMod = 600000;
658 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
659 transEta = 14; transPhi = 0; transMod = 400000;
660 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
661 embEta = 0; embPhi = 0; embMod = 200000;
668 std::unordered_map<int,jTower> tmp_jTowersColl_subset_4;
676 tmp_jTowersIDs_subset_4[
i][j] = 0;
680 rows =
sizeof tmp_jTowersIDs_subset_4 /
sizeof tmp_jTowersIDs_subset_4[0];
681 cols =
sizeof tmp_jTowersIDs_subset_4[0] /
sizeof tmp_jTowersIDs_subset_4[0][0];
684 for(
int thisCol = 0; thisCol < 14; thisCol++){
685 for(
int thisRow=0; thisRow<
rows; thisRow++){
686 int towerid = initialEMB + ( (thisCol) * 64) + thisRow;
688 tmp_jTowersIDs_subset_4[thisRow][thisCol] = towerid;
689 tmp_jTowersColl_subset_4.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
694 for(
int thisRow = 0; thisRow <
rows; thisRow++){
695 int towerid = initialTRANS + thisRow;
697 tmp_jTowersIDs_subset_4[thisRow][14] = towerid;
698 tmp_jTowersColl_subset_4.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
702 for(
int thisCol = 15; thisCol <
cols; thisCol++){
703 for(
int thisRow=0; thisRow<
rows; thisRow++){
704 int towerid = initialEMEC + ( (thisCol-15) * 64) + thisRow;
706 tmp_jTowersIDs_subset_4[thisRow][thisCol] = towerid;
707 tmp_jTowersColl_subset_4.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
714 for (
int thisRow=
rows-1; thisRow>=0; thisRow--) {
715 for (
int thisCol=0; thisCol<
cols; thisCol++) {
716 int tmptowerid = tmp_jTowersIDs_subset_4[thisRow][thisCol];
717 if(tmptowerid == 0)
continue;
718 const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
719 const float tmptowereta = tmptower->
iEta();
720 const float tmptowerphi = tmptower->
iPhi();
721 if(thisCol !=
cols-1) {
722 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) ");
725 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
733 ATH_CHECK(
m_jFEXSimTool->ExecuteBarrel(tmp_jTowersIDs_subset_4, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
750 fcal2Eta = 0; fcal2Phi = 0; fcal2Mod = 1200000;
751 initialFCAL2 =
calcTowerID(fcal2Eta,fcal2Phi,fcal2Mod);
752 fcal1Eta = 0; fcal1Phi = 0; fcal1Mod = 1000000;
753 initialFCAL1 =
calcTowerID(fcal1Eta,fcal1Phi,fcal1Mod);
754 fcal0Eta = 0; fcal0Phi = 0; fcal0Mod = 800000;
755 initialFCAL0 =
calcTowerID(fcal0Eta,fcal0Phi,fcal0Mod);
756 emecEta = 15; emecPhi = 0; emecMod = 600000;
757 initialEMEC =
calcTowerID(emecEta,emecPhi,emecMod);
758 transEta = 14; transPhi = 0; transMod = 400000;
759 initialTRANS =
calcTowerID(transEta,transPhi,transMod);
760 embEta = 8; embPhi = 0; embMod = 200000;
767 std::unordered_map<int,jTower> tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2;
775 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[
i][j] = 0;
779 rows =
sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2 /
sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[0];
780 cols =
sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[0] /
sizeof tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[0][0];
783 for(
int thisCol = 0; thisCol < 6; thisCol++){
784 for(
int thisRow=0; thisRow<
rows; thisRow++){
785 int towerid = initialEMB + ( (thisCol) * 64) + thisRow;
787 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
788 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
794 for(
int thisRow = 0; thisRow <
rows; thisRow++){
795 int towerid = initialTRANS + thisRow;
797 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][6] = towerid;
798 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
803 for(
int thisCol=7; thisCol<17; thisCol++){
804 for(
int thisRow=0; thisRow<
rows; thisRow++){
806 int towerid = initialEMEC + ((thisCol-7) * 64) + thisRow;
808 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
809 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
815 for(
int thisCol=17; thisCol<21; thisCol++){
816 for(
int thisRow=0; thisRow<
rows/2; thisRow++){
818 int towerid = initialEMEC + ((thisCol-7) * 64) + thisRow;
820 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
821 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
829 for(
int thisCol=21; thisCol<33; thisCol++){
830 for(
int thisRow=0; thisRow<
rows/4; thisRow++){
832 int towerid = initialFCAL0 + ((thisCol-21) * 64) + thisRow;
834 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
835 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
843 for(
int thisCol=33; thisCol<41; thisCol++){
844 for(
int thisRow=0; thisRow<
rows/4; thisRow++){
846 int towerid = initialFCAL1 + ((thisCol-33) * 64) + thisRow;
848 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
849 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
857 for(
int thisCol=41; thisCol<45; thisCol++){
858 for(
int thisRow=0; thisRow<
rows/4; thisRow++){
860 int towerid = initialFCAL2 + ((thisCol-41) * 64) + thisRow;
862 tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol] = towerid;
863 tmp_jTowersColl_subset_ENDCAP_AND_EMB_AND_FCAL_2.insert( std::unordered_map<int, jTower>::value_type(towerid, *(this_jTowerContainer->findTower(towerid))));
871 for (
int thisRow=
rows-1; thisRow>=0; thisRow--) {
872 for (
int thisCol=0; thisCol<
cols; thisCol++) {
873 int tmptowerid = tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2[thisRow][thisCol];
874 if(tmptowerid == 0)
continue;
875 const LVL1::jTower* tmptower = this_jTowerContainer->findTower(tmptowerid);
876 const float tmptowereta = tmptower->
iEta();
877 const float tmptowerphi = tmptower->
iPhi();
878 if(thisCol !=
cols-1) {
879 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowerphi <<
"][" << tmptowereta <<
"]) ");
882 ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |");
889 ATH_CHECK(
m_jFEXSimTool->ExecuteForwardCSide(tmp_jTowersIDs_subset_ENDCAP_AND_EMB_AND_FCAL_2, inputOutputCollection, { evtTimeStamp, myDBTool->get_jJCalibParams(thisJFEX) } ));
907 const int jFwdElResolution = l1Menu->thrExtraInfo().jEM().resolutionMeV();
910 auto tobContainer_jJ = std::make_unique<xAOD::jFexSRJetRoIContainer> ();
911 std::unique_ptr< xAOD::jFexSRJetRoIAuxContainer > tobAuxContainer_jJ = std::make_unique<xAOD::jFexSRJetRoIAuxContainer> ();
912 tobContainer_jJ->setStore(tobAuxContainer_jJ.get());
914 auto xtobContainer_jJ = std::make_unique<xAOD::jFexSRJetRoIContainer> ();
915 std::unique_ptr< xAOD::jFexSRJetRoIAuxContainer > xtobAuxContainer_jJ = std::make_unique<xAOD::jFexSRJetRoIAuxContainer> ();
916 xtobContainer_jJ->setStore(xtobAuxContainer_jJ.get());
920 for(
auto const & tobs: fpga) {
921 for(
size_t it = 0;
it<tobs.size();
it++) {
925 if(tobs.at(
it)->getWord() != 0) {
926 eta = (this_jTowerContainer->findTower( tobs.at(
it)->getTTID() ))->centreEta();
927 phi = (this_jTowerContainer->findTower( tobs.at(
it)->getTTID() ))->centrephi_toPI();
933 ATH_CHECK(
fillSRJetEDM(tobs.at(
it)->getjFex(),tobs.at(
it)->getFpga(),tobs.at(
it)->getWord(),istob,tobs.at(
it)->getRes(), eta, phi, tobContainer_jJ));
935 ATH_CHECK(
fillSRJetEDM(tobs.at(
it)->getjFex(),tobs.at(
it)->getFpga(),tobs.at(
it)->getWord(),istob,tobs.at(
it)->getRes(), eta, phi, xtobContainer_jJ));
942 ATH_MSG_DEBUG(
" write: " << output_Tob_jJ.key() <<
" = " <<
"..." );
943 ATH_CHECK(output_Tob_jJ.record(std::move(tobContainer_jJ),std::move(tobAuxContainer_jJ)));
946 ATH_MSG_DEBUG(
" write: " << output_xTob_jJ.key() <<
" = " <<
"..." );
947 ATH_CHECK(output_xTob_jJ.record(std::move(xtobContainer_jJ),std::move(xtobAuxContainer_jJ)));
950 auto tobContainer_jLJ = std::make_unique<xAOD::jFexLRJetRoIContainer> ();
951 std::unique_ptr< xAOD::jFexLRJetRoIAuxContainer > tobAuxContainer_jLJ = std::make_unique<xAOD::jFexLRJetRoIAuxContainer> ();
952 tobContainer_jLJ->setStore(tobAuxContainer_jLJ.get());
954 auto xtobContainer_jLJ = std::make_unique<xAOD::jFexLRJetRoIContainer> ();
955 std::unique_ptr< xAOD::jFexLRJetRoIAuxContainer > xtobAuxContainer_jLJ = std::make_unique<xAOD::jFexLRJetRoIAuxContainer> ();
956 xtobContainer_jLJ->setStore(xtobAuxContainer_jLJ.get());
960 for(
auto const& tobs: fpga) {
961 for(
size_t it = 0;
it<tobs.size();
it++) {
965 if(tobs.at(
it)->getWord() != 0) {
966 eta = (this_jTowerContainer->findTower( tobs.at(
it)->getTTID() ))->centreEta();
967 phi = (this_jTowerContainer->findTower( tobs.at(
it)->getTTID() ))->centrephi_toPI();
973 ATH_CHECK(
fillLRJetEDM(tobs.at(
it)->getjFex(),tobs.at(
it)->getFpga(),tobs.at(
it)->getWord(),istob,tobs.at(
it)->getRes(), eta, phi, tobContainer_jLJ));
975 ATH_CHECK(
fillLRJetEDM(tobs.at(
it)->getjFex(),tobs.at(
it)->getFpga(),tobs.at(
it)->getWord(),istob,tobs.at(
it)->getRes(), eta, phi, xtobContainer_jLJ));
981 ATH_MSG_DEBUG(
" write: " << output_Tob_jLJ.key() <<
" = " <<
"..." );
982 ATH_CHECK(output_Tob_jLJ.record(std::move(tobContainer_jLJ),std::move(tobAuxContainer_jLJ)));
985 ATH_MSG_DEBUG(
" write: " << output_xTob_jLJ.key() <<
" = " <<
"..." );
986 ATH_CHECK(output_xTob_jLJ.record(std::move(xtobContainer_jLJ),std::move(xtobAuxContainer_jLJ)));
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());
998 for(
auto const& tobs : fpga){
999 for(
size_t it = 0;
it<tobs.size();
it++) {
1003 if(tobs.at(
it)->getWord() != 0){
1004 eta = (this_jTowerContainer->findTower( tobs.at(
it)->getTTID() ))->centreEta();
1005 phi = (this_jTowerContainer->findTower( tobs.at(
it)->getTTID() ))->centrephi_toPI();
1011 ATH_CHECK(
fillTauEDM(tobs.at(
it)->getjFex() ,tobs.at(
it)->getFpga() ,tobs.at(
it)->getWord() ,istob ,tobs.at(
it)->getRes(), eta, phi, tobContainer_jTau));
1013 ATH_CHECK(
fillTauEDM(tobs.at(
it)->getjFex() ,tobs.at(
it)->getFpga() ,tobs.at(
it)->getWord() ,istob ,tobs.at(
it)->getRes(), eta, phi, xtobContainer_jTau));
1020 ATH_MSG_DEBUG(
" write: " << output_Tob_jTau.key() <<
" = " <<
"..." );
1021 ATH_CHECK(output_Tob_jTau.record(std::move(tobContainer_jTau),std::move(tobAuxContainer_jTau)));
1024 ATH_MSG_DEBUG(
" write: " << output_xTob_jTau.key() <<
" = " <<
"..." );
1025 ATH_CHECK(output_xTob_jTau.record(std::move(xtobContainer_jTau),std::move(xtobAuxContainer_jTau)));
1028 auto tobContainer_jEM = std::make_unique<xAOD::jFexFwdElRoIContainer> ();
1029 std::unique_ptr< xAOD::jFexFwdElRoIAuxContainer > tobAuxContainer_jEM = std::make_unique<xAOD::jFexFwdElRoIAuxContainer> ();
1030 tobContainer_jEM->setStore(tobAuxContainer_jEM.get());
1032 auto xtobContainer_jEM = std::make_unique<xAOD::jFexFwdElRoIContainer> ();
1033 std::unique_ptr< xAOD::jFexFwdElRoIAuxContainer > xtobAuxContainer_jEM = std::make_unique<xAOD::jFexFwdElRoIAuxContainer> ();
1034 xtobContainer_jEM->setStore(xtobAuxContainer_jEM.get());
1038 const int fpga_map[4]={0,1,3,2};
1040 for(
auto &FPGA_tob : MODULE_tobs) {
1042 ATH_MSG_ERROR(
"FPGA larger than 4 in Forward electron EDM!");
1045 for(
size_t it = 0;
it<FPGA_tob.size();
it++) {
1049 if(FPGA_tob.at(
it).at(1) != 0) {
1050 eta = (this_jTowerContainer->findTower(FPGA_tob.at(
it).at(1)))->centreEta();
1051 phi = (this_jTowerContainer->findTower(FPGA_tob.at(
it).at(1)))->centrephi_toPI();
1056 ATH_CHECK(
fillFwdElEDM(jfex,fpga_map[fpgaNum], FPGA_tob.at(
it).at(0),istob, jFwdElResolution, eta, phi, tobContainer_jEM));
1058 ATH_CHECK(
fillFwdElEDM(jfex,fpga_map[fpgaNum], FPGA_tob.at(
it).at(0),istob, jFwdElResolution, eta, phi, xtobContainer_jEM));
1066 ATH_MSG_DEBUG(
" write: " << output_Tob_jEM.key() <<
" = " <<
"..." );
1067 ATH_CHECK(output_Tob_jEM.record(std::move(tobContainer_jEM),std::move(tobAuxContainer_jEM)));
1070 ATH_MSG_DEBUG(
" write: " << output_xTob_jEM.key() <<
" = " <<
"..." );
1071 ATH_CHECK(output_xTob_jEM.record(std::move(xtobContainer_jEM),std::move(xtobAuxContainer_jEM)));
1074 auto tobContainer_jTE = std::make_unique<xAOD::jFexSumETRoIContainer> ();
1075 std::unique_ptr< xAOD::jFexSumETRoIAuxContainer > tobAuxContainer_jTE = std::make_unique<xAOD::jFexSumETRoIAuxContainer> ();
1076 tobContainer_jTE->setStore(tobAuxContainer_jTE.get());
1080 for(
auto const&
t : tobs) {
1086 ATH_MSG_DEBUG(
" write: " << output_Tob_jTE.key() <<
" = " <<
"..." );
1087 ATH_CHECK(output_Tob_jTE.record(std::move(tobContainer_jTE),std::move(tobAuxContainer_jTE)));
1090 auto tobContainer_jXE = std::make_unique<xAOD::jFexMETRoIContainer> ();
1091 std::unique_ptr< xAOD::jFexMETRoIAuxContainer > tobAuxContainer_jXE = std::make_unique<xAOD::jFexMETRoIAuxContainer> ();
1092 tobContainer_jXE->setStore(tobAuxContainer_jXE.get());
1096 for(
auto const&
t : tobs) {
1102 ATH_MSG_DEBUG(
" write: " << output_Tob_jXE.key() <<
" = " <<
"..." );
1103 ATH_CHECK(output_Tob_jXE.record(std::move(tobContainer_jXE),std::move(tobAuxContainer_jXE)));
1112 return StatusCode::SUCCESS;