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")),
27 : numeratorDir_(handler.numeratorDir_),
28 denominatorDir_(handler.denominatorDir_),
29 outputDir_(handler.outputDir_),
30 plotName_(handler.plotName_),
31 numeratorSuffix_(handler.numeratorSuffix_),
32 denominatorSuffix_(handler.denominatorSuffix_),
33 h_efficiency_(handler.h_efficiency_) {}
46 << (!
num && !den ? numeratorName +
" && " + denominatorName : !
num ? numeratorName : denominatorName)
47 <<
" not gettable. Quitting booking" << endl;
51 TH1 *numH =
num->getTH1();
56 << (!numH && !denH ? numeratorName +
" && " + denominatorName : !
num ? numeratorName : denominatorName)
57 <<
" is not TH1F. Quitting booking" << endl;
62 if (numH->GetNbinsX() != denH->GetNbinsX()) {
63 edm::LogWarning(
"L1TEfficiencyPlotHandler") <<
" # X bins in " << numeratorName <<
" and " << denominatorName
64 <<
" are different. Quitting booking" << endl;
73 if (numH->GetNbinsY() != denH->GetNbinsY()) {
74 edm::LogWarning(
"L1TEfficiencyPlotHandler") <<
" # Y bins in " << numeratorName <<
" and " << denominatorName
75 <<
" are different. Quitting booking" << endl;
98 TH1 *numH =
num->getTH1();
102 effH->Divide(numH, denH, 1.0, 1.0,
"B");
107 : verbose_(ps.getUntrackedParameter<
bool>(
"verbose")), plotHandlers_() {
109 edm::LogInfo(
"L1TEfficiencyHarvesting") <<
"____________ Storage initialization ____________ " << endl;
113 vector<string>
plots = plotConfig.getUntrackedParameter<vector<string>>(
"plots");
126 edm::LogInfo(
"L1TEfficiencyHarvesting") <<
"Called endRun." << endl;
130 plotHandler.book(ibooker, igetter);
131 plotHandler.computeEfficiency(ibooker, igetter);