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_) {}
45 edm::LogWarning(
"L1TEfficiencyPlotHandler") << (!
num && !den ? numeratorName +
" && " + denominatorName
46 : !
num ? numeratorName
48 <<
" not gettable. Quitting booking" << endl;
52 TH1 *numH =
num->getTH1();
56 edm::LogWarning(
"L1TEfficiencyPlotHandler") << (!numH && !denH ? numeratorName +
" && " + denominatorName
57 : !
num ? numeratorName
59 <<
" is not TH1F. Quitting booking" << endl;
64 if (numH->GetNbinsX() != denH->GetNbinsX()) {
65 edm::LogWarning(
"L1TEfficiencyPlotHandler") <<
" # X bins in " << numeratorName <<
" and " << denominatorName
66 <<
" are different. Quitting booking" << endl;
75 if (numH->GetNbinsY() != denH->GetNbinsY()) {
76 edm::LogWarning(
"L1TEfficiencyPlotHandler") <<
" # Y bins in " << numeratorName <<
" and " << denominatorName
77 <<
" are different. Quitting booking" << endl;
100 TH1 *numH =
num->getTH1();
101 TH1 *denH = den->
getTH1();
104 effH->Divide(numH, denH, 1.0, 1.0,
"B");
109 : verbose_(ps.getUntrackedParameter<
bool>(
"verbose")), plotHandlers_() {
111 edm::LogInfo(
"L1TEfficiencyHarvesting") <<
"____________ Storage initialization ____________ " << endl;
114 for (
const auto &plotConfig : ps.
getUntrackedParameter<std::vector<edm::ParameterSet>>(
"plotCfgs")) {
115 vector<string>
plots = plotConfig.getUntrackedParameter<vector<string>>(
"plots");
128 edm::LogInfo(
"L1TEfficiencyHarvesting") <<
"Called endRun." << endl;
132 plotHandler.book(ibooker, igetter);
133 plotHandler.computeEfficiency(ibooker, igetter);