39 m_nrBinsPhiMu(0), m_nrBinsPhiJetEg(0), m_nrBinsPhiEtm(0),
40 m_nrBinsPhiHtm(0), m_nrBinsEtaCommon(0), m_verbosity(0),
48 std::pair < L1GtObject, L1GtObject > gtObjPair;
57 gtObjPair = std::make_pair(
Mu,
CenJet);
63 gtObjPair = std::make_pair(
CenJet,
Mu);
70 gtObjPair = std::make_pair(
Mu,
ForJet);
76 gtObjPair = std::make_pair(
ForJet,
Mu);
83 gtObjPair = std::make_pair(
Mu,
TauJet);
89 gtObjPair = std::make_pair(
TauJet,
Mu);
109 gtObjPair = std::make_pair(
Mu,
IsoEG);
115 gtObjPair = std::make_pair(
IsoEG,
Mu);
122 gtObjPair = std::make_pair(
Mu,
ETM);
128 gtObjPair = std::make_pair(
ETM,
Mu);
135 gtObjPair = std::make_pair(
Mu,
HTM);
141 gtObjPair = std::make_pair(
HTM,
Mu);
201 gtObjPair = std::make_pair(
ETM,
IsoEG);
207 gtObjPair = std::make_pair(
IsoEG,
ETM);
267 gtObjPair = std::make_pair(
HTM,
IsoEG);
273 gtObjPair = std::make_pair(
IsoEG,
HTM);
282 gtObjPair = std::make_pair(
ETM,
HTM);
288 gtObjPair = std::make_pair(
HTM,
ETM);
429 LogTrace(
"L1GlobalTrigger") <<
"\nm_gtObjectPairVec size: "
432 unsigned int iPair = 0;
434 for (std::vector<std::pair<L1GtObject, L1GtObject> >::const_iterator
437 LogTrace(
"L1GlobalTrigger") <<
"m_gtObjectPairVec vector element ["
440 <<
"], \t\tpair index = " << iPair << std::endl;
461 std::pair < L1GtObject, L1GtObject > gtObjPair;
462 gtObjPair = std::make_pair(obj0, obj1);
468 unsigned int iPair = 0;
469 for (std::vector<std::pair<L1GtObject, L1GtObject> >::const_iterator cIter =
472 if (*cIter == gtObjPair) {
473 LogTrace(
"L1GlobalTrigger") <<
"\n Index for pair ["
476 << iPair << std::endl;
492 const unsigned int positionPair,
const unsigned int initialIndex,
493 unsigned int& convertedIndex)
const {
496 bool conversionStatus =
false;
503 conversionStatus =
false;
506 LogTrace(
"L1GlobalTrigger") << (positionPair ?
" Second"
507 :
"\n First") <<
" object from pair " << pairIndex
508 <<
": initial phi index " << initialIndex <<
" >= "
510 <<
" Conversion failed." << std::endl;
514 LogTrace(
"L1GlobalTrigger") << (positionPair ?
" Second"
515 :
"\n First") <<
" object from pair " << pairIndex
516 <<
": initial phi index " << initialIndex
517 <<
" within scale size " <<
525 switch (positionPair) {
533 conversionStatus =
true;
537 << (positionPair ?
" Second" :
"\n First")
538 <<
" object from pair " << pairIndex
539 <<
": initial phi index " << initialIndex
540 <<
" converted to " << newIndex << std::endl;
545 conversionStatus =
false;
549 << (positionPair ?
" Second" :
"\n First")
550 <<
" object from pair " << pairIndex
551 <<
": converted phi index " << newIndex
552 <<
"is equal to badIndex " <<
badIndex
553 <<
" Conversion failed." << std::endl;
558 newIndex = initialIndex;
559 conversionStatus =
true;
562 LogTrace(
"L1GlobalTrigger") << (positionPair ?
" Second"
563 :
"\n First") <<
" object from pair " << pairIndex
564 <<
": initial phi index " << initialIndex
565 <<
" not requested to be converted, return index "
566 << newIndex << std::endl;
575 newIndex = initialIndex;
576 conversionStatus =
true;
579 LogTrace(
"L1GlobalTrigger") << (positionPair ?
" Second"
580 :
"\n First") <<
" object from pair " << pairIndex
581 <<
": initial phi index " << initialIndex
582 <<
" not requested to be converted, return index, return index "
583 << newIndex << std::endl;
591 conversionStatus =
true;
595 << (positionPair ?
" Second" :
"\n First")
596 <<
" object from pair " << pairIndex
597 <<
": initial phi index " << initialIndex
598 <<
" converted to " << newIndex << std::endl;
603 conversionStatus =
false;
607 << (positionPair ?
" Second" :
"\n First")
608 <<
" object from pair " << pairIndex
609 <<
": converted phi index " << newIndex
610 <<
"is equal to badIndex " <<
badIndex
611 <<
" Conversion failed." << std::endl;
624 <<
"\n Wrong position in the object pair " << positionPair
625 <<
"\n Programming error - position must be either 0 or 1..."
633 convertedIndex = newIndex;
634 return conversionStatus;
639 const unsigned int initialIndex,
unsigned int& convertedIndex)
const {
642 bool conversionStatus =
false;
653 conversionStatus =
false;
656 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
658 <<
" has initial eta index " << initialIndex
660 <<
" scale size. Conversion failed." << std::endl;
669 conversionStatus =
true;
672 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
674 <<
" initial eta index " << initialIndex
675 <<
" (within scale size "
677 <<
") converted to " << newIndex << std::endl;
682 conversionStatus =
false;
685 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
687 <<
" initial eta index " << initialIndex
688 <<
" (within scale size "
690 <<
") converted to badIndex" << newIndex
691 <<
" Conversion failed." << std::endl;
710 conversionStatus =
false;
713 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
715 <<
" has initial eta index " << initialIndex
717 <<
" scale size. Conversion failed." << std::endl;
726 conversionStatus =
true;
729 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
731 <<
" initial eta index " << initialIndex
732 <<
" (within scale size "
734 <<
") converted to " << newIndex << std::endl;
739 conversionStatus =
false;
742 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
744 <<
" initial eta index " << initialIndex
745 <<
" (within scale size "
747 <<
") converted to badIndex" << newIndex
748 <<
" Conversion failed." << std::endl;
764 conversionStatus =
false;
767 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
769 <<
" has initial eta index " << initialIndex
771 <<
" scale size. Conversion failed." << std::endl;
780 conversionStatus =
true;
783 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
785 <<
" initial eta index " << initialIndex
786 <<
" (within scale size "
788 <<
") converted to " << newIndex << std::endl;
793 conversionStatus =
false;
796 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
798 <<
" initial eta index " << initialIndex
799 <<
" (within scale size "
801 <<
") converted to badIndex" << newIndex
802 <<
" Conversion failed." << std::endl;
824 conversionStatus =
false;
830 gtObject)) <<
"' is not a recognized L1GtObject. "
831 <<
"\n Conversion failed. " << std::endl;
832 conversionStatus =
false;
838 convertedIndex = newIndex;
840 return conversionStatus;
894 <<
"' is not a recognized L1GtObject. "
895 <<
"\n Return 0 bins.";
906 std::pair < L1GtObject, L1GtObject > gtObjPair;
907 gtObjPair = std::make_pair(obj0, obj1);
914 for (std::vector<std::pair<L1GtObject, L1GtObject> >::const_iterator cIter =
917 if (*cIter == gtObjPair) {
918 LogTrace(
"L1GlobalTrigger") <<
"\n gtObjectNrBinsPhi ["
933 const unsigned int pairIndex)
const {
937 <<
"\n gtObjectNrBinsPhi for L1 GT object pair index "
951 const int ifCaloEtaNumberBits,
const int ifMuEtaNumberBits) {
982 for (
unsigned int phiMuInd = 0; phiMuInd <
m_nrBinsPhiMu; ++phiMuInd) {
990 double phiMuLowEdgeSmallShiftRight = phiMuLowEdge + (phiMuHighEdge
991 - phiMuLowEdge) / 100.;
997 for (
unsigned int iBin = nrBins;; --iBin) {
1002 if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
1005 LogTrace(
"L1GlobalTrigger") <<
" phiMuIndex \t" << phiMuInd
1006 <<
" [ " << phiMuLowEdge <<
" \t, "
1007 << phiMuHighEdge <<
"] \t==>\t phiMuJetEG \t"
1009 << phiLowEdge <<
"\t, " << phiHighEdge <<
" ]"
1020 for (
unsigned int iBin = nrBins;; --iBin) {
1025 if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
1028 LogTrace(
"L1GlobalTrigger") <<
" phiMuIndex \t" << phiMuInd
1029 <<
" [ " << phiMuLowEdge <<
" \t, "
1030 << phiMuHighEdge <<
"] \t==>\t phiMuToEtm \t"
1032 <<
"\t, " << phiHighEdge <<
" ]" << std::endl;
1042 for (
unsigned int iBin = nrBins;; --iBin) {
1047 if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
1050 LogTrace(
"L1GlobalTrigger") <<
" phiMuIndex \t" << phiMuInd
1051 <<
" [ " << phiMuLowEdge <<
" \t, "
1052 << phiMuHighEdge <<
"] \t==>\t phiMuToHtm \t"
1054 <<
"\t, " << phiHighEdge <<
" ]" << std::endl;
1060 LogTrace(
"L1GlobalTrigger") << std::endl;
1065 LogTrace(
"L1GlobalTrigger") <<
"Mu phi conversions" << std::endl;
1067 LogTrace(
"L1GlobalTrigger") <<
" Mu phiIndex \t" << iBin
1068 <<
"\t converted to index:"
1075 LogTrace(
"L1GlobalTrigger") << std::endl;
1089 for (
unsigned int phiEtmInd = 0; phiEtmInd <
m_nrBinsPhiEtm; ++phiEtmInd) {
1095 double phiEtmLowEdgeSmallShiftRight = phiEtmLowEdge + (phiEtmHighEdge
1096 - phiEtmLowEdge) / 100.;
1102 for (
unsigned int iBin = nrBins;; --iBin) {
1107 if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
1110 LogTrace(
"L1GlobalTrigger") <<
" phiEtmIndex \t" << phiEtmInd
1111 <<
" [ " << phiEtmLowEdge <<
" \t, "
1112 << phiEtmHighEdge <<
"] \t==>\t phiEtmJetEG \t"
1114 << phiLowEdge <<
"\t, " << phiHighEdge <<
" ]"
1125 for (
unsigned int iBin = nrBins;; --iBin) {
1130 if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
1133 LogTrace(
"L1GlobalTrigger") <<
" phiEtmIndex \t" << phiEtmInd
1134 <<
" [ " << phiEtmLowEdge <<
" \t, "
1135 << phiEtmHighEdge <<
"] \t==>\t phiEtmToHtm \t"
1137 <<
"\t, " << phiHighEdge <<
" ]" << std::endl;
1143 LogTrace(
"L1GlobalTrigger") << std::endl;
1155 for (
unsigned int phiHtmInd = 0; phiHtmInd <
m_nrBinsPhiHtm; ++phiHtmInd) {
1161 double phiHtmLowEdgeSmallShiftRight = phiHtmLowEdge + (phiHtmHighEdge
1162 - phiHtmLowEdge) / 100.;
1166 for (
unsigned int iBin = nrBins;; --iBin) {
1171 if (phiHtmLowEdgeSmallShiftRight >= phiLowEdge) {
1174 LogTrace(
"L1GlobalTrigger") <<
" phiHtmIndex \t" << phiHtmInd
1175 <<
" [ " << phiHtmLowEdge <<
" \t, "
1176 << phiHtmHighEdge <<
"] \t==>\t phiHtmJetEG \t"
1178 << phiLowEdge <<
"\t, " << phiHighEdge <<
" ]"
1212 unsigned int nrGctCentralEtaBinsPerHalf =
1215 unsigned int nrGctForwardEtaBinsPerHalf =
1218 unsigned int nrGctTotalEtaBinsPerHalf = nrGctCentralEtaBinsPerHalf
1219 + nrGctForwardEtaBinsPerHalf;
1230 <<
" \nEta conversion: CenJet/TauJet & IsoEG/NoIsoEG to a common calorimeter scale\n"
1235 (nrGctCentralEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))),
1238 for (
unsigned int etaInd = 0; etaInd < nrGctCentralEtaBinsPerHalf; ++etaInd) {
1245 LogTrace(
"L1GlobalTrigger") <<
" etaIndex " << etaInd <<
"\t [hex: "
1246 << std::hex << etaInd <<
"] " <<
std::dec
1247 <<
" ==> etaIndexGlobal " << globalIndex << std::endl;
1250 unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1255 LogTrace(
"L1GlobalTrigger") <<
" etaIndex " << etaIndNeg
1256 <<
"\t [hex: " << std::hex << etaIndNeg <<
"] " <<
std::dec
1257 <<
" ==> etaIndexGlobal " << globalIndex << std::endl;
1267 <<
" \nEta conversion: ForJet to a common calorimeter scale\n"
1272 (nrGctForwardEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))),
1275 for (
unsigned int etaInd = 0; etaInd < nrGctForwardEtaBinsPerHalf; ++etaInd) {
1282 LogTrace(
"L1GlobalTrigger") <<
" etaIndex " << etaInd <<
"\t [hex: "
1283 << std::hex << etaInd <<
"] " <<
std::dec
1284 <<
" ==> etaIndexGlobal " << globalIndex << std::endl;
1287 unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1292 LogTrace(
"L1GlobalTrigger") <<
" etaIndex " << etaIndNeg <<
"\t [hex: "
1293 << std::hex << etaIndNeg <<
"] " <<
std::dec
1294 <<
" ==> etaIndexGlobal " << globalIndex << std::endl;
1304 <<
" \nEta conversion: Mu to a common calorimeter scale\n"
1308 unsigned int nrBinsEtaMuPerHalf =
1310 LogTrace(
"L1GlobalTrigger") <<
" \nnrBinsEtaMuPerHalf = "
1311 << nrBinsEtaMuPerHalf <<
"\n" << std::endl;
1315 (nrBinsEtaMuPerHalf | (1 << (ifMuEtaNumberBits - 1))),
badIndex);
1317 for (
unsigned int etaMuInd = 0; etaMuInd < nrBinsEtaMuPerHalf; ++etaMuInd) {
1325 double etaMuLowEdgeSmallShiftRight = etaMuLowEdge + (etaMuHighEdge
1326 - etaMuLowEdge) / 100.;
1333 double etaHighEdge = 0.0;
1335 etaHighEdge = etaLowEdge;
1340 if (etaMuLowEdgeSmallShiftRight >= etaLowEdge) {
1343 LogTrace(
"L1GlobalTrigger") <<
" etaMuIndex \t" << etaMuInd
1344 <<
"\t [ " << etaMuLowEdge <<
", \t" << etaMuHighEdge
1345 <<
"] ==> etaMuJetEG \t"
1347 << etaLowEdge <<
", \t" << etaHighEdge <<
" ]"
1355 unsigned int etaMuIndNeg = etaMuInd | (1 << (ifMuEtaNumberBits - 1));
1360 LogTrace(
"L1GlobalTrigger") <<
" etaMuIndexNeg \t" << etaMuIndNeg
1361 <<
"\t [ " << (-1.0 * etaMuLowEdge) <<
", \t" << (-1.0
1362 * etaMuHighEdge) <<
"] ==> etaMuJetEG \t"
1373 LogTrace(
"L1GlobalTrigger") << std::endl;
1374 LogTrace(
"L1GlobalTrigger") << std::endl;
1383 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1386 <<
"\n---++Conversion tables for phi and eta variables of the trigger objects used in correlation conditions \n"
1396 <<
"\n---+++Phi conversion for muons to jets and e-gamma common phi scale \n"
1400 myCout <<
"Size of look-up table = " << lutPhiMuToJetEgSize <<
"\n"
1403 myCout <<
"| *Initial Phi Hardware Index* "
1404 <<
"|| *Initial Phi Range* ||"
1405 <<
" *Converted Phi Hardware Index* "
1406 <<
"|| *Converted Phi Range* ||" <<
"\n"
1407 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1410 for (
unsigned int indexToConv = 0; indexToConv < lutPhiMuToJetEgSize; ++indexToConv) {
1414 double highEdgeToConv =
1419 double convLowEdge = 0.;
1420 double convHighEdge = 0.;
1428 highEdgeToConv = 0.;
1431 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1432 << indexToConv <<
" | " <<
std::dec << std::setw(3)
1433 << std::left << indexToConv <<
" |[ " << std::setw(10)
1434 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1435 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1436 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1437 << convIndex <<
" | " <<
std::dec << std::setw(6) << convIndex
1438 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1439 convLowEdge)) <<
", |" << std::setw(10) << std::left
1440 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1448 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1450 myCout <<
"\n---+++Phi conversion for muons to ETM phi scale \n"
1454 myCout <<
"Size of look-up table = " << lutPhiMuToEtmSize <<
"\n"
1457 myCout <<
"| *Initial Phi Hardware Index* "
1458 <<
"|| *Initial Phi Range* ||"
1459 <<
" *Converted Phi Hardware Index* "
1460 <<
"|| *Converted Phi Range* ||" <<
"\n"
1461 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1464 for (
unsigned int indexToConv = 0; indexToConv < lutPhiMuToEtmSize; ++indexToConv) {
1468 double highEdgeToConv =
1473 double convLowEdge = 0.;
1474 double convHighEdge = 0.;
1482 highEdgeToConv = 0.;
1485 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1486 << indexToConv <<
" | " <<
std::dec << std::setw(3)
1487 << std::left << indexToConv <<
" |[ " << std::setw(10)
1488 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1489 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1490 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1491 << convIndex <<
" | " <<
std::dec << std::setw(6) << convIndex
1492 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1493 convLowEdge)) <<
", |" << std::setw(10) << std::left
1494 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1502 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1504 myCout <<
"\n---+++Phi conversion for muons to HTM phi scale \n"
1508 myCout <<
"Size of look-up table = " << lutPhiMuToHtmSize <<
"\n"
1511 myCout <<
"| *Initial Phi Hardware Index* "
1512 <<
"|| *Initial Phi Range* ||"
1513 <<
" *Converted Phi Hardware Index* "
1514 <<
"|| *Converted Phi Range* ||" <<
"\n"
1515 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1518 for (
unsigned int indexToConv = 0; indexToConv < lutPhiMuToHtmSize; ++indexToConv) {
1522 double highEdgeToConv =
1527 double convLowEdge = 0.;
1528 double convHighEdge = 0.;
1536 highEdgeToConv = 0.;
1539 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1540 << indexToConv <<
" | " <<
std::dec << std::setw(3)
1541 << std::left << indexToConv <<
" |[ " << std::setw(10)
1542 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1543 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1544 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1545 << convIndex <<
" | " <<
std::dec << std::setw(6) << convIndex
1546 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1547 convLowEdge)) <<
", |" << std::setw(10) << std::left
1548 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1556 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1559 <<
"\n---+++Phi conversion for ETM to jets and e-gamma scale common phi scale \n"
1563 myCout <<
"Size of look-up table = " << lutPhiEtmToJetEgSize <<
"\n"
1566 myCout <<
"| *Initial Phi Hardware Index* "
1567 <<
"|| *Initial Phi Range* ||"
1568 <<
" *Converted Phi Hardware Index* "
1569 <<
"|| *Converted Phi Range* ||" <<
"\n"
1570 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1573 for (
unsigned int indexToConv = 0; indexToConv < lutPhiEtmToJetEgSize; ++indexToConv) {
1575 double lowEdgeToConv =
1582 double convLowEdge = 0.;
1583 double convHighEdge = 0.;
1591 highEdgeToConv = 0.;
1594 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1595 << indexToConv <<
" | " <<
std::dec << std::setw(3)
1596 << std::left << indexToConv <<
" |[ " << std::setw(10)
1597 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1598 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1599 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1600 << convIndex <<
" | " <<
std::dec << std::setw(6) << convIndex
1601 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1602 convLowEdge)) <<
", |" << std::setw(10) << std::left
1603 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1611 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1613 myCout <<
"\n---+++Phi conversion for ETM to HTM phi scale \n" << std::endl;
1616 myCout <<
"Size of look-up table = " << lutPhiEtmToHtmSize <<
"\n"
1619 myCout <<
"| *Initial Phi Hardware Index* "
1620 <<
"|| *Initial Phi Range* ||"
1621 <<
" *Converted Phi Hardware Index* "
1622 <<
"|| *Converted Phi Range* ||" <<
"\n"
1623 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1626 for (
unsigned int indexToConv = 0; indexToConv < lutPhiEtmToHtmSize; ++indexToConv) {
1628 double lowEdgeToConv =
1635 double convLowEdge = 0.;
1636 double convHighEdge = 0.;
1644 highEdgeToConv = 0.;
1647 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1648 << indexToConv <<
" | " <<
std::dec << std::setw(3)
1649 << std::left << indexToConv <<
" |[ " << std::setw(10)
1650 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1651 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1652 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1653 << convIndex <<
" | " <<
std::dec << std::setw(6) << convIndex
1654 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1655 convLowEdge)) <<
", |" << std::setw(10) << std::left
1656 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1665 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1668 <<
"\n---+++Phi conversion for HTM to jets and e-gamma scale common phi scale \n"
1672 myCout <<
"Size of look-up table = " << lutPhiHtmToJetEgSize <<
"\n"
1675 myCout <<
"| *Initial Phi Hardware Index* "
1676 <<
"|| *Initial Phi Range* ||"
1677 <<
" *Converted Phi Hardware Index* "
1678 <<
"|| *Converted Phi Range* ||" <<
"\n"
1679 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1682 for (
unsigned int indexToConv = 0; indexToConv < lutPhiHtmToJetEgSize; ++indexToConv) {
1684 double lowEdgeToConv =
1691 double convLowEdge = 0.;
1692 double convHighEdge = 0.;
1700 highEdgeToConv = 0.;
1703 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1704 << indexToConv <<
" | " <<
std::dec << std::setw(3)
1705 << std::left << indexToConv <<
" |[ " << std::setw(10)
1706 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1707 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1708 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1709 << convIndex <<
" | " <<
std::dec << std::setw(6) << convIndex
1710 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1711 convLowEdge)) <<
", |" << std::setw(10) << std::left
1712 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1726 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1729 <<
"\n---+++Eta conversion for central and tau jets and e-gamma objects to a common central and forward calorimeter eta scale \n"
1733 myCout <<
"Size of look-up table = " << lutEtaCentralToCommonCaloSize
1734 <<
"\n" << std::endl;
1736 myCout <<
"| *Initial Eta Hardware Index* "
1737 <<
"|| *Initial Eta Range* ||"
1738 <<
" *Converted Eta Hardware Index* "
1739 <<
"|| *Converted Eta Range* ||" <<
"\n"
1740 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1743 for (
unsigned int indexToConv = 0; indexToConv
1744 < lutEtaCentralToCommonCaloSize; ++indexToConv) {
1755 double convLowEdge = 0.;
1756 double convHighEdge = 0.;
1764 highEdgeToConv = 0.;
1767 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1768 << indexToConv <<
" | " <<
std::dec << std::setw(3)
1769 << std::left << indexToConv <<
" |[ " << std::setw(10)
1770 << std::left << lowEdgeToConv <<
", |" << std::setw(10)
1771 << std::left << highEdgeToConv <<
" ) | 0x" << std::setw(6)
1772 << std::hex << std::left << convIndex <<
" | " <<
std::dec
1773 << std::setw(6) << convIndex <<
" |[ " << std::setw(10)
1774 << std::left << convLowEdge <<
", |" << std::setw(10)
1775 << std::left << convHighEdge <<
" ) |" << std::right
1783 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1786 <<
"\n---+++Eta conversion for forward jets to a common central and forward calorimeter eta scale \n"
1790 myCout <<
"Size of look-up table = " << lutEtaForJetToCommonCaloSize
1791 <<
"\n" << std::endl;
1793 myCout <<
"| *Initial Eta Hardware Index* "
1794 <<
"|| *Initial Eta Range* ||"
1795 <<
" *Converted Eta Hardware Index* "
1796 <<
"|| *Converted Eta Range* ||" <<
"\n"
1797 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1800 for (
unsigned int indexToConv = 0; indexToConv
1801 < lutEtaForJetToCommonCaloSize; ++indexToConv) {
1806 double highEdgeToConv =
1814 double convLowEdge = 0.;
1815 double convHighEdge = 0.;
1823 highEdgeToConv = 0.;
1826 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1827 << indexToConv <<
" | " <<
std::dec << std::setw(3)
1828 << std::left << indexToConv <<
" |[ " << std::setw(10)
1829 << std::left << lowEdgeToConv <<
", |" << std::setw(10)
1830 << std::left << highEdgeToConv <<
" ) | 0x" << std::setw(6)
1831 << std::hex << std::left << convIndex <<
" | " <<
std::dec
1832 << std::setw(6) << convIndex <<
" |[ " << std::setw(10)
1833 << std::left << convLowEdge <<
", |" << std::setw(10)
1834 << std::left << convHighEdge <<
" ) |" << std::right
1841 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1844 <<
"\n---+++Eta conversion for muons to a common central and forward calorimeter eta scale \n"
1848 myCout <<
"Size of look-up table = " << lutEtaMuToCommonCaloSize <<
"\n"
1851 unsigned int nrBinsEtaMuPerHalf =
1854 myCout <<
"| *Initial Eta Hardware Index* "
1855 <<
"|| *Initial Eta Range* ||"
1856 <<
" *Converted Eta Hardware Index* "
1857 <<
"|| *Converted Eta Range* ||" <<
"\n"
1858 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1861 for (
unsigned int indexToConv = 0; indexToConv < lutEtaMuToCommonCaloSize; ++indexToConv) {
1864 unsigned int iBinOffset = 0;
1865 double etaSign = 1.;
1867 if (indexToConv > nrBinsEtaMuPerHalf) {
1868 iBinOffset = nrBinsEtaMuPerHalf + 1;
1872 double lowEdgeToConv = etaSign
1874 indexToConv - iBinOffset);
1875 double highEdgeToConv = etaSign
1877 indexToConv + 1 - iBinOffset);
1881 double convLowEdge = 0.;
1882 double convHighEdge = 0.;
1890 highEdgeToConv = 0.;
1893 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1894 << indexToConv <<
" | " <<
std::dec << std::setw(3)
1895 << std::left << indexToConv <<
" |[ " << std::setw(10)
1896 << std::left << lowEdgeToConv <<
", |" << std::setw(10)
1897 << std::left << highEdgeToConv <<
" ) | 0x" << std::setw(6)
1898 << std::hex << std::left << convIndex <<
" | " <<
std::dec
1899 << std::setw(6) << convIndex <<
" |[ " << std::setw(10)
1900 << std::left << convLowEdge <<
", |" << std::setw(10)
1901 << std::left << convHighEdge <<
" ) |" << std::right
const L1CaloGeometry * m_l1CaloGeometry
pointer to calorimetry scales - updated in convertl1Scales method
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
unsigned int numberGctForwardEtaBinsPerHalf() const
const double rad2deg(const double &) const
convert phi from rad (-pi, pi] to deg (0, 360)
unsigned int m_nrBinsEtaCommon
number of eta bins for common scale
unsigned int m_nrBinsPhiMu
number of phi bins for muons
std::vector< const std::vector< unsigned int > * > m_pairPhiConvVec
std::vector< unsigned int > m_lutEtaCentralToCommonCalo
unsigned int numberGctHtSumPhiBins() const
std::vector< const unsigned int * > m_pairNrPhiBinsVec
double htSumPhiBinLowEdge(unsigned int phiIndex) const
std::vector< bool > m_pairConvertPhiFirstGtObject
unsigned int numberGctEtSumPhiBins() const
L1GtEtaPhiConversions()
constructor
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
unsigned int m_nrBinsPhiEtm
number of phi bins for ETM
unsigned int numberGctEmJetPhiBins() const
std::vector< unsigned int > m_lutPhiMuToHtm
phi conversion for Mu to HTM
double etaBinCenter(unsigned int etaIndex, bool central=true) const
unsigned int numberGctCentralEtaBinsPerHalf() const
std::string l1GtObjectEnumToString(const L1GtObject &)
const unsigned int gtObjectPairIndex(const L1GtObject &, const L1GtObject &) const
virtual ~L1GtEtaPhiConversions()
destructor
std::vector< unsigned int > m_lutEtaForJetToCommonCalo
eta conversion of ForJet to the common calorimeter eta scale defined before
void convertL1Scales(const L1CaloGeometry *, const L1MuTriggerScales *, const int, const int)
perform all scale conversions
virtual float getHighEdge(unsigned packed) const =0
get the upper edge of bin represented by packed
const L1MuScale * getPhiScale() const
get the phi scale
std::vector< unsigned int > m_lutPhiMuToEtm
phi conversion for Mu to ETM
virtual float getValue(unsigned i) const =0
get value of the underlying vector for bin i
const unsigned int gtObjectNrBinsPhi(const L1GtObject &) const
return the number of phi bins for a GT object
static const unsigned int badIndex
int m_verbosity
verbosity level
std::vector< std::pair< L1GtObject, L1GtObject > > m_gtObjectPairVec
vector of all L1GtObject pairs
unsigned int m_nrBinsPhiJetEg
number of phi bins for calorimeter objects (*Jet, *EG)
const bool convertEtaIndex(const L1GtObject &, const unsigned int initialIndex, unsigned int &convertedIndex) const
static const double PiConversion
std::vector< unsigned int > m_lutPhiMuToJetEg
phi conversion for Mu to (*Jet, EG)
unsigned int m_nrBinsPhiHtm
number of phi bins for HTM
bool m_isDebugEnabled
cached edm::isDebugEnabled()
const L1MuTriggerScales * m_l1MuTriggerScales
pointer to muon scales - updated in convertl1Scales method
double etSumPhiBinLowEdge(unsigned int phiIndex) const
virtual unsigned getNBins() const =0
get number of bins
std::vector< unsigned int > m_lutPhiEtmToHtm
phi conversion for ETM to HTM
const bool convertPhiIndex(const unsigned int pairIndex, const unsigned int positionPair, const unsigned int initialIndex, unsigned int &convertedIndex) const
virtual void print(std::ostream &myCout) const
print all the performed conversions
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
double emJetPhiBinLowEdge(unsigned int phiIndex) const
double htSumPhiBinHighEdge(unsigned int phiIndex) const
std::vector< unsigned int > m_lutPhiJetEgToJetEg
std::vector< unsigned int > m_lutPhiHtmToJetEg
phi conversion for HTM to (*Jet, EG)
std::vector< unsigned int > m_lutEtaMuToCommonCalo
eta conversion of Mu to the common calorimeter eta scale defined before
unsigned int globalEtaIndex(const double &etaValue) const
std::vector< unsigned int > m_lutPhiEtmToJetEg
phi conversion for ETM to (*Jet, EG)
double emJetPhiBinHighEdge(unsigned int phiIndex) const
double etSumPhiBinHighEdge(unsigned int phiIndex) const