30 #include "boost/lexical_cast.hpp"
36 m_tagL1ExtraMuon(paramSet.getParameter<edm::InputTag>(
"TagL1ExtraMuon")),
37 m_tagL1ExtraIsoEG(paramSet.getParameter<edm::InputTag>(
"TagL1ExtraIsoEG")),
38 m_tagL1ExtraNoIsoEG(paramSet.getParameter<edm::InputTag>(
"TagL1ExtraNoIsoEG")),
39 m_tagL1ExtraCenJet(paramSet.getParameter<edm::InputTag>(
"TagL1ExtraCenJet")),
40 m_tagL1ExtraForJet(paramSet.getParameter<edm::InputTag>(
"TagL1ExtraForJet")),
41 m_tagL1ExtraTauJet(paramSet.getParameter<edm::InputTag>(
"TagL1ExtraTauJet")),
42 m_tagL1ExtraEtMissMET(paramSet.getParameter<edm::InputTag>(
"TagL1ExtraEtMissMET")),
43 m_tagL1ExtraEtMissHTM(paramSet.getParameter<edm::InputTag>(
"TagL1ExtraEtMissHTM")),
44 m_tagL1ExtraHFRings(paramSet.getParameter<edm::InputTag>(
"TagL1ExtraHFRings")),
47 m_validL1ExtraMuon(
false),
48 m_validL1ExtraIsoEG(
false),
49 m_validL1ExtraNoIsoEG(
false),
50 m_validL1ExtraCenJet(
false),
51 m_validL1ExtraForJet(
false),
52 m_validL1ExtraTauJet(
false),
53 m_validL1ExtraETT(
false),
54 m_validL1ExtraETM(
false),
55 m_validL1ExtraHTT(
false),
56 m_validL1ExtraHTM(
false),
57 m_validL1ExtraHfBitCounts(
false),
58 m_validL1ExtraHfRingEtSums(
false),
71 m_l1ExtraHfBitCounts(0),
72 m_l1ExtraHfRingEtSums(0)
96 if (collL1ExtraMuon.
isValid()) {
101 <<
"\n l1extra::L1MuonParticleCollection with input tag \n "
103 <<
"\n Return pointer 0 and false validity tag."
115 if (collL1ExtraIsoEG.
isValid()) {
120 <<
"\n l1extra::L1EmParticleCollection with input tag \n "
122 <<
"\n Return pointer 0 and false validity tag."
133 if (collL1ExtraNoIsoEG.
isValid()) {
138 <<
"\n l1extra::L1EmParticleCollection with input tag \n "
140 <<
"\n Return pointer 0 and false validity tag."
152 if (collL1ExtraCenJet.
isValid()) {
157 <<
"\n l1extra::L1JetParticleCollection with input tag \n "
159 <<
"\n Return pointer 0 and false validity tag."
170 if (collL1ExtraForJet.
isValid()) {
175 <<
"\n l1extra::L1JetParticleCollection with input tag \n "
177 <<
"\n Return pointer 0 and false validity tag."
188 if (collL1ExtraTauJet.
isValid()) {
193 <<
"\n l1extra::L1JetParticleCollection with input tag \n "
195 <<
"\n Return pointer 0 and false validity tag."
207 if (collL1ExtraEtMissMET.
isValid()) {
214 <<
"\n l1extra::L1EtMissParticleCollection with input tag \n "
216 <<
"\n Return pointer 0 and false validity tag."
229 if (collL1ExtraEtMissHTM.
isValid()) {
236 <<
"\n l1extra::L1EtMissParticleCollection with input tag \n "
238 <<
"\n Return pointer 0 and false validity tag."
252 if (collL1ExtraHFRings.
isValid()) {
259 <<
"\n l1extra::L1HFRingsCollection with input tag \n "
261 <<
"\n Return pointer 0 and false validity tag."
324 return emptyInputTag;
335 return emptyInputTag;
340 return emptyInputTag;
345 return emptyInputTag;
350 return emptyInputTag;
355 return emptyInputTag;
361 <<
"' is not a recognized L1GtObject. ";
363 return emptyInputTag;
369 return emptyInputTag;
469 <<
"' is not a recognized L1GtObject. ";
481 const L1GtObject& gtObject,
const bool checkBxInEvent,
482 const int bxInEvent,
const bool checkObjIndexInColl,
483 const int objIndexInColl)
const {
486 oStr <<
"\n L1Extra collection for L1 GT object "
489 gtObject) <<
" not valid." << std::endl;
495 oStr <<
"\n Mu collection\n" << std::endl;
497 int indexInColl = -1;
499 for (l1extra::L1MuonParticleCollection::const_iterator iterColl =
503 if (checkBxInEvent) {
504 if (iterColl->bx() != bxInEvent) {
506 oStr <<
"\n BxInEvent " << bxInEvent
507 <<
": collection not in the event" << std::endl;
512 if (!checkObjIndexInColl) {
513 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
514 <<
" indexInColl = " << indexInColl
515 <<
" PT = " << std::right << std::setw(6) << (iterColl->pt()) <<
" GeV"
516 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
517 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
519 if (objIndexInColl == indexInColl) {
520 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
521 <<
" indexInColl = " << indexInColl
522 <<
" PT = " << std::right << std::setw(6) << (iterColl->pt()) <<
" GeV"
523 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
524 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
529 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" PT = "
530 << std::right << std::setw(6) << (iterColl->pt()) <<
" GeV" <<
" eta = "
531 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
532 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
542 oStr <<
"\n NoIsoEG collection\n" << std::endl;
544 int indexInColl = -1;
546 for (l1extra::L1EmParticleCollection::const_iterator iterColl =
550 if (checkBxInEvent) {
551 if (iterColl->bx() != bxInEvent) {
553 oStr <<
"\n BxInEvent " << bxInEvent
554 <<
": collection not in the event" << std::endl;
559 if (!checkObjIndexInColl) {
560 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
561 <<
" indexInColl = " << indexInColl
562 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
563 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
564 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
566 if (objIndexInColl == indexInColl) {
567 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
568 <<
" indexInColl = " << indexInColl
569 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
570 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
571 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
576 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
577 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = "
578 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
579 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
588 oStr <<
"\n IsoEG collection\n" << std::endl;
590 int indexInColl = -1;
592 for (l1extra::L1EmParticleCollection::const_iterator iterColl =
595 if (checkBxInEvent) {
596 if (iterColl->bx() != bxInEvent) {
598 oStr <<
"\n BxInEvent " << bxInEvent
599 <<
": collection not in the event" << std::endl;
604 if (!checkObjIndexInColl) {
605 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
606 <<
" indexInColl = " << indexInColl
607 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
608 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
609 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
611 if (objIndexInColl == indexInColl) {
612 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
613 <<
" indexInColl = " << indexInColl
614 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
615 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
616 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
621 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
622 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = "
623 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
624 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
633 oStr <<
"\n CenJet collection\n" << std::endl;
635 int indexInColl = -1;
637 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
641 if (checkBxInEvent) {
642 if (iterColl->bx() != bxInEvent) {
644 oStr <<
"\n BxInEvent " << bxInEvent
645 <<
": collection not in the event" << std::endl;
650 if (!checkObjIndexInColl) {
651 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
652 <<
" indexInColl = " << indexInColl
653 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
654 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
655 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
657 if (objIndexInColl == indexInColl) {
658 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
659 <<
" indexInColl = " << indexInColl
660 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
661 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
662 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
667 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
668 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = "
669 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
670 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
679 oStr <<
"\n ForJet collection\n" << std::endl;
681 int indexInColl = -1;
683 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
687 if (checkBxInEvent) {
688 if (iterColl->bx() != bxInEvent) {
690 oStr <<
"\n BxInEvent " << bxInEvent
691 <<
": collection not in the event" << std::endl;
696 if (!checkObjIndexInColl) {
697 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
698 <<
" indexInColl = " << indexInColl
699 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
700 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
701 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
703 if (objIndexInColl == indexInColl) {
704 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
705 <<
" indexInColl = " << indexInColl
706 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
707 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
708 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
713 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
714 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = "
715 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
716 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
725 oStr <<
"\n TauJet collection\n" << std::endl;
727 int indexInColl = -1;
729 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
733 if (checkBxInEvent) {
734 if (iterColl->bx() != bxInEvent) {
736 oStr <<
"\n BxInEvent " << bxInEvent
737 <<
": collection not in the event" << std::endl;
742 if (!checkObjIndexInColl) {
743 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
744 <<
" indexInColl = " << indexInColl
745 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
746 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
747 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
749 if (objIndexInColl == indexInColl) {
750 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
751 <<
" indexInColl = " << indexInColl
752 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
753 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta())
754 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
759 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
760 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" eta = "
761 << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = "
762 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
771 oStr <<
"\n ETM collection\n" << std::endl;
773 int indexInColl = -1;
775 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
778 if (checkBxInEvent) {
779 if (iterColl->bx() != bxInEvent) {
781 oStr <<
"\n BxInEvent " << bxInEvent
782 <<
": collection not in the event" << std::endl;
787 if (!checkObjIndexInColl) {
788 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
789 <<
" indexInColl = " << indexInColl
790 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
791 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
793 if (objIndexInColl == indexInColl) {
794 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
795 <<
" indexInColl = " << indexInColl
796 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
797 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
802 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
803 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" phi = "
804 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
813 oStr <<
"\n ETT collection\n" << std::endl;
815 int indexInColl = -1;
817 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
820 if (checkBxInEvent) {
821 if (iterColl->bx() != bxInEvent) {
823 oStr <<
"\n BxInEvent " << bxInEvent
824 <<
": collection not in the event" << std::endl;
829 if (!checkObjIndexInColl) {
830 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
831 <<
" indexInColl = " << indexInColl
832 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
834 if (objIndexInColl == indexInColl) {
835 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
836 <<
" indexInColl = " << indexInColl
837 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
842 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
843 << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
852 oStr <<
"\n HTT collection\n" << std::endl;
854 int indexInColl = -1;
856 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
859 if (checkBxInEvent) {
860 if (iterColl->bx() != bxInEvent) {
862 oStr <<
"\n BxInEvent " << bxInEvent
863 <<
": collection not in the event" << std::endl;
868 if (!checkObjIndexInColl) {
869 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
870 <<
" indexInColl = " << indexInColl
871 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
873 if (objIndexInColl == indexInColl) {
874 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
875 <<
" indexInColl = " << indexInColl
876 <<
" ET = " << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
881 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
882 << std::right << std::setw(6) <<(iterColl->etTotal()) <<
" GeV" << std::endl;
891 oStr <<
"\n HTM collection\n" << std::endl;
893 int indexInColl = -1;
895 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
898 if (checkBxInEvent) {
899 if (iterColl->bx() != bxInEvent) {
901 oStr <<
"\n BxInEvent " << bxInEvent
902 <<
": collection not in the event" << std::endl;
907 if (!checkObjIndexInColl) {
908 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
909 <<
" indexInColl = " << indexInColl
910 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
911 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
913 if (objIndexInColl == indexInColl) {
914 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
915 <<
" indexInColl = " << indexInColl
916 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV"
917 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
922 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = "
923 << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" <<
" phi = "
924 << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
938 oStr <<
"\n HfBitCounts collection\n" << std::endl;
940 for (l1extra::L1HFRingsCollection::const_iterator iterColl =
944 if (checkBxInEvent) {
945 if (iterColl->bx() != bxInEvent) {
947 oStr <<
"\n BxInEvent " << bxInEvent
948 <<
": collection not in the event" << std::endl;
951 if (!checkObjIndexInColl) {
953 for (
int iCount = 0; iCount
955 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
956 <<
" count = " << iCount <<
" HF counts = "
957 << (iterColl->hfBitCount(
962 for (
int iCount = 0; iCount
964 if (objIndexInColl == iCount) {
965 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
966 <<
" count = " << iCount
968 << (iterColl->hfBitCount(
976 if (objIndexInColl == iCount) {
977 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx())
978 <<
" count = " << iCount <<
" HF counts = "
979 << (iterColl->hfBitCount(
991 oStr <<
"\n HfRingEtSums collection\n" << std::endl;
993 for (l1extra::L1HFRingsCollection::const_iterator iterColl =
997 if (checkBxInEvent) {
998 if (iterColl->bx() != bxInEvent) {
1000 oStr <<
"\n BxInEvent " << bxInEvent
1001 <<
": collection not in the event" << std::endl;
1004 if (!checkObjIndexInColl) {
1006 for (
int iCount = 0; iCount
1008 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
1009 <<
" count = " << iCount
1011 << (iterColl->hfEtSum(
1016 for (
int iCount = 0; iCount
1018 if (objIndexInColl == iCount) {
1019 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
1020 <<
" count = " << iCount
1022 << (iterColl->hfEtSum(
1030 if (objIndexInColl == iCount) {
1031 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx())
1032 <<
" count = " << iCount <<
" HF ET sum = "
1033 << (iterColl->hfEtSum(
1071 <<
"' is not a recognized L1GtObject. ";
1082 const L1GtObject& gtObject,
const int bxInEvent)
const {
1084 bool checkBxInEvent =
true;
1085 bool checkObjIndexInColl =
false;
1086 int objIndexInColl = -1;
1088 printL1Extra(oStr, gtObject, checkBxInEvent, bxInEvent,
1089 checkObjIndexInColl, objIndexInColl);
1095 bool checkBxInEvent =
false;
1096 bool checkObjIndexInColl =
false;
1097 int bxInEvent = 999;
1098 int objIndexInColl = -1;
1100 printL1Extra(oStr, gtObject, checkBxInEvent, bxInEvent,
1101 checkObjIndexInColl, objIndexInColl);
std::string l1GtObjectEnumToString(const L1GtObject &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * product() const