CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TRate_Harvest.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_L1TRIGGER_L1TRATE_HARVEST_H
2 #define DQMOFFLINE_L1TRIGGER_L1TRATE_HARVEST_H
3 
4 // system include files
5 #include <memory>
6 #include <unistd.h>
7 
8 // user include files
15 
17 
22 
23 #include <TString.h>
24 
25 #include <iostream>
26 #include <fstream>
27 #include <vector>
28 
29 //
30 // class declaration
31 //
32 
34 
35  public:
36 
37  enum Errors{
38  UNKNOWN = 1,
40  };
41 
42  public:
43 
44  L1TRate_Harvest(const edm::ParameterSet& ps); // Constructor
45  virtual ~L1TRate_Harvest(); // Destructor
46 
47  protected:
48 
49  void analyze (const edm::Event& e, const edm::EventSetup& c) {
50  }; // Analyze
51  void beginJob(); // BeginJob
52  void endJob (); // EndJob
53  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup);
54  void endRun (const edm::Run& run, const edm::EventSetup& iSetup);
55 
56  virtual void beginLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
57  virtual void endLuminosityBlock (edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
58 
59  // Private methods
60  private:
61 
62  // bool getXSexFitsOMDS (const edm::ParameterSet& ps);
63  bool getXSexFitsPython(const edm::ParameterSet& ps);
64 
65  // Private variables
66  private:
67 
68  // bool
69  bool m_verbose;
70 
71  // int
72  int m_refPrescaleSet; // What is the reference prescale index to use for trigger choice
73  int m_maxNbins; // Maximum number of bins for MonitorElement
74  int m_lsShiftGTRates; // What shift (if any) to be applied to GT Rates LS number
75 
76  // string
77  std::string m_outputFile; // External output file name (for testiting)
78 
79  // Vectors
80  const std::vector< std::vector<int> >* m_listsPrescaleFactors; // Collection os all sets of prescales
81 
82  // Maps
83  std::map<int,int> m_lsPrescaleIndex; // Map of precale index for each LS
84  std::map<int,double> m_lsLuminosity; // Map of luminosity recorded for each LS
85  std::map<int,std::map<TString,double> > m_lsRates; // Map of rates (by bit) recorded for each LS
86  std::map<TString,int> m_algoBit; // Map of bit associated with a L1 Algo alias
87  std::map<TString,TF1*> m_algoFit; // 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 
93  std::map<TString,MonitorElement*> m_CountsVsLS; // Monitor Elements for
94  std::map<TString,MonitorElement*> m_InstLumiVsLS; // Monitor Elements for
95  std::map<TString,MonitorElement*> m_PrescIndexVsLS; // Monitor Elements for
96 
97  std::map<TString,TF1*> m_templateFunctions; // For each trigger template f(InstLumi)=XSec
98 
99  std::map<int,std::map<TString,double> > m_lsCounts; // Map of counts (by bit) recorded for each LS
100 
101  // Input tags
102  edm::InputTag m_scalersSource; // Where to get L1 Scalers
103  edm::InputTag m_l1GtDataDaqInputTag; // Where to get L1 GT Data DAQ
104 
105  // ParameterSet
107 
108  // MonitorElement
110 
111  // Others
112  DQMStore* dbe; // The DQM Service Handle
113 
114 };
115 
116 #endif
std::map< TString, TF1 * > m_algoFit
std::map< std::string, bool > m_inputCategories
edm::InputTag m_scalersSource
std::map< int, std::map< TString, double > > m_lsRates
std::map< TString, MonitorElement * > m_xSecObservedToExpected
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
void endRun(const edm::Run &run, const edm::EventSetup &iSetup)
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
MonitorElement * m_ErrorMonitor
bool getXSexFitsPython(const edm::ParameterSet &ps)
std::map< TString, int > m_algoBit
std::map< TString, MonitorElement * > m_xSecVsInstLumi
std::string m_outputFile
void analyze(const edm::Event &e, const edm::EventSetup &c)
virtual ~L1TRate_Harvest()
edm::InputTag m_l1GtDataDaqInputTag
std::map< TString, TF1 * > m_templateFunctions
std::map< int, int > m_lsPrescaleIndex
L1TRate_Harvest(const edm::ParameterSet &ps)
std::map< int, std::map< TString, double > > m_lsCounts
std::map< int, double > m_lsLuminosity
const std::vector< std::vector< int > > * m_listsPrescaleFactors
std::map< TString, MonitorElement * > m_CountsVsLS
edm::ParameterSet m_parameters
std::map< TString, MonitorElement * > m_InstLumiVsLS
std::map< std::string, std::string > m_selectedTriggers
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
std::map< TString, MonitorElement * > m_PrescIndexVsLS
Definition: Run.h:41