41 m_nrBinsPhiMu(0), m_nrBinsPhiJetEg(0), m_nrBinsPhiEtm(0),
42 m_nrBinsPhiHtm(0), m_nrBinsEtaCommon(0), m_verbosity(0),
50 std::pair < L1GtObject, L1GtObject > gtObjPair;
59 gtObjPair = std::make_pair(
Mu,
CenJet);
65 gtObjPair = std::make_pair(
CenJet,
Mu);
72 gtObjPair = std::make_pair(
Mu,
ForJet);
78 gtObjPair = std::make_pair(
ForJet,
Mu);
85 gtObjPair = std::make_pair(
Mu,
TauJet);
91 gtObjPair = std::make_pair(
TauJet,
Mu);
111 gtObjPair = std::make_pair(
Mu,
IsoEG);
117 gtObjPair = std::make_pair(
IsoEG,
Mu);
124 gtObjPair = std::make_pair(
Mu,
ETM);
130 gtObjPair = std::make_pair(
ETM,
Mu);
137 gtObjPair = std::make_pair(
Mu,
HTM);
143 gtObjPair = std::make_pair(
HTM,
Mu);
203 gtObjPair = std::make_pair(
ETM,
IsoEG);
209 gtObjPair = std::make_pair(
IsoEG,
ETM);
269 gtObjPair = std::make_pair(
HTM,
IsoEG);
275 gtObjPair = std::make_pair(
IsoEG,
HTM);
284 gtObjPair = std::make_pair(
ETM,
HTM);
290 gtObjPair = std::make_pair(
HTM,
ETM);
431 LogTrace(
"L1GlobalTrigger") <<
"\nm_gtObjectPairVec size: "
434 unsigned int iPair = 0;
436 for (std::vector<std::pair<L1GtObject, L1GtObject> >::const_iterator
439 LogTrace(
"L1GlobalTrigger") <<
"m_gtObjectPairVec vector element ["
442 <<
"], \t\tpair index = " << iPair << std::endl;
463 std::pair < L1GtObject, L1GtObject > gtObjPair;
464 gtObjPair = std::make_pair(obj0, obj1);
470 unsigned int iPair = 0;
471 for (std::vector<std::pair<L1GtObject, L1GtObject> >::const_iterator cIter =
474 if (*cIter == gtObjPair) {
475 LogTrace(
"L1GlobalTrigger") <<
"\n Index for pair ["
478 << iPair << std::endl;
494 const unsigned int positionPair,
const unsigned int initialIndex,
495 unsigned int& convertedIndex)
const {
498 bool conversionStatus =
false;
505 conversionStatus =
false;
508 LogTrace(
"L1GlobalTrigger") << (positionPair ?
" Second"
509 :
"\n First") <<
" object from pair " << pairIndex
510 <<
": initial phi index " << initialIndex <<
" >= "
512 <<
" Conversion failed." << std::endl;
516 LogTrace(
"L1GlobalTrigger") << (positionPair ?
" Second"
517 :
"\n First") <<
" object from pair " << pairIndex
518 <<
": initial phi index " << initialIndex
519 <<
" within scale size " <<
527 switch (positionPair) {
535 conversionStatus =
true;
539 << (positionPair ?
" Second" :
"\n First")
540 <<
" object from pair " << pairIndex
541 <<
": initial phi index " << initialIndex
542 <<
" converted to " << newIndex << std::endl;
547 conversionStatus =
false;
551 << (positionPair ?
" Second" :
"\n First")
552 <<
" object from pair " << pairIndex
553 <<
": converted phi index " << newIndex
554 <<
"is equal to badIndex " <<
badIndex
555 <<
" Conversion failed." << std::endl;
560 newIndex = initialIndex;
561 conversionStatus =
true;
564 LogTrace(
"L1GlobalTrigger") << (positionPair ?
" Second"
565 :
"\n First") <<
" object from pair " << pairIndex
566 <<
": initial phi index " << initialIndex
567 <<
" not requested to be converted, return index "
568 << newIndex << std::endl;
577 newIndex = initialIndex;
578 conversionStatus =
true;
581 LogTrace(
"L1GlobalTrigger") << (positionPair ?
" Second"
582 :
"\n First") <<
" object from pair " << pairIndex
583 <<
": initial phi index " << initialIndex
584 <<
" not requested to be converted, return index, return index "
585 << newIndex << std::endl;
593 conversionStatus =
true;
597 << (positionPair ?
" Second" :
"\n First")
598 <<
" object from pair " << pairIndex
599 <<
": initial phi index " << initialIndex
600 <<
" converted to " << newIndex << std::endl;
605 conversionStatus =
false;
609 << (positionPair ?
" Second" :
"\n First")
610 <<
" object from pair " << pairIndex
611 <<
": converted phi index " << newIndex
612 <<
"is equal to badIndex " <<
badIndex
613 <<
" Conversion failed." << std::endl;
626 <<
"\n Wrong position in the object pair " << positionPair
627 <<
"\n Programming error - position must be either 0 or 1..."
635 convertedIndex = newIndex;
636 return conversionStatus;
641 const unsigned int initialIndex,
unsigned int& convertedIndex)
const {
644 bool conversionStatus =
false;
655 conversionStatus =
false;
658 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
660 <<
" has initial eta index " << initialIndex
662 <<
" scale size. Conversion failed." << std::endl;
671 conversionStatus =
true;
674 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
676 <<
" initial eta index " << initialIndex
677 <<
" (within scale size "
679 <<
") converted to " << newIndex << std::endl;
684 conversionStatus =
false;
687 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
689 <<
" initial eta index " << initialIndex
690 <<
" (within scale size "
692 <<
") converted to badIndex" << newIndex
693 <<
" Conversion failed." << std::endl;
712 conversionStatus =
false;
715 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
717 <<
" has initial eta index " << initialIndex
719 <<
" scale size. Conversion failed." << std::endl;
728 conversionStatus =
true;
731 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
733 <<
" initial eta index " << initialIndex
734 <<
" (within scale size "
736 <<
") converted to " << newIndex << std::endl;
741 conversionStatus =
false;
744 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
746 <<
" initial eta index " << initialIndex
747 <<
" (within scale size "
749 <<
") converted to badIndex" << newIndex
750 <<
" Conversion failed." << std::endl;
766 conversionStatus =
false;
769 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
771 <<
" has initial eta index " << initialIndex
773 <<
" scale size. Conversion failed." << std::endl;
782 conversionStatus =
true;
785 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
787 <<
" initial eta index " << initialIndex
788 <<
" (within scale size "
790 <<
") converted to " << newIndex << std::endl;
795 conversionStatus =
false;
798 LogTrace(
"L1GlobalTrigger") <<
" L1 GT object "
800 <<
" initial eta index " << initialIndex
801 <<
" (within scale size "
803 <<
") converted to badIndex" << newIndex
804 <<
" Conversion failed." << std::endl;
826 conversionStatus =
false;
832 gtObject)) <<
"' is not a recognized L1GtObject. "
833 <<
"\n Conversion failed. " << std::endl;
834 conversionStatus =
false;
840 convertedIndex = newIndex;
842 return conversionStatus;
896 <<
"' is not a recognized L1GtObject. "
897 <<
"\n Return 0 bins.";
908 std::pair < L1GtObject, L1GtObject > gtObjPair;
909 gtObjPair = std::make_pair(obj0, obj1);
916 for (std::vector<std::pair<L1GtObject, L1GtObject> >::const_iterator cIter =
919 if (*cIter == gtObjPair) {
920 LogTrace(
"L1GlobalTrigger") <<
"\n gtObjectNrBinsPhi ["
935 const unsigned int pairIndex)
const {
939 <<
"\n gtObjectNrBinsPhi for L1 GT object pair index "
953 const int ifCaloEtaNumberBits,
const int ifMuEtaNumberBits) {
984 for (
unsigned int phiMuInd = 0; phiMuInd <
m_nrBinsPhiMu; ++phiMuInd) {
992 double phiMuLowEdgeSmallShiftRight = phiMuLowEdge + (phiMuHighEdge
993 - phiMuLowEdge) / 100.;
999 for (
unsigned int iBin = nrBins;; --iBin) {
1004 if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
1007 LogTrace(
"L1GlobalTrigger") <<
" phiMuIndex \t" << phiMuInd
1008 <<
" [ " << phiMuLowEdge <<
" \t, "
1009 << phiMuHighEdge <<
"] \t==>\t phiMuJetEG \t"
1011 << phiLowEdge <<
"\t, " << phiHighEdge <<
" ]"
1022 for (
unsigned int iBin = nrBins;; --iBin) {
1027 if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
1030 LogTrace(
"L1GlobalTrigger") <<
" phiMuIndex \t" << phiMuInd
1031 <<
" [ " << phiMuLowEdge <<
" \t, "
1032 << phiMuHighEdge <<
"] \t==>\t phiMuToEtm \t"
1034 <<
"\t, " << phiHighEdge <<
" ]" << std::endl;
1044 for (
unsigned int iBin = nrBins;; --iBin) {
1049 if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
1052 LogTrace(
"L1GlobalTrigger") <<
" phiMuIndex \t" << phiMuInd
1053 <<
" [ " << phiMuLowEdge <<
" \t, "
1054 << phiMuHighEdge <<
"] \t==>\t phiMuToHtm \t"
1056 <<
"\t, " << phiHighEdge <<
" ]" << std::endl;
1062 LogTrace(
"L1GlobalTrigger") << std::endl;
1067 LogTrace(
"L1GlobalTrigger") <<
"Mu phi conversions" << std::endl;
1069 LogTrace(
"L1GlobalTrigger") <<
" Mu phiIndex \t" << iBin
1070 <<
"\t converted to index:"
1077 LogTrace(
"L1GlobalTrigger") << std::endl;
1091 for (
unsigned int phiEtmInd = 0; phiEtmInd <
m_nrBinsPhiEtm; ++phiEtmInd) {
1097 double phiEtmLowEdgeSmallShiftRight = phiEtmLowEdge + (phiEtmHighEdge
1098 - phiEtmLowEdge) / 100.;
1104 for (
unsigned int iBin = nrBins;; --iBin) {
1109 if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
1112 LogTrace(
"L1GlobalTrigger") <<
" phiEtmIndex \t" << phiEtmInd
1113 <<
" [ " << phiEtmLowEdge <<
" \t, "
1114 << phiEtmHighEdge <<
"] \t==>\t phiEtmJetEG \t"
1116 << phiLowEdge <<
"\t, " << phiHighEdge <<
" ]"
1127 for (
unsigned int iBin = nrBins;; --iBin) {
1132 if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
1135 LogTrace(
"L1GlobalTrigger") <<
" phiEtmIndex \t" << phiEtmInd
1136 <<
" [ " << phiEtmLowEdge <<
" \t, "
1137 << phiEtmHighEdge <<
"] \t==>\t phiEtmToHtm \t"
1139 <<
"\t, " << phiHighEdge <<
" ]" << std::endl;
1145 LogTrace(
"L1GlobalTrigger") << std::endl;
1157 for (
unsigned int phiHtmInd = 0; phiHtmInd <
m_nrBinsPhiHtm; ++phiHtmInd) {
1163 double phiHtmLowEdgeSmallShiftRight = phiHtmLowEdge + (phiHtmHighEdge
1164 - phiHtmLowEdge) / 100.;
1168 for (
unsigned int iBin = nrBins;; --iBin) {
1173 if (phiHtmLowEdgeSmallShiftRight >= phiLowEdge) {
1176 LogTrace(
"L1GlobalTrigger") <<
" phiHtmIndex \t" << phiHtmInd
1177 <<
" [ " << phiHtmLowEdge <<
" \t, "
1178 << phiHtmHighEdge <<
"] \t==>\t phiHtmJetEG \t"
1180 << phiLowEdge <<
"\t, " << phiHighEdge <<
" ]"
1214 unsigned int nrGctCentralEtaBinsPerHalf =
1217 unsigned int nrGctForwardEtaBinsPerHalf =
1220 unsigned int nrGctTotalEtaBinsPerHalf = nrGctCentralEtaBinsPerHalf
1221 + nrGctForwardEtaBinsPerHalf;
1232 <<
" \nEta conversion: CenJet/TauJet & IsoEG/NoIsoEG to a common calorimeter scale\n"
1237 (nrGctCentralEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))),
1240 for (
unsigned int etaInd = 0; etaInd < nrGctCentralEtaBinsPerHalf; ++etaInd) {
1247 LogTrace(
"L1GlobalTrigger") <<
" etaIndex " << etaInd <<
"\t [hex: "
1248 << std::hex << etaInd <<
"] " << std::dec
1249 <<
" ==> etaIndexGlobal " << globalIndex << std::endl;
1252 unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1257 LogTrace(
"L1GlobalTrigger") <<
" etaIndex " << etaIndNeg
1258 <<
"\t [hex: " << std::hex << etaIndNeg <<
"] " << std::dec
1259 <<
" ==> etaIndexGlobal " << globalIndex << std::endl;
1269 <<
" \nEta conversion: ForJet to a common calorimeter scale\n"
1274 (nrGctForwardEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))),
1277 for (
unsigned int etaInd = 0; etaInd < nrGctForwardEtaBinsPerHalf; ++etaInd) {
1284 LogTrace(
"L1GlobalTrigger") <<
" etaIndex " << etaInd <<
"\t [hex: "
1285 << std::hex << etaInd <<
"] " << std::dec
1286 <<
" ==> etaIndexGlobal " << globalIndex << std::endl;
1289 unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1294 LogTrace(
"L1GlobalTrigger") <<
" etaIndex " << etaIndNeg <<
"\t [hex: "
1295 << std::hex << etaIndNeg <<
"] " << std::dec
1296 <<
" ==> etaIndexGlobal " << globalIndex << std::endl;
1306 <<
" \nEta conversion: Mu to a common calorimeter scale\n"
1310 unsigned int nrBinsEtaMuPerHalf =
1312 LogTrace(
"L1GlobalTrigger") <<
" \nnrBinsEtaMuPerHalf = "
1313 << nrBinsEtaMuPerHalf <<
"\n" << std::endl;
1317 (nrBinsEtaMuPerHalf | (1 << (ifMuEtaNumberBits - 1))),
badIndex);
1319 for (
unsigned int etaMuInd = 0; etaMuInd < nrBinsEtaMuPerHalf; ++etaMuInd) {
1327 double etaMuLowEdgeSmallShiftRight = etaMuLowEdge + (etaMuHighEdge
1328 - etaMuLowEdge) / 100.;
1335 double etaHighEdge = 0.0;
1337 etaHighEdge = etaLowEdge;
1342 if (etaMuLowEdgeSmallShiftRight >= etaLowEdge) {
1345 LogTrace(
"L1GlobalTrigger") <<
" etaMuIndex \t" << etaMuInd
1346 <<
"\t [ " << etaMuLowEdge <<
", \t" << etaMuHighEdge
1347 <<
"] ==> etaMuJetEG \t"
1349 << etaLowEdge <<
", \t" << etaHighEdge <<
" ]"
1357 unsigned int etaMuIndNeg = etaMuInd | (1 << (ifMuEtaNumberBits - 1));
1362 LogTrace(
"L1GlobalTrigger") <<
" etaMuIndexNeg \t" << etaMuIndNeg
1363 <<
"\t [ " << (-1.0 * etaMuLowEdge) <<
", \t" << (-1.0
1364 * etaMuHighEdge) <<
"] ==> etaMuJetEG \t"
1375 LogTrace(
"L1GlobalTrigger") << std::endl;
1376 LogTrace(
"L1GlobalTrigger") << std::endl;
1385 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1388 <<
"\n---++Conversion tables for phi and eta variables of the trigger objects used in correlation conditions \n"
1398 <<
"\n---+++Phi conversion for muons to jets and e-gamma common phi scale \n"
1402 myCout <<
"Size of look-up table = " << lutPhiMuToJetEgSize <<
"\n"
1405 myCout <<
"| *Initial Phi Hardware Index* "
1406 <<
"|| *Initial Phi Range* ||"
1407 <<
" *Converted Phi Hardware Index* "
1408 <<
"|| *Converted Phi Range* ||" <<
"\n"
1409 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1412 for (
unsigned int indexToConv = 0; indexToConv < lutPhiMuToJetEgSize; ++indexToConv) {
1416 double highEdgeToConv =
1421 double convLowEdge = 0.;
1422 double convHighEdge = 0.;
1430 highEdgeToConv = 0.;
1433 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1434 << indexToConv <<
" | " << std::dec << std::setw(3)
1435 << std::left << indexToConv <<
" |[ " << std::setw(10)
1436 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1437 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1438 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1439 << convIndex <<
" | " << std::dec << std::setw(6) << convIndex
1440 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1441 convLowEdge)) <<
", |" << std::setw(10) << std::left
1442 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1450 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1452 myCout <<
"\n---+++Phi conversion for muons to ETM phi scale \n"
1456 myCout <<
"Size of look-up table = " << lutPhiMuToEtmSize <<
"\n"
1459 myCout <<
"| *Initial Phi Hardware Index* "
1460 <<
"|| *Initial Phi Range* ||"
1461 <<
" *Converted Phi Hardware Index* "
1462 <<
"|| *Converted Phi Range* ||" <<
"\n"
1463 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1466 for (
unsigned int indexToConv = 0; indexToConv < lutPhiMuToEtmSize; ++indexToConv) {
1470 double highEdgeToConv =
1475 double convLowEdge = 0.;
1476 double convHighEdge = 0.;
1484 highEdgeToConv = 0.;
1487 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1488 << indexToConv <<
" | " << std::dec << std::setw(3)
1489 << std::left << indexToConv <<
" |[ " << std::setw(10)
1490 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1491 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1492 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1493 << convIndex <<
" | " << std::dec << std::setw(6) << convIndex
1494 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1495 convLowEdge)) <<
", |" << std::setw(10) << std::left
1496 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1504 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1506 myCout <<
"\n---+++Phi conversion for muons to HTM phi scale \n"
1510 myCout <<
"Size of look-up table = " << lutPhiMuToHtmSize <<
"\n"
1513 myCout <<
"| *Initial Phi Hardware Index* "
1514 <<
"|| *Initial Phi Range* ||"
1515 <<
" *Converted Phi Hardware Index* "
1516 <<
"|| *Converted Phi Range* ||" <<
"\n"
1517 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1520 for (
unsigned int indexToConv = 0; indexToConv < lutPhiMuToHtmSize; ++indexToConv) {
1524 double highEdgeToConv =
1529 double convLowEdge = 0.;
1530 double convHighEdge = 0.;
1538 highEdgeToConv = 0.;
1541 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1542 << indexToConv <<
" | " << std::dec << std::setw(3)
1543 << std::left << indexToConv <<
" |[ " << std::setw(10)
1544 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1545 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1546 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1547 << convIndex <<
" | " << std::dec << std::setw(6) << convIndex
1548 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1549 convLowEdge)) <<
", |" << std::setw(10) << std::left
1550 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1558 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1561 <<
"\n---+++Phi conversion for ETM to jets and e-gamma scale common phi scale \n"
1565 myCout <<
"Size of look-up table = " << lutPhiEtmToJetEgSize <<
"\n"
1568 myCout <<
"| *Initial Phi Hardware Index* "
1569 <<
"|| *Initial Phi Range* ||"
1570 <<
" *Converted Phi Hardware Index* "
1571 <<
"|| *Converted Phi Range* ||" <<
"\n"
1572 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1575 for (
unsigned int indexToConv = 0; indexToConv < lutPhiEtmToJetEgSize; ++indexToConv) {
1577 double lowEdgeToConv =
1584 double convLowEdge = 0.;
1585 double convHighEdge = 0.;
1593 highEdgeToConv = 0.;
1596 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1597 << indexToConv <<
" | " << std::dec << std::setw(3)
1598 << std::left << indexToConv <<
" |[ " << std::setw(10)
1599 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1600 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1601 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1602 << convIndex <<
" | " << std::dec << std::setw(6) << convIndex
1603 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1604 convLowEdge)) <<
", |" << std::setw(10) << std::left
1605 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1613 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1615 myCout <<
"\n---+++Phi conversion for ETM to HTM phi scale \n" << std::endl;
1618 myCout <<
"Size of look-up table = " << lutPhiEtmToHtmSize <<
"\n"
1621 myCout <<
"| *Initial Phi Hardware Index* "
1622 <<
"|| *Initial Phi Range* ||"
1623 <<
" *Converted Phi Hardware Index* "
1624 <<
"|| *Converted Phi Range* ||" <<
"\n"
1625 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1628 for (
unsigned int indexToConv = 0; indexToConv < lutPhiEtmToHtmSize; ++indexToConv) {
1630 double lowEdgeToConv =
1637 double convLowEdge = 0.;
1638 double convHighEdge = 0.;
1646 highEdgeToConv = 0.;
1649 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1650 << indexToConv <<
" | " << std::dec << std::setw(3)
1651 << std::left << indexToConv <<
" |[ " << std::setw(10)
1652 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1653 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1654 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1655 << convIndex <<
" | " << std::dec << std::setw(6) << convIndex
1656 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1657 convLowEdge)) <<
", |" << std::setw(10) << std::left
1658 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1667 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1670 <<
"\n---+++Phi conversion for HTM to jets and e-gamma scale common phi scale \n"
1674 myCout <<
"Size of look-up table = " << lutPhiHtmToJetEgSize <<
"\n"
1677 myCout <<
"| *Initial Phi Hardware Index* "
1678 <<
"|| *Initial Phi Range* ||"
1679 <<
" *Converted Phi Hardware Index* "
1680 <<
"|| *Converted Phi Range* ||" <<
"\n"
1681 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1684 for (
unsigned int indexToConv = 0; indexToConv < lutPhiHtmToJetEgSize; ++indexToConv) {
1686 double lowEdgeToConv =
1693 double convLowEdge = 0.;
1694 double convHighEdge = 0.;
1702 highEdgeToConv = 0.;
1705 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1706 << indexToConv <<
" | " << std::dec << std::setw(3)
1707 << std::left << indexToConv <<
" |[ " << std::setw(10)
1708 << std::left << (
rad2deg(lowEdgeToConv)) <<
", |"
1709 << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1710 <<
" ) | 0x" << std::setw(6) << std::hex << std::left
1711 << convIndex <<
" | " << std::dec << std::setw(6) << convIndex
1712 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(
1713 convLowEdge)) <<
", |" << std::setw(10) << std::left
1714 << (
rad2deg(convHighEdge)) <<
" ) |" << std::right
1728 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1731 <<
"\n---+++Eta conversion for central and tau jets and e-gamma objects to a common central and forward calorimeter eta scale \n"
1735 myCout <<
"Size of look-up table = " << lutEtaCentralToCommonCaloSize
1736 <<
"\n" << std::endl;
1738 myCout <<
"| *Initial Eta Hardware Index* "
1739 <<
"|| *Initial Eta Range* ||"
1740 <<
" *Converted Eta Hardware Index* "
1741 <<
"|| *Converted Eta Range* ||" <<
"\n"
1742 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1745 for (
unsigned int indexToConv = 0; indexToConv
1746 < lutEtaCentralToCommonCaloSize; ++indexToConv) {
1757 double convLowEdge = 0.;
1758 double convHighEdge = 0.;
1766 highEdgeToConv = 0.;
1769 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1770 << indexToConv <<
" | " << std::dec << std::setw(3)
1771 << std::left << indexToConv <<
" |[ " << std::setw(10)
1772 << std::left << lowEdgeToConv <<
", |" << std::setw(10)
1773 << std::left << highEdgeToConv <<
" ) | 0x" << std::setw(6)
1774 << std::hex << std::left << convIndex <<
" | " << std::dec
1775 << std::setw(6) << convIndex <<
" |[ " << std::setw(10)
1776 << std::left << convLowEdge <<
", |" << std::setw(10)
1777 << std::left << convHighEdge <<
" ) |" << std::right
1785 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1788 <<
"\n---+++Eta conversion for forward jets to a common central and forward calorimeter eta scale \n"
1792 myCout <<
"Size of look-up table = " << lutEtaForJetToCommonCaloSize
1793 <<
"\n" << std::endl;
1795 myCout <<
"| *Initial Eta Hardware Index* "
1796 <<
"|| *Initial Eta Range* ||"
1797 <<
" *Converted Eta Hardware Index* "
1798 <<
"|| *Converted Eta Range* ||" <<
"\n"
1799 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1802 for (
unsigned int indexToConv = 0; indexToConv
1803 < lutEtaForJetToCommonCaloSize; ++indexToConv) {
1808 double highEdgeToConv =
1816 double convLowEdge = 0.;
1817 double convHighEdge = 0.;
1825 highEdgeToConv = 0.;
1828 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1829 << indexToConv <<
" | " << std::dec << std::setw(3)
1830 << std::left << indexToConv <<
" |[ " << std::setw(10)
1831 << std::left << lowEdgeToConv <<
", |" << std::setw(10)
1832 << std::left << highEdgeToConv <<
" ) | 0x" << std::setw(6)
1833 << std::hex << std::left << convIndex <<
" | " << std::dec
1834 << std::setw(6) << convIndex <<
" |[ " << std::setw(10)
1835 << std::left << convLowEdge <<
", |" << std::setw(10)
1836 << std::left << convHighEdge <<
" ) |" << std::right
1843 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1846 <<
"\n---+++Eta conversion for muons to a common central and forward calorimeter eta scale \n"
1850 myCout <<
"Size of look-up table = " << lutEtaMuToCommonCaloSize <<
"\n"
1853 unsigned int nrBinsEtaMuPerHalf =
1856 myCout <<
"| *Initial Eta Hardware Index* "
1857 <<
"|| *Initial Eta Range* ||"
1858 <<
" *Converted Eta Hardware Index* "
1859 <<
"|| *Converted Eta Range* ||" <<
"\n"
1860 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|"
1863 for (
unsigned int indexToConv = 0; indexToConv < lutEtaMuToCommonCaloSize; ++indexToConv) {
1866 unsigned int iBinOffset = 0;
1867 double etaSign = 1.;
1869 if (indexToConv > nrBinsEtaMuPerHalf) {
1870 iBinOffset = nrBinsEtaMuPerHalf + 1;
1874 double lowEdgeToConv = etaSign
1876 indexToConv - iBinOffset);
1877 double highEdgeToConv = etaSign
1879 indexToConv + 1 - iBinOffset);
1883 double convLowEdge = 0.;
1884 double convHighEdge = 0.;
1892 highEdgeToConv = 0.;
1895 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left
1896 << indexToConv <<
" | " << std::dec << std::setw(3)
1897 << std::left << indexToConv <<
" |[ " << std::setw(10)
1898 << std::left << lowEdgeToConv <<
", |" << std::setw(10)
1899 << std::left << highEdgeToConv <<
" ) | 0x" << std::setw(6)
1900 << std::hex << std::left << convIndex <<
" | " << std::dec
1901 << std::setw(6) << convIndex <<
" |[ " << std::setw(10)
1902 << std::left << convLowEdge <<
", |" << std::setw(10)
1903 << 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