28 #include "boost/lexical_cast.hpp" 34 m_tagL1ExtraMuon(paramSet.getParameter<
edm::InputTag>(
"TagL1ExtraMuon")),
35 m_tagL1ExtraIsoEG(paramSet.getParameter<
edm::InputTag>(
"TagL1ExtraIsoEG")),
36 m_tagL1ExtraNoIsoEG(paramSet.getParameter<
edm::InputTag>(
"TagL1ExtraNoIsoEG")),
37 m_tagL1ExtraCenJet(paramSet.getParameter<
edm::InputTag>(
"TagL1ExtraCenJet")),
38 m_tagL1ExtraForJet(paramSet.getParameter<
edm::InputTag>(
"TagL1ExtraForJet")),
39 m_tagL1ExtraTauJet(paramSet.getParameter<
edm::InputTag>(
"TagL1ExtraTauJet")),
40 m_tagL1ExtraEtMissMET(paramSet.getParameter<
edm::InputTag>(
"TagL1ExtraEtMissMET")),
41 m_tagL1ExtraEtMissHTM(paramSet.getParameter<
edm::InputTag>(
"TagL1ExtraEtMissHTM")),
42 m_tagL1ExtraHFRings(paramSet.getParameter<
edm::InputTag>(
"TagL1ExtraHFRings")),
45 m_validL1ExtraMuon(
false),
46 m_validL1ExtraIsoEG(
false),
47 m_validL1ExtraNoIsoEG(
false),
48 m_validL1ExtraCenJet(
false),
49 m_validL1ExtraForJet(
false),
50 m_validL1ExtraTauJet(
false),
51 m_validL1ExtraETT(
false),
52 m_validL1ExtraETM(
false),
53 m_validL1ExtraHTT(
false),
54 m_validL1ExtraHTM(
false),
55 m_validL1ExtraHfBitCounts(
false),
56 m_validL1ExtraHfRingEtSums(
false),
104 if (collL1ExtraMuon.
isValid()) {
109 <<
"\n l1extra::L1MuonParticleCollection with input tag \n " 111 <<
"\n Return pointer 0 and false validity tag." 123 if (collL1ExtraIsoEG.
isValid()) {
128 <<
"\n l1extra::L1EmParticleCollection with input tag \n " 130 <<
"\n Return pointer 0 and false validity tag." 141 if (collL1ExtraNoIsoEG.
isValid()) {
146 <<
"\n l1extra::L1EmParticleCollection with input tag \n " 148 <<
"\n Return pointer 0 and false validity tag." 160 if (collL1ExtraCenJet.
isValid()) {
165 <<
"\n l1extra::L1JetParticleCollection with input tag \n " 167 <<
"\n Return pointer 0 and false validity tag." 178 if (collL1ExtraForJet.
isValid()) {
183 <<
"\n l1extra::L1JetParticleCollection with input tag \n " 185 <<
"\n Return pointer 0 and false validity tag." 196 if (collL1ExtraTauJet.
isValid()) {
201 <<
"\n l1extra::L1JetParticleCollection with input tag \n " 203 <<
"\n Return pointer 0 and false validity tag." 215 if (collL1ExtraEtMissMET.
isValid()) {
222 <<
"\n l1extra::L1EtMissParticleCollection with input tag \n " 224 <<
"\n Return pointer 0 and false validity tag." 237 if (collL1ExtraEtMissHTM.
isValid()) {
244 <<
"\n l1extra::L1EtMissParticleCollection with input tag \n " 246 <<
"\n Return pointer 0 and false validity tag." 260 if (collL1ExtraHFRings.
isValid()) {
267 <<
"\n l1extra::L1HFRingsCollection with input tag \n " 269 <<
"\n Return pointer 0 and false validity tag." 332 return emptyInputTag;
343 return emptyInputTag;
348 return emptyInputTag;
353 return emptyInputTag;
358 return emptyInputTag;
363 return emptyInputTag;
369 <<
"' is not a recognized L1GtObject. ";
371 return emptyInputTag;
377 return emptyInputTag;
477 <<
"' is not a recognized L1GtObject. ";
489 const L1GtObject& gtObject,
const bool checkBxInEvent,
490 const int bxInEvent,
const bool checkObjIndexInColl,
491 const int objIndexInColl)
const {
494 oStr <<
"\n L1Extra collection for L1 GT object " 497 gtObject) <<
" not valid." << std::endl;
503 oStr <<
"\n Mu collection\n" << std::endl;
505 int indexInColl = -1;
507 for (l1extra::L1MuonParticleCollection::const_iterator iterColl =
511 if (checkBxInEvent) {
512 if (iterColl->bx() != bxInEvent) {
514 oStr <<
"\n BxInEvent " << bxInEvent
515 <<
": collection not in the event" << std::endl;
520 if (!checkObjIndexInColl) {
521 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
522 <<
" indexInColl = " << indexInColl
523 <<
" PT = " << std::right << std::setw(6) << (iterColl->pt()) <<
" GeV" 524 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
525 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
527 if (objIndexInColl == indexInColl) {
528 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
529 <<
" indexInColl = " << indexInColl
530 <<
" PT = " << std::right << std::setw(6) << (iterColl->pt()) <<
" GeV" 531 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
532 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
537 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" PT = " 538 << std::right << std::setw(6) << (iterColl->pt()) <<
" GeV" <<
" eta = " 539 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " 540 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
550 oStr <<
"\n NoIsoEG collection\n" << std::endl;
552 int indexInColl = -1;
554 for (l1extra::L1EmParticleCollection::const_iterator iterColl =
558 if (checkBxInEvent) {
559 if (iterColl->bx() != bxInEvent) {
561 oStr <<
"\n BxInEvent " << bxInEvent
562 <<
": collection not in the event" << std::endl;
567 if (!checkObjIndexInColl) {
568 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
569 <<
" indexInColl = " << indexInColl
570 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 571 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
572 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
574 if (objIndexInColl == indexInColl) {
575 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
576 <<
" indexInColl = " << indexInColl
577 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 578 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
579 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
584 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " 585 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = " 586 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " 587 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
596 oStr <<
"\n IsoEG collection\n" << std::endl;
598 int indexInColl = -1;
600 for (l1extra::L1EmParticleCollection::const_iterator iterColl =
603 if (checkBxInEvent) {
604 if (iterColl->bx() != bxInEvent) {
606 oStr <<
"\n BxInEvent " << bxInEvent
607 <<
": collection not in the event" << std::endl;
612 if (!checkObjIndexInColl) {
613 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
614 <<
" indexInColl = " << indexInColl
615 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 616 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
617 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
619 if (objIndexInColl == indexInColl) {
620 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
621 <<
" indexInColl = " << indexInColl
622 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 623 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
624 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
629 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " 630 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = " 631 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " 632 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
641 oStr <<
"\n CenJet collection\n" << std::endl;
643 int indexInColl = -1;
645 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
649 if (checkBxInEvent) {
650 if (iterColl->bx() != bxInEvent) {
652 oStr <<
"\n BxInEvent " << bxInEvent
653 <<
": collection not in the event" << std::endl;
658 if (!checkObjIndexInColl) {
659 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
660 <<
" indexInColl = " << indexInColl
661 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 662 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
663 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
665 if (objIndexInColl == indexInColl) {
666 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
667 <<
" indexInColl = " << indexInColl
668 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 669 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
670 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
675 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " 676 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = " 677 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " 678 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
687 oStr <<
"\n ForJet collection\n" << std::endl;
689 int indexInColl = -1;
691 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
695 if (checkBxInEvent) {
696 if (iterColl->bx() != bxInEvent) {
698 oStr <<
"\n BxInEvent " << bxInEvent
699 <<
": collection not in the event" << std::endl;
704 if (!checkObjIndexInColl) {
705 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
706 <<
" indexInColl = " << indexInColl
707 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 708 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
709 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
711 if (objIndexInColl == indexInColl) {
712 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
713 <<
" indexInColl = " << indexInColl
714 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 715 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
716 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
721 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " 722 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = " 723 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " 724 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
733 oStr <<
"\n TauJet collection\n" << std::endl;
735 int indexInColl = -1;
737 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
741 if (checkBxInEvent) {
742 if (iterColl->bx() != bxInEvent) {
744 oStr <<
"\n BxInEvent " << bxInEvent
745 <<
": collection not in the event" << std::endl;
750 if (!checkObjIndexInColl) {
751 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
752 <<
" indexInColl = " << indexInColl
753 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 754 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
755 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
757 if (objIndexInColl == indexInColl) {
758 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
759 <<
" indexInColl = " << indexInColl
760 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 761 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
762 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
767 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " 768 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = " 769 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " 770 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
779 oStr <<
"\n ETM collection\n" << std::endl;
781 int indexInColl = -1;
783 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
786 if (checkBxInEvent) {
787 if (iterColl->bx() != bxInEvent) {
789 oStr <<
"\n BxInEvent " << bxInEvent
790 <<
": collection not in the event" << std::endl;
795 if (!checkObjIndexInColl) {
796 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
797 <<
" indexInColl = " << indexInColl
798 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 799 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
801 if (objIndexInColl == indexInColl) {
802 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
803 <<
" indexInColl = " << indexInColl
804 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 805 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
810 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " 811 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" phi = " 812 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
821 oStr <<
"\n ETT collection\n" << std::endl;
823 int indexInColl = -1;
825 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
828 if (checkBxInEvent) {
829 if (iterColl->bx() != bxInEvent) {
831 oStr <<
"\n BxInEvent " << bxInEvent
832 <<
": collection not in the event" << std::endl;
837 if (!checkObjIndexInColl) {
838 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
839 <<
" indexInColl = " << indexInColl
840 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
842 if (objIndexInColl == indexInColl) {
843 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
844 <<
" indexInColl = " << indexInColl
845 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
850 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " 851 << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
860 oStr <<
"\n HTT collection\n" << std::endl;
862 int indexInColl = -1;
864 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
867 if (checkBxInEvent) {
868 if (iterColl->bx() != bxInEvent) {
870 oStr <<
"\n BxInEvent " << bxInEvent
871 <<
": collection not in the event" << std::endl;
876 if (!checkObjIndexInColl) {
877 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
878 <<
" indexInColl = " << indexInColl
879 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
881 if (objIndexInColl == indexInColl) {
882 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
883 <<
" indexInColl = " << indexInColl
884 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
889 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " 890 << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
899 oStr <<
"\n HTM collection\n" << std::endl;
901 int indexInColl = -1;
903 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
906 if (checkBxInEvent) {
907 if (iterColl->bx() != bxInEvent) {
909 oStr <<
"\n BxInEvent " << bxInEvent
910 <<
": collection not in the event" << std::endl;
915 if (!checkObjIndexInColl) {
916 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
917 <<
" indexInColl = " << indexInColl
918 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 919 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
921 if (objIndexInColl == indexInColl) {
922 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
923 <<
" indexInColl = " << indexInColl
924 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 925 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
930 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " 931 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" phi = " 932 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
946 oStr <<
"\n HfBitCounts collection\n" << std::endl;
948 for (l1extra::L1HFRingsCollection::const_iterator iterColl =
952 if (checkBxInEvent) {
953 if (iterColl->bx() != bxInEvent) {
955 oStr <<
"\n BxInEvent " << bxInEvent
956 <<
": collection not in the event" << std::endl;
959 if (!checkObjIndexInColl) {
961 for (
int iCount = 0; iCount
963 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
964 <<
" count = " << iCount <<
" HF counts = " 965 << (iterColl->hfBitCount(
970 for (
int iCount = 0; iCount
972 if (objIndexInColl == iCount) {
973 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
974 <<
" count = " << iCount
976 << (iterColl->hfBitCount(
984 if (objIndexInColl == iCount) {
985 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx())
986 <<
" count = " << iCount <<
" HF counts = " 987 << (iterColl->hfBitCount(
999 oStr <<
"\n HfRingEtSums collection\n" << std::endl;
1001 for (l1extra::L1HFRingsCollection::const_iterator iterColl =
1005 if (checkBxInEvent) {
1006 if (iterColl->bx() != bxInEvent) {
1008 oStr <<
"\n BxInEvent " << bxInEvent
1009 <<
": collection not in the event" << std::endl;
1012 if (!checkObjIndexInColl) {
1014 for (
int iCount = 0; iCount
1016 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
1017 <<
" count = " << iCount
1019 << (iterColl->hfEtSum(
1024 for (
int iCount = 0; iCount
1026 if (objIndexInColl == iCount) {
1027 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
1028 <<
" count = " << iCount
1030 << (iterColl->hfEtSum(
1038 if (objIndexInColl == iCount) {
1039 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx())
1040 <<
" count = " << iCount <<
" HF ET sum = " 1041 << (iterColl->hfEtSum(
1079 <<
"' is not a recognized L1GtObject. ";
1090 const L1GtObject& gtObject,
const int bxInEvent)
const {
1092 bool checkBxInEvent =
true;
1093 bool checkObjIndexInColl =
false;
1094 int objIndexInColl = -1;
1096 printL1Extra(oStr, gtObject, checkBxInEvent, bxInEvent,
1097 checkObjIndexInColl, objIndexInColl);
1103 bool checkBxInEvent =
false;
1104 bool checkObjIndexInColl =
false;
1105 int bxInEvent = 999;
1106 int objIndexInColl = -1;
1108 printL1Extra(oStr, gtObject, checkBxInEvent, bxInEvent,
1109 checkObjIndexInColl, objIndexInColl);
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string l1GtObjectEnumToString(const L1GtObject &)
T const * product() const