36 m_dir = handler.
m_dir;
45 cout <<
"[L1TEfficiencyMuons_Harvesting:] Booking efficiency histo for "
46 << m_dir <<
" and " << m_plotName << endl;
53 cout <<
"[L1TEfficiencyMuons_Harvesting:] "
54 << (!num && !den ?
"Num && Den" : !num ?
"Num" :
"Den")
55 <<
" not gettable. Quitting booking" << endl;
66 cout <<
"[L1TEfficiencyMuons_Harvesting:] "
67 << (!numH && !denH ?
"Num && Den" : !numH ?
"Num" :
"Den")
68 <<
" is not TH1F. Quitting booking" << endl;
74 int nBinsNum = numH->GetNbinsX();
75 int nBinsDen = denH->GetNbinsX();
77 if (nBinsNum != nBinsDen) {
79 cout <<
"[L1TEfficiencyMuons_Harvesting:] # bins in num and den is different. Quitting booking" << endl;
85 double min = numH->GetXaxis()->GetXmin();
86 double max = numH->GetXaxis()->GetXmax();
89 m_effHisto = ibooker.
book1D(m_plotName,m_plotName,nBinsNum,min,max);
99 cout <<
"[L1TEfficiencyMuons_Harvesting:] Computing efficiency for "
100 << m_plotName << endl;
111 TH1F *effH = m_effHisto->getTH1F();
113 effH->Divide(numH,denH);
123 cout <<
"[L1TEfficiency_Harvesting:] ____________ Storage inicialization ____________ " << endl;
124 cout <<
"[L1TEfficiency_Harvesting:] Setting up dbe folder: L1T/Efficiency" << endl;
129 vector<ParameterSet>::const_iterator plotCfgIt = plotCfgs.begin();
130 vector<ParameterSet>::const_iterator plotCfgEnd = plotCfgs.end();
132 for (; plotCfgIt!=plotCfgEnd; ++plotCfgIt) {
134 string dir = plotCfgIt->getUntrackedParameter<
string>(
"dqmBaseDir");
135 vector<string>
plots = plotCfgIt->getUntrackedParameter<vector<string>>(
"plots");
137 vector<string>::const_iterator plotIt = plots.begin();
138 vector<string>::const_iterator plotEnd = plots.end();
140 for (; plotIt!=plotEnd; ++plotIt)
155 if (m_verbose) {
cout <<
"[L1TEfficiency_Harvesting:] Called endRun." << endl;}
157 vector<L1TEfficiencyPlotHandler>::iterator plotHandlerIt = m_plotHandlers.begin();
158 vector<L1TEfficiencyPlotHandler>::iterator plotHandlerEnd = m_plotHandlers.end();
160 for(; plotHandlerIt!=plotHandlerEnd; ++plotHandlerIt) {
161 plotHandlerIt->book(ibooker, igetter);
162 plotHandlerIt->computeEfficiency(ibooker, igetter);
172 cout <<
"[L1TEfficiency_Harvesting:] Called endLuminosityBlock at LS="
LuminosityBlockID id() const
T getUntrackedParameter(std::string const &, T const &) const
L1TEfficiencyPlotHandler(std::string dir, std::string plotName)
L1TEfficiency_Harvesting(const edm::ParameterSet &ps)
MonitorElement * get(const std::string &path)
#define DEFINE_FWK_MODULE(type)
virtual void dqmEndLuminosityBlock(DQMStore::IGetter &igetter, edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
virtual void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
virtual ~L1TEfficiency_Harvesting()
MonitorElement * book1D(Args &&...args)
EventID const & min(EventID const &lh, EventID const &rh)
void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void setCurrentFolder(const std::string &fullpath)
TH1F * getTH1F(void) const
LuminosityBlockNumber_t luminosityBlock() const
void computeEfficiency(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
EventID const & max(EventID const &lh, EventID const &rh)
MonitorElement * m_effHisto