File indexing completed on 2024-04-06 12:21:15
0001 #include "L1Trigger/L1TNtuples/interface/L1AnalysisL1Menu.h"
0002 #include <vector>
0003
0004 void L1Analysis::L1AnalysisL1Menu::SetPrescaleFactorIndex(L1GtUtils& l1GtUtils_, const edm::Event& iEvent) {
0005 int iErrorCode = -1;
0006 const int pfSetIndexAlgorithmTrigger =
0007 l1GtUtils_.prescaleFactorSetIndex(iEvent, L1GtUtils::AlgorithmTrigger, iErrorCode);
0008
0009 if (iErrorCode == 0) {
0010 std::cout << "\nAlgorithm triggers: index for prescale factor set = " << pfSetIndexAlgorithmTrigger << "\nfor run "
0011 << iEvent.run() << ", luminosity block " << iEvent.luminosityBlock() << ", with L1 menu \n "
0012 << l1GtUtils_.l1TriggerMenu() << std::endl;
0013 data_.AlgoTrig_PrescaleFactorIndexValid = true;
0014 data_.AlgoTrig_PrescaleFactorIndex = pfSetIndexAlgorithmTrigger;
0015 } else {
0016 std::cout << "\nError encountered when retrieving the prescale factor set index"
0017 << "\n for algorithm triggers, for run " << iEvent.run() << ", luminosity block "
0018 << iEvent.luminosityBlock() << " with L1 menu \n " << l1GtUtils_.l1TriggerMenu()
0019 << "\n Error code: " << iErrorCode << "\n"
0020 << std::endl;
0021 data_.AlgoTrig_PrescaleFactorIndexValid = false;
0022 data_.AlgoTrig_PrescaleFactorIndex = 0;
0023 }
0024
0025 iErrorCode = -1;
0026 const int pfSetIndexTechnicalTrigger =
0027 l1GtUtils_.prescaleFactorSetIndex(iEvent, L1GtUtils::TechnicalTrigger, iErrorCode);
0028
0029 if (iErrorCode == 0) {
0030 std::cout << "\nAlgorithm triggers: index for prescale factor set = " << pfSetIndexTechnicalTrigger << "\nfor run "
0031 << iEvent.run() << ", luminosity block " << iEvent.luminosityBlock() << ", with L1 menu \n "
0032 << l1GtUtils_.l1TriggerMenu() << std::endl;
0033 data_.TechTrig_PrescaleFactorIndexValid = true;
0034 data_.TechTrig_PrescaleFactorIndex = pfSetIndexTechnicalTrigger;
0035 } else {
0036 std::cout << "\nError encountered when retrieving the prescale factor set index"
0037 << "\n for algorithm triggers, for run " << iEvent.run() << ", luminosity block "
0038 << iEvent.luminosityBlock() << " with L1 menu \n " << l1GtUtils_.l1TriggerMenu()
0039 << "\n Error code: " << iErrorCode << "\n"
0040 << std::endl;
0041 data_.TechTrig_PrescaleFactorIndexValid = false;
0042 data_.TechTrig_PrescaleFactorIndex = 0;
0043 }
0044 }