27 bool isJetDir =
false;
28 bool isMetDir =
false;
41 std::vector<std::string> subdirectories = igetter.
getSubdirs();
42 for (std::vector<std::string>::iterator
dir = subdirectories.begin();
dir != subdirectories.end();
dir++) {
48 if (TString(*dir).Contains(patternJet))
50 if (TString(*dir).Contains(patternMet))
64 "Gen Missing ET Turn-On RelVal");
71 "Gen Missing ET Turn-On Data");
80 "HLT Missing ET Turn-On RelVal");
87 "HLT Missing ET Turn-On Data");
101 "Gen Jet Pt Turn-On RelVal");
108 "Gen Jet Pt Turn-On Data");
115 "Gen Jet Eta Turn-On RelVal");
119 "_meGenJetEtaTrgLow",
122 "Gen Jet Eta Turn-On Data");
129 "Gen Jet Phi Turn-On RelVal");
133 "_meGenJetPhiTrgLow",
136 "Gen Jet Phi Turn-On Data");
145 "HLT Jet Pt Turn-On RelVal");
152 "HLT Jet Pt Turn-On Data");
159 "HLT Jet Eta Turn-On RelVal");
163 "_meHLTJetEtaTrgLow",
166 "HLT Jet Eta Turn-On Data");
173 "HLT Jet Phi Turn-On RelVal");
177 "_meHLTJetPhiTrgLow",
180 "HLT Jet Phi Turn-On Data");
202 TH1F *denom =
getHistogram(ibooker, igetter, ibooker.
pwd() +
"/" + denomName);
206 <<
"numerator histogram " << ibooker.
pwd() +
"/" + numName <<
" does not exist";
207 if (denom ==
nullptr)
209 <<
"denominator histogram " << ibooker.
pwd() +
"/" + denomName <<
" does not exist";
216 outName, titel, num->GetXaxis()->GetNbins(), num->GetXaxis()->GetXmin(), num->GetXaxis()->GetXmax(), 0., 1.2);
219 out->GetXaxis()->SetTitle(label.c_str());
220 out->SetYTitle(
"Efficiency");
221 out->SetOption(
"PE");
222 out->SetLineColor(2);
223 out->SetLineWidth(2);
224 out->SetMarkerStyle(20);
225 out->SetMarkerSize(0.8);
226 out->SetStats(kFALSE);
228 for (
int i = 1;
i <= num->GetNbinsX();
i++) {
230 Efficiency((
int)num->GetBinContent(
i), (
int)denom->GetBinContent(
i), 0.683,
e, low, high);
231 double err = e - low > high - e ? e - low : high -
e;
233 out->SetBinContent(
i, e);
234 out->SetBinEntries(
i, 1);
235 out->SetBinError(
i,
sqrt(e * e + err * err));
246 if (monElement !=
nullptr)
262 mode = passing / ((double)total);
265 lowerBound = TEfficiency::Wilson(total, passing, level,
false);
266 upperBound = TEfficiency::Wilson(total, passing, level,
true);
TProfile * getTProfile() const
std::string patternJetTrg_
T getUntrackedParameter(std::string const &, T const &) const
void Efficiency(int passing, int total, double level, double &mode, double &lowerBound, double &upperBound)
MonitorElement * bookProfile(Args &&...args)
JetMETDQMPostProcessor(const edm::ParameterSet &pset)
std::string patternMetTrg_
#define DEFINE_FWK_MODULE(type)
TH1F * getHistogram(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &histoPath)
TProfile * dividehistos(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const std::string &numName, const std::string &denomName, const std::string &outName, const std::string &label, const std::string &titel)
MonitorElement * get(std::string const &path)
std::string const & pwd()
bool dirExists(std::string const &path)
std::vector< std::string > getSubdirs()
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override