CMS 3D CMS Logo

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