59 m_l1GtDaqReadoutRecordInputTag(parSet.getParameter<edm::InputTag>(
60 "L1GtDaqReadoutRecordInputTag")),
63 m_l1GtRecordInputTag(parSet.getParameter<edm::InputTag>(
64 "L1GtRecordInputTag")),
67 m_l1GtObjectMapTag(parSet.getParameter<edm::InputTag>(
71 m_l1GmtInputTag(parSet.getParameter<edm::InputTag>(
75 m_l1GtTmLInputTag(parSet.getParameter<edm::InputTag> (
79 m_condInEdmInputTag(parSet.getParameter<edm::InputTag> (
80 "CondInEdmInputTag")),
83 m_nameAlgTechTrig(parSet.getParameter<std::string> (
"AlgorithmName")),
84 m_condName(parSet.getParameter<std::string> (
"ConditionName")),
85 m_bitNumber(parSet.getParameter<unsigned int> (
"BitNumber")),
87 m_l1GtUtilsConfiguration(parSet.getParameter<unsigned int> (
"L1GtUtilsConfiguration")),
88 m_l1GtTmLInputTagProv(parSet.getParameter<bool> (
"L1GtTmLInputTagProv"))
92 <<
"\n Input parameters for L1 GT test analyzer"
93 <<
"\n L1 GT DAQ product: "
95 <<
"\n L1 GT lite product: "
97 <<
"\n L1 GT object map collection: "
99 <<
"\n Muon collection from GMT: "
101 <<
"\n L1 trigger menu lite product: "
104 <<
"\n Condition, if a physics algorithm is requested: " <<
m_condName
105 <<
"\n Bit number for an algorithm or technical trigger: " <<
m_bitNumber
107 <<
"\n Retrieve input tag from provenance for L1 trigger menu lite in the L1GtUtils: "
109 <<
" \n" << std::endl;
151 <<
"\n**** L1GtAnalyzer::analyzeDecisionReadoutRecord ****\n"
156 std::ostringstream myCoutStream;
162 if (!gtReadoutRecord.
isValid()) {
164 LogDebug(
"L1GtAnalyzer") <<
"\nL1GlobalTriggerReadoutRecord with \n "
166 <<
"\nrequested in configuration, but not found in the event."
167 <<
"\nExit the method.\n" << std::endl;
173 bool gtDecision = gtReadoutRecord->decision();
174 DecisionWord gtDecisionWord = gtReadoutRecord->decisionWord();
178 <<
"\n GlobalTrigger decision: " << gtDecision << std::endl;
181 gtReadoutRecord->printGtDecision(myCoutStream);
184 gtReadoutRecord->printTechnicalTrigger(myCoutStream);
186 LogDebug(
"L1GtAnalyzer") << myCoutStream.str() << std::endl;
188 myCoutStream.str(
"");
189 myCoutStream.clear();
198 <<
"\n**** L1GtAnalyzer::analyzeDecisionLiteRecord ****\n"
206 LogDebug(
"L1GtAnalyzer") <<
"\nL1GlobalTriggerRecord with \n "
208 <<
"\nrequested in configuration, but not found in the event."
209 <<
"\nExit the method.\n" << std::endl;
215 const DecisionWord gtDecisionWord = gtRecord->decisionWord();
225 <<
": " << algResult <<
"\n" << std::endl;
235 std::ostringstream myCoutStream;
252 myCoutStream <<
"\nL1 configuration code: \n"
254 <<
"\n 0 - Retrieve L1 trigger configuration from L1GtTriggerMenuLite only"
255 <<
"\n 10000 L1GtTriggerMenuLite product is valid"
256 <<
"\n 99999 L1GtTriggerMenuLite product not valid. Error."
258 <<
"\n 100000 - Fall through: try first L1GtTriggerMenuLite; if not valid,try event setup."
259 <<
"\n 110000 L1GtTriggerMenuLite product is valid"
260 <<
"\n 120000 L1GtTriggerMenuLite product not valid, event setup valid."
261 <<
"\n 199999 L1GtTriggerMenuLite product not valid, event setup not valid. Error."
263 <<
"\n 200000 - Retrieve L1 trigger configuration from event setup only."
264 <<
"\n 210000 Event setup valid."
265 <<
"\n 299999 Event setup not valid. Error."
267 <<
"\n 300000 - No L1 trigger configuration requested to be retrieved. Error"
268 <<
"\n Must call before using L1GtUtils methods at least one of the following:"
269 <<
"\n retrieveL1GtTriggerMenuLite or retrieveL1EventSetup.\n"
275 myCoutStream <<
"\nL1 configuration code:" << l1ConfCode
276 <<
"\nValid L1 trigger configuration." << std::endl;
278 myCoutStream <<
"\nL1 trigger menu name and implementation:" <<
"\n"
283 myCoutStream <<
"\nL1 configuration code:" << l1ConfCode
284 <<
"\nNo valid L1 trigger configuration available."
285 <<
"\nSee text above for error code interpretation"
286 <<
"\nNo return here, in order to test each method, protected against configuration error."
293 <<
"\n******** Results found with input tags retrieved from provenance ******** \n"
320 myCoutStream <<
"\n\nMethods:"
321 <<
"\n decisionBeforeMask(iEvent, m_nameAlgTechTrig, iErrorCode)"
322 <<
"\n decisionAfterMask(iEvent, m_nameAlgTechTrig, iErrorCode)"
323 <<
"\n decision(iEvent, m_nameAlgTechTrig, iErrorCode)"
324 <<
"\n prescaleFactor(iEvent, m_nameAlgTechTrig, iErrorCode)"
325 <<
"\n triggerMask(iEvent, m_nameAlgTechTrig, iErrorCode)"
326 <<
"\n triggerMask(m_nameAlgTechTrig,iErrorCode)"
327 <<
"\n\n" << std::endl;
330 if (iErrorCode == 0) {
331 myCoutStream <<
"\nDecision before trigger mask for "
335 <<
": " << decisionAfterMaskAlgTechTrig << std::endl;
336 myCoutStream <<
"Decision (after trigger mask) for "
341 <<
": " << prescaleFactorAlgTechTrig
345 <<
": " << triggerMaskAlgTechTrig
348 }
else if (iErrorCode == 1) {
350 <<
" does not exist in the L1 menu "
354 myCoutStream <<
"\nError: "
355 <<
"\n An error was encountered when retrieving decision, mask and prescale factor for "
358 << iErrorCode << std::endl;
368 if (iErrorCode == 0) {
370 <<
"(faster method): " << triggerMaskAlgTechTrig
373 }
else if (iErrorCode == 1) {
375 <<
" does not exist in the L1 menu "
379 myCoutStream <<
"\nError: "
380 <<
"\n An error was encountered when fast retrieving trigger mask for "
383 << iErrorCode << std::endl;
394 myCoutStream <<
"\nMethods:"
395 <<
"\n prescaleFactorSetIndex(iEvent, trigCategory, iErrorCode)"
396 <<
"\n prescaleFactorSet(iEvent, trigCategory,iErrorCode)\n"
401 iEvent, trigCategory, iErrorCode);
403 if (iErrorCode == 0) {
405 <<
"\nAlgorithm triggers: index for prescale factor set = "
406 << pfSetIndexAlgorithmTrigger <<
"\nfor run " << iEvent.
run()
414 <<
"\nError encountered when retrieving the prescale factor set index"
415 <<
"\n for algorithm triggers, for run " << iEvent.
run()
418 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
422 const std::vector<int>& pfSetAlgorithmTrigger =
425 if (iErrorCode == 0) {
426 myCoutStream <<
"\nAlgorithm triggers: prescale factor set index = "
427 << pfSetIndexAlgorithmTrigger <<
"\nfor run " << iEvent.
run()
433 for (std::vector<int>::const_iterator cItBit =
434 pfSetAlgorithmTrigger.begin(); cItBit
435 != pfSetAlgorithmTrigger.end(); ++cItBit) {
438 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
439 <<
": prescale factor = " << (*cItBit) << std::endl;
445 <<
"\nError encountered when retrieving the prescale factor set "
446 <<
"\n for algorithm triggers, for run " << iEvent.
run()
449 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
454 myCoutStream <<
"\nMethod:"
455 <<
"\n triggerMaskSet(trigCategory, iErrorCode)"
459 const std::vector<unsigned int>& tmSetAlgorithmTrigger =
462 if (iErrorCode == 0) {
463 myCoutStream <<
"\nAlgorithm triggers: trigger mask set for run "
464 << iEvent.
run() <<
", luminosity block "
469 for (std::vector<unsigned int>::const_iterator cItBit =
470 tmSetAlgorithmTrigger.begin(); cItBit
471 != tmSetAlgorithmTrigger.end(); ++cItBit) {
474 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
475 <<
": trigger mask = " << (*cItBit) << std::endl;
481 <<
"\nError encountered when retrieving the trigger mask set "
482 <<
"\n for algorithm triggers, for run " << iEvent.
run()
485 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
490 std::string triggerAlgTechTrig =
"PhysicsAlgorithms";
492 myCoutStream <<
"\nDeprecated methods:"
493 <<
"\n prescaleFactorSetIndex(iEvent, triggerAlgTechTrig, iErrorCode)"
494 <<
"\n prescaleFactorSet(iEvent, triggerAlgTechTrig, iErrorCode)"
499 iEvent, triggerAlgTechTrig, iErrorCode);
501 if (iErrorCode == 0) {
502 myCoutStream <<
"\nAlgorithm triggers: index for prescale factor set = "
503 << pfSetIndexPhysicsAlgorithms <<
"\nfor run " << iEvent.
run()
506 <<
"Warning: deprecated method.\n" << std::endl;
510 <<
"\nError encountered when retrieving the prescale factor set index"
511 <<
"\n for algorithm triggers, for run " << iEvent.
run()
514 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
519 const std::vector<int>& pfSetPhysicsAlgorithms =
523 if (iErrorCode == 0) {
524 myCoutStream <<
"\nAlgorithm triggers: prescale factor set index = "
525 << pfSetIndexPhysicsAlgorithms <<
"\nfor run " << iEvent.
run()
528 <<
"\nWarning: deprecated method.\n" << std::endl;
531 for (std::vector<int>::const_iterator cItBit =
532 pfSetPhysicsAlgorithms.begin(); cItBit
533 != pfSetPhysicsAlgorithms.end(); ++cItBit) {
536 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
537 <<
": prescale factor = " << (*cItBit) << std::endl;
543 <<
"\nError encountered when retrieving the prescale factor set "
544 <<
"\n for algorithm triggers, for run " << iEvent.
run()
547 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
552 myCoutStream <<
"\nDeprecated methods:"
553 <<
"\n triggerMaskSet(triggerAlgTechTrig, iErrorCode)"
557 const std::vector<unsigned int>& tmSetPhysicsAlgorithms =
560 if (iErrorCode == 0) {
561 myCoutStream <<
"\nAlgorithm triggers: trigger mask set for run "
562 << iEvent.
run() <<
", luminosity block "
565 <<
"\nWarning: deprecated method.\n" << std::endl;
568 for (std::vector<unsigned int>::const_iterator cItBit =
569 tmSetPhysicsAlgorithms.begin(); cItBit
570 != tmSetPhysicsAlgorithms.end(); ++cItBit) {
573 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
574 <<
": trigger mask = " << (*cItBit) << std::endl;
580 <<
"\nError encountered when retrieving the trigger mask set "
581 <<
"\n for algorithm triggers, for run " << iEvent.
run()
584 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
594 myCoutStream <<
"\nMethods:"
595 <<
"\n prescaleFactorSetIndex(iEvent, trigCategory, iErrorCode)"
596 <<
"\n prescaleFactorSet(iEvent, trigCategory,iErrorCode)\n"
601 iEvent, trigCategory, iErrorCode);
603 if (iErrorCode == 0) {
605 <<
"\nTechnical triggers: index for prescale factor set = "
606 << pfSetIndexTechnicalTrigger <<
"\nfor run " << iEvent.
run()
609 <<
"\nMethod: prescaleFactorSetIndex(iEvent, trigCategory, iErrorCode)\n"
614 <<
"\nError encountered when retrieving the prescale factor set index"
615 <<
"\n for technical triggers, for run " << iEvent.
run()
618 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
622 const std::vector<int>& pfSetTechnicalTrigger =
625 if (iErrorCode == 0) {
626 myCoutStream <<
"\nTechnical triggers: prescale factor set index = "
627 << pfSetIndexTechnicalTrigger <<
"\nfor run " << iEvent.
run()
630 <<
"\nMethod: prescaleFactorSet(iEvent, trigCategory,iErrorCode)\n"
634 for (std::vector<int>::const_iterator cItBit =
635 pfSetTechnicalTrigger.begin(); cItBit
636 != pfSetTechnicalTrigger.end(); ++cItBit) {
639 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
640 <<
": prescale factor = " << (*cItBit) << std::endl;
646 <<
"\nError encountered when retrieving the prescale factor set "
647 <<
"\n for technical triggers, for run " << iEvent.
run()
650 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
655 myCoutStream <<
"\nMethod:"
656 <<
"\n triggerMaskSet(trigCategory, iErrorCode)"
660 const std::vector<unsigned int>& tmSetTechnicalTrigger =
663 if (iErrorCode == 0) {
664 myCoutStream <<
"\nTechnical triggers: trigger mask set for run "
665 << iEvent.
run() <<
", luminosity block "
670 for (std::vector<unsigned int>::const_iterator cItBit =
671 tmSetTechnicalTrigger.begin(); cItBit
672 != tmSetTechnicalTrigger.end(); ++cItBit) {
675 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
676 <<
": trigger mask = " << (*cItBit) << std::endl;
682 <<
"\nError encountered when retrieving the trigger mask set "
683 <<
"\n for technical triggers, for run " << iEvent.
run()
686 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
691 triggerAlgTechTrig =
"TechnicalTriggers";
693 myCoutStream <<
"\nDeprecated methods:"
694 <<
"\n prescaleFactorSetIndex(iEvent, triggerAlgTechTrig, iErrorCode)"
695 <<
"\n prescaleFactorSet(iEvent, triggerAlgTechTrig, iErrorCode)"
700 iEvent, triggerAlgTechTrig, iErrorCode);
702 if (iErrorCode == 0) {
703 myCoutStream <<
"\nTechnical triggers: index for prescale factor set = "
704 << pfSetIndexTechnicalTriggers <<
"\nfor run " << iEvent.
run()
707 <<
"Warning: deprecated method.\n" << std::endl;
711 <<
"\nError encountered when retrieving the prescale factor set index"
712 <<
"\n for technical triggers, for run " << iEvent.
run()
715 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
720 const std::vector<int>& pfSetTechnicalTriggers =
724 if (iErrorCode == 0) {
725 myCoutStream <<
"\nTechnical triggers: prescale factor set index = "
726 << pfSetIndexTechnicalTriggers <<
"\nfor run " << iEvent.
run()
729 <<
"\nWarning: deprecated method.\n" << std::endl;
732 for (std::vector<int>::const_iterator cItBit =
733 pfSetTechnicalTriggers.begin(); cItBit
734 != pfSetTechnicalTriggers.end(); ++cItBit) {
737 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
738 <<
": prescale factor = " << (*cItBit) << std::endl;
744 <<
"\nError encountered when retrieving the prescale factor set "
745 <<
"\n for technical triggers, for run " << iEvent.
run()
748 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
753 myCoutStream <<
"\nDeprecated methods:"
754 <<
"\n triggerMaskSet(triggerAlgTechTrig, iErrorCode)"
758 const std::vector<unsigned int>& tmSetTechnicalTriggers =
761 if (iErrorCode == 0) {
762 myCoutStream <<
"\nTechnical triggers: trigger mask set for run "
763 << iEvent.
run() <<
", luminosity block "
766 <<
"\nWarning: deprecated method.\n" << std::endl;
769 for (std::vector<unsigned int>::const_iterator cItBit =
770 tmSetTechnicalTriggers.begin(); cItBit
771 != tmSetTechnicalTriggers.end(); ++cItBit) {
774 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
775 <<
": trigger mask = " << (*cItBit) << std::endl;
781 <<
"\nError encountered when retrieving the trigger mask set "
782 <<
"\n for technical triggers, for run " << iEvent.
run()
785 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
795 <<
"\n******** Results found with input tags provided in the configuration file ******** \n"
797 <<
"\n L1GlobalTriggerReadoutRecord: "
826 myCoutStream <<
"\n\nMethods:"
827 <<
"\n decisionBeforeMask(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, m_nameAlgTechTrig, iErrorCode)"
828 <<
"\n decisionAfterMask(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, m_nameAlgTechTrig, iErrorCode)"
829 <<
"\n decision(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, m_nameAlgTechTrig, iErrorCode)"
830 <<
"\n prescaleFactor(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, m_nameAlgTechTrig, iErrorCode)"
831 <<
"\n triggerMask(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, m_nameAlgTechTrig, iErrorCode)"
836 if (iErrorCode == 0) {
837 myCoutStream <<
"\nDecision before trigger mask for "
841 <<
": " << decisionAfterMaskAlgTechTrigITag << std::endl;
842 myCoutStream <<
"Decision (after trigger mask) for "
847 <<
": " << prescaleFactorAlgTechTrigITag
851 <<
": " << triggerMaskAlgTechTrigITag
854 }
else if (iErrorCode == 1) {
856 <<
" does not exist in the L1 menu "
860 myCoutStream <<
"\nError: "
861 <<
"\n An error was encountered when retrieving decision, mask and prescale factor for "
864 << iErrorCode << std::endl;
876 myCoutStream <<
"\nMethods:"
877 <<
"\n prescaleFactorSetIndex(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, trigCategory, iErrorCode)"
878 <<
"\n prescaleFactorSet(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, trigCategory,iErrorCode)\n"
884 trigCategory, iErrorCode);
886 if (iErrorCode == 0) {
888 <<
"\nAlgorithm triggers: index for prescale factor set = "
889 << pfSetIndexAlgorithmTriggerITag <<
"\nfor run " << iEvent.
run()
897 <<
"\nError encountered when retrieving the prescale factor set index"
898 <<
"\n for algorithm triggers, for run " << iEvent.
run()
901 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
905 const std::vector<int>& pfSetAlgorithmTriggerITag =
909 if (iErrorCode == 0) {
910 myCoutStream <<
"\nAlgorithm triggers: prescale factor set index = "
911 << pfSetIndexAlgorithmTriggerITag <<
"\nfor run " << iEvent.
run()
917 for (std::vector<int>::const_iterator cItBit =
918 pfSetAlgorithmTriggerITag.begin(); cItBit
919 != pfSetAlgorithmTriggerITag.end(); ++cItBit) {
922 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
923 <<
": prescale factor = " << (*cItBit) << std::endl;
929 <<
"\nError encountered when retrieving the prescale factor set "
930 <<
"\n for algorithm triggers, for run " << iEvent.
run()
933 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
939 triggerAlgTechTrig =
"PhysicsAlgorithms";
941 myCoutStream <<
"\nDeprecated methods:"
942 <<
"\n prescaleFactorSetIndex(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, triggerAlgTechTrig, iErrorCode)"
943 <<
"\n prescaleFactorSet(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, triggerAlgTechTrig, iErrorCode)"
949 triggerAlgTechTrig, iErrorCode);
951 if (iErrorCode == 0) {
952 myCoutStream <<
"\nAlgorithm triggers: index for prescale factor set = "
953 << pfSetIndexPhysicsAlgorithmsITag <<
"\nfor run " << iEvent.
run()
956 <<
"Warning: deprecated method.\n" << std::endl;
960 <<
"\nError encountered when retrieving the prescale factor set index"
961 <<
"\n for algorithm triggers, for run " << iEvent.
run()
964 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
969 const std::vector<int>& pfSetPhysicsAlgorithmsITag =
974 if (iErrorCode == 0) {
975 myCoutStream <<
"\nAlgorithm triggers: prescale factor set index = "
976 << pfSetIndexPhysicsAlgorithmsITag <<
"\nfor run " << iEvent.
run()
979 <<
"\nWarning: deprecated method.\n" << std::endl;
982 for (std::vector<int>::const_iterator cItBit =
983 pfSetPhysicsAlgorithmsITag.begin(); cItBit
984 != pfSetPhysicsAlgorithmsITag.end(); ++cItBit) {
987 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
988 <<
": prescale factor = " << (*cItBit) << std::endl;
994 <<
"\nError encountered when retrieving the prescale factor set "
995 <<
"\n for algorithm triggers, for run " << iEvent.
run()
998 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
1009 myCoutStream <<
"\nMethods:"
1010 <<
"\n prescaleFactorSetIndex(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, trigCategory, iErrorCode)"
1011 <<
"\n prescaleFactorSet(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, trigCategory,iErrorCode)\n"
1017 trigCategory, iErrorCode);
1019 if (iErrorCode == 0) {
1021 <<
"\nTechnical triggers: index for prescale factor set = "
1022 << pfSetIndexTechnicalTriggerITag <<
"\nfor run " << iEvent.
run()
1029 <<
"\nError encountered when retrieving the prescale factor set index"
1030 <<
"\n for technical triggers, for run " << iEvent.
run()
1033 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
1037 const std::vector<int>& pfSetTechnicalTriggerITag =
1041 if (iErrorCode == 0) {
1042 myCoutStream <<
"\nTechnical triggers: prescale factor set index = "
1043 << pfSetIndexTechnicalTriggerITag <<
"\nfor run " << iEvent.
run()
1049 for (std::vector<int>::const_iterator cItBit =
1050 pfSetTechnicalTriggerITag.begin(); cItBit
1051 != pfSetTechnicalTriggerITag.end(); ++cItBit) {
1054 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
1055 <<
": prescale factor = " << (*cItBit) << std::endl;
1061 <<
"\nError encountered when retrieving the prescale factor set "
1062 <<
"\n for technical triggers, for run " << iEvent.
run()
1065 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
1071 triggerAlgTechTrig =
"TechnicalTriggers";
1073 myCoutStream <<
"\nDeprecated methods:"
1074 <<
"\n prescaleFactorSetIndex(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, triggerAlgTechTrig, iErrorCode)"
1075 <<
"\n prescaleFactorSet(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, triggerAlgTechTrig, iErrorCode)"
1081 triggerAlgTechTrig, iErrorCode);
1083 if (iErrorCode == 0) {
1084 myCoutStream <<
"\nTechnical triggers: index for prescale factor set = "
1085 << pfSetIndexTechnicalTriggersITag <<
"\nfor run " << iEvent.
run()
1088 <<
"Warning: deprecated method.\n" << std::endl;
1092 <<
"\nError encountered when retrieving the prescale factor set index"
1093 <<
"\n for technical triggers, for run " << iEvent.
run()
1096 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
1101 const std::vector<int>& pfSetTechnicalTriggersITag =
1106 if (iErrorCode == 0) {
1107 myCoutStream <<
"\nTechnical triggers: prescale factor set index = "
1108 << pfSetIndexTechnicalTriggersITag <<
"\nfor run " << iEvent.
run()
1111 <<
"\nWarning: deprecated method.\n" << std::endl;
1114 for (std::vector<int>::const_iterator cItBit =
1115 pfSetTechnicalTriggersITag.begin(); cItBit
1116 != pfSetTechnicalTriggersITag.end(); ++cItBit) {
1119 myCoutStream <<
"Bit number " << std::right << std::setw(4) << iBit
1120 <<
": prescale factor = " << (*cItBit) << std::endl;
1126 <<
"\nError encountered when retrieving the prescale factor set "
1127 <<
"\n for technical triggers, for run " << iEvent.
run()
1130 <<
"\n Error code: " << iErrorCode <<
"\n" << std::endl;
1137 LogDebug(
"L1GtAnalyzer") << myCoutStream.str() << std::endl;
1139 myCoutStream.str(
"");
1140 myCoutStream.clear();
1148 <<
"\n**** L1GtAnalyzer::analyzeL1GtUtilsMenuLite ****\n"
1175 LogDebug(
"L1GtAnalyzer") <<
"\n**** L1GtAnalyzer::analyzeL1GtUtilsEventSetup ****\n"
1192 LogDebug(
"L1GtAnalyzer") <<
"\n**** L1GtAnalyzer::analyzeL1GtUtils ****\n"
1223 <<
"\n**** L1GtAnalyzer::analyzeObjectMap object map product ****\n"
1228 std::ostringstream myCoutStream;
1235 if (!gtObjectMapRecord.
isValid()) {
1237 <<
"\nWarning: L1GlobalTriggerObjectMapRecord with input tag "
1239 <<
"\nrequested in configuration, but not found in the event."
1240 <<
"\nExit the method.\n" << std::endl;
1246 const std::vector<L1GlobalTriggerObjectMap>& objMapVec =
1247 gtObjectMapRecord->gtObjectMap();
1250 for (std::vector<L1GlobalTriggerObjectMap>::const_iterator it =
1251 objMapVec.begin(); it != objMapVec.end(); ++it) {
1253 (*it).print(myCoutStream);
1262 myCoutStream <<
"\n Number of combinations passing ("
1264 << comb->size() << std::endl;
1272 const bool result = gtObjectMapRecord->getConditionResult(
1275 myCoutStream <<
"\n Result for condition " <<
m_condName
1281 <<
"Test gtObjectMapRecord in L1GlobalTrigger \n\n"
1282 << myCoutStream.str() <<
"\n\n" << std::endl;
1283 myCoutStream.str(
"");
1284 myCoutStream.clear();
1293 <<
"\n**** L1GtAnalyzer::analyzeL1GtTriggerMenuLite ****\n"
1298 std::ostringstream myCoutStream;
1308 if (!triggerMenuLite.
isValid()) {
1310 LogDebug(
"L1GtAnalyzer") <<
"\nL1GtTriggerMenuLite with \n "
1312 <<
"\nrequested in configuration, but not found in the event."
1313 <<
"\nExit the method.\n" << std::endl;
1319 myCoutStream << (*triggerMenuLite);
1323 const std::string& triggerMenuInterface =
1324 triggerMenuLite->gtTriggerMenuInterface();
1325 const std::string& triggerMenuName = triggerMenuLite->gtTriggerMenuName();
1326 const std::string& triggerMenuImplementation =
1327 triggerMenuLite->gtTriggerMenuImplementation();
1328 const std::string& scaleDbKey = triggerMenuLite->gtScaleDbKey();
1332 triggerMenuLite->gtAlgorithmAliasMap();
1334 triggerMenuLite->gtTechnicalTriggerMap();
1336 const std::vector<unsigned int>& triggerMaskAlgoTrig =
1337 triggerMenuLite->gtTriggerMaskAlgoTrig();
1338 const std::vector<unsigned int>& triggerMaskTechTrig =
1339 triggerMenuLite->gtTriggerMaskTechTrig();
1341 const std::vector<std::vector<int> >& prescaleFactorsAlgoTrig =
1342 triggerMenuLite->gtPrescaleFactorsAlgoTrig();
1343 const std::vector<std::vector<int> >& prescaleFactorsTechTrig =
1344 triggerMenuLite->gtPrescaleFactorsTechTrig();
1348 size_t nrDefinedAlgo = algorithmMap.size();
1349 size_t nrDefinedTech = technicalTriggerMap.size();
1353 myCoutStream <<
"\n ********** L1 Trigger Menu - printing ********** \n"
1354 <<
"\nL1 Trigger Menu Interface: " << triggerMenuInterface
1355 <<
"\nL1 Trigger Menu Name: " << triggerMenuName
1356 <<
"\nL1 Trigger Menu Implementation: " << triggerMenuImplementation
1357 <<
"\nAssociated Scale DB Key: " << scaleDbKey <<
"\n\n"
1358 <<
"\nL1 Physics Algorithms: " << nrDefinedAlgo <<
" algorithms defined." <<
"\n\n"
1360 << std::right << std::setw(35) <<
"Algorithm Name" <<
" "
1361 << std::right << std::setw(35) <<
"Algorithm Alias" <<
" "
1362 << std::right << std::setw(12) <<
"Trigger Mask";
1363 for (
unsigned iSet = 0; iSet < prescaleFactorsAlgoTrig.size(); iSet++) {
1364 myCoutStream << std::right << std::setw(10) <<
"PF Set "
1365 << std::right << std::setw(2) << iSet;
1368 myCoutStream << std::endl;
1372 != algorithmMap.end(); itTrig++) {
1374 const unsigned int bitNumber = itTrig->first;
1375 const std::string& aName = itTrig->second;
1379 if (itAlias != algorithmAliasMap.end()) {
1380 aAlias = itAlias->second;
1383 myCoutStream << std::setw(6) << bitNumber <<
" "
1384 << std::right << std::setw(35) << aName <<
" "
1385 << std::right << std::setw(35) << aAlias <<
" "
1386 << std::right << std::setw(12) << triggerMaskAlgoTrig[bitNumber];
1387 for (
unsigned iSet = 0; iSet < prescaleFactorsAlgoTrig.size(); iSet++) {
1388 myCoutStream << std::right << std::setw(12) << prescaleFactorsAlgoTrig[iSet][bitNumber];
1391 myCoutStream << std::endl;
1394 myCoutStream <<
"\nL1 Technical Triggers: " << nrDefinedTech
1395 <<
" technical triggers defined." <<
"\n\n" << std::endl;
1396 if (nrDefinedTech) {
1398 << std::right << std::setw(6) <<
"Bit Number "
1399 << std::right << std::setw(45) <<
" Technical trigger name " <<
" "
1400 << std::right << std::setw(12) <<
"Trigger Mask";
1401 for (
unsigned iSet = 0; iSet < prescaleFactorsTechTrig.size(); iSet++) {
1402 myCoutStream << std::right << std::setw(10) <<
"PF Set "
1403 << std::right << std::setw(2) << iSet;
1406 myCoutStream << std::endl;
1410 != technicalTriggerMap.end(); itTrig++) {
1412 unsigned int bitNumber = itTrig->first;
1413 std::string aName = itTrig->second;
1415 myCoutStream << std::setw(6) << bitNumber <<
" "
1416 << std::right << std::setw(45) << aName
1417 << std::right << std::setw(12) << triggerMaskTechTrig[bitNumber];
1418 for (
unsigned iSet = 0; iSet < prescaleFactorsTechTrig.size(); iSet++) {
1419 myCoutStream << std::right << std::setw(12) << prescaleFactorsTechTrig[iSet][bitNumber];
1422 myCoutStream << std::endl;
1429 const std::string* algorithmAlias = triggerMenuLite->gtAlgorithmAlias(
1433 <<
"\nError code retrieving alias for algorithm with bit number "
1436 myCoutStream <<
"\nAlias for algorithm with bit number " <<
m_bitNumber
1437 <<
": " << (*algorithmAlias) << std::endl;
1441 const std::string* algorithmName = triggerMenuLite->gtAlgorithmName(
1445 <<
"\nError code retrieving name for algorithm with bit number "
1448 myCoutStream <<
"\nName for algorithm with bit number " <<
m_bitNumber
1449 <<
": " << (*algorithmName) << std::endl;
1453 const std::string* techTrigName = triggerMenuLite->gtTechTrigName(
1457 <<
"\nError code retrieving name for technical trigger with bit number "
1460 myCoutStream <<
"\nName for technical trigger with bit number "
1461 <<
m_bitNumber <<
": " << (*techTrigName) << std::endl;
1465 const unsigned int bitNumber = triggerMenuLite->gtBitNumber(
1469 <<
"\nError code retrieving bit number for algorithm/technical trigger "
1472 myCoutStream <<
"\nBit number for algorithm/technical trigger "
1482 LogDebug(
"L1GtAnalyzer") << myCoutStream.str() << std::endl;
1484 myCoutStream.str(
"");
1485 myCoutStream.clear();
1494 <<
"\n**** L1GtAnalyzer::analyzeConditionsInRunBlock ****\n"
1499 std::ostringstream myCoutStream;
1505 if (!condInRunBlock.
isValid()) {
1507 LogDebug(
"L1GtAnalyzer") <<
"\nConditionsInRunBlock with \n "
1509 <<
"\nrequested in configuration, but not found in the event."
1510 <<
"\nExit the method.\n" << std::endl;
1515 const boost::uint16_t beamModeVal = condInRunBlock->beamMode;
1516 const boost::uint16_t beamMomentumVal = condInRunBlock->beamMomentum;
1517 const boost::uint32_t lhcFillNumberVal = condInRunBlock->lhcFillNumber;
1520 myCoutStream <<
"\nLHC quantities in run " << iRun.
run()
1521 <<
"\n Beam Mode = " << beamModeVal
1522 <<
"\n Beam Momentum = " << beamMomentumVal <<
" GeV"
1523 <<
"\n LHC Fill Number = " << lhcFillNumberVal
1526 LogDebug(
"L1GtAnalyzer") << myCoutStream.str() << std::endl;
1528 myCoutStream.str(
"");
1529 myCoutStream.clear();
1537 <<
"\n**** L1GtAnalyzer::analyzeConditionsInLumiBlock ****\n"
1542 std::ostringstream myCoutStream;
1548 if (!condInLumiBlock.
isValid()) {
1550 LogDebug(
"L1GtAnalyzer") <<
"\nConditionsInLumiBlock with \n "
1552 <<
"\nrequested in configuration, but not found in the event."
1553 <<
"\nExit the method.\n" << std::endl;
1558 const boost::uint32_t totalIntensityBeam1Val =
1559 condInLumiBlock->totalIntensityBeam1;
1560 const boost::uint32_t totalIntensityBeam2Val =
1561 condInLumiBlock->totalIntensityBeam2;
1563 myCoutStream <<
"\nLHC quantities in luminosity section "
1566 <<
"\n Total Intensity Beam 1 (Integer × 10E10 charges) = "
1567 << totalIntensityBeam1Val
1568 <<
"\n Total Intensity Beam 2 (Integer × 10E10 charges) = "
1569 << totalIntensityBeam2Val << std::endl;
1571 LogDebug(
"L1GtAnalyzer") << myCoutStream.str() << std::endl;
1573 myCoutStream.str(
"");
1574 myCoutStream.clear();
1582 std::ostringstream myCoutStream;
1588 if (!condInEventBlock.
isValid()) {
1590 LogDebug(
"L1GtAnalyzer") <<
"\nConditionsInEventBlock with \n "
1592 <<
"\nrequested in configuration, but not found in the event."
1593 <<
"\nExit the method.\n" << std::endl;
1598 const boost::uint16_t bstMasterStatusVal =
1599 condInEventBlock->bstMasterStatus;
1600 const boost::uint32_t turnCountNumberVal =
1601 condInEventBlock->turnCountNumber;
1603 myCoutStream <<
"\nLHC quantities in event " << iEvent.
id().
event()
1605 <<
" from run " << iEvent.
run() <<
"\n BST Master Status = "
1606 << bstMasterStatusVal <<
"\n Turn count number = "
1607 << turnCountNumberVal << std::endl;
1609 LogDebug(
"L1GtAnalyzer") << myCoutStream.str() << std::endl;
1611 myCoutStream.str(
"");
1612 myCoutStream.clear();
virtual void analyzeObjectMap(const edm::Event &, const edm::EventSetup &)
analyze: object map product
EventNumber_t event() const
bool getByLabel(std::string const &label, Handle< PROD > &result) const
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
void analyzeDecisionLiteRecord(const edm::Event &, const edm::EventSetup &)
analyze: decision for a given algorithm via trigger menu
edm::InputTag m_l1GmtInputTag
input tag for muon collection from GMT
virtual void analyzeDecisionReadoutRecord(const edm::Event &, const edm::EventSetup &)
edm::InputTag m_condInEdmInputTag
input tag for ConditionInEdm products
edm::InputTag m_l1GtRecordInputTag
input tags for GT lite product
virtual void endJob()
end of job
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
analyze each event: event loop over various code snippets
edm::LuminosityBlockNumber_t luminosityBlock() const
Run const & getRun() const
const std::vector< unsigned int > & triggerMaskSet(const TriggerCategory &trigCategory, int &errorCode)
const std::string & l1TriggerMenu() const
return the L1 trigger menu name
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
end section
bool getByLabel(std::string const &label, Handle< PROD > &result) const
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
void analyzeConditionsInEventBlock(const edm::Event &, const edm::EventSetup &)
to be used in analyze/produce/filter
LuminosityBlockNumber_t luminosityBlock() const
void analyzeConditionsInRunBlock(const edm::Run &, const edm::EventSetup &)
void analyzeL1GtUtils(const edm::Event &, const edm::EventSetup &)
std::string m_nameAlgTechTrig
a physics algorithm (name or alias) or a technical trigger name
virtual void endRun(const edm::Run &, const edm::EventSetup &)
std::string m_condName
a condition in the physics algorithm to test the object maps
const bool decision(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
void analyzeL1GtTriggerMenuLite(const edm::Event &, const edm::EventSetup &)
analyze: usage of L1GtTriggerMenuLite
const std::string & l1TriggerMenuImplementation() const
return the L1 trigger menu implementation
edm::InputTag m_l1GtObjectMapTag
input tags for GT object map collection
std::vector< bool > DecisionWord
typedefs
const std::vector< int > & prescaleFactorSet(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode)
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed ...
unsigned int m_bitNumber
a bit number to retrieve the name and the alias
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void analyzeConditionsInLumiBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
to be used in beginLuminosityBlock
void retrieveL1GtTriggerMenuLite(const edm::Event &, edm::InputTag &)
T const * product() const
unsigned int m_l1GtUtilsConfiguration
L1 configuration code for L1GtUtils.
edm::InputTag m_l1GtDaqReadoutRecordInputTag
input tags for GT DAQ product
L1GtAnalyzer(const edm::ParameterSet &)
const int prescaleFactorSetIndex(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode) const
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
bool m_l1GtTmLInputTagProv
void analyzeL1GtUtilsEventSetup(const edm::Event &, const edm::EventSetup &)
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
void analyzeL1GtUtilsMenuLite(const edm::Event &, const edm::EventSetup &)
for tests, use only one of the following methods
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
edm::InputTag m_l1GtTmLInputTag
input tag for L1GtTriggerMenuLite
void analyzeL1GtUtilsCore(const edm::Event &, const edm::EventSetup &)
analyze: usage of L1GtUtils