CMS 3D CMS Logo

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
14 
16 
19 
20 //DataFormats
25 #include "DataFormats/Common/interface/ConditionsInEdm.h" // Parameters associated to Run, LS and Event
26 #include "DataFormats/Luminosity/interface/LumiDetails.h" // Luminosity Information
27 #include "DataFormats/Luminosity/interface/LumiSummary.h" // Luminosity Information
28 
30 
32 
33 #include <TString.h>
34 
35 #include <iostream>
36 #include <fstream>
37 #include <vector>
38 
39 //
40 // class declaration
41 //
42 
43 class L1TRate_Offline : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
44 public:
46 
47 public:
48  L1TRate_Offline(const edm::ParameterSet& ps); // Constructor
49  ~L1TRate_Offline() override; // Destructor
50 
51 protected:
52  void analyze(const edm::Event& e, const edm::EventSetup& c) override; // Analyze
53  void bookHistograms(DQMStore::IBooker& ibooker, const edm::Run& run, const edm::EventSetup& iSetup) override;
54 
55  void beginLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c) override;
56  void endLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c) override;
57 
58  // Private methods
59  //private:
60 
61  // bool getXSexFitsOMDS (const edm::ParameterSet& ps);
62  bool getXSexFitsPython(const edm::ParameterSet& ps);
63 
64  // Private variables
65 private:
66  // bool
67  bool m_verbose;
68 
69  // int
70  int m_refPrescaleSet; // What is the reference prescale index to use for trigger choice
71  int m_maxNbins; // Maximum number of bins for MonitorElement
72  int m_lsShiftGTRates; // What shift (if any) to be applied to GT Rates LS number
73 
74  // string
75  std::string m_outputFile; // External output file name (for testiting)
76 
77  // Vectors
78  const std::vector<std::vector<int> >* m_listsPrescaleFactors; // Collection os all sets of prescales
79 
80  // Maps
81  std::map<int, double> m_lsDeadTime; // Map of dead time for each LS
82  std::map<int, int> m_lsPrescaleIndex; // Map of precale index for each LS
83  std::map<int, double> m_lsLuminosity; // Map of luminosity recorded for each LS
84  std::map<int, std::map<TString, double> > m_lsRates; // Map of rates (by bit) recorded for each LS
85  std::map<TString, int> m_algoBit; // Map of bit associated with a L1 Algo alias
86  std::map<TString, TF1*> m_algoFit; // Map of bit associated with a L1 Algo alias
87  std::map<std::string, bool> m_inputCategories; // Map of categories to monitor
88  std::map<std::string, std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
89  std::map<TString, MonitorElement*> m_xSecObservedToExpected; // Monitor Elements for Observed to Expected Algo XSec
90  std::map<TString, MonitorElement*> m_xSecVsInstLumi; // Monitor Elements for Algo XSec vs Instant Luminosity
91 
92  std::map<TString, MonitorElement*> m_xSecObservedVsDelivLumi;
93  std::map<TString, MonitorElement*> m_xSecObservedVsRecorLumi;
94 
95  std::map<TString, MonitorElement*> m_CountsVsLS; // Monitor Elements for counts
96  std::map<TString, MonitorElement*> m_InstLumiVsLS; // Monitor Elements for Instant Lumi
97  std::map<TString, MonitorElement*> m_PrescIndexVsLS; // Monitor Elements for Prescale Index
98  // std::map<TString,MonitorElement*> m_DeadTimeVsLS; // Monitor Elements (Check Purpose)
99 
100  std::map<TString, MonitorElement*> m_xSecObservedVsLS;
101  std::map<TString, MonitorElement*> m_DelivLumiVsLS;
102  std::map<TString, MonitorElement*> m_RecorLumiVsLS;
103 
104  std::map<TString, TF1*> m_templateFunctions; // For each trigger template f(InstLumi)=XSec
105 
106  std::map<int, std::map<TString, double> > m_lsCounts; // Map of counts (by bit) recorded for each LS
107 
108  // Input tags
112 
113  // ParameterSet
115 
116  // MonitorElement
118 
123 };
124 
125 #endif
L1TRate_Offline::m_RecorLumiVsLS
std::map< TString, MonitorElement * > m_RecorLumiVsLS
Definition: L1TRate_Offline.h:102
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
LumiScalers.h
MessageLogger.h
L1TRate_Offline::~L1TRate_Offline
~L1TRate_Offline() override
Definition: L1TRate_Offline.cc:59
L1TRate_Offline::m_algoFit
std::map< TString, TF1 * > m_algoFit
Definition: L1TRate_Offline.h:86
L1TRate_Offline::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: L1TRate_Offline.cc:338
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
L1TRate_Offline::m_verbose
bool m_verbose
Definition: L1TRate_Offline.h:67
edm::Run
Definition: Run.h:45
L1TRate_Offline::m_outputFile
std::string m_outputFile
Definition: L1TRate_Offline.h:75
edm::EDGetTokenT< LumiScalersCollection >
LuminosityBlock.h
L1TRate_Offline::m_l1GtUtils
L1GtUtils m_l1GtUtils
Definition: L1TRate_Offline.h:122
L1TRate_Offline::m_listsPrescaleFactors
const std::vector< std::vector< int > > * m_listsPrescaleFactors
Definition: L1TRate_Offline.h:78
L1TRate_Offline::m_algoBit
std::map< TString, int > m_algoBit
Definition: L1TRate_Offline.h:85
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
DQMStore.h
L1TRate_Offline::bookHistograms
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &run, const edm::EventSetup &iSetup) override
Definition: L1TRate_Offline.cc:64
L1TRate_Offline::m_InstLumiVsLS
std::map< TString, MonitorElement * > m_InstLumiVsLS
Definition: L1TRate_Offline.h:96
L1TMenuHelper::Tokens
Definition: L1TMenuHelper.h:80
L1TRate_Offline::m_CountsVsLS
std::map< TString, MonitorElement * > m_CountsVsLS
Definition: L1TRate_Offline.h:95
DQMOneEDAnalyzer.h
L1TRate_Offline::m_maxNbins
int m_maxNbins
Definition: L1TRate_Offline.h:71
L1TRate_Offline::m_scalersSource_LSCollection
edm::EDGetTokenT< LumiScalersCollection > m_scalersSource_LSCollection
Definition: L1TRate_Offline.h:109
MakerMacros.h
L1TRate_Offline::m_PrescIndexVsLS
std::map< TString, MonitorElement * > m_PrescIndexVsLS
Definition: L1TRate_Offline.h:97
Level1TriggerScalers.h
L1TRate_Offline::m_xSecObservedVsRecorLumi
std::map< TString, MonitorElement * > m_xSecObservedVsRecorLumi
Definition: L1TRate_Offline.h:93
L1TRate_Offline::m_lsShiftGTRates
int m_lsShiftGTRates
Definition: L1TRate_Offline.h:72
L1GtUtils
Definition: L1GtUtils.h:66
L1TRate_Offline::m_menuToken
const edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > m_menuToken
Definition: L1TRate_Offline.h:119
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TRate_Offline::m_lsCounts
std::map< int, std::map< TString, double > > m_lsCounts
Definition: L1TRate_Offline.h:106
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
LumiDetails.h
L1TRate_Offline::m_lsDeadTime
std::map< int, double > m_lsDeadTime
Definition: L1TRate_Offline.h:81
L1TRate_Offline::m_scalersSource_L1TSCollection
edm::EDGetTokenT< Level1TriggerScalersCollection > m_scalersSource_L1TSCollection
Definition: L1TRate_Offline.h:110
L1TRate_Offline::m_xSecVsInstLumi
std::map< TString, MonitorElement * > m_xSecVsInstLumi
Definition: L1TRate_Offline.h:90
L1TRate_Offline::Errors
Errors
Definition: L1TRate_Offline.h:45
L1TRate_Offline::m_ErrorMonitor
MonitorElement * m_ErrorMonitor
Definition: L1TRate_Offline.h:117
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
L1TRate_Offline::m_xSecObservedToExpected
std::map< TString, MonitorElement * > m_xSecObservedToExpected
Definition: L1TRate_Offline.h:89
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd >
L1TRate_Offline::m_inputCategories
std::map< std::string, bool > m_inputCategories
Definition: L1TRate_Offline.h:87
L1TRate_Offline::m_selectedTriggers
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TRate_Offline.h:88
L1TMenuHelper.h
L1TRate_Offline::WARNING_PY_MISSING_FIT
Definition: L1TRate_Offline.h:45
writedatasetfile.run
run
Definition: writedatasetfile.py:27
L1TRate_Offline::m_lsRates
std::map< int, std::map< TString, double > > m_lsRates
Definition: L1TRate_Offline.h:84
L1TRate_Offline::m_lsPrescaleIndex
std::map< int, int > m_lsPrescaleIndex
Definition: L1TRate_Offline.h:82
ConditionsInEdm.h
Frameworkfwd.h
L1TRate_Offline::m_xSecObservedVsLS
std::map< TString, MonitorElement * > m_xSecObservedVsLS
Definition: L1TRate_Offline.h:100
L1GtUtils.h
LumiSummary.h
L1TRate_Offline::endLuminosityBlock
void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TRate_Offline.cc:217
Level1TriggerRates.h
L1TRate_Offline::m_l1GtDataDaqInputTag
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
Definition: L1TRate_Offline.h:111
dqm::implementation::IBooker
Definition: DQMStore.h:43
L1TRate_Offline::m_parameters
edm::ParameterSet m_parameters
Definition: L1TRate_Offline.h:114
L1TRate_Offline::getXSexFitsPython
bool getXSexFitsPython(const edm::ParameterSet &ps)
Definition: L1TRate_Offline.cc:474
L1TRate_Offline::m_refPrescaleSet
int m_refPrescaleSet
Definition: L1TRate_Offline.h:70
ParameterSet.h
L1TRate_Offline
Definition: L1TRate_Offline.h:43
L1TRate_Offline::m_l1GtPfAlgoToken
const edm::ESGetToken< L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd > m_l1GtPfAlgoToken
Definition: L1TRate_Offline.h:120
L1TRate_Offline::m_xSecObservedVsDelivLumi
std::map< TString, MonitorElement * > m_xSecObservedVsDelivLumi
Definition: L1TRate_Offline.h:92
L1TRate_Offline::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TRate_Offline.cc:210
edm::Event
Definition: Event.h:73
L1TRate_Offline::UNKNOWN
Definition: L1TRate_Offline.h:45
L1TRate_Offline::m_templateFunctions
std::map< TString, TF1 * > m_templateFunctions
Definition: L1TRate_Offline.h:104
L1TRate_Offline::m_lsLuminosity
std::map< int, double > m_lsLuminosity
Definition: L1TRate_Offline.h:83
L1GlobalTriggerReadoutRecord.h
L1TRate_Offline::m_DelivLumiVsLS
std::map< TString, MonitorElement * > m_DelivLumiVsLS
Definition: L1TRate_Offline.h:101
L1TRate_Offline::L1TRate_Offline
L1TRate_Offline(const edm::ParameterSet &ps)
Definition: L1TRate_Offline.cc:18
L1TRate_Offline::m_helperTokens
L1TMenuHelper::Tokens m_helperTokens
Definition: L1TRate_Offline.h:121
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37