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  * $Date: 2011/10/28 13:24:48 $
8  * $Revision: 1.4 $
9  * \author J. Pela
10  *
11 */
12 
13 // system include files
14 #include <memory>
15 #include <unistd.h>
16 
17 // user include files
24 
26 
31 
32 #include <TString.h>
33 
34 #include <iostream>
35 #include <fstream>
36 #include <vector>
37 
38 //
39 // class declaration
40 //
41 
42 class L1TRate : public edm::EDAnalyzer {
43 
44  public:
45 
46  L1TRate(const edm::ParameterSet& ps); // Constructor
47  virtual ~L1TRate(); // Destructor
48 
49  protected:
50 
51  void analyze (const edm::Event& e, const edm::EventSetup& c); // Analyze
52  void beginJob(); // BeginJob
53  void endJob (); // EndJob
54  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup);
55  void endRun (const edm::Run& run, const edm::EventSetup& iSetup);
56 
57  virtual void beginLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
58  virtual void endLuminosityBlock (edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
59 
60  // Private methods
61  private:
62 
63  bool getXSexFitsOMDS (const edm::ParameterSet& ps);
64  bool getXSexFitsPython(const edm::ParameterSet& ps);
65 
66  // Private variables
67  private:
68 
69  // bool
70  bool m_verbose;
71 
72  // int
73  int m_refPrescaleSet; // What is the reference prescale index to use for trigger choice
74  int m_maxNbins; // Maximum number of bins for MonitorElement
75  int m_lsShiftGTRates; // What shift (if any) to be applied to GT Rates LS number
76 
77  // string
78  std::string m_outputFile; // External output file name (for testiting)
79 
80  // Vectors
81  const std::vector< std::vector<int> >* m_listsPrescaleFactors; // Collection os all sets of prescales
82 
83  // Maps
84  std::map<int,int> m_lsPrescaleIndex; // Map of precale index for each LS
85  std::map<int,double> m_lsLuminosity; // Map of luminosity recorded for each LS
86  std::map<int,std::map<TString,double> > m_lsRates; // Map of rates (by bit) recorded for each LS
87  std::map<TString,int> m_algoBit; // Map of bit associated with a L1 Algo alias
88  std::map<std::string,bool> m_inputCategories; // Map of categories to monitor
89  std::map<std::string,std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
90  std::map<TString,MonitorElement*> m_xSecObservedToExpected; // Monitor Elements for Observed to Expected Algo XSec
91  std::map<TString,MonitorElement*> m_xSecVsInstLumi; // Monitor Elements for Algo XSec vs Instant Luminosity
92  std::map<TString,TF1*> m_templateFunctions; // For each trigger template f(InstLumi)=XSec
93 
94  // Input tags
95  edm::InputTag m_scalersSource; // Where to get L1 Scalers
96  edm::InputTag m_l1GtDataDaqInputTag; // Where to get L1 GT Data DAQ
97 
98  // ParameterSet
100 
101  // MonitorElement
103 
104  // Others
105  DQMStore* dbe; // The DQM Service Handle
106 
107 };
108 
109 #endif
edm::InputTag m_scalersSource
Definition: L1TRate.h:95
std::map< int, std::map< TString, double > > m_lsRates
Definition: L1TRate.h:86
std::map< TString, MonitorElement * > m_xSecObservedToExpected
Definition: L1TRate.h:90
edm::ParameterSet m_parameters
Definition: L1TRate.h:99
void beginJob()
Definition: L1TRate.cc:93
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
Definition: L1TRate.cc:122
std::map< TString, TF1 * > m_templateFunctions
Definition: L1TRate.h:92
bool m_verbose
Definition: L1TRate.h:70
virtual ~L1TRate()
Definition: L1TRate.cc:90
int m_lsShiftGTRates
Definition: L1TRate.h:75
edm::InputTag m_l1GtDataDaqInputTag
Definition: L1TRate.h:96
bool getXSexFitsPython(const edm::ParameterSet &ps)
Definition: L1TRate.cc:513
int m_maxNbins
Definition: L1TRate.h:74
std::map< int, double > m_lsLuminosity
Definition: L1TRate.h:85
std::map< TString, int > m_algoBit
Definition: L1TRate.h:87
int m_refPrescaleSet
Definition: L1TRate.h:73
L1TRate(const edm::ParameterSet &ps)
Definition: L1TRate.cc:41
bool getXSexFitsOMDS(const edm::ParameterSet &ps)
Definition: L1TRate.cc:438
void endRun(const edm::Run &run, const edm::EventSetup &iSetup)
Definition: L1TRate.cc:239
std::string m_outputFile
Definition: L1TRate.h:78
const std::vector< std::vector< int > > * m_listsPrescaleFactors
Definition: L1TRate.h:81
DQMStore * dbe
Definition: L1TRate.h:105
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TRate.cc:244
std::map< TString, MonitorElement * > m_xSecVsInstLumi
Definition: L1TRate.h:91
std::map< std::string, bool > m_inputCategories
Definition: L1TRate.h:88
MonitorElement * m_ErrorMonitor
Definition: L1TRate.h:102
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TRate.cc:251
std::map< int, int > m_lsPrescaleIndex
Definition: L1TRate.h:84
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TRate.h:89
Definition: Run.h:33
void endJob()
Definition: L1TRate.cc:109
void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: L1TRate.cc:334