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),
69 m_l1ExtraHfBitCounts(0),
70 m_l1ExtraHfRingEtSums(0)
94 if (collL1ExtraMuon.
isValid()) {
99 <<
"\n l1extra::L1MuonParticleCollection with input tag \n "
101 <<
"\n Return pointer 0 and false validity tag."
113 if (collL1ExtraIsoEG.
isValid()) {
118 <<
"\n l1extra::L1EmParticleCollection with input tag \n "
120 <<
"\n Return pointer 0 and false validity tag."
131 if (collL1ExtraNoIsoEG.
isValid()) {
136 <<
"\n l1extra::L1EmParticleCollection with input tag \n "
138 <<
"\n Return pointer 0 and false validity tag."
150 if (collL1ExtraCenJet.
isValid()) {
155 <<
"\n l1extra::L1JetParticleCollection with input tag \n "
157 <<
"\n Return pointer 0 and false validity tag."
168 if (collL1ExtraForJet.
isValid()) {
173 <<
"\n l1extra::L1JetParticleCollection with input tag \n "
175 <<
"\n Return pointer 0 and false validity tag."
186 if (collL1ExtraTauJet.
isValid()) {
191 <<
"\n l1extra::L1JetParticleCollection with input tag \n "
193 <<
"\n Return pointer 0 and false validity tag."
205 if (collL1ExtraEtMissMET.
isValid()) {
212 <<
"\n l1extra::L1EtMissParticleCollection with input tag \n "
214 <<
"\n Return pointer 0 and false validity tag."
227 if (collL1ExtraEtMissHTM.
isValid()) {
234 <<
"\n l1extra::L1EtMissParticleCollection with input tag \n "
236 <<
"\n Return pointer 0 and false validity tag."
250 if (collL1ExtraHFRings.
isValid()) {
257 <<
"\n l1extra::L1HFRingsCollection with input tag \n "
259 <<
"\n Return pointer 0 and false validity tag."
322 return emptyInputTag;
333 return emptyInputTag;
338 return emptyInputTag;
343 return emptyInputTag;
348 return emptyInputTag;
353 return emptyInputTag;
359 <<
"' is not a recognized L1GtObject. ";
361 return emptyInputTag;
367 return emptyInputTag;
467 <<
"' is not a recognized L1GtObject. ";
479 const L1GtObject& gtObject,
const bool checkBxInEvent,
480 const int bxInEvent,
const bool checkObjIndexInColl,
481 const int objIndexInColl)
const {
484 oStr <<
"\n L1Extra collection for L1 GT object "
487 gtObject) <<
" not valid." << std::endl;
493 oStr <<
"\n Mu collection\n" << std::endl;
495 int indexInColl = -1;
497 for (l1extra::L1MuonParticleCollection::const_iterator iterColl =
501 if (checkBxInEvent) {
502 if (iterColl->bx() != bxInEvent) {
504 oStr <<
"\n BxInEvent " << bxInEvent
505 <<
": collection not in the event" << std::endl;
510 if (!checkObjIndexInColl) {
511 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
512 <<
" indexInColl = " << indexInColl
513 <<
" PT = " << std::right << std::setw(6) << (iterColl->pt()) <<
" GeV"
514 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
515 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
517 if (objIndexInColl == indexInColl) {
518 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
519 <<
" indexInColl = " << indexInColl
520 <<
" PT = " << std::right << std::setw(6) << (iterColl->pt()) <<
" GeV"
521 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
522 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
527 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" PT = "
528 << std::right << std::setw(6) << (iterColl->pt()) <<
" GeV" <<
" eta = "
529 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
530 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
540 oStr <<
"\n NoIsoEG collection\n" << std::endl;
542 int indexInColl = -1;
544 for (l1extra::L1EmParticleCollection::const_iterator iterColl =
548 if (checkBxInEvent) {
549 if (iterColl->bx() != bxInEvent) {
551 oStr <<
"\n BxInEvent " << bxInEvent
552 <<
": collection not in the event" << std::endl;
557 if (!checkObjIndexInColl) {
558 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
559 <<
" indexInColl = " << indexInColl
560 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
561 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
562 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
564 if (objIndexInColl == indexInColl) {
565 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
566 <<
" indexInColl = " << indexInColl
567 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
568 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
569 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
574 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
575 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = "
576 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
577 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
586 oStr <<
"\n IsoEG collection\n" << std::endl;
588 int indexInColl = -1;
590 for (l1extra::L1EmParticleCollection::const_iterator iterColl =
593 if (checkBxInEvent) {
594 if (iterColl->bx() != bxInEvent) {
596 oStr <<
"\n BxInEvent " << bxInEvent
597 <<
": collection not in the event" << std::endl;
602 if (!checkObjIndexInColl) {
603 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
604 <<
" indexInColl = " << indexInColl
605 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
606 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
607 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
609 if (objIndexInColl == indexInColl) {
610 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
611 <<
" indexInColl = " << indexInColl
612 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
613 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
614 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
619 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
620 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = "
621 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
622 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
631 oStr <<
"\n CenJet collection\n" << std::endl;
633 int indexInColl = -1;
635 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
639 if (checkBxInEvent) {
640 if (iterColl->bx() != bxInEvent) {
642 oStr <<
"\n BxInEvent " << bxInEvent
643 <<
": collection not in the event" << std::endl;
648 if (!checkObjIndexInColl) {
649 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
650 <<
" indexInColl = " << indexInColl
651 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
652 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
653 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
655 if (objIndexInColl == indexInColl) {
656 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
657 <<
" indexInColl = " << indexInColl
658 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
659 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
660 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
665 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
666 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = "
667 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
668 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
677 oStr <<
"\n ForJet collection\n" << std::endl;
679 int indexInColl = -1;
681 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
685 if (checkBxInEvent) {
686 if (iterColl->bx() != bxInEvent) {
688 oStr <<
"\n BxInEvent " << bxInEvent
689 <<
": collection not in the event" << std::endl;
694 if (!checkObjIndexInColl) {
695 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
696 <<
" indexInColl = " << indexInColl
697 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
698 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
699 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
701 if (objIndexInColl == indexInColl) {
702 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
703 <<
" indexInColl = " << indexInColl
704 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
705 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
706 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
711 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
712 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = "
713 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
714 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
723 oStr <<
"\n TauJet collection\n" << std::endl;
725 int indexInColl = -1;
727 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
731 if (checkBxInEvent) {
732 if (iterColl->bx() != bxInEvent) {
734 oStr <<
"\n BxInEvent " << bxInEvent
735 <<
": collection not in the event" << std::endl;
740 if (!checkObjIndexInColl) {
741 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
742 <<
" indexInColl = " << indexInColl
743 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
744 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
745 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
747 if (objIndexInColl == indexInColl) {
748 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
749 <<
" indexInColl = " << indexInColl
750 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
751 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
752 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
757 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
758 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = "
759 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
760 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
769 oStr <<
"\n ETM collection\n" << std::endl;
771 int indexInColl = -1;
773 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
776 if (checkBxInEvent) {
777 if (iterColl->bx() != bxInEvent) {
779 oStr <<
"\n BxInEvent " << bxInEvent
780 <<
": collection not in the event" << std::endl;
785 if (!checkObjIndexInColl) {
786 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
787 <<
" indexInColl = " << indexInColl
788 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
789 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
791 if (objIndexInColl == indexInColl) {
792 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
793 <<
" indexInColl = " << indexInColl
794 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
795 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
800 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
801 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" phi = "
802 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
811 oStr <<
"\n ETT collection\n" << std::endl;
813 int indexInColl = -1;
815 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
818 if (checkBxInEvent) {
819 if (iterColl->bx() != bxInEvent) {
821 oStr <<
"\n BxInEvent " << bxInEvent
822 <<
": collection not in the event" << std::endl;
827 if (!checkObjIndexInColl) {
828 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
829 <<
" indexInColl = " << indexInColl
830 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
832 if (objIndexInColl == indexInColl) {
833 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
834 <<
" indexInColl = " << indexInColl
835 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
840 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
841 << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
850 oStr <<
"\n HTT collection\n" << std::endl;
852 int indexInColl = -1;
854 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
857 if (checkBxInEvent) {
858 if (iterColl->bx() != bxInEvent) {
860 oStr <<
"\n BxInEvent " << bxInEvent
861 <<
": collection not in the event" << std::endl;
866 if (!checkObjIndexInColl) {
867 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
868 <<
" indexInColl = " << indexInColl
869 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
871 if (objIndexInColl == indexInColl) {
872 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
873 <<
" indexInColl = " << indexInColl
874 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
879 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
880 << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
889 oStr <<
"\n HTM collection\n" << std::endl;
891 int indexInColl = -1;
893 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
896 if (checkBxInEvent) {
897 if (iterColl->bx() != bxInEvent) {
899 oStr <<
"\n BxInEvent " << bxInEvent
900 <<
": collection not in the event" << std::endl;
905 if (!checkObjIndexInColl) {
906 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
907 <<
" indexInColl = " << indexInColl
908 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
909 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
911 if (objIndexInColl == indexInColl) {
912 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
913 <<
" indexInColl = " << indexInColl
914 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
915 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
920 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
921 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" phi = "
922 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
936 oStr <<
"\n HfBitCounts collection\n" << std::endl;
938 for (l1extra::L1HFRingsCollection::const_iterator iterColl =
942 if (checkBxInEvent) {
943 if (iterColl->bx() != bxInEvent) {
945 oStr <<
"\n BxInEvent " << bxInEvent
946 <<
": collection not in the event" << std::endl;
949 if (!checkObjIndexInColl) {
951 for (
int iCount = 0; iCount
953 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
954 <<
" count = " << iCount <<
" HF counts = "
955 << (iterColl->hfBitCount(
960 for (
int iCount = 0; iCount
962 if (objIndexInColl == iCount) {
963 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
964 <<
" count = " << iCount
966 << (iterColl->hfBitCount(
974 if (objIndexInColl == iCount) {
975 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx())
976 <<
" count = " << iCount <<
" HF counts = "
977 << (iterColl->hfBitCount(
989 oStr <<
"\n HfRingEtSums collection\n" << std::endl;
991 for (l1extra::L1HFRingsCollection::const_iterator iterColl =
995 if (checkBxInEvent) {
996 if (iterColl->bx() != bxInEvent) {
998 oStr <<
"\n BxInEvent " << bxInEvent
999 <<
": collection not in the event" << std::endl;
1002 if (!checkObjIndexInColl) {
1004 for (
int iCount = 0; iCount
1006 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
1007 <<
" count = " << iCount
1009 << (iterColl->hfEtSum(
1014 for (
int iCount = 0; iCount
1016 if (objIndexInColl == iCount) {
1017 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
1018 <<
" count = " << iCount
1020 << (iterColl->hfEtSum(
1028 if (objIndexInColl == iCount) {
1029 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx())
1030 <<
" count = " << iCount <<
" HF ET sum = "
1031 << (iterColl->hfEtSum(
1069 <<
"' is not a recognized L1GtObject. ";
1080 const L1GtObject& gtObject,
const int bxInEvent)
const {
1082 bool checkBxInEvent =
true;
1083 bool checkObjIndexInColl =
false;
1084 int objIndexInColl = -1;
1086 printL1Extra(oStr, gtObject, checkBxInEvent, bxInEvent,
1087 checkObjIndexInColl, objIndexInColl);
1093 bool checkBxInEvent =
false;
1094 bool checkObjIndexInColl =
false;
1095 int bxInEvent = 999;
1096 int objIndexInColl = -1;
1098 printL1Extra(oStr, gtObject, checkBxInEvent, bxInEvent,
1099 checkObjIndexInColl, objIndexInColl);
std::string l1GtObjectEnumToString(const L1GtObject &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * product() const
volatile std::atomic< bool > shutdown_flag false