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 
36 
37 #include <TString.h>
38 
39 #include <iostream>
40 #include <fstream>
41 #include <vector>
42 
43 //
44 // class declaration
45 //
46 
47 class L1TRate : public DQMEDAnalyzer {
48 
49  public:
50 
51  L1TRate(const edm::ParameterSet& ps); // Constructor
52  virtual ~L1TRate(); // Destructor
53 
54  protected:
55 
56  void analyze (const edm::Event& e, const edm::EventSetup& c); // Analyze
57  //void beginJob(); // BeginJob
58  //void endJob (); // EndJob
59  virtual void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run&, const edm::EventSetup&) override;
60  //void endRun (const edm::Run& run, const edm::EventSetup& iSetup);
61 
62  virtual void beginLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
63  virtual void endLuminosityBlock (edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
64  virtual void dqmBeginRun(edm::Run const&, edm::EventSetup const&);
65 
66  // Private methods
67  private:
68 
69  bool getXSexFitsOMDS (const edm::ParameterSet& ps);
70  bool getXSexFitsPython(const edm::ParameterSet& ps);
71 
72  // Private variables
73  private:
74 
75  // bool
76  bool m_verbose;
77 
78  // int
79  int m_refPrescaleSet; // What is the reference prescale index to use for trigger choice
80  int m_maxNbins; // Maximum number of bins for MonitorElement
81  int m_lsShiftGTRates; // What shift (if any) to be applied to GT Rates LS number
82 
83  // string
84  std::string m_outputFile; // External output file name (for testiting)
85 
86  // Vectors
87  const std::vector< std::vector<int> >* m_listsPrescaleFactors; // Collection os all sets of prescales
88 
89  // Maps
90  std::map<int,int> m_lsPrescaleIndex; // Map of precale index for each LS
91  std::map<int,double> m_lsLuminosity; // Map of luminosity recorded for each LS
92  std::map<int,std::map<TString,double> > m_lsRates; // Map of rates (by bit) recorded for each LS
93  std::map<TString,int> m_algoBit; // Map of bit associated with a L1 Algo alias
94  std::map<std::string,bool> m_inputCategories; // Map of categories to monitor
95  std::map<std::string,std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
96  std::map<TString,MonitorElement*> m_xSecObservedToExpected; // Monitor Elements for Observed to Expected Algo XSec
97  std::map<TString,MonitorElement*> m_xSecVsInstLumi; // Monitor Elements for Algo XSec vs Instant Luminosity
98  std::map<TString,TF1*> m_templateFunctions; // For each trigger template f(InstLumi)=XSec
99 
100  // Input tags
104 
105  // ParameterSet
107 
108  // MonitorElement
110 
111  // Others
112  //DQMStore* dbe; // The DQM Service Handle
113 
114 };
115 
116 #endif
edm::EDGetTokenT< LumiScalersCollection > m_scalersSource_colLScal
Definition: L1TRate.h:101
edm::EDGetTokenT< Level1TriggerScalersCollection > m_scalersSource_triggerScalers
Definition: L1TRate.h:102
std::map< int, std::map< TString, double > > m_lsRates
Definition: L1TRate.h:92
std::map< TString, MonitorElement * > m_xSecObservedToExpected
Definition: L1TRate.h:96
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
Definition: L1TRate.h:103
edm::ParameterSet m_parameters
Definition: L1TRate.h:106
std::map< TString, TF1 * > m_templateFunctions
Definition: L1TRate.h:98
bool m_verbose
Definition: L1TRate.h:76
virtual ~L1TRate()
Definition: L1TRate.cc:76
virtual void dqmBeginRun(edm::Run const &, edm::EventSetup const &)
Definition: L1TRate.cc:196
int m_lsShiftGTRates
Definition: L1TRate.h:81
bool getXSexFitsPython(const edm::ParameterSet &ps)
Definition: L1TRate.cc:470
int m_maxNbins
Definition: L1TRate.h:80
std::map< int, double > m_lsLuminosity
Definition: L1TRate.h:91
std::map< TString, int > m_algoBit
Definition: L1TRate.h:93
int m_refPrescaleSet
Definition: L1TRate.h:79
L1TRate(const edm::ParameterSet &ps)
Definition: L1TRate.cc:35
bool getXSexFitsOMDS(const edm::ParameterSet &ps)
Definition: L1TRate.cc:395
std::string m_outputFile
Definition: L1TRate.h:84
const std::vector< std::vector< int > > * m_listsPrescaleFactors
Definition: L1TRate.h:87
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TRate.cc:201
std::map< TString, MonitorElement * > m_xSecVsInstLumi
Definition: L1TRate.h:97
std::map< std::string, bool > m_inputCategories
Definition: L1TRate.h:94
MonitorElement * m_ErrorMonitor
Definition: L1TRate.h:109
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TRate.cc:208
std::map< int, int > m_lsPrescaleIndex
Definition: L1TRate.h:90
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TRate.h:95
Definition: Run.h:41
virtual void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
Definition: L1TRate.cc:81
void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: L1TRate.cc:291