50 for (std::vector<std::string>::const_iterator
plotName = plotNames.begin();
plotName != plotNames.end(); ++
plotName) {
53 typedef std::vector<std::string>
vstring;
55 if (plotParameter.empty()) {
71 <<
" Failed to decode histogram names for plotName = " << (*plotName) <<
" --> skipping !!";
87 std::string numeratorHistogramName, numeratorHistogramDirectory;
94 TH1* histoNumerator = (meNumerator !=
nullptr) ? meNumerator->
getTH1() :
nullptr;
97 std::string denominatorHistogramName, denominatorHistogramDirectory;
104 TH1* histoDenominator = (meDenominator !=
nullptr) ? meDenominator->
getTH1() :
nullptr;
106 if (histoNumerator !=
nullptr && histoDenominator !=
nullptr) {
107 if (!histoNumerator->GetSumw2N())
108 histoNumerator->Sumw2();
111 if (!histoDenominator->GetSumw2N())
112 histoDenominator->Sumw2();
118 if (!effHistogramDirectory.empty()) {
119 if (iget.
dirExists(effHistogramDirectory))
122 std::cout <<
"TauDQMHistEffProducer:: Directory: " << effHistogramDirectory <<
" does not exist!"
128 histoNumerator->GetNbinsX(),
129 histoNumerator->GetXaxis()->GetXmin(),
130 histoNumerator->GetXaxis()->GetXmax());
132 histoEfficiency->
getTH1F()->Divide(histoNumerator, histoDenominator, 1., 1.,
"B");
143 edm::LogError(
"endRun") <<
" Failed to produce efficiency histogram = " <<
plot->efficiency_ <<
" !!";
144 if (histoNumerator ==
nullptr)
145 edm::LogError(
"endRun") <<
" numerator = " <<
plot->numerator_ <<
" does not exist.";
146 if (histoDenominator ==
nullptr)
147 edm::LogError(
"endRun") <<
" denominator = " <<
plot->denominator_ <<
" does not exist.";