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;
56 gtObjPair = std::make_pair(
Mu,
CenJet);
62 gtObjPair = std::make_pair(
CenJet,
Mu);
69 gtObjPair = std::make_pair(
Mu,
ForJet);
75 gtObjPair = std::make_pair(
ForJet,
Mu);
82 gtObjPair = std::make_pair(
Mu,
TauJet);
88 gtObjPair = std::make_pair(
TauJet,
Mu);
108 gtObjPair = std::make_pair(
Mu,
IsoEG);
114 gtObjPair = std::make_pair(
IsoEG,
Mu);
121 gtObjPair = std::make_pair(
Mu,
ETM);
127 gtObjPair = std::make_pair(
ETM,
Mu);
134 gtObjPair = std::make_pair(
Mu,
HTM);
140 gtObjPair = std::make_pair(
HTM,
Mu);
200 gtObjPair = std::make_pair(
ETM,
IsoEG);
206 gtObjPair = std::make_pair(
IsoEG,
ETM);
266 gtObjPair = std::make_pair(
HTM,
IsoEG);
272 gtObjPair = std::make_pair(
IsoEG,
HTM);
280 gtObjPair = std::make_pair(
ETM,
HTM);
286 gtObjPair = std::make_pair(
HTM,
ETM);
430 unsigned int iPair = 0;
432 for (std::vector<std::pair<L1GtObject, L1GtObject>>::const_iterator cIter =
436 <<
"m_gtObjectPairVec vector element [" 439 <<
"], \t\tpair index = " << iPair << std::endl;
458 std::pair<L1GtObject, L1GtObject> gtObjPair;
459 gtObjPair = std::make_pair(obj0, obj1);
465 unsigned int iPair = 0;
466 for (std::vector<std::pair<L1GtObject, L1GtObject>>::const_iterator cIter =
470 if (*cIter == gtObjPair) {
489 const unsigned int pairIndex,
const unsigned int positionPair,
490 const unsigned int initialIndex,
unsigned int &convertedIndex)
const {
493 bool conversionStatus =
false;
500 conversionStatus =
false;
504 << (positionPair ?
" Second" :
"\n First") <<
" object from pair " 505 << pairIndex <<
": initial phi index " << initialIndex
507 <<
" Conversion failed." << std::endl;
512 << (positionPair ?
" Second" :
"\n First") <<
" object from pair " 513 << pairIndex <<
": initial phi index " << initialIndex
514 <<
" within scale size " 520 switch (positionPair) {
528 conversionStatus =
true;
532 << (positionPair ?
" Second" :
"\n First")
533 <<
" object from pair " << pairIndex <<
": initial phi index " 534 << initialIndex <<
" converted to " << newIndex << std::endl;
539 conversionStatus =
false;
543 << (positionPair ?
" Second" :
"\n First")
544 <<
" object from pair " << pairIndex <<
": converted phi index " 545 << newIndex <<
"is equal to badIndex " <<
badIndex 546 <<
" Conversion failed." << std::endl;
551 newIndex = initialIndex;
552 conversionStatus =
true;
556 << (positionPair ?
" Second" :
"\n First")
557 <<
" object from pair " << pairIndex <<
": initial phi index " 558 << initialIndex <<
" not requested to be converted, return index " 559 << newIndex << std::endl;
568 newIndex = initialIndex;
569 conversionStatus =
true;
573 << (positionPair ?
" Second" :
"\n First")
574 <<
" object from pair " << pairIndex <<
": initial phi index " 576 <<
" not requested to be converted, return index, return index " 577 << newIndex << std::endl;
585 conversionStatus =
true;
589 << (positionPair ?
" Second" :
"\n First")
590 <<
" object from pair " << pairIndex <<
": initial phi index " 591 << initialIndex <<
" converted to " << newIndex << std::endl;
596 conversionStatus =
false;
600 << (positionPair ?
" Second" :
"\n First")
601 <<
" object from pair " << pairIndex <<
": converted phi index " 602 << newIndex <<
"is equal to badIndex " <<
badIndex 603 <<
" Conversion failed." << std::endl;
615 <<
"\n Wrong position in the object pair " << positionPair
616 <<
"\n Programming error - position must be either 0 or 1..." 623 convertedIndex = newIndex;
624 return conversionStatus;
629 const unsigned int initialIndex,
630 unsigned int &convertedIndex)
const {
633 bool conversionStatus =
false;
644 conversionStatus =
false;
649 <<
" has initial eta index " << initialIndex
651 <<
" scale size. Conversion failed." << std::endl;
660 conversionStatus =
true;
665 <<
" initial eta index " << initialIndex <<
" (within scale size " 667 << newIndex << std::endl;
672 conversionStatus =
false;
677 <<
" initial eta index " << initialIndex <<
" (within scale size " 679 << newIndex <<
" Conversion failed." << std::endl;
696 conversionStatus =
false;
701 <<
" has initial eta index " << initialIndex
703 <<
" scale size. Conversion failed." << std::endl;
712 conversionStatus =
true;
717 <<
" initial eta index " << initialIndex <<
" (within scale size " 719 << newIndex << std::endl;
724 conversionStatus =
false;
729 <<
" initial eta index " << initialIndex <<
" (within scale size " 731 <<
") converted to badIndex" << newIndex <<
" Conversion failed." 746 conversionStatus =
false;
751 <<
" has initial eta index " << initialIndex
753 <<
" scale size. Conversion failed." << std::endl;
762 conversionStatus =
true;
767 <<
" initial eta index " << initialIndex <<
" (within scale size " 769 << newIndex << std::endl;
774 conversionStatus =
false;
779 <<
" initial eta index " << initialIndex <<
" (within scale size " 781 <<
") converted to badIndex" << newIndex <<
" Conversion failed." 802 conversionStatus =
false;
807 <<
"' is not a recognized L1GtObject. " 808 <<
"\n Conversion failed. " << std::endl;
809 conversionStatus =
false;
814 convertedIndex = newIndex;
816 return conversionStatus;
862 <<
"' is not a recognized L1GtObject. " 863 <<
"\n Return 0 bins.";
873 std::pair<L1GtObject, L1GtObject> gtObjPair;
874 gtObjPair = std::make_pair(obj0, obj1);
881 for (std::vector<std::pair<L1GtObject, L1GtObject>>::const_iterator cIter =
885 if (*cIter == gtObjPair) {
905 <<
"\n gtObjectNrBinsPhi for L1 GT object pair index " << pairIndex
916 const int ifMuEtaNumberBits) {
948 for (
unsigned int phiMuInd = 0; phiMuInd <
m_nrBinsPhiMu; ++phiMuInd) {
950 double phiMuLowEdge =
952 double phiMuHighEdge =
956 double phiMuLowEdgeSmallShiftRight =
957 phiMuLowEdge + (phiMuHighEdge - phiMuLowEdge) / 100.;
963 for (
unsigned int iBin = nrBins;; --iBin) {
968 if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
972 <<
" phiMuIndex \t" << phiMuInd <<
" [ " << phiMuLowEdge <<
" \t, " 973 << phiMuHighEdge <<
"] \t==>\t phiMuJetEG \t" 975 << phiHighEdge <<
" ]" << std::endl;
985 for (
unsigned int iBin = nrBins;; --iBin) {
990 if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
994 <<
" phiMuIndex \t" << phiMuInd <<
" [ " << phiMuLowEdge <<
" \t, " 995 << phiMuHighEdge <<
"] \t==>\t phiMuToEtm \t" 997 << phiHighEdge <<
" ]" << std::endl;
1007 for (
unsigned int iBin = nrBins;; --iBin) {
1012 if (phiMuLowEdgeSmallShiftRight >= phiLowEdge) {
1016 <<
" phiMuIndex \t" << phiMuInd <<
" [ " << phiMuLowEdge <<
" \t, " 1017 << phiMuHighEdge <<
"] \t==>\t phiMuToHtm \t" 1019 << phiHighEdge <<
" ]" << std::endl;
1025 LogTrace(
"L1GlobalTrigger") << std::endl;
1029 LogTrace(
"L1GlobalTrigger") <<
"Mu phi conversions" << std::endl;
1032 <<
" Mu phiIndex \t" << iBin <<
"\t converted to index:" 1037 LogTrace(
"L1GlobalTrigger") << std::endl;
1050 for (
unsigned int phiEtmInd = 0; phiEtmInd <
m_nrBinsPhiEtm; ++phiEtmInd) {
1056 double phiEtmLowEdgeSmallShiftRight =
1057 phiEtmLowEdge + (phiEtmHighEdge - phiEtmLowEdge) / 100.;
1063 for (
unsigned int iBin = nrBins;; --iBin) {
1068 if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
1072 <<
" phiEtmIndex \t" << phiEtmInd <<
" [ " << phiEtmLowEdge
1073 <<
" \t, " << phiEtmHighEdge <<
"] \t==>\t phiEtmJetEG \t" 1075 << phiHighEdge <<
" ]" << std::endl;
1085 for (
unsigned int iBin = nrBins;; --iBin) {
1090 if (phiEtmLowEdgeSmallShiftRight >= phiLowEdge) {
1094 <<
" phiEtmIndex \t" << phiEtmInd <<
" [ " << phiEtmLowEdge
1095 <<
" \t, " << phiEtmHighEdge <<
"] \t==>\t phiEtmToHtm \t" 1097 << phiHighEdge <<
" ]" << std::endl;
1103 LogTrace(
"L1GlobalTrigger") << std::endl;
1113 for (
unsigned int phiHtmInd = 0; phiHtmInd <
m_nrBinsPhiHtm; ++phiHtmInd) {
1119 double phiHtmLowEdgeSmallShiftRight =
1120 phiHtmLowEdge + (phiHtmHighEdge - phiHtmLowEdge) / 100.;
1124 for (
unsigned int iBin = nrBins;; --iBin) {
1129 if (phiHtmLowEdgeSmallShiftRight >= phiLowEdge) {
1133 <<
" phiHtmIndex \t" << phiHtmInd <<
" [ " << phiHtmLowEdge
1134 <<
" \t, " << phiHtmHighEdge <<
"] \t==>\t phiHtmJetEG \t" 1136 << phiHighEdge <<
" ]" << std::endl;
1168 unsigned int nrGctCentralEtaBinsPerHalf =
1171 unsigned int nrGctForwardEtaBinsPerHalf =
1174 unsigned int nrGctTotalEtaBinsPerHalf =
1175 nrGctCentralEtaBinsPerHalf + nrGctForwardEtaBinsPerHalf;
1185 LogTrace(
"L1GlobalTrigger") <<
" \nEta conversion: CenJet/TauJet & " 1186 "IsoEG/NoIsoEG to a common calorimeter scale\n" 1191 (nrGctCentralEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))),
1194 for (
unsigned int etaInd = 0; etaInd < nrGctCentralEtaBinsPerHalf; ++etaInd) {
1202 <<
" etaIndex " << etaInd <<
"\t [hex: " << std::hex << etaInd <<
"] " 1203 <<
std::dec <<
" ==> etaIndexGlobal " << globalIndex << std::endl;
1206 unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1212 <<
" etaIndex " << etaIndNeg <<
"\t [hex: " << std::hex << etaIndNeg
1213 <<
"] " <<
std::dec <<
" ==> etaIndexGlobal " << globalIndex
1223 <<
" \nEta conversion: ForJet to a common calorimeter scale\n" 1228 (nrGctForwardEtaBinsPerHalf | (1 << (ifCaloEtaNumberBits - 1))),
1231 for (
unsigned int etaInd = 0; etaInd < nrGctForwardEtaBinsPerHalf; ++etaInd) {
1239 <<
" etaIndex " << etaInd <<
"\t [hex: " << std::hex << etaInd <<
"] " 1240 <<
std::dec <<
" ==> etaIndexGlobal " << globalIndex << std::endl;
1243 unsigned int etaIndNeg = etaInd | (1 << (ifCaloEtaNumberBits - 1));
1249 <<
" etaIndex " << etaIndNeg <<
"\t [hex: " << std::hex << etaIndNeg
1250 <<
"] " <<
std::dec <<
" ==> etaIndexGlobal " << globalIndex
1260 <<
" \nEta conversion: Mu to a common calorimeter scale\n" 1264 unsigned int nrBinsEtaMuPerHalf =
1267 <<
" \nnrBinsEtaMuPerHalf = " << nrBinsEtaMuPerHalf <<
"\n" 1272 (nrBinsEtaMuPerHalf | (1 << (ifMuEtaNumberBits - 1))),
badIndex);
1274 for (
unsigned int etaMuInd = 0; etaMuInd < nrBinsEtaMuPerHalf; ++etaMuInd) {
1276 double etaMuLowEdge =
1278 double etaMuHighEdge =
1282 double etaMuLowEdgeSmallShiftRight =
1283 etaMuLowEdge + (etaMuHighEdge - etaMuLowEdge) / 100.;
1290 double etaHighEdge = 0.0;
1292 etaHighEdge = etaLowEdge;
1297 if (etaMuLowEdgeSmallShiftRight >= etaLowEdge) {
1301 <<
" etaMuIndex \t" << etaMuInd <<
"\t [ " << etaMuLowEdge <<
", \t" 1302 << etaMuHighEdge <<
"] ==> etaMuJetEG \t" 1304 <<
", \t" << etaHighEdge <<
" ]" << std::endl;
1311 unsigned int etaMuIndNeg = etaMuInd | (1 << (ifMuEtaNumberBits - 1));
1317 <<
" etaMuIndexNeg \t" << etaMuIndNeg <<
"\t [ " 1318 << (-1.0 * etaMuLowEdge) <<
", \t" << (-1.0 * etaMuHighEdge)
1326 <<
" ]" << std::endl;
1330 LogTrace(
"L1GlobalTrigger") << std::endl;
1331 LogTrace(
"L1GlobalTrigger") << std::endl;
1339 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1341 myCout <<
"\n---++Conversion tables for phi and eta variables of the trigger " 1342 "objects used in correlation conditions \n" 1351 myCout <<
"\n---+++Phi conversion for muons to jets and e-gamma common phi " 1356 myCout <<
"Size of look-up table = " << lutPhiMuToJetEgSize <<
"\n" 1359 myCout <<
"| *Initial Phi Hardware Index* " 1360 <<
"|| *Initial Phi Range* ||" 1361 <<
" *Converted Phi Hardware Index* " 1362 <<
"|| *Converted Phi Range* ||" 1364 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1366 for (
unsigned int indexToConv = 0; indexToConv < lutPhiMuToJetEgSize;
1369 double lowEdgeToConv =
1371 double highEdgeToConv =
1376 double convLowEdge = 0.;
1377 double convHighEdge = 0.;
1385 highEdgeToConv = 0.;
1388 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1389 <<
" | " <<
std::dec << std::setw(3) << std::left << indexToConv
1390 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(lowEdgeToConv))
1391 <<
", |" << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1392 <<
" ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1393 <<
" | " <<
std::dec << std::setw(6) << convIndex <<
" |[ " 1394 << std::setw(10) << std::left << (
rad2deg(convLowEdge)) <<
", |" 1395 << std::setw(10) << std::left << (
rad2deg(convHighEdge)) <<
" ) |" 1396 << std::right << std::endl;
1402 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1404 myCout <<
"\n---+++Phi conversion for muons to ETM phi scale \n" << std::endl;
1407 myCout <<
"Size of look-up table = " << lutPhiMuToEtmSize <<
"\n" 1410 myCout <<
"| *Initial Phi Hardware Index* " 1411 <<
"|| *Initial Phi Range* ||" 1412 <<
" *Converted Phi Hardware Index* " 1413 <<
"|| *Converted Phi Range* ||" 1415 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1417 for (
unsigned int indexToConv = 0; indexToConv < lutPhiMuToEtmSize;
1420 double lowEdgeToConv =
1422 double highEdgeToConv =
1427 double convLowEdge = 0.;
1428 double convHighEdge = 0.;
1436 highEdgeToConv = 0.;
1439 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1440 <<
" | " <<
std::dec << std::setw(3) << std::left << indexToConv
1441 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(lowEdgeToConv))
1442 <<
", |" << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1443 <<
" ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1444 <<
" | " <<
std::dec << std::setw(6) << convIndex <<
" |[ " 1445 << std::setw(10) << std::left << (
rad2deg(convLowEdge)) <<
", |" 1446 << std::setw(10) << std::left << (
rad2deg(convHighEdge)) <<
" ) |" 1447 << std::right << std::endl;
1453 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1455 myCout <<
"\n---+++Phi conversion for muons to HTM phi scale \n" << std::endl;
1458 myCout <<
"Size of look-up table = " << lutPhiMuToHtmSize <<
"\n" 1461 myCout <<
"| *Initial Phi Hardware Index* " 1462 <<
"|| *Initial Phi Range* ||" 1463 <<
" *Converted Phi Hardware Index* " 1464 <<
"|| *Converted Phi Range* ||" 1466 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1468 for (
unsigned int indexToConv = 0; indexToConv < lutPhiMuToHtmSize;
1471 double lowEdgeToConv =
1473 double highEdgeToConv =
1478 double convLowEdge = 0.;
1479 double convHighEdge = 0.;
1487 highEdgeToConv = 0.;
1490 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1491 <<
" | " <<
std::dec << std::setw(3) << std::left << indexToConv
1492 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(lowEdgeToConv))
1493 <<
", |" << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1494 <<
" ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1495 <<
" | " <<
std::dec << std::setw(6) << convIndex <<
" |[ " 1496 << std::setw(10) << std::left << (
rad2deg(convLowEdge)) <<
", |" 1497 << std::setw(10) << std::left << (
rad2deg(convHighEdge)) <<
" ) |" 1498 << std::right << std::endl;
1504 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1506 myCout <<
"\n---+++Phi conversion for ETM to jets and e-gamma scale common " 1511 myCout <<
"Size of look-up table = " << lutPhiEtmToJetEgSize <<
"\n" 1514 myCout <<
"| *Initial Phi Hardware Index* " 1515 <<
"|| *Initial Phi Range* ||" 1516 <<
" *Converted Phi Hardware Index* " 1517 <<
"|| *Converted Phi Range* ||" 1519 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1521 for (
unsigned int indexToConv = 0; indexToConv < lutPhiEtmToJetEgSize;
1529 double convLowEdge = 0.;
1530 double convHighEdge = 0.;
1538 highEdgeToConv = 0.;
1541 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1542 <<
" | " <<
std::dec << std::setw(3) << std::left << indexToConv
1543 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(lowEdgeToConv))
1544 <<
", |" << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1545 <<
" ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1546 <<
" | " <<
std::dec << std::setw(6) << convIndex <<
" |[ " 1547 << std::setw(10) << std::left << (
rad2deg(convLowEdge)) <<
", |" 1548 << std::setw(10) << std::left << (
rad2deg(convHighEdge)) <<
" ) |" 1549 << std::right << std::endl;
1555 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1557 myCout <<
"\n---+++Phi conversion for ETM to HTM phi scale \n" << std::endl;
1560 myCout <<
"Size of look-up table = " << lutPhiEtmToHtmSize <<
"\n" 1563 myCout <<
"| *Initial Phi Hardware Index* " 1564 <<
"|| *Initial Phi Range* ||" 1565 <<
" *Converted Phi Hardware Index* " 1566 <<
"|| *Converted Phi Range* ||" 1568 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1570 for (
unsigned int indexToConv = 0; indexToConv < lutPhiEtmToHtmSize;
1578 double convLowEdge = 0.;
1579 double convHighEdge = 0.;
1587 highEdgeToConv = 0.;
1590 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1591 <<
" | " <<
std::dec << std::setw(3) << std::left << indexToConv
1592 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(lowEdgeToConv))
1593 <<
", |" << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1594 <<
" ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1595 <<
" | " <<
std::dec << std::setw(6) << convIndex <<
" |[ " 1596 << std::setw(10) << std::left << (
rad2deg(convLowEdge)) <<
", |" 1597 << std::setw(10) << std::left << (
rad2deg(convHighEdge)) <<
" ) |" 1598 << std::right << std::endl;
1604 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1606 myCout <<
"\n---+++Phi conversion for HTM to jets and e-gamma scale common " 1611 myCout <<
"Size of look-up table = " << lutPhiHtmToJetEgSize <<
"\n" 1614 myCout <<
"| *Initial Phi Hardware Index* " 1615 <<
"|| *Initial Phi Range* ||" 1616 <<
" *Converted Phi Hardware Index* " 1617 <<
"|| *Converted Phi Range* ||" 1619 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1621 for (
unsigned int indexToConv = 0; indexToConv < lutPhiHtmToJetEgSize;
1629 double convLowEdge = 0.;
1630 double convHighEdge = 0.;
1638 highEdgeToConv = 0.;
1641 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1642 <<
" | " <<
std::dec << std::setw(3) << std::left << indexToConv
1643 <<
" |[ " << std::setw(10) << std::left << (
rad2deg(lowEdgeToConv))
1644 <<
", |" << std::setw(10) << std::left << (
rad2deg(highEdgeToConv))
1645 <<
" ) | 0x" << std::setw(6) << std::hex << std::left << convIndex
1646 <<
" | " <<
std::dec << std::setw(6) << convIndex <<
" |[ " 1647 << std::setw(10) << std::left << (
rad2deg(convLowEdge)) <<
", |" 1648 << std::setw(10) << std::left << (
rad2deg(convHighEdge)) <<
" ) |" 1649 << std::right << std::endl;
1660 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1662 myCout <<
"\n---+++Eta conversion for central and tau jets and e-gamma " 1663 "objects to a common central and forward calorimeter eta scale \n" 1667 myCout <<
"Size of look-up table = " << lutEtaCentralToCommonCaloSize <<
"\n" 1670 myCout <<
"| *Initial Eta Hardware Index* " 1671 <<
"|| *Initial Eta Range* ||" 1672 <<
" *Converted Eta Hardware Index* " 1673 <<
"|| *Converted Eta Range* ||" 1675 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1677 for (
unsigned int indexToConv = 0;
1678 indexToConv < lutEtaCentralToCommonCaloSize; ++indexToConv) {
1680 double lowEdgeToConv =
1690 double convLowEdge = 0.;
1691 double convHighEdge = 0.;
1699 highEdgeToConv = 0.;
1702 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1703 <<
" | " <<
std::dec << std::setw(3) << std::left << indexToConv
1704 <<
" |[ " << std::setw(10) << std::left << lowEdgeToConv <<
", |" 1705 << std::setw(10) << std::left << highEdgeToConv <<
" ) | 0x" 1706 << std::setw(6) << std::hex << std::left << convIndex <<
" | " 1707 <<
std::dec << std::setw(6) << convIndex <<
" |[ " << std::setw(10)
1708 << std::left << convLowEdge <<
", |" << std::setw(10) << std::left
1709 << convHighEdge <<
" ) |" << std::right << std::endl;
1715 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1717 myCout <<
"\n---+++Eta conversion for forward jets to a common central and " 1718 "forward calorimeter eta scale \n" 1722 myCout <<
"Size of look-up table = " << lutEtaForJetToCommonCaloSize <<
"\n" 1725 myCout <<
"| *Initial Eta Hardware Index* " 1726 <<
"|| *Initial Eta Range* ||" 1727 <<
" *Converted Eta Hardware Index* " 1728 <<
"|| *Converted Eta Range* ||" 1730 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1732 for (
unsigned int indexToConv = 0; indexToConv < lutEtaForJetToCommonCaloSize;
1735 double lowEdgeToConv =
1745 double convLowEdge = 0.;
1746 double convHighEdge = 0.;
1754 highEdgeToConv = 0.;
1757 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1758 <<
" | " <<
std::dec << std::setw(3) << std::left << indexToConv
1759 <<
" |[ " << std::setw(10) << std::left << lowEdgeToConv <<
", |" 1760 << std::setw(10) << std::left << highEdgeToConv <<
" ) | 0x" 1761 << std::setw(6) << std::hex << std::left << convIndex <<
" | " 1762 <<
std::dec << std::setw(6) << convIndex <<
" |[ " << std::setw(10)
1763 << std::left << convLowEdge <<
", |" << std::setw(10) << std::left
1764 << convHighEdge <<
" ) |" << std::right << std::endl;
1770 myCout <<
"<p style=\"page-break-before: always\"> </p>";
1772 myCout <<
"\n---+++Eta conversion for muons to a common central and forward " 1773 "calorimeter eta scale \n" 1777 myCout <<
"Size of look-up table = " << lutEtaMuToCommonCaloSize <<
"\n" 1780 unsigned int nrBinsEtaMuPerHalf =
1783 myCout <<
"| *Initial Eta Hardware Index* " 1784 <<
"|| *Initial Eta Range* ||" 1785 <<
" *Converted Eta Hardware Index* " 1786 <<
"|| *Converted Eta Range* ||" 1788 <<
"| *hex* | *dec* | ^|^| *hex* | *dec* |^|^|" << std::endl;
1790 for (
unsigned int indexToConv = 0; indexToConv < lutEtaMuToCommonCaloSize;
1794 unsigned int iBinOffset = 0;
1795 double etaSign = 1.;
1797 if (indexToConv > nrBinsEtaMuPerHalf) {
1798 iBinOffset = nrBinsEtaMuPerHalf + 1;
1802 double lowEdgeToConv =
1805 double highEdgeToConv =
1807 indexToConv + 1 - iBinOffset);
1811 double convLowEdge = 0.;
1812 double convHighEdge = 0.;
1820 highEdgeToConv = 0.;
1823 myCout <<
"| 0x" << std::setw(3) << std::hex << std::left << indexToConv
1824 <<
" | " <<
std::dec << std::setw(3) << std::left << indexToConv
1825 <<
" |[ " << std::setw(10) << std::left << lowEdgeToConv <<
", |" 1826 << std::setw(10) << std::left << highEdgeToConv <<
" ) | 0x" 1827 << std::setw(6) << std::hex << std::left << convIndex <<
" | " 1828 <<
std::dec << std::setw(6) << convIndex <<
" |[ " << std::setw(10)
1829 << std::left << convLowEdge <<
", |" << std::setw(10) << std::left
1830 << convHighEdge <<
" ) |" << std::right << std::endl;
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< unsigned int > m_lutEtaCentralToCommonCalo
unsigned int numberGctHtSumPhiBins() const
double htSumPhiBinLowEdge(unsigned int phiIndex) const
std::vector< bool > m_pairConvertPhiFirstGtObject
unsigned int numberGctEtSumPhiBins() const
L1GtEtaPhiConversions()
constructor
unsigned int m_nrBinsPhiEtm
number of phi bins for ETM
unsigned int numberGctEmJetPhiBins() const
std::vector< const std::vector< unsigned int > * > m_pairPhiConvVec
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
virtual float getHighEdge(unsigned packed) const =0
get the upper edge of bin represented by packed
std::vector< unsigned int > m_lutEtaForJetToCommonCalo
void convertL1Scales(const L1CaloGeometry *, const L1MuTriggerScales *, const int, const int)
perform all scale conversions
const L1MuScale * getPhiScale() const
get the phi scale
std::vector< unsigned int > m_lutPhiMuToEtm
phi conversion for Mu to ETM
const unsigned int gtObjectNrBinsPhi(const L1GtObject &) const
return the number of phi bins for a GT object
static const unsigned int badIndex
virtual unsigned getNBins() const =0
get number of bins
int m_verbosity
verbosity level
std::vector< std::pair< L1GtObject, L1GtObject > > m_gtObjectPairVec
vector of all L1GtObject pairs
std::vector< const unsigned int * > m_pairNrPhiBinsVec
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
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 float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
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)
virtual float getValue(unsigned i) const =0
get value of the underlying vector for bin i
double emJetPhiBinHighEdge(unsigned int phiIndex) const
double etSumPhiBinHighEdge(unsigned int phiIndex) const