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
37 
42  unsigned int quality;
43  unsigned int etaRange;
44  unsigned int threshold;
45 
46 };
47 
48 // Simplified structure for single object conditions information
50 
53  unsigned int bit;
54  int prescale;
55  unsigned int threshold; //
56  unsigned int quality; // Only aplicable to Muons
57  unsigned int etaRange; // Only aplicable to Muons
58 
59  bool operator< (const SingleObjectTrigger &iSOT) const{
60 
61  if (this->etaRange > iSOT.etaRange){return true;}
62  else if(this->etaRange < iSOT.etaRange){return false;}
63 
64  if (this->prescale < iSOT.prescale){return true;}
65  else if(this->prescale > iSOT.prescale){return false;}
66 
67  if (this->quality > iSOT.quality){return true;}
68  else if(this->quality < iSOT.quality){return false;}
69 
70  return this->threshold < iSOT.threshold;
71 
72  }
73 
74 };
75 
77 
78  public:
79 
80  L1TMenuHelper(const edm::EventSetup& iSetup); // Constructor
81  ~L1TMenuHelper(); // Destructor
82 
83  // Get Lowest Unprescaled Single Object Triggers
84  std::map<std::string,std::string> getLUSOTrigger(const std::map<std::string,bool>& iCategories,
85  int IndexRefPrescaleFactors,
86  L1GtUtils const& myUtils);
87  std::map<std::string,std::string> testAlgos (const std::map<std::string,std::string>&);
88 
89 
90  // To convert enum to strings
91  std::string enumToStringL1GtObject (L1GtObject iObject);
92  std::string enumToStringL1GtConditionType (L1GtConditionType iConditionType);
93  std::string enumToStringL1GtConditionCategory(L1GtConditionCategory iConditionCategory);
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:
101 
104 
106  const std::vector<std::vector<int> >* m_prescaleFactorsAlgoTrig;
107 
108  // Vectors to hold significant information about single object triggers
109  std::vector<SingleObjectTrigger> m_vTrigMu;
110  std::vector<SingleObjectTrigger> m_vTrigEG ;
111  std::vector<SingleObjectTrigger> m_vTrigIsoEG;
112  std::vector<SingleObjectTrigger> m_vTrigJet ;
113  std::vector<SingleObjectTrigger> m_vTrigCenJet;
114  std::vector<SingleObjectTrigger> m_vTrigForJet;
115  std::vector<SingleObjectTrigger> m_vTrigTauJet;
116  std::vector<SingleObjectTrigger> m_vTrigETM;
117  std::vector<SingleObjectTrigger> m_vTrigETT;
118  std::vector<SingleObjectTrigger> m_vTrigHTT;
119  std::vector<SingleObjectTrigger> m_vTrigHTM;
120 
121 };
122 
123 #endif
L1GtConditionCategory conditionCategory
Definition: L1TMenuHelper.h:39
std::vector< SingleObjectTrigger > m_vTrigJet
unsigned int quality
Definition: L1TMenuHelper.h:56
std::vector< SingleObjectTrigger > m_vTrigETM
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
std::vector< SingleObjectTrigger > m_vTrigMu
unsigned int etaRange
Definition: L1TMenuHelper.h:43
const L1GtTriggerMenu * m_l1GtMenu
L1GtConditionType conditionType
Definition: L1TMenuHelper.h:40
std::vector< SingleObjectTrigger > m_vTrigTauJet
L1GtConditionType
unsigned int threshold
Definition: L1TMenuHelper.h:55
unsigned int threshold
Definition: L1TMenuHelper.h:44
unsigned int quality
Definition: L1TMenuHelper.h:42
std::vector< SingleObjectTrigger > m_vTrigHTM
std::vector< SingleObjectTrigger > m_vTrigHTT
bool operator<(const FedChannelConnection &, const FedChannelConnection &)
L1GtConditionCategory
condition categories
unsigned int bit
Definition: L1TMenuHelper.h:53
unsigned int etaRange
Definition: L1TMenuHelper.h:57
std::vector< SingleObjectTrigger > m_vTrigIsoEG
edm::ESHandle< L1GtTriggerMenu > menuRcd
std::vector< SingleObjectTrigger > m_vTrigETT
std::vector< SingleObjectTrigger > m_vTrigCenJet
edm::ESHandle< L1GtPrescaleFactors > l1GtPfAlgo
std::vector< SingleObjectTrigger > m_vTrigForJet
std::vector< SingleObjectTrigger > m_vTrigEG