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 
33 
35 
36 #include <TString.h>
37 
38 #include <iostream>
39 #include <fstream>
40 #include <vector>
41 
42 //
43 // class declaration
44 //
45 
47 
48 public:
49 
50  enum Errors{
51  UNKNOWN = 1,
53  };
54 
55 public:
56 
57  L1TRate_Offline(const edm::ParameterSet& ps); // Constructor
58  virtual ~L1TRate_Offline(); // Destructor
59 
60 protected:
61 
62  void analyze (const edm::Event& e, const edm::EventSetup& c); // Analyze
63  virtual void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run& run, const edm::EventSetup& iSetup) override;
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  virtual void dqmBeginRun(edm::Run const&, edm::EventSetup const&);
68 
69 // Private methods
70 //private:
71 
72  // bool getXSexFitsOMDS (const edm::ParameterSet& ps);
73  bool getXSexFitsPython(const edm::ParameterSet& ps);
74 
75 // Private variables
76 private:
77 
78  // bool
79  bool m_verbose;
80 
81  // int
82  int m_refPrescaleSet; // What is the reference prescale index to use for trigger choice
83  int m_maxNbins; // Maximum number of bins for MonitorElement
84  int m_lsShiftGTRates; // What shift (if any) to be applied to GT Rates LS number
85 
86  // string
87  std::string m_outputFile; // External output file name (for testiting)
88 
89  // Vectors
90  const std::vector< std::vector<int> >* m_listsPrescaleFactors; // Collection os all sets of prescales
91 
92  // Maps
93  std::map<int,double> m_lsDeadTime; // Map of dead time for each LS
94  std::map<int,int> m_lsPrescaleIndex; // Map of precale index for each LS
95  std::map<int,double> m_lsLuminosity; // Map of luminosity recorded for each LS
96  std::map<int,std::map<TString,double> > m_lsRates; // Map of rates (by bit) recorded for each LS
97  std::map<TString,int> m_algoBit; // Map of bit associated with a L1 Algo alias
98  std::map<TString,TF1*> m_algoFit; // Map of bit associated with a L1 Algo alias
99  std::map<std::string,bool> m_inputCategories; // Map of categories to monitor
100  std::map<std::string,std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
101  std::map<TString,MonitorElement*> m_xSecObservedToExpected; // Monitor Elements for Observed to Expected Algo XSec
102  std::map<TString,MonitorElement*> m_xSecVsInstLumi; // Monitor Elements for Algo XSec vs Instant Luminosity
103 
104  std::map<TString,MonitorElement*> m_xSecObservedVsDelivLumi;
105  std::map<TString,MonitorElement*> m_xSecObservedVsRecorLumi;
106 
107 
108  std::map<TString,MonitorElement*> m_CountsVsLS; // Monitor Elements for counts
109  std::map<TString,MonitorElement*> m_InstLumiVsLS; // Monitor Elements for Instant Lumi
110  std::map<TString,MonitorElement*> m_PrescIndexVsLS; // Monitor Elements for Prescale Index
111  // std::map<TString,MonitorElement*> m_DeadTimeVsLS; // Monitor Elements (Check Purpose)
112 
113  std::map<TString,MonitorElement*> m_xSecObservedVsLS;
114  std::map<TString,MonitorElement*> m_DelivLumiVsLS;
115  std::map<TString,MonitorElement*> m_RecorLumiVsLS;
116 
117  std::map<TString,TF1*> m_templateFunctions; // For each trigger template f(InstLumi)=XSec
118 
119  std::map<int,std::map<TString,double> > m_lsCounts; // Map of counts (by bit) recorded for each LS
120 
121  // Input tags
125 
126  // ParameterSet
128 
129  // MonitorElement
131 
133 };
134 
135 #endif
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
edm::EDGetTokenT< Level1TriggerScalersCollection > m_scalersSource_L1TSCollection
MonitorElement * m_ErrorMonitor
virtual void dqmBeginRun(edm::Run const &, edm::EventSetup const &)
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
std::map< int, int > m_lsPrescaleIndex
std::map< std::string, bool > m_inputCategories
L1GtUtils m_l1GtUtils
std::map< int, std::map< TString, double > > m_lsCounts
std::map< int, double > m_lsDeadTime
std::map< TString, MonitorElement * > m_CountsVsLS
virtual void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &run, const edm::EventSetup &iSetup) override
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:43
std::map< TString, TF1 * > m_algoFit