28 #include "boost/lexical_cast.hpp" 33 m_tagL1ExtraMuon(paramSet.getParameter<
edm::
InputTag>(
"TagL1ExtraMuon")),
34 m_tagL1ExtraIsoEG(paramSet.getParameter<
edm::
InputTag>(
"TagL1ExtraIsoEG")),
35 m_tagL1ExtraNoIsoEG(paramSet.getParameter<
edm::
InputTag>(
"TagL1ExtraNoIsoEG")),
36 m_tagL1ExtraCenJet(paramSet.getParameter<
edm::
InputTag>(
"TagL1ExtraCenJet")),
37 m_tagL1ExtraForJet(paramSet.getParameter<
edm::
InputTag>(
"TagL1ExtraForJet")),
38 m_tagL1ExtraTauJet(paramSet.getParameter<
edm::
InputTag>(
"TagL1ExtraTauJet")),
39 m_tagL1ExtraEtMissMET(paramSet.getParameter<
edm::
InputTag>(
"TagL1ExtraEtMissMET")),
40 m_tagL1ExtraEtMissHTM(paramSet.getParameter<
edm::
InputTag>(
"TagL1ExtraEtMissHTM")),
41 m_tagL1ExtraHFRings(paramSet.getParameter<
edm::
InputTag>(
"TagL1ExtraHFRings")),
44 m_validL1ExtraMuon(
false),
45 m_validL1ExtraIsoEG(
false),
46 m_validL1ExtraNoIsoEG(
false),
47 m_validL1ExtraCenJet(
false),
48 m_validL1ExtraForJet(
false),
49 m_validL1ExtraTauJet(
false),
50 m_validL1ExtraETT(
false),
51 m_validL1ExtraETM(
false),
52 m_validL1ExtraHTT(
false),
53 m_validL1ExtraHTM(
false),
54 m_validL1ExtraHfBitCounts(
false),
55 m_validL1ExtraHfRingEtSums(
false),
96 if (collL1ExtraMuon.
isValid()) {
101 <<
"\n not found in the event.\n" 102 <<
"\n Return pointer 0 and false validity tag." << std::endl;
112 if (collL1ExtraIsoEG.
isValid()) {
117 <<
"\n not found in the event.\n" 118 <<
"\n Return pointer 0 and false validity tag." << std::endl;
127 if (collL1ExtraNoIsoEG.
isValid()) {
132 <<
"\n not found in the event.\n" 133 <<
"\n Return pointer 0 and false validity tag." << std::endl;
143 if (collL1ExtraCenJet.
isValid()) {
148 <<
"\n not found in the event.\n" 149 <<
"\n Return pointer 0 and false validity tag." << std::endl;
158 if (collL1ExtraForJet.
isValid()) {
163 <<
"\n not found in the event.\n" 164 <<
"\n Return pointer 0 and false validity tag." << std::endl;
173 if (collL1ExtraTauJet.
isValid()) {
178 <<
"\n not found in the event.\n" 179 <<
"\n Return pointer 0 and false validity tag." << std::endl;
189 if (collL1ExtraEtMissMET.
isValid()) {
195 LogDebug(
"L1RetrieveL1Extra") <<
"\n l1extra::L1EtMissParticleCollection with input tag \n " 197 <<
"\n Return pointer 0 and false validity tag." << std::endl;
208 if (collL1ExtraEtMissHTM.
isValid()) {
214 LogDebug(
"L1RetrieveL1Extra") <<
"\n l1extra::L1EtMissParticleCollection with input tag \n " 216 <<
"\n Return pointer 0 and false validity tag." << std::endl;
228 if (collL1ExtraHFRings.
isValid()) {
235 <<
"\n not found in the event.\n" 236 <<
"\n Return pointer 0 and false validity tag." << std::endl;
286 return emptyInputTag;
295 return emptyInputTag;
299 return emptyInputTag;
303 return emptyInputTag;
307 return emptyInputTag;
311 return emptyInputTag;
315 edm::LogInfo(
"L1GtObject") <<
"\n '" << gtObject <<
"' is not a recognized L1GtObject. ";
317 return emptyInputTag;
322 return emptyInputTag;
401 edm::LogInfo(
"L1GtObject") <<
"\n '" << gtObject <<
"' is not a recognized L1GtObject. ";
413 const bool checkBxInEvent,
415 const bool checkObjIndexInColl,
416 const int objIndexInColl)
const {
419 <<
" with collection input tag " <<
inputTagL1ExtraColl(gtObject) <<
" not valid." << std::endl;
424 oStr <<
"\n Mu collection\n" << std::endl;
426 int indexInColl = -1;
428 for (l1extra::L1MuonParticleCollection::const_iterator iterColl =
m_l1ExtraMuon->begin();
431 if (checkBxInEvent) {
432 if (iterColl->bx() != bxInEvent) {
434 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
438 if (!checkObjIndexInColl) {
439 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" indexInColl = " << indexInColl
440 <<
" PT = " << std::right << std::setw(6) << (iterColl->pt()) <<
" GeV" 441 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
442 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
444 if (objIndexInColl == indexInColl) {
445 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
446 <<
" indexInColl = " << indexInColl <<
" PT = " << std::right << std::setw(6) << (iterColl->pt())
448 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
449 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
454 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" PT = " << std::right
455 << std::setw(6) << (iterColl->pt()) <<
" GeV" 456 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
457 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
464 oStr <<
"\n NoIsoEG collection\n" << std::endl;
466 int indexInColl = -1;
468 for (l1extra::L1EmParticleCollection::const_iterator iterColl =
m_l1ExtraNoIsoEG->begin();
471 if (checkBxInEvent) {
472 if (iterColl->bx() != bxInEvent) {
474 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
478 if (!checkObjIndexInColl) {
479 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" indexInColl = " << indexInColl
480 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 481 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
482 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
484 if (objIndexInColl == indexInColl) {
485 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
486 <<
" indexInColl = " << indexInColl <<
" ET = " << std::right << std::setw(6) << (iterColl->et())
488 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
489 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
494 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " << std::right
495 << std::setw(6) << (iterColl->et()) <<
" GeV" 496 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
497 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
503 oStr <<
"\n IsoEG collection\n" << std::endl;
505 int indexInColl = -1;
507 for (l1extra::L1EmParticleCollection::const_iterator iterColl =
m_l1ExtraIsoEG->begin();
510 if (checkBxInEvent) {
511 if (iterColl->bx() != bxInEvent) {
513 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
517 if (!checkObjIndexInColl) {
518 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" indexInColl = " << indexInColl
519 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 520 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
521 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
523 if (objIndexInColl == indexInColl) {
524 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
525 <<
" indexInColl = " << indexInColl <<
" ET = " << std::right << std::setw(6) << (iterColl->et())
527 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
528 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
533 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " << std::right
534 << std::setw(6) << (iterColl->et()) <<
" GeV" 535 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
536 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
542 oStr <<
"\n CenJet collection\n" << std::endl;
544 int indexInColl = -1;
546 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
m_l1ExtraCenJet->begin();
549 if (checkBxInEvent) {
550 if (iterColl->bx() != bxInEvent) {
552 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
556 if (!checkObjIndexInColl) {
557 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" indexInColl = " << indexInColl
558 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 559 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
560 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
562 if (objIndexInColl == indexInColl) {
563 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
564 <<
" indexInColl = " << indexInColl <<
" ET = " << std::right << std::setw(6) << (iterColl->et())
566 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
567 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
572 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " << std::right
573 << std::setw(6) << (iterColl->et()) <<
" GeV" 574 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
575 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
581 oStr <<
"\n ForJet collection\n" << std::endl;
583 int indexInColl = -1;
585 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
m_l1ExtraForJet->begin();
588 if (checkBxInEvent) {
589 if (iterColl->bx() != bxInEvent) {
591 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
595 if (!checkObjIndexInColl) {
596 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" indexInColl = " << indexInColl
597 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 598 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
599 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
601 if (objIndexInColl == indexInColl) {
602 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
603 <<
" indexInColl = " << indexInColl <<
" ET = " << std::right << std::setw(6) << (iterColl->et())
605 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
606 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
611 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " << std::right
612 << std::setw(6) << (iterColl->et()) <<
" GeV" 613 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
614 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
620 oStr <<
"\n TauJet collection\n" << std::endl;
622 int indexInColl = -1;
624 for (l1extra::L1JetParticleCollection::const_iterator iterColl =
m_l1ExtraTauJet->begin();
627 if (checkBxInEvent) {
628 if (iterColl->bx() != bxInEvent) {
630 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
634 if (!checkObjIndexInColl) {
635 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" indexInColl = " << indexInColl
636 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 637 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
638 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
640 if (objIndexInColl == indexInColl) {
641 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
642 <<
" indexInColl = " << indexInColl <<
" ET = " << std::right << std::setw(6) << (iterColl->et())
644 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
645 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
650 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " << std::right
651 << std::setw(6) << (iterColl->et()) <<
" GeV" 652 <<
" eta = " << std::right << std::setw(8) << (iterColl->eta()) <<
" phi = " << std::right
653 << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
659 oStr <<
"\n ETM collection\n" << std::endl;
661 int indexInColl = -1;
663 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
m_l1ExtraETM->begin();
666 if (checkBxInEvent) {
667 if (iterColl->bx() != bxInEvent) {
669 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
673 if (!checkObjIndexInColl) {
674 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" indexInColl = " << indexInColl
675 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 676 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
678 if (objIndexInColl == indexInColl) {
679 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
680 <<
" indexInColl = " << indexInColl <<
" ET = " << std::right << std::setw(6) << (iterColl->et())
682 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
687 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " << std::right
688 << std::setw(6) << (iterColl->et()) <<
" GeV" 689 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
695 oStr <<
"\n ETT collection\n" << std::endl;
697 int indexInColl = -1;
699 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
m_l1ExtraETT->begin();
702 if (checkBxInEvent) {
703 if (iterColl->bx() != bxInEvent) {
705 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
709 if (!checkObjIndexInColl) {
710 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" indexInColl = " << indexInColl
711 <<
" ET = " << std::right << std::setw(6) << (iterColl->etTotal()) <<
" GeV" << std::endl;
713 if (objIndexInColl == indexInColl) {
714 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
715 <<
" indexInColl = " << indexInColl <<
" ET = " << std::right << std::setw(6)
716 << (iterColl->etTotal()) <<
" GeV" << std::endl;
721 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " << std::right
722 << std::setw(6) << (iterColl->etTotal()) <<
" GeV" << std::endl;
728 oStr <<
"\n HTT collection\n" << std::endl;
730 int indexInColl = -1;
732 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
m_l1ExtraHTT->begin();
735 if (checkBxInEvent) {
736 if (iterColl->bx() != bxInEvent) {
738 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
742 if (!checkObjIndexInColl) {
743 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" indexInColl = " << indexInColl
744 <<
" ET = " << std::right << std::setw(6) << (iterColl->etTotal()) <<
" GeV" << std::endl;
746 if (objIndexInColl == indexInColl) {
747 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
748 <<
" indexInColl = " << indexInColl <<
" ET = " << std::right << std::setw(6)
749 << (iterColl->etTotal()) <<
" GeV" << std::endl;
754 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " << std::right
755 << std::setw(6) << (iterColl->etTotal()) <<
" GeV" << std::endl;
761 oStr <<
"\n HTM collection\n" << std::endl;
763 int indexInColl = -1;
765 for (l1extra::L1EtMissParticleCollection::const_iterator iterColl =
m_l1ExtraHTM->begin();
768 if (checkBxInEvent) {
769 if (iterColl->bx() != bxInEvent) {
771 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
775 if (!checkObjIndexInColl) {
776 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" indexInColl = " << indexInColl
777 <<
" ET = " << std::right << std::setw(6) << (iterColl->et()) <<
" GeV" 778 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
780 if (objIndexInColl == indexInColl) {
781 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent
782 <<
" indexInColl = " << indexInColl <<
" ET = " << std::right << std::setw(6) << (iterColl->et())
784 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
789 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" ET = " << std::right
790 << std::setw(6) << (iterColl->et()) <<
" GeV" 791 <<
" phi = " << std::right << std::setw(8) << (iterColl->phi()) <<
" rad" << std::endl;
801 oStr <<
"\n HfBitCounts collection\n" << std::endl;
806 if (checkBxInEvent) {
807 if (iterColl->bx() != bxInEvent) {
809 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
811 if (!checkObjIndexInColl) {
813 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" count = " << iCount
820 if (objIndexInColl == iCount) {
821 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" count = " << iCount
830 if (objIndexInColl == iCount) {
831 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" count = " << iCount
840 oStr <<
"\n HfRingEtSums collection\n" << std::endl;
845 if (checkBxInEvent) {
846 if (iterColl->bx() != bxInEvent) {
848 oStr <<
"\n BxInEvent " << bxInEvent <<
": collection not in the event" << std::endl;
850 if (!checkObjIndexInColl) {
852 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" count = " << iCount
859 if (objIndexInColl == iCount) {
860 oStr <<
" bxInEvent = " << std::right << std::setw(2) << bxInEvent <<
" count = " << iCount
869 if (objIndexInColl == iCount) {
870 oStr <<
" bxInEvent = " << std::right << std::setw(2) << (iterColl->bx()) <<
" count = " << iCount
900 edm::LogInfo(
"L1GtObject") <<
"\n '" << gtObject <<
"' is not a recognized L1GtObject. ";
909 bool checkBxInEvent =
true;
910 bool checkObjIndexInColl =
false;
911 int objIndexInColl = -1;
913 printL1Extra(oStr, gtObject, checkBxInEvent, bxInEvent, checkObjIndexInColl, objIndexInColl);
917 bool checkBxInEvent =
false;
918 bool checkObjIndexInColl =
false;
920 int objIndexInColl = -1;
922 printL1Extra(oStr, gtObject, checkBxInEvent, bxInEvent, checkObjIndexInColl, objIndexInColl);
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string l1GtObjectEnumToString(const L1GtObject &)
T const * product() const