33 LogDebug(
"HltSusyExoPostProcessor") <<
"Start dqmEndJob";
36 if (iGetter_.dirExists(
subDir_))
43 LogDebug(
"HltSusyExoPostProcessor") <<
"DQMStore cd";
56 int nL1bins = (iGetter_.get(iBooker_.pwd() + triggerBitsDir +
"/L1Bits")->getNbinsX());
57 int nHltbins = (iGetter_.get(iBooker_.pwd() + triggerBitsDir +
"/HltBits")->getNbinsX());
59 std::vector<int> L1placement;
60 for (
int i = 0;
i < nL1bins - 1 *
mcFlag; ++
i)
61 L1placement.push_back(6);
62 std::vector<int> Hltplacement;
63 for (
int i = 0;
i < nHltbins - 1 *
mcFlag; ++
i)
64 Hltplacement.push_back(7);
66 for (
unsigned int i = 0;
i <
sizeof(L1bins) /
sizeof(L1bins[0]); ++
i)
69 for (
unsigned int i = 0;
i <
sizeof(Hltbins) /
sizeof(Hltbins[0]); ++
i)
71 string L1search[8] = {
"Mu",
"EG",
"Jet",
"ET",
"TauJet",
"X",
""};
72 string L1search3 =
"HTT", L1search6 =
"Bias";
73 string Hltsearch[8] = {
"Mu",
"Ele",
"Jet",
"Photon",
"MET",
"Tau",
"X",
""};
74 string Hltsearch4 =
"HT", Hltsearch5 =
"BTag", Hltsearch6_1 =
"EG", Hltsearch6_2 =
"ET", Hltsearch7_1 =
"Bias",
75 Hltsearch7_2 =
"AlCa";
77 LogDebug(
"HltSusyExoPostProcessor") <<
"number of L1 bins = " << nL1bins <<
" number of HLT bins = " << nHltbins;
82 iGetter_.setCurrentFolder(
subDir_ + triggerBitsDir);
83 TH1F *hL1Paths = iGetter_.get(
subDir_ + triggerBitsDir +
"/L1Paths")->getTH1F();
85 TH1F *hHltPaths = iGetter_.get(
subDir_ + triggerBitsDir +
"/HltPaths")->getTH1F();
88 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements booked";
91 float nTotalBeforeCuts = -1;
92 int reference_bin = -1;
94 nTotalBeforeCuts = iGetter_.get(
subDir_ + triggerBitsDir +
"/L1Bits")->getBinContent(nL1bins);
95 reference_bin = nL1bins;
97 for (
int i = 0;
i < nHltbins; ++
i) {
98 string triggername = ((TProfile *)hHltEffBeforeCuts->
getTProfile())->GetXaxis()->GetBinLabel(
i + 1);
99 string eff_search =
"HLT_ZeroBias";
100 if (triggername.find(eff_search) != string::npos && triggername.size() == eff_search.size()) {
101 nTotalBeforeCuts = ((TProfile *)hHltEffBeforeCuts->
getTProfile())->GetBinContent(
i + 1);
102 reference_bin =
i + 1;
106 if (nTotalBeforeCuts == -1) {
107 nTotalBeforeCuts = iGetter_.get(
subDir_ + triggerBitsDir +
"/L1Bits")->getBinContent(nL1bins);
108 reference_bin = nHltbins;
111 LogDebug(
"HltSusyExoPostProcessor") <<
"Total number of events = " << nTotalBeforeCuts;
114 for (
int i = 0;
i < nL1bins - 1 *
mcFlag;
i++) {
116 (double)iGetter_.get(
subDir_ + triggerBitsDir +
"/L1Paths")->getBinContent(
i + 1) / (double)nTotalBeforeCuts;
117 error =
sqrt(value * (1 - value) / (
double)nTotalBeforeCuts);
123 string triggername = ((TProfile *)hL1EffBeforeCuts->
getTProfile())->GetXaxis()->GetBinLabel(
i + 1);
124 if (triggername.find(L1search6) == string::npos) {
125 for (
unsigned int j = 0;
j <
sizeof(L1search) /
sizeof(L1search[0]) - 2; ++
j) {
126 if (triggername.find(L1search[
j]) != string::npos || (j == 3 && triggername.find(L1search3) != string::npos)) {
127 if (L1placement[
i] == 6)
129 else if (L1placement[
i] == 2 && j == 4)
133 }
else if (triggername.empty() || triggername.find(
"Total") != string::npos)
139 for (
unsigned int i = 0;
i < L1placement.size(); ++
i)
140 if (L1placement[
i] != -1)
141 ++L1bins[L1placement[
i]];
143 for (
int i = 0;
i < nHltbins - 1 *
mcFlag;
i++) {
145 (double)iGetter_.get(
subDir_ + triggerBitsDir +
"/HltPaths")->getBinContent(
i + 1) / (double)nTotalBeforeCuts;
146 error =
sqrt(value * (1 - value) / (
double)nTotalBeforeCuts);
152 string triggername = ((TProfile *)hHltEffBeforeCuts->
getTProfile())->GetXaxis()->GetBinLabel(
i + 1);
153 if (triggername.find(Hltsearch7_1) == string::npos && triggername.find(Hltsearch7_2) == string::npos) {
154 for (
unsigned int j = 0; j <
sizeof(Hltsearch) /
sizeof(Hltsearch[0]) - 2; ++
j) {
155 if (triggername.find(Hltsearch[j]) != string::npos ||
156 (j == 4 && triggername.find(Hltsearch4) != string::npos) ||
157 (j == 5 && triggername.find(Hltsearch5) != string::npos)) {
158 if (Hltplacement[
i] == 7)
160 else if (triggername.find(Hltsearch5) != string::npos)
164 }
else if (triggername.empty() || triggername.find(
"Total") != string::npos)
165 Hltplacement[
i] = -1;
167 if (Hltplacement[
i] >= 0 && Hltplacement[
i] <= 5 &&
168 (triggername.find(Hltsearch6_1) != string::npos ||
169 (triggername.find(Hltsearch6_2) != string::npos && Hltplacement[
i] != 4)))
174 for (
unsigned int i = 0;
i < Hltplacement.size(); ++
i)
175 if (Hltplacement[
i] != -1)
176 ++Hltbins[Hltplacement[
i]];
178 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements filled";
181 iBooker_.setCurrentFolder(
subDir_ + triggerBitsDir);
183 iBooker_.bookProfile(
"L1_Mu",
new TProfile(
"L1_Mu",
"Efficiencies of L1 Muon Triggers", L1bins[0], 0, L1bins[0])),
184 iBooker_.bookProfile(
"L1_EG",
new TProfile(
"L1_EG",
"Efficiencies of L1 EG Triggers", L1bins[1], 0, L1bins[1])),
185 iBooker_.bookProfile(
"L1_Jet",
186 new TProfile(
"L1_Jet",
"Efficiencies of L1 Jet Triggers", L1bins[2], 0, L1bins[2])),
187 iBooker_.bookProfile(
189 new TProfile(
"L1_ETM_ETT_HTT",
"Efficiencies of L1 ETM, ETT, and HTT Triggers", L1bins[3], 0, L1bins[3])),
190 iBooker_.bookProfile(
"L1_TauJet",
191 new TProfile(
"L1_TauJet",
"Efficiencies of L1 TauJet Triggers", L1bins[4], 0, L1bins[4])),
192 iBooker_.bookProfile(
"L1_XTrigger",
193 new TProfile(
"L1_XTrigger",
"Efficiencies of L1 Cross Triggers", L1bins[5], 0, L1bins[5])),
194 iBooker_.bookProfile(
195 "L1_Overflow",
new TProfile(
"L1_Overflow",
"Efficiencies of L1 Unsorted Triggers", L1bins[6], 0, L1bins[6]))};
198 iBooker_.bookProfile(
"Hlt_Mu",
199 new TProfile(
"Hlt_Mu",
"Efficiencies of HL Muon Triggers", Hltbins[0], 0, Hltbins[0])),
200 iBooker_.bookProfile(
"Hlt_Ele",
201 new TProfile(
"Hlt_Ele",
"Efficiencies of HL Electron Triggers", Hltbins[1], 0, Hltbins[1])),
202 iBooker_.bookProfile(
"Hlt_Jet",
203 new TProfile(
"Hlt_Jet",
"Efficiencies of HL Jet Triggers", Hltbins[2], 0, Hltbins[2],
"s")),
204 iBooker_.bookProfile(
"Hlt_Photon",
205 new TProfile(
"Hlt_Photon",
"Efficiencies of HL Photon Triggers", Hltbins[3], 0, Hltbins[3])),
206 iBooker_.bookProfile(
208 new TProfile(
"Hlt_MET_HT",
"Efficiencies of HL MET and HT Triggers", Hltbins[4], 0, Hltbins[4])),
209 iBooker_.bookProfile(
211 new TProfile(
"Hlt_Tau_Btag",
"Efficiencies of HL Tau and BTag Triggers", Hltbins[5], 0, Hltbins[5])),
212 iBooker_.bookProfile(
213 "Hlt_XTrigger",
new TProfile(
"Hlt_XTrigger",
"Efficiencies of HL Cross Triggers", Hltbins[6], 0, Hltbins[6])),
214 iBooker_.bookProfile(
216 new TProfile(
"Hlt_Overflow",
"Efficiencies of HL Unsorted Triggers", Hltbins[7], 0, Hltbins[7]))};
219 for (
unsigned int i = 0;
i <
sizeof(L1bincounter) /
sizeof(L1bincounter[0]); ++
i)
221 int Hltbincounter[8];
222 for (
unsigned int i = 0;
i <
sizeof(Hltbincounter) /
sizeof(Hltbincounter[0]); ++
i)
223 Hltbincounter[
i] = 0;
224 TProfile *hL1_ = (TProfile *)hL1EffBeforeCuts->
getTProfile();
225 TProfile *hHlt_ = (TProfile *)hHltEffBeforeCuts->
getTProfile();
228 for (
unsigned int i = 0;
i < L1placement.size(); ++
i) {
229 if (L1placement[
i] != -1) {
230 hL1EffSorted[L1placement[
i]]->
setBinLabel(L1bincounter[L1placement[
i]] + 1, hL1_->GetXaxis()->GetBinLabel(
i + 1));
231 hL1EffSorted[L1placement[
i]]->
setBinContent(L1bincounter[L1placement[
i]] + 1, hL1_->GetBinContent(
i + 1));
232 hL1EffSorted[L1placement[
i]]->
setBinEntries(L1bincounter[L1placement[
i]] + 1, 1);
233 hL1EffSorted[L1placement[
i]]->
setBinError(L1bincounter[L1placement[
i]] + 1, hL1_->GetBinError(
i + 1));
234 ++L1bincounter[L1placement[
i]];
237 for (
unsigned int i = 0;
i < Hltplacement.size(); ++
i) {
238 if (Hltplacement[
i] != -1) {
239 hHltEffSorted[Hltplacement[
i]]->
setBinLabel(Hltbincounter[Hltplacement[
i]] + 1,
240 hHlt_->GetXaxis()->GetBinLabel(
i + 1));
241 hHltEffSorted[Hltplacement[
i]]->
setBinContent(Hltbincounter[Hltplacement[
i]] + 1, hHlt_->GetBinContent(
i + 1));
242 hHltEffSorted[Hltplacement[
i]]->
setBinEntries(Hltbincounter[Hltplacement[
i]] + 1, 1);
243 hHltEffSorted[Hltplacement[
i]]->
setBinError(Hltbincounter[Hltplacement[
i]] + 1, hHlt_->GetBinError(
i + 1));
244 ++Hltbincounter[Hltplacement[
i]];
248 for (
unsigned int i = 0;
i <
mc_dirs.size(); ++
i) {
252 char set_name_L1[256], set_name_Hlt[256];
253 sprintf(set_name_L1,
"L1Eff_%s",
mc_dirs[i].c_str());
254 sprintf(set_name_Hlt,
"HltEff_%s",
mc_dirs[i].c_str());
259 hL1EffAfterMcCuts->
setTitle(
"L1 Efficiencies for " +
mc_dirs[i] +
" selection");
264 hHltEffAfterMcCuts->
setTitle(
"HLT Efficiencies for " +
mc_dirs[i] +
" selection");
266 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements for " <<
mc_dirs[
i] <<
" selection booked";
269 float nTotalAfterMcCuts;
272 iGetter_.get(
subDir_ + mcSelBitsDir +
"/" +
mc_dirs[i] +
"/L1Bits_" +
mc_dirs[i])->getBinContent(nL1bins);
274 nTotalAfterMcCuts = iGetter_.get(
subDir_ + mcSelBitsDir +
"/" +
mc_dirs[i] +
"/HltBits_" +
mc_dirs[i])
275 ->getBinContent(reference_bin);
277 LogDebug(
"HltSusyExoPostProcessor") <<
"Total number of events = " << nTotalAfterMcCuts;
281 char buffer1[256], buffer2[256];
282 string L1_nametags[7] = {
"Mu",
"EG",
"Jet",
"ETM_ETT_HTT",
"TauJet",
"XTrigger",
"Overflow"};
283 string L1_titletags[7] = {
"Muon",
"EG",
"Jet",
"ETM, ETT, and HTT",
"TauJet",
"Cross",
"Unsorted"};
284 string Hlt_nametags[8] = {
"Mu",
"Ele",
"Jet",
"Photon",
"MET_HT",
"Tau_BTag",
"XTrigger",
"Overflow"};
285 string Hlt_titletags[8] = {
"Muon",
"Electron",
"Jet",
"Photon",
"MET and HT",
"Tau and BTag",
"Cross",
"Unsorted"};
286 for (
unsigned int j = 0; j <
sizeof(hL1EffSorted_mc) /
sizeof(hL1EffSorted_mc[0]); ++
j) {
287 sprintf(buffer1,
"L1_%s_%s",
mc_dirs[i].c_str(), L1_nametags[j].c_str());
288 sprintf(buffer2,
"Efficiencies of L1 %s Triggers for %s Selection", L1_titletags[j].c_str(),
mc_dirs[i].c_str());
289 hL1EffSorted_mc[
j] = iBooker_.bookProfile(buffer1,
new TProfile(buffer1, buffer2, L1bins[j], 0, L1bins[j]));
291 for (
unsigned int j = 0; j <
sizeof(hHltEffSorted_mc) /
sizeof(hHltEffSorted_mc[0]); ++
j) {
292 sprintf(buffer1,
"Hlt_%s_%s",
mc_dirs[i].c_str(), Hlt_nametags[j].c_str());
293 sprintf(buffer2,
"Efficiencies of HL %s Triggers for %s Selection", Hlt_titletags[j].c_str(),
mc_dirs[i].c_str());
294 hHltEffSorted_mc[
j] = iBooker_.bookProfile(buffer1,
new TProfile(buffer1, buffer2, Hltbins[j], 0, Hltbins[j]));
298 int L1bincounter_mc[8];
299 for (
unsigned int j = 0; j <
sizeof(L1bincounter_mc) /
sizeof(L1bincounter_mc[0]); ++
j)
300 L1bincounter_mc[j] = 0;
301 int Hltbincounter_mc[8];
302 for (
unsigned int j = 0; j <
sizeof(Hltbincounter_mc) /
sizeof(Hltbincounter_mc[0]); ++
j)
303 Hltbincounter_mc[j] = 0;
304 TProfile *hL1_mc = (TProfile *)hL1EffAfterMcCuts->
getTProfile();
305 TProfile *hHlt_mc = (TProfile *)hHltEffAfterMcCuts->
getTProfile();
306 for (
unsigned int j = 0; j < L1placement.size(); j++) {
307 value = nTotalAfterMcCuts
309 ->getBinContent(j + 1) /
312 error = nTotalAfterMcCuts ?
sqrt(value * (1 - value) / nTotalAfterMcCuts) : 0;
316 if (L1placement[j] != -1) {
317 hL1EffSorted_mc[L1placement[
j]]->
setBinLabel(L1bincounter_mc[L1placement[j]] + 1,
318 hL1_mc->GetXaxis()->GetBinLabel(j + 1));
319 hL1EffSorted_mc[L1placement[
j]]->
setBinContent(L1bincounter_mc[L1placement[j]] + 1,
320 hL1_mc->GetBinContent(j + 1));
321 hL1EffSorted_mc[L1placement[
j]]->
setBinEntries(L1bincounter_mc[L1placement[j]] + 1, 1);
322 hL1EffSorted_mc[L1placement[
j]]->
setBinError(L1bincounter_mc[L1placement[j]] + 1, hL1_mc->GetBinError(j + 1));
323 ++L1bincounter_mc[L1placement[
j]];
326 if (nL1bins !=
int(L1placement.size())) {
327 value = nTotalAfterMcCuts
329 ->getBinContent(nL1bins) /
332 error = nTotalAfterMcCuts ?
sqrt(value * (1 - value) / nTotalAfterMcCuts) : 0;
337 for (
unsigned int j = 0; j < Hltplacement.size(); j++) {
338 value = nTotalAfterMcCuts
340 ->getBinContent(j + 1) /
343 error = nTotalAfterMcCuts ?
sqrt(value * (1 - value) / nTotalAfterMcCuts) : 0;
347 if (Hltplacement[j] != -1) {
348 hHltEffSorted_mc[Hltplacement[
j]]->
setBinLabel(Hltbincounter_mc[Hltplacement[j]] + 1,
349 hHlt_mc->GetXaxis()->GetBinLabel(j + 1));
350 hHltEffSorted_mc[Hltplacement[
j]]->
setBinContent(Hltbincounter_mc[Hltplacement[j]] + 1,
351 hHlt_mc->GetBinContent(j + 1));
352 hHltEffSorted_mc[Hltplacement[
j]]->
setBinEntries(Hltbincounter_mc[Hltplacement[j]] + 1, 1);
353 hHltEffSorted_mc[Hltplacement[
j]]->
setBinError(Hltbincounter_mc[Hltplacement[j]] + 1,
354 hHlt_mc->GetBinError(j + 1));
355 ++Hltbincounter_mc[Hltplacement[
j]];
358 if (nHltbins !=
int(Hltplacement.size())) {
359 value = nTotalAfterMcCuts
361 ->getBinContent(nHltbins) /
364 error = nTotalAfterMcCuts ?
sqrt(value * (1 - value) / nTotalAfterMcCuts) : 0;
369 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements filled for " <<
mc_dirs[
i] <<
" selection";
372 for (
unsigned int i = 0; i <
reco_dirs.size(); ++
i) {
376 char set_name_L1[256], set_name_Hlt[256];
377 sprintf(set_name_L1,
"L1Eff_%s",
reco_dirs[i].c_str());
378 sprintf(set_name_Hlt,
"HltEff_%s",
reco_dirs[i].c_str());
383 hL1EffAfterRecoCuts->
setTitle(
"L1 Efficiencies for " +
reco_dirs[i] +
" selection");
388 hHltEffAfterRecoCuts->
setTitle(
"HLT Efficiencies for " +
reco_dirs[i] +
" selection");
390 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements for " <<
reco_dirs[
i] <<
" selection booked";
393 float nTotalAfterRecoCuts;
396 ->getBinContent(nL1bins);
399 ->getBinContent(reference_bin);
401 LogDebug(
"HltSusyExoPostProcessor") <<
"Total number of events = " << nTotalAfterRecoCuts;
405 char buffer1[256], buffer2[256];
406 string L1_nametags[7] = {
"Mu",
"EG",
"Jet",
"ETM_ETT_HTT",
"TauJet",
"XTrigger",
"Overflow"};
407 string L1_titletags[7] = {
"Muon",
"EG",
"Jet",
"ETM, ETT, and HTT",
"TauJet",
"Cross",
"Unsorted"};
408 string Hlt_nametags[8] = {
"Mu",
"Ele",
"Jet",
"Photon",
"MET_HT",
"Tau_BTag",
"XTrigger",
"Overflow"};
409 string Hlt_titletags[8] = {
"Muon",
"Electron",
"Jet",
"Photon",
"MET and HT",
"Tau and BTag",
"Cross",
"Unsorted"};
410 for (
unsigned int j = 0; j <
sizeof(hL1EffSorted_reco) /
sizeof(hL1EffSorted_reco[0]); ++
j) {
411 sprintf(buffer1,
"L1_%s_%s",
reco_dirs[i].c_str(), L1_nametags[j].c_str());
413 buffer2,
"Efficiencies of L1 %s Triggers for %s Selection", L1_titletags[j].c_str(),
reco_dirs[i].c_str());
414 hL1EffSorted_reco[
j] = iBooker_.bookProfile(buffer1,
new TProfile(buffer1, buffer2, L1bins[j], 0, L1bins[j]));
416 for (
unsigned int j = 0; j <
sizeof(hHltEffSorted_reco) /
sizeof(hHltEffSorted_reco[0]); ++
j) {
417 sprintf(buffer1,
"Hlt_%s_%s",
reco_dirs[i].c_str(), Hlt_nametags[j].c_str());
419 buffer2,
"Efficiencies of HL %s Triggers for %s Selection", Hlt_titletags[j].c_str(),
reco_dirs[i].c_str());
420 hHltEffSorted_reco[
j] = iBooker_.bookProfile(buffer1,
new TProfile(buffer1, buffer2, Hltbins[j], 0, Hltbins[j]));
424 int L1bincounter_reco[8];
425 for (
unsigned int j = 0; j <
sizeof(L1bincounter_reco) /
sizeof(L1bincounter_reco[0]); ++
j)
426 L1bincounter_reco[j] = 0;
427 int Hltbincounter_reco[8];
428 for (
unsigned int j = 0; j <
sizeof(Hltbincounter_reco) /
sizeof(Hltbincounter_reco[0]); ++
j)
429 Hltbincounter_reco[j] = 0;
430 TProfile *hL1_reco = (TProfile *)hL1EffAfterRecoCuts->
getTProfile();
431 TProfile *hHlt_reco = (TProfile *)hHltEffAfterRecoCuts->
getTProfile();
432 for (
unsigned int j = 0; j < L1placement.size(); j++) {
433 value = nTotalAfterRecoCuts
435 ->getBinContent(j + 1) /
438 error = nTotalAfterRecoCuts ?
sqrt(value * (1 - value) / nTotalAfterRecoCuts) : 0;
442 if (L1placement[j] != -1) {
443 hL1EffSorted_reco[L1placement[
j]]->
setBinLabel(L1bincounter_reco[L1placement[j]] + 1,
444 hL1_reco->GetXaxis()->GetBinLabel(j + 1));
445 hL1EffSorted_reco[L1placement[
j]]->
setBinContent(L1bincounter_reco[L1placement[j]] + 1,
446 hL1_reco->GetBinContent(j + 1));
447 hL1EffSorted_reco[L1placement[
j]]->
setBinEntries(L1bincounter_reco[L1placement[j]] + 1, 1);
448 hL1EffSorted_reco[L1placement[
j]]->
setBinError(L1bincounter_reco[L1placement[j]] + 1,
449 hL1_reco->GetBinError(j + 1));
450 ++L1bincounter_reco[L1placement[
j]];
453 if (nL1bins !=
int(L1placement.size())) {
454 value = nTotalAfterRecoCuts
456 ->getBinContent(nL1bins) /
459 error = nTotalAfterRecoCuts ?
sqrt(value * (1 - value) / nTotalAfterRecoCuts) : 0;
464 for (
unsigned int j = 0; j < Hltplacement.size(); j++) {
465 value = nTotalAfterRecoCuts
467 ->getBinContent(j + 1) /
470 error = nTotalAfterRecoCuts ?
sqrt(value * (1 - value) / nTotalAfterRecoCuts) : 0;
474 if (Hltplacement[j] != -1) {
475 hHltEffSorted_reco[Hltplacement[
j]]->
setBinLabel(Hltbincounter_reco[Hltplacement[j]] + 1,
476 hHlt_reco->GetXaxis()->GetBinLabel(j + 1));
477 hHltEffSorted_reco[Hltplacement[
j]]->
setBinContent(Hltbincounter_reco[Hltplacement[j]] + 1,
478 hHlt_reco->GetBinContent(j + 1));
479 hHltEffSorted_reco[Hltplacement[
j]]->
setBinEntries(Hltbincounter_reco[Hltplacement[j]] + 1, 1);
480 hHltEffSorted_reco[Hltplacement[
j]]->
setBinError(Hltbincounter_reco[Hltplacement[j]] + 1,
481 hHlt_reco->GetBinError(j + 1));
482 ++Hltbincounter_reco[Hltplacement[
j]];
485 if (nHltbins !=
int(Hltplacement.size())) {
486 value = nTotalAfterRecoCuts
488 ->getBinContent(nHltbins) /
491 error = nTotalAfterRecoCuts ?
sqrt(value * (1 - value) / nTotalAfterRecoCuts) : 0;
494 hHltEffAfterRecoCuts->
setBinError(nHltbins, error);
496 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements filled";
499 int pt_bins = 100, eta_bins = 100;
500 double pt_floor = 0., pt_ceiling = 200., eta_floor = -3.5, eta_ceiling = 3.5;
501 iBooker_.setCurrentFolder(
subDir_ + byEventDir);
503 "Pt_1_ByEvent",
"Turn on as a Function of P_{t}, |Eta|<1.2, By Event", pt_bins, pt_floor, pt_ceiling);
505 "Eta_1_ByEvent",
"Efficiency as a Function of Eta, P_{t}>0, By Event", eta_bins, eta_floor, eta_ceiling);
507 "Pt_2_ByEvent",
"Turn on as a Function of P_{t}, 1.2<|Eta|<2.1, By Event", pt_bins, pt_floor, pt_ceiling);
509 "Eta_2_ByEvent",
"Efficiency as a Function of Eta, P_{t}>10, By Event", eta_bins, eta_floor, eta_ceiling);
511 "Pt_3_ByEvent",
"Turn on as a Function of P_{t}, |Eta|>2.1, By Event", pt_bins, pt_floor, pt_ceiling);
513 "Eta_3_ByEvent",
"Efficiency as a Function of Eta, P_{t}>20, By Event", eta_bins, eta_floor, eta_ceiling);
514 iBooker_.setCurrentFolder(
subDir_ + byMuonDir);
516 "Pt_1_ByMuon",
"Turn on as a Function of P_{t}, |Eta|<1.2, By Muon", pt_bins, pt_floor, pt_ceiling);
518 "Eta_1_ByMuon",
"Efficiency as a Function of Eta, P_{t}>0, By Muon", eta_bins, eta_floor, eta_ceiling);
520 "Pt_2_ByMuon",
"Turn on as a Function of P_{t}, 1.2<|Eta|<2.1, By Muon", pt_bins, pt_floor, pt_ceiling);
522 "Eta_2_ByMuon",
"Efficiency as a Function of Eta, P_{t}>10, By Muon", eta_bins, eta_floor, eta_ceiling);
524 "Pt_3_ByMuon",
"Turn on as a Function of P_{t}, |Eta|>2.1, By Muon", pt_bins, pt_floor, pt_ceiling);
526 "Eta_3_ByMuon",
"Efficiency as a Function of Eta, P_{t}>20, By Muon", eta_bins, eta_floor, eta_ceiling);
528 for (
int i = 1; i <= hPt_1_ByEvent->
getNbinsX(); ++
i) {
529 double n1 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadAssocRecoMuonPt_1_ByEvent")->
getBinContent(i);
530 double n2 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadRecoMuonPt_1_ByEvent")->getBinContent(i);
531 double value = (n2 != 0 ? n1 / n2 : 0);
532 double error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
536 n1 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadAssocRecoMuonPt_2_ByEvent")->getBinContent(i);
537 n2 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadRecoMuonPt_2_ByEvent")->getBinContent(i);
538 value = (n2 != 0 ? n1 / n2 : 0);
539 error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
543 n1 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadAssocRecoMuonPt_3_ByEvent")->getBinContent(i);
544 n2 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadRecoMuonPt_3_ByEvent")->getBinContent(i);
545 value = (n2 != 0 ? n1 / n2 : 0);
546 error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
550 n1 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/AssocRecoMuonPt_1_ByMuon")->getBinContent(i);
551 n2 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/RecoMuonPt_1_ByMuon")->getBinContent(i);
552 value = (n2 != 0 ? n1 / n2 : 0);
553 error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
557 n1 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/AssocRecoMuonPt_2_ByMuon")->getBinContent(i);
558 n2 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/RecoMuonPt_2_ByMuon")->getBinContent(i);
559 value = (n2 != 0 ? n1 / n2 : 0);
560 error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
564 n1 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/AssocRecoMuonPt_3_ByMuon")->getBinContent(i);
565 n2 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/RecoMuonPt_3_ByMuon")->getBinContent(i);
566 value = (n2 != 0 ? n1 / n2 : 0);
567 error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
572 for (
int i = 1; i <= hEta_1_ByEvent->
getNbinsX(); ++
i) {
573 double n1 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadAssocRecoMuonEta_1_ByEvent")->getBinContent(i);
574 double n2 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadRecoMuonEta_1_ByEvent")->getBinContent(i);
575 double value = (n2 != 0 ? n1 / n2 : 0);
576 double error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
580 n1 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadAssocRecoMuonEta_2_ByEvent")->getBinContent(i);
581 n2 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadRecoMuonEta_2_ByEvent")->getBinContent(i);
582 value = (n2 != 0 ? n1 / n2 : 0);
583 error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
587 n1 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadAssocRecoMuonEta_3_ByEvent")->getBinContent(i);
588 n2 = (double)iGetter_.get(
subDir_ + byEventDir +
"/LeadRecoMuonEta_3_ByEvent")->getBinContent(i);
589 value = (n2 != 0 ? n1 / n2 : 0);
590 error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
594 n1 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/AssocRecoMuonEta_1_ByMuon")->getBinContent(i);
595 n2 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/RecoMuonEta_1_ByMuon")->getBinContent(i);
596 value = (n2 != 0 ? n1 / n2 : 0);
597 error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
601 n1 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/AssocRecoMuonEta_2_ByMuon")->getBinContent(i);
602 n2 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/RecoMuonEta_2_ByMuon")->getBinContent(i);
603 value = (n2 != 0 ? n1 / n2 : 0);
604 error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
608 n1 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/AssocRecoMuonEta_3_ByMuon")->getBinContent(i);
609 n2 = (double)iGetter_.get(
subDir_ + byMuonDir +
"/RecoMuonEta_3_ByMuon")->getBinContent(i);
610 value = (n2 != 0 ? n1 / n2 : 0);
611 error = (n2 != 0 ?
sqrt(value * (1 - value) / n2) : 0);
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
std::vector< std::string > mc_dirs
virtual int getNbinsX() const
get # of bins in X-axis
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
std::vector< std::string > reco_dirs
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
virtual TProfile * getTProfile() const
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * bookEffMEProfileFromTH1(TH1F *, std::string, DQMStore::IBooker &)