CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TRate_Offline.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_L1TRIGGER_L1TRATE_OFFLINE_H
2 #define DQMOFFLINE_L1TRIGGER_L1TRATE_OFFLINE_H
3 
4 /*
5  * \file L1TRate_Offline.h
6  *
7  * $Date: 2012/11/26 14:56:56 $
8  * $Revision: 1.2 $
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 
43 
44 public:
45 
46  enum Errors{
47  UNKNOWN = 1,
49  };
50 
51 public:
52 
53  L1TRate_Offline(const edm::ParameterSet& ps); // Constructor
54  virtual ~L1TRate_Offline(); // 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  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup);
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 
67 // Private methods
68 private:
69 
70  // bool getXSexFitsOMDS (const edm::ParameterSet& ps);
71  bool getXSexFitsPython(const edm::ParameterSet& ps);
72 
73 // Private variables
74 private:
75 
76  // bool
77  bool m_verbose;
78 
79  // int
80  int m_refPrescaleSet; // What is the reference prescale index to use for trigger choice
81  int m_maxNbins; // Maximum number of bins for MonitorElement
82  int m_lsShiftGTRates; // What shift (if any) to be applied to GT Rates LS number
83 
84  // string
85  std::string m_outputFile; // External output file name (for testiting)
86 
87  // Vectors
88  const std::vector< std::vector<int> >* m_listsPrescaleFactors; // Collection os all sets of prescales
89 
90  // Maps
91  std::map<int,int> m_lsPrescaleIndex; // Map of precale index for each LS
92  std::map<int,double> m_lsLuminosity; // Map of luminosity recorded for each LS
93  std::map<int,std::map<TString,double> > m_lsRates; // Map of rates (by bit) recorded for each LS
94  std::map<TString,int> m_algoBit; // Map of bit associated with a L1 Algo alias
95  std::map<TString,TF1*> m_algoFit; // 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 
101  std::map<TString,MonitorElement*> m_CountsVsLS; // Monitor Elements for
102  std::map<TString,MonitorElement*> m_InstLumiVsLS; // Monitor Elements for
103  std::map<TString,MonitorElement*> m_PrescIndexVsLS; // Monitor Elements for
104 
105  std::map<TString,TF1*> m_templateFunctions; // For each trigger template f(InstLumi)=XSec
106 
107  std::map<int,std::map<TString,double> > m_lsCounts; // Map of counts (by bit) recorded for each LS
108 
109  // Input tags
110  edm::InputTag m_scalersSource; // Where to get L1 Scalers
111  edm::InputTag m_l1GtDataDaqInputTag; // Where to get L1 GT Data DAQ
112 
113  // ParameterSet
115 
116  // MonitorElement
118 
119  // Others
120  DQMStore* dbe; // The DQM Service Handle
121 
122 };
123 
124 #endif
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
MonitorElement * m_ErrorMonitor
edm::InputTag m_l1GtDataDaqInputTag
std::map< std::string, std::string > m_selectedTriggers
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
std::map< TString, TF1 * > m_templateFunctions
bool getXSexFitsPython(const edm::ParameterSet &ps)
std::map< TString, MonitorElement * > m_xSecVsInstLumi
std::map< int, double > m_lsLuminosity
edm::ParameterSet m_parameters
std::map< TString, MonitorElement * > m_InstLumiVsLS
virtual ~L1TRate_Offline()
L1TRate_Offline(const edm::ParameterSet &ps)
void analyze(const edm::Event &e, const edm::EventSetup &c)
std::map< TString, MonitorElement * > m_PrescIndexVsLS
std::map< TString, MonitorElement * > m_xSecObservedToExpected
std::string m_outputFile
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
edm::InputTag m_scalersSource
std::map< int, int > m_lsPrescaleIndex
std::map< std::string, bool > m_inputCategories
std::map< int, std::map< TString, double > > m_lsCounts
void endRun(const edm::Run &run, const edm::EventSetup &iSetup)
std::map< TString, MonitorElement * > m_CountsVsLS
const std::vector< std::vector< int > > * m_listsPrescaleFactors
std::map< int, std::map< TString, double > > m_lsRates
std::map< TString, int > m_algoBit
Definition: Run.h:36
std::map< TString, TF1 * > m_algoFit