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 // system include files
5 #include <memory>
6 #include <unistd.h>
7 
8 // user include files
15 
17 
22 
23 //DataFormats
28 #include "DataFormats/Common/interface/ConditionsInEdm.h" // Parameters associated to Run, LS and Event
29 #include "DataFormats/Luminosity/interface/LumiDetails.h" // Luminosity Information
30 #include "DataFormats/Luminosity/interface/LumiSummary.h" // Luminosity Information
31 
32 
33 #include <TString.h>
34 
35 #include <iostream>
36 #include <fstream>
37 #include <vector>
38 
39 //
40 // class declaration
41 //
42 
44 
45 public:
46 
47  enum Errors{
48  UNKNOWN = 1,
50  };
51 
52 public:
53 
54  L1TRate_Offline(const edm::ParameterSet& ps); // Constructor
55  virtual ~L1TRate_Offline(); // Destructor
56 
57 protected:
58 
59  void analyze (const edm::Event& e, const edm::EventSetup& c); // Analyze
60  void beginJob(); // BeginJob
61  void endJob (); // EndJob
62  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup);
63  void endRun (const edm::Run& run, const edm::EventSetup& iSetup);
64 
65  virtual void beginLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
66  virtual void endLuminosityBlock (edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
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,double> m_lsDeadTime; // Map of dead time for each LS
93  std::map<int,int> m_lsPrescaleIndex; // Map of precale index for each LS
94  std::map<int,double> m_lsLuminosity; // Map of luminosity recorded for each LS
95  std::map<int,std::map<TString,double> > m_lsRates; // Map of rates (by bit) recorded for each LS
96  std::map<TString,int> m_algoBit; // Map of bit associated with a L1 Algo alias
97  std::map<TString,TF1*> m_algoFit; // Map of bit associated with a L1 Algo alias
98  std::map<std::string,bool> m_inputCategories; // Map of categories to monitor
99  std::map<std::string,std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
100  std::map<TString,MonitorElement*> m_xSecObservedToExpected; // Monitor Elements for Observed to Expected Algo XSec
101  std::map<TString,MonitorElement*> m_xSecVsInstLumi; // Monitor Elements for Algo XSec vs Instant Luminosity
102 
103  std::map<TString,MonitorElement*> m_xSecObservedVsDelivLumi;
104  std::map<TString,MonitorElement*> m_xSecObservedVsRecorLumi;
105 
106 
107  std::map<TString,MonitorElement*> m_CountsVsLS; // Monitor Elements for counts
108  std::map<TString,MonitorElement*> m_InstLumiVsLS; // Monitor Elements for Instant Lumi
109  std::map<TString,MonitorElement*> m_PrescIndexVsLS; // Monitor Elements for Prescale Index
110  // std::map<TString,MonitorElement*> m_DeadTimeVsLS; // Monitor Elements (Check Purpose)
111 
112  std::map<TString,MonitorElement*> m_xSecObservedVsLS;
113  std::map<TString,MonitorElement*> m_DelivLumiVsLS;
114  std::map<TString,MonitorElement*> m_RecorLumiVsLS;
115 
116  std::map<TString,TF1*> m_templateFunctions; // For each trigger template f(InstLumi)=XSec
117 
118  std::map<int,std::map<TString,double> > m_lsCounts; // Map of counts (by bit) recorded for each LS
119 
120  // Input tags
124 
125  // ParameterSet
127 
128  // MonitorElement
130 
131  // Others
132  DQMStore* dbe; // The DQM Service Handle
133 
134 };
135 
136 #endif
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
edm::EDGetTokenT< Level1TriggerScalersCollection > m_scalersSource_L1TSCollection
MonitorElement * m_ErrorMonitor
std::map< std::string, std::string > m_selectedTriggers
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
std::map< TString, MonitorElement * > m_RecorLumiVsLS
std::map< TString, TF1 * > m_templateFunctions
bool getXSexFitsPython(const edm::ParameterSet &ps)
std::map< TString, MonitorElement * > m_xSecVsInstLumi
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
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_xSecObservedVsDelivLumi
std::map< TString, MonitorElement * > m_xSecObservedVsLS
std::map< TString, MonitorElement * > m_xSecObservedToExpected
std::string m_outputFile
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
std::map< int, int > m_lsPrescaleIndex
std::map< std::string, bool > m_inputCategories
std::map< int, std::map< TString, double > > m_lsCounts
std::map< int, double > m_lsDeadTime
void endRun(const edm::Run &run, const edm::EventSetup &iSetup)
std::map< TString, MonitorElement * > m_CountsVsLS
const std::vector< std::vector< int > > * m_listsPrescaleFactors
edm::EDGetTokenT< LumiScalersCollection > m_scalersSource_LSCollection
std::map< int, std::map< TString, double > > m_lsRates
std::map< TString, int > m_algoBit
std::map< TString, MonitorElement * > m_DelivLumiVsLS
std::map< TString, MonitorElement * > m_xSecObservedVsRecorLumi
Definition: Run.h:41
std::map< TString, TF1 * > m_algoFit