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