38 m_dir = handler.
m_dir;
40 m_dbe = handler.
m_dbe;
50 cout <<
"[L1TEfficiencyMuons_Harvesting:] Booking efficiency histo for "
51 << m_dir <<
" and " << m_plotName << endl;
60 cout <<
"[L1TEfficiencyMuons_Harvesting:] "
61 << (!num && !den ?
"Num && Den" : !num ?
"Num" :
"Den")
62 <<
" not gettable. Quitting booking" << endl;
74 cout <<
"[L1TEfficiencyMuons_Harvesting:] "
75 << (!numH && !denH ?
"Num && Den" : !numH ?
"Num" :
"Den")
76 <<
" is not TH1F. Quitting booking" << endl;
82 int nBinsNum = numH->GetNbinsX();
83 int nBinsDen = denH->GetNbinsX();
85 if (nBinsNum != nBinsDen) {
88 cout <<
"[L1TEfficiencyMuons_Harvesting:] # bins in num and den is different. Quitting booking" << endl;
94 double min = numH->GetXaxis()->GetXmin();
95 double max = numH->GetXaxis()->GetXmax();
97 m_dbe->setCurrentFolder(m_dir);
98 m_effHisto = m_dbe->book1D(m_plotName,m_plotName,nBinsNum,min,max);
109 cout <<
"[L1TEfficiencyMuons_Harvesting:] Computing efficiency for "
110 << m_plotName << endl;
122 TH1F *effH = m_effHisto->getTH1F();
124 effH->Divide(numH,denH);
134 cout <<
"[L1TEfficiency_Harvesting:] ____________ Storage inicialization ____________ " << endl;
135 cout <<
"[L1TEfficiency_Harvesting:] Setting up dbe folder: L1T/Efficiency" << endl;
142 if (m_verbose) {
cout <<
"[L1TEfficiency_Harvesting:] Pointer for DQM Store: " << dbe << endl;}
146 vector<ParameterSet>::const_iterator plotCfgIt = plotCfgs.begin();
147 vector<ParameterSet>::const_iterator plotCfgEnd = plotCfgs.end();
149 for (; plotCfgIt!=plotCfgEnd; ++plotCfgIt) {
151 string dir = plotCfgIt->getUntrackedParameter<
string>(
"dqmBaseDir");
152 vector<string>
plots = plotCfgIt->getUntrackedParameter<vector<string>>(
"plots");
154 vector<string>::const_iterator plotIt = plots.begin();
155 vector<string>::const_iterator plotEnd = plots.end();
157 for (; plotIt!=plotEnd; ++plotIt)
172 if (m_verbose) {
cout <<
"[L1TEfficiency_Harvesting:] Called beginJob." << endl;}
180 if (m_verbose) {
cout <<
"[L1TEfficiency_Harvesting:] Called endJob." << endl;}
187 if (m_verbose) {
cout <<
"[L1TEfficiency_Harvesting:] Called beginRun." << endl;}
195 if (m_verbose) {
cout <<
"[L1TEfficiency_Harvesting:] Called endRun." << endl;}
197 vector<L1TEfficiencyPlotHandler>::iterator plotHandlerIt = m_plotHandlers.begin();
198 vector<L1TEfficiencyPlotHandler>::iterator plotHandlerEnd = m_plotHandlers.end();
200 for(; plotHandlerIt!=plotHandlerEnd; ++plotHandlerIt) {
201 plotHandlerIt->book(m_verbose);
202 plotHandlerIt->computeEfficiency(m_verbose);
212 cout <<
"[L1TEfficiency_Harvesting:] Called beginLuminosityBlock at LS="
222 cout <<
"[L1TEfficiency_Harvesting:] Called endLuminosityBlock at LS="
LuminosityBlockID id() const
T getUntrackedParameter(std::string const &, T const &) const
L1TEfficiency_Harvesting(const edm::ParameterSet &ps)
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
DEFINE_FWK_MODULE(HiMixingModule)
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