CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
22 
24 
26 
29 
31 
32 #include "TString.h"
33 
34 // Simplified structure for single object conditions information
36 
41  unsigned int quality;
42  unsigned int etaRange;
43  unsigned int threshold;
44 
45 };
46 
47 // Simplified structure for single object conditions information
49 
52  unsigned int bit;
53  int prescale;
54  unsigned int threshold; //
55  unsigned int quality; // Only aplicable to Muons
56  unsigned int etaRange; // Only aplicable to Muons
57 
58  bool operator< (const SingleObjectTrigger &iSOT) const{
59 
60  if (this->etaRange > iSOT.etaRange){return true;}
61  else if(this->etaRange < iSOT.etaRange){return false;}
62 
63  if (this->prescale < iSOT.prescale){return true;}
64  else if(this->prescale > iSOT.prescale){return false;}
65 
66  if (this->quality > iSOT.quality){return true;}
67  else if(this->quality < iSOT.quality){return false;}
68 
69  return this->threshold < iSOT.threshold;
70 
71  }
72 
73 };
74 
76 
77  public:
78 
79  L1TMenuHelper(const edm::EventSetup& iSetup); // Constructor
80  ~L1TMenuHelper(); // Destructor
81 
82  // Get Lowest Unprescaled Single Object Triggers
83  std::map<std::string,std::string> getLUSOTrigger(const std::map<std::string,bool>& iCategories,
84  int IndexRefPrescaleFactors,
85  L1GtUtils const& myUtils);
86  std::map<std::string,std::string> testAlgos (const std::map<std::string,std::string>&);
87 
88 
89  // To convert enum to strings
93 
94  // Getters
95  int getPrescaleByAlias(const TString& iCategory, const TString& iAlias);
96  unsigned int getEtaRangeByAlias(const TString& iCategory, const TString& iAlias);
97  unsigned int getQualityAlias (const TString& iCategory, const TString& iAlias);
98 
99  private:
100 
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 
122 #endif
L1GtConditionCategory conditionCategory
Definition: L1TMenuHelper.h:38
std::vector< SingleObjectTrigger > m_vTrigJet
unsigned int quality
Definition: L1TMenuHelper.h:55
std::string enumToStringL1GtObject(L1GtObject iObject)
std::vector< SingleObjectTrigger > m_vTrigETM
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
std::vector< SingleObjectTrigger > m_vTrigMu
unsigned int etaRange
Definition: L1TMenuHelper.h:42
const L1GtTriggerMenu * m_l1GtMenu
L1GtConditionType conditionType
Definition: L1TMenuHelper.h:39
std::vector< SingleObjectTrigger > m_vTrigTauJet
L1GtConditionType
unsigned int threshold
Definition: L1TMenuHelper.h:54
unsigned int threshold
Definition: L1TMenuHelper.h:43
unsigned int quality
Definition: L1TMenuHelper.h:41
bool operator<(const SingleObjectTrigger &iSOT) const
Definition: L1TMenuHelper.h:58
std::vector< SingleObjectTrigger > m_vTrigHTM
std::vector< SingleObjectTrigger > m_vTrigHTT
L1TMenuHelper(const edm::EventSetup &iSetup)
L1GtConditionCategory
condition categories
unsigned int bit
Definition: L1TMenuHelper.h:52
unsigned int getQualityAlias(const TString &iCategory, const TString &iAlias)
unsigned int etaRange
Definition: L1TMenuHelper.h:56
std::map< std::string, std::string > testAlgos(const std::map< std::string, std::string > &)
std::vector< SingleObjectTrigger > m_vTrigIsoEG
edm::ESHandle< L1GtTriggerMenu > menuRcd
std::vector< SingleObjectTrigger > m_vTrigETT
std::vector< SingleObjectTrigger > m_vTrigCenJet
std::string enumToStringL1GtConditionType(L1GtConditionType iConditionType)
edm::ESHandle< L1GtPrescaleFactors > l1GtPfAlgo
std::string enumToStringL1GtConditionCategory(L1GtConditionCategory iConditionCategory)
std::vector< SingleObjectTrigger > m_vTrigForJet
std::vector< SingleObjectTrigger > m_vTrigEG
unsigned int getEtaRangeByAlias(const TString &iCategory, const TString &iAlias)
int getPrescaleByAlias(const TString &iCategory, const TString &iAlias)
std::map< std::string, std::string > getLUSOTrigger(const std::map< std::string, bool > &iCategories, int IndexRefPrescaleFactors, L1GtUtils const &myUtils)