18 numeratorDir_(ps.getUntrackedParameter <
std::
string > (
"numeratorDir")),
19 denominatorDir_(ps.getUntrackedParameter <
std::
string > (
"denominatorDir", numeratorDir_)),
20 outputDir_(ps.getUntrackedParameter <
std::
string > (
"outputDir", numeratorDir_)),
22 numeratorSuffix_(ps.getUntrackedParameter <
std::
string > (
"numeratorSuffix",
"Num")),
23 denominatorSuffix_(ps.getUntrackedParameter <
std::
string > (
"denominatorSuffix",
"Den")),
55 << (!num && !den ? numeratorName +
" && " + denominatorName : !num ? numeratorName : denominatorName)
56 <<
" not gettable. Quitting booking" << endl;
66 << (!numH && !denH ? numeratorName +
" && " + denominatorName : !num ? numeratorName : denominatorName)
67 <<
" is not TH1F. Quitting booking" << endl;
73 if (numH->GetNbinsX() != denH->GetNbinsX()) {
75 "L1TEfficiencyPlotHandler") <<
" # X bins in " <<
76 numeratorName <<
" and " << denominatorName <<
77 " are different. Quitting booking" << endl;
88 if (numH->GetNbinsY() != denH->GetNbinsY()) {
90 "L1TEfficiencyPlotHandler") <<
" # Y bins in " << numeratorName <<
91 " and " << denominatorName <<
" are different. Quitting booking" <<
117 TH1 *numH = num->
getTH1();
118 TH1 *denH = den->
getTH1();
121 effH->Divide(numH, denH, 1.0, 1.0,
"B");
126 verbose_(ps.getUntrackedParameter<
bool>(
"verbose")),
130 edm::LogInfo(
"L1TEfficiencyHarvesting") <<
"____________ Storage initialization ____________ " << endl;
134 vector < string >
plots = plotConfig.getUntrackedParameter < vector < string >> (
"plots");
135 for (
auto plot : plots) {
150 edm::LogInfo(
"L1TEfficiencyHarvesting") <<
"Called endRun." << endl;
154 plotHandler.book(ibooker, igetter);
155 plotHandler.computeEfficiency(ibooker, igetter);
LuminosityBlockID id() const
T getUntrackedParameter(std::string const &, T const &) const
std::string numeratorSuffix_
std::string numeratorDir_
L1TEfficiencyHarvesting(const edm::ParameterSet &ps)
virtual void dqmEndLuminosityBlock(DQMStore::IGetter &igetter, edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
MonitorElement * get(const std::string &path)
#define DEFINE_FWK_MODULE(type)
L1TEfficiencyPlotHandler(const edm::ParameterSet &ps, std::string plotName)
MonitorElement * h_efficiency_
std::string denominatorDir_
bool is2D(HitType hitType)
~L1TEfficiencyHarvesting() override
MonitorElement * book1D(Args &&...args)
void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
L1TEfficiencyPlotHandlerCollection plotHandlers_
void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
std::string denominatorSuffix_
LuminosityBlockNumber_t luminosityBlock() const
void computeEfficiency(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
Kind kind() const
Get the type of the monitor element.