36 m_dir = handler.
m_dir;
38 m_dbe = handler.
m_dbe;
48 cout <<
"[L1TEfficiencyMuons_Harvesting:] Booking efficiency histo for "
49 << m_dir <<
" and " << m_plotName << endl;
58 cout <<
"[L1TEfficiencyMuons_Harvesting:] "
59 << (!num && !den ?
"Num && Den" : !num ?
"Num" :
"Den")
60 <<
" not gettable. Quitting booking" << endl;
72 cout <<
"[L1TEfficiencyMuons_Harvesting:] "
73 << (!numH && !denH ?
"Num && Den" : !numH ?
"Num" :
"Den")
74 <<
" is not TH1F. Quitting booking" << endl;
80 int nBinsNum = numH->GetNbinsX();
81 int nBinsDen = denH->GetNbinsX();
83 if (nBinsNum != nBinsDen) {
86 cout <<
"[L1TEfficiencyMuons_Harvesting:] # bins in num and den is different. Quitting booking" << endl;
92 double min = numH->GetXaxis()->GetXmin();
93 double max = numH->GetXaxis()->GetXmax();
95 m_dbe->setCurrentFolder(m_dir);
96 m_effHisto = m_dbe->book1D(m_plotName,m_plotName,nBinsNum,min,max);
107 cout <<
"[L1TEfficiencyMuons_Harvesting:] Computing efficiency for "
108 << m_plotName << endl;
120 TH1F *effH = m_effHisto->getTH1F();
122 effH->Divide(numH,denH);
132 cout <<
"[L1TEfficiency_Harvesting:] ____________ Storage inicialization ____________ " << endl;
133 cout <<
"[L1TEfficiency_Harvesting:] Setting up dbe folder: L1T/Efficiency" << endl;
140 if (m_verbose) {
cout <<
"[L1TEfficiency_Harvesting:] Pointer for DQM Store: " << dbe << endl;}
144 vector<ParameterSet>::const_iterator plotCfgIt = plotCfgs.begin();
145 vector<ParameterSet>::const_iterator plotCfgEnd = plotCfgs.end();
147 for (; plotCfgIt!=plotCfgEnd; ++plotCfgIt) {
149 string dir = plotCfgIt->getUntrackedParameter<
string>(
"dqmBaseDir");
150 vector<string>
plots = plotCfgIt->getUntrackedParameter<vector<string>>(
"plots");
152 vector<string>::const_iterator plotIt = plots.begin();
153 vector<string>::const_iterator plotEnd = plots.end();
155 for (; plotIt!=plotEnd; ++plotIt)
170 if (m_verbose) {
cout <<
"[L1TEfficiency_Harvesting:] Called beginJob." << endl;}
178 if (m_verbose) {
cout <<
"[L1TEfficiency_Harvesting:] Called endJob." << endl;}
185 if (m_verbose) {
cout <<
"[L1TEfficiency_Harvesting:] Called beginRun." << endl;}
193 if (m_verbose) {
cout <<
"[L1TEfficiency_Harvesting:] Called endRun." << endl;}
195 vector<L1TEfficiencyPlotHandler>::iterator plotHandlerIt = m_plotHandlers.begin();
196 vector<L1TEfficiencyPlotHandler>::iterator plotHandlerEnd = m_plotHandlers.end();
198 for(; plotHandlerIt!=plotHandlerEnd; ++plotHandlerIt) {
199 plotHandlerIt->book(m_verbose);
200 plotHandlerIt->computeEfficiency(m_verbose);
210 cout <<
"[L1TEfficiency_Harvesting:] Called beginLuminosityBlock at LS="
220 cout <<
"[L1TEfficiency_Harvesting:] Called endLuminosityBlock at LS="
LuminosityBlockID id() const
T getUntrackedParameter(std::string const &, T const &) const
L1TEfficiency_Harvesting(const edm::ParameterSet &ps)
#define DEFINE_FWK_MODULE(type)
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
void computeEfficiency(bool verbose)
void endRun(const edm::Run &run, const edm::EventSetup &iSetup)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
L1TEfficiencyPlotHandler(std::string dir, std::string plotName, DQMStore *dbe)
virtual ~L1TEfficiency_Harvesting()
EventID const & min(EventID const &lh, EventID const &rh)
void setVerbose(unsigned level)
void analyze(const edm::Event &e, const edm::EventSetup &c)
TH1F * getTH1F(void) const
LuminosityBlockNumber_t luminosityBlock() const
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
EventID const & max(EventID const &lh, EventID const &rh)
MonitorElement * m_effHisto