test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TRate.h
Go to the documentation of this file.
1 #ifndef DQM_L1TMONITOR_L1TRATE_H
2 #define DQM_L1TMONITOR_L1TRATE_H
3 
4 /*
5  * \file L1TRate.h
6  *
7  * \author J. Pela
8  *
9 */
10 
11 // system include files
12 #include <memory>
13 #include <unistd.h>
14 
15 // user include files
22 
24 
29 
34 
35 
36 #include <TString.h>
37 
38 #include <iostream>
39 #include <fstream>
40 #include <vector>
41 
42 //
43 // class declaration
44 //
45 
46 class L1TRate : public edm::EDAnalyzer {
47 
48  public:
49 
50  L1TRate(const edm::ParameterSet& ps); // Constructor
51  virtual ~L1TRate(); // Destructor
52 
53  protected:
54 
55  void analyze (const edm::Event& e, const edm::EventSetup& c); // Analyze
56  void beginJob(); // BeginJob
57  void endJob (); // EndJob
58  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup);
59  void endRun (const edm::Run& run, const edm::EventSetup& iSetup);
60 
61  virtual void beginLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
62  virtual void endLuminosityBlock (edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
63 
64  // Private methods
65  private:
66 
67  bool getXSexFitsOMDS (const edm::ParameterSet& ps);
68  bool getXSexFitsPython(const edm::ParameterSet& ps);
69 
70  // Private variables
71  private:
72 
73  // bool
74  bool m_verbose;
75 
76  // int
77  int m_refPrescaleSet; // What is the reference prescale index to use for trigger choice
78  int m_maxNbins; // Maximum number of bins for MonitorElement
79  int m_lsShiftGTRates; // What shift (if any) to be applied to GT Rates LS number
80 
81  // string
82  std::string m_outputFile; // External output file name (for testiting)
83 
84  // Vectors
85  const std::vector< std::vector<int> >* m_listsPrescaleFactors; // Collection os all sets of prescales
86 
87  // Maps
88  std::map<int,int> m_lsPrescaleIndex; // Map of precale index for each LS
89  std::map<int,double> m_lsLuminosity; // Map of luminosity recorded for each LS
90  std::map<int,std::map<TString,double> > m_lsRates; // Map of rates (by bit) recorded for each LS
91  std::map<TString,int> m_algoBit; // Map of bit associated with a L1 Algo alias
92  std::map<std::string,bool> m_inputCategories; // Map of categories to monitor
93  std::map<std::string,std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
94  std::map<TString,MonitorElement*> m_xSecObservedToExpected; // Monitor Elements for Observed to Expected Algo XSec
95  std::map<TString,MonitorElement*> m_xSecVsInstLumi; // Monitor Elements for Algo XSec vs Instant Luminosity
96  std::map<TString,TF1*> m_templateFunctions; // For each trigger template f(InstLumi)=XSec
97 
98  // Input tags
102 
103  // ParameterSet
105 
106  // MonitorElement
108 
109  // Others
110  DQMStore* dbe; // The DQM Service Handle
111 
112 };
113 
114 #endif
edm::EDGetTokenT< LumiScalersCollection > m_scalersSource_colLScal
Definition: L1TRate.h:99
edm::EDGetTokenT< Level1TriggerScalersCollection > m_scalersSource_triggerScalers
Definition: L1TRate.h:100
std::map< int, std::map< TString, double > > m_lsRates
Definition: L1TRate.h:90
std::map< TString, MonitorElement * > m_xSecObservedToExpected
Definition: L1TRate.h:94
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
Definition: L1TRate.h:101
edm::ParameterSet m_parameters
Definition: L1TRate.h:104
void beginJob()
Definition: L1TRate.cc:88
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
Definition: L1TRate.cc:117
std::map< TString, TF1 * > m_templateFunctions
Definition: L1TRate.h:96
bool m_verbose
Definition: L1TRate.h:74
virtual ~L1TRate()
Definition: L1TRate.cc:85
int m_lsShiftGTRates
Definition: L1TRate.h:79
bool getXSexFitsPython(const edm::ParameterSet &ps)
Definition: L1TRate.cc:508
int m_maxNbins
Definition: L1TRate.h:78
std::map< int, double > m_lsLuminosity
Definition: L1TRate.h:89
std::map< TString, int > m_algoBit
Definition: L1TRate.h:91
int m_refPrescaleSet
Definition: L1TRate.h:77
L1TRate(const edm::ParameterSet &ps)
Definition: L1TRate.cc:35
bool getXSexFitsOMDS(const edm::ParameterSet &ps)
Definition: L1TRate.cc:433
void endRun(const edm::Run &run, const edm::EventSetup &iSetup)
Definition: L1TRate.cc:234
std::string m_outputFile
Definition: L1TRate.h:82
const std::vector< std::vector< int > > * m_listsPrescaleFactors
Definition: L1TRate.h:85
DQMStore * dbe
Definition: L1TRate.h:110
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TRate.cc:239
std::map< TString, MonitorElement * > m_xSecVsInstLumi
Definition: L1TRate.h:95
std::map< std::string, bool > m_inputCategories
Definition: L1TRate.h:92
MonitorElement * m_ErrorMonitor
Definition: L1TRate.h:107
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TRate.cc:246
std::map< int, int > m_lsPrescaleIndex
Definition: L1TRate.h:88
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TRate.h:93
Definition: Run.h:41
void endJob()
Definition: L1TRate.cc:104
void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: L1TRate.cc:329