CMS 3D CMS Logo

L1TMenuHelper.h
Go to the documentation of this file.
1 #ifndef DQM_L1TMONITOR_L1TMENUHELPER_H
2 #define DQM_L1TMONITOR_L1TMENUHELPER_H
3 
4 /*
5  * \file L1TMenuHelper.h
6  *
7  * \author J. Pela
8  *
9 */
10 
11 // system include files
12 #include <iostream>
13 #include <fstream>
14 #include <vector>
15 #include <memory>
16 #include <unistd.h>
17 
18 // user include files
23 
25 
27 
30 
32 
33 #include "TString.h"
34 
35 // Simplified structure for single object conditions information
41  unsigned int quality;
42  unsigned int etaRange;
43  unsigned int threshold;
44 };
45 
46 // Simplified structure for single object conditions information
50  unsigned int bit;
51  int prescale;
52  unsigned int threshold; //
53  unsigned int quality; // Only aplicable to Muons
54  unsigned int etaRange; // Only aplicable to Muons
55 
56  bool operator<(const SingleObjectTrigger& iSOT) const {
57  if (this->etaRange > iSOT.etaRange) {
58  return true;
59  } else if (this->etaRange < iSOT.etaRange) {
60  return false;
61  }
62 
63  if (this->prescale < iSOT.prescale) {
64  return true;
65  } else if (this->prescale > iSOT.prescale) {
66  return false;
67  }
68 
69  if (this->quality > iSOT.quality) {
70  return true;
71  } else if (this->quality < iSOT.quality) {
72  return false;
73  }
74 
75  return this->threshold < iSOT.threshold;
76  }
77 };
78 
80 public:
81  L1TMenuHelper(const edm::EventSetup& iSetup); // Constructor
82  ~L1TMenuHelper(); // Destructor
83 
84  // Get Lowest Unprescaled Single Object Triggers
85  std::map<std::string, std::string> getLUSOTrigger(const std::map<std::string, bool>& iCategories,
86  int IndexRefPrescaleFactors,
87  L1GtUtils const& myUtils);
88  std::map<std::string, std::string> testAlgos(const std::map<std::string, std::string>&);
89 
90  // To convert enum to strings
94 
95  // Getters
96  int getPrescaleByAlias(const TString& iCategory, const TString& iAlias);
97  unsigned int getEtaRangeByAlias(const TString& iCategory, const TString& iAlias);
98  unsigned int getQualityAlias(const TString& iCategory, const TString& iAlias);
99 
100 private:
103 
105  const std::vector<std::vector<int> >* m_prescaleFactorsAlgoTrig;
106 
107  // Vectors to hold significant information about single object triggers
108  std::vector<SingleObjectTrigger> m_vTrigMu;
109  std::vector<SingleObjectTrigger> m_vTrigEG;
110  std::vector<SingleObjectTrigger> m_vTrigIsoEG;
111  std::vector<SingleObjectTrigger> m_vTrigJet;
112  std::vector<SingleObjectTrigger> m_vTrigCenJet;
113  std::vector<SingleObjectTrigger> m_vTrigForJet;
114  std::vector<SingleObjectTrigger> m_vTrigTauJet;
115  std::vector<SingleObjectTrigger> m_vTrigETM;
116  std::vector<SingleObjectTrigger> m_vTrigETT;
117  std::vector<SingleObjectTrigger> m_vTrigHTT;
118  std::vector<SingleObjectTrigger> m_vTrigHTM;
119 };
120 
121 #endif
L1TMenuHelper::m_vTrigForJet
std::vector< SingleObjectTrigger > m_vTrigForJet
Definition: L1TMenuHelper.h:113
L1GtTriggerMenu.h
SingleObjectCondition::object
L1GtObject object
Definition: L1TMenuHelper.h:40
L1TMenuHelper::~L1TMenuHelper
~L1TMenuHelper()
Definition: L1TMenuHelper.cc:51
ESHandle.h
L1GlobalTriggerReadoutSetupFwd.h
L1TMenuHelper::m_prescaleFactorsAlgoTrig
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1TMenuHelper.h:105
L1TMenuHelper::m_vTrigCenJet
std::vector< SingleObjectTrigger > m_vTrigCenJet
Definition: L1TMenuHelper.h:112
L1TMenuHelper::L1TMenuHelper
L1TMenuHelper(const edm::EventSetup &iSetup)
Definition: L1TMenuHelper.cc:38
SingleObjectTrigger::bit
unsigned int bit
Definition: L1TMenuHelper.h:50
L1TMenuHelper::m_vTrigHTM
std::vector< SingleObjectTrigger > m_vTrigHTM
Definition: L1TMenuHelper.h:118
L1GtConditionType
L1GtConditionType
Definition: L1GtDefinitions.h:91
L1TMenuHelper::m_vTrigEG
std::vector< SingleObjectTrigger > m_vTrigEG
Definition: L1TMenuHelper.h:109
L1TMenuHelper::getQualityAlias
unsigned int getQualityAlias(const TString &iCategory, const TString &iAlias)
Definition: L1TMenuHelper.cc:754
L1TMenuHelper::getPrescaleByAlias
int getPrescaleByAlias(const TString &iCategory, const TString &iAlias)
Definition: L1TMenuHelper.cc:604
SingleObjectCondition::name
std::string name
Definition: L1TMenuHelper.h:37
L1TMenuHelper::m_vTrigHTT
std::vector< SingleObjectTrigger > m_vTrigHTT
Definition: L1TMenuHelper.h:117
SingleObjectTrigger::threshold
unsigned int threshold
Definition: L1TMenuHelper.h:52
MakerMacros.h
SingleObjectTrigger::prescale
int prescale
Definition: L1TMenuHelper.h:51
Service.h
L1TMenuHelper::m_l1GtMenu
const L1GtTriggerMenu * m_l1GtMenu
Definition: L1TMenuHelper.h:104
edm::ESHandle< L1GtTriggerMenu >
L1GtConditionCategory
L1GtConditionCategory
condition categories
Definition: L1GtDefinitions.h:121
L1GtUtils
Definition: L1GtUtils.h:66
SingleObjectTrigger
Definition: L1TMenuHelper.h:47
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TMenuHelper::m_vTrigETM
std::vector< SingleObjectTrigger > m_vTrigETM
Definition: L1TMenuHelper.h:115
L1TMenuHelper::m_vTrigMu
std::vector< SingleObjectTrigger > m_vTrigMu
Definition: L1TMenuHelper.h:108
SingleObjectTrigger::alias
std::string alias
Definition: L1TMenuHelper.h:49
L1TMenuHelper::m_vTrigJet
std::vector< SingleObjectTrigger > m_vTrigJet
Definition: L1TMenuHelper.h:111
L1TMenuHelper
Definition: L1TMenuHelper.h:79
L1GtTriggerMenu
Definition: L1GtTriggerMenu.h:48
Event.h
SingleObjectCondition::etaRange
unsigned int etaRange
Definition: L1TMenuHelper.h:42
L1TMenuHelper::m_vTrigIsoEG
std::vector< SingleObjectTrigger > m_vTrigIsoEG
Definition: L1TMenuHelper.h:110
edm::EventSetup
Definition: EventSetup.h:57
L1TMenuHelper::testAlgos
std::map< std::string, std::string > testAlgos(const std::map< std::string, std::string > &)
Definition: L1TMenuHelper.cc:399
SingleObjectTrigger::object
L1GtObject object
Definition: L1TMenuHelper.h:48
L1TMenuHelper::m_vTrigTauJet
std::vector< SingleObjectTrigger > m_vTrigTauJet
Definition: L1TMenuHelper.h:114
SingleObjectCondition::conditionCategory
L1GtConditionCategory conditionCategory
Definition: L1TMenuHelper.h:38
L1TMenuHelper::m_vTrigETT
std::vector< SingleObjectTrigger > m_vTrigETT
Definition: L1TMenuHelper.h:116
SingleObjectTrigger::etaRange
unsigned int etaRange
Definition: L1TMenuHelper.h:54
L1TMenuHelper::l1GtPfAlgo
edm::ESHandle< L1GtPrescaleFactors > l1GtPfAlgo
Definition: L1TMenuHelper.h:102
L1TMenuHelper::getLUSOTrigger
std::map< std::string, std::string > getLUSOTrigger(const std::map< std::string, bool > &iCategories, int IndexRefPrescaleFactors, L1GtUtils const &myUtils)
Definition: L1TMenuHelper.cc:57
Frameworkfwd.h
L1GtUtils.h
SingleObjectCondition
Definition: L1TMenuHelper.h:36
L1TMenuHelper::enumToStringL1GtConditionCategory
std::string enumToStringL1GtConditionCategory(L1GtConditionCategory iConditionCategory)
Definition: L1TMenuHelper.cc:558
L1TMenuHelper::getEtaRangeByAlias
unsigned int getEtaRangeByAlias(const TString &iCategory, const TString &iAlias)
Definition: L1TMenuHelper.cc:679
L1TMenuHelper::enumToStringL1GtConditionType
std::string enumToStringL1GtConditionType(L1GtConditionType iConditionType)
Definition: L1TMenuHelper.cc:491
SingleObjectCondition::threshold
unsigned int threshold
Definition: L1TMenuHelper.h:43
SingleObjectCondition::conditionType
L1GtConditionType conditionType
Definition: L1TMenuHelper.h:39
L1GtTriggerMenuFwd.h
L1TMenuHelper::menuRcd
edm::ESHandle< L1GtTriggerMenu > menuRcd
Definition: L1TMenuHelper.h:101
SingleObjectCondition::quality
unsigned int quality
Definition: L1TMenuHelper.h:41
L1TMenuHelper::enumToStringL1GtObject
std::string enumToStringL1GtObject(L1GtObject iObject)
Definition: L1TMenuHelper.cc:424
SingleObjectTrigger::quality
unsigned int quality
Definition: L1TMenuHelper.h:53
SingleObjectTrigger::operator<
bool operator<(const SingleObjectTrigger &iSOT) const
Definition: L1TMenuHelper.h:56
L1GtObject