22 subDir_(pset.getUntrackedParameter<std::string>(
"subDir", std::string(
"HLT/SusyExo"))),
23 mcFlag(pset.getUntrackedParameter<bool>(
"mc_flag",
true)),
24 reco_parametersets(pset.getParameter<
VParameterSet>(
"reco_parametersets")),
25 mc_parametersets(pset.getParameter<
VParameterSet>(
"mc_parametersets"))
37 LogDebug(
"HltSusyExoPostProcessor") <<
"Start endRun";
46 edm::LogInfo(
"HltSusyExoPostProcessor") <<
"Cannot create DQMStore instance\n";
50 LogDebug(
"HltSusyExoPostProcessor") <<
"DQMStore opened";
59 LogDebug(
"HltSusyExoPostProcessor") <<
"DQMStore cd";
62 std::string triggerBitsDir =
"/TriggerBits";
63 std::string recoSelBitsDir =
"/RecoSelection";
64 std::string mcSelBitsDir =
"/McSelection";
65 std::string byEventDir =
"/By_Event";
66 std::string byMuonDir =
"/By_Muon";
72 int nL1bins = (
dqm->
get(
dqm->
pwd() + triggerBitsDir +
"/L1Bits")->getNbinsX());
73 int nHltbins = (
dqm->
get(
dqm->
pwd() + triggerBitsDir +
"/HltBits")->getNbinsX());
75 std::vector<int> L1placement;
for(
int i=0;
i<nL1bins-1*
mcFlag; ++
i) L1placement.push_back(6);
76 std::vector<int> Hltplacement;
for(
int i=0;
i<nHltbins-1*
mcFlag; ++
i) Hltplacement.push_back(7);
77 int L1bins[7];
for(
unsigned int i=0;
i<
sizeof(L1bins)/
sizeof(L1bins[0]); ++
i) L1bins[
i]=0;
78 int Hltbins[8];
for(
unsigned int i=0;
i<
sizeof(Hltbins)/
sizeof(Hltbins[0]); ++
i) Hltbins[
i]=0;
79 string L1search[8] = {
"Mu",
"EG",
"Jet",
"ET",
"TauJet",
"X",
""};
80 string L1search3 =
"HTT", L1search6 =
"Bias";
81 string Hltsearch[8] = {
"Mu",
"Ele",
"Jet",
"Photon",
"MET",
"Tau",
"X",
""};
82 string Hltsearch4 =
"HT", Hltsearch5 =
"BTag", Hltsearch6_1 =
"EG", Hltsearch6_2 =
"ET", Hltsearch7_1 =
"Bias", Hltsearch7_2 =
"AlCa";
85 LogDebug(
"HltSusyExoPostProcessor") <<
"number of L1 bins = " << nL1bins <<
" number of HLT bins = " << nHltbins;
104 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements booked";
107 float nTotalBeforeCuts = -1;
108 int reference_bin = -1;
112 reference_bin = nL1bins;
116 for(
int i=0;
i<nHltbins; ++
i)
118 string triggername = ((TProfile*)hHltEffBeforeCuts->
getTProfile())->GetXaxis()->GetBinLabel(
i+1);
119 string eff_search =
"HLT_ZeroBias";
120 if(triggername.find(eff_search)!=string::npos && triggername.size()==eff_search.size())
122 nTotalBeforeCuts = ((TProfile*)hHltEffBeforeCuts->
getTProfile())->GetBinContent(
i+1);
127 if(nTotalBeforeCuts == -1)
130 reference_bin = nHltbins;
133 LogDebug(
"HltSusyExoPostProcessor") <<
"Total number of events = " << nTotalBeforeCuts;
136 for(
int i=0;
i<nL1bins;
i++) {
138 error =
sqrt(value*(1-value)/(
double)nTotalBeforeCuts);
144 string triggername = ((TProfile*)hL1EffBeforeCuts->
getTProfile())->GetXaxis()->GetBinLabel(
i+1);
145 if( triggername.find(L1search6)==string::npos )
147 for(
unsigned int j=0;
j<
sizeof(L1search)/
sizeof(L1search[0])-2; ++
j)
149 if( triggername.find(L1search[
j])!=string::npos || (j==3 && triggername.find(L1search3)!=string::npos) )
151 if(L1placement[
i]==6)
153 else if(L1placement[
i]==2 && j==4)
158 else if(triggername.size()==0 || triggername.find(
"Total")!=string::npos)
164 for(
unsigned int i=0;
i<L1placement.size(); ++
i)
165 if(L1placement[
i]!=-1)
166 ++L1bins[L1placement[
i]];
168 for(
int i=0;
i<nHltbins;
i++) {
170 error =
sqrt(value*(1-value)/(
double)nTotalBeforeCuts);
176 string triggername = ((TProfile*)hHltEffBeforeCuts->
getTProfile())->GetXaxis()->GetBinLabel(
i+1);
177 if( triggername.find(Hltsearch7_1)==string::npos && triggername.find(Hltsearch7_2)==string::npos )
179 for(
unsigned int j=0;
j<
sizeof(Hltsearch)/
sizeof(Hltsearch[0])-2; ++
j)
181 if( triggername.find(Hltsearch[
j])!=string::npos || (j==4 && triggername.find(Hltsearch4)!=string::npos) || (j==5 && triggername.find(Hltsearch5)!=string::npos) )
183 if(Hltplacement[
i]==7)
185 else if( triggername.find(Hltsearch5)!=string::npos )
190 else if(triggername.size()==0 || triggername.find(
"Total")!=string::npos)
193 if(Hltplacement[
i]>=0 && Hltplacement[
i]<=5 && (triggername.find(Hltsearch6_1)!=string::npos || (triggername.find(Hltsearch6_2)!=string::npos && Hltplacement[
i]!=4) ))
198 for(
unsigned int i=0;
i<Hltplacement.size(); ++
i)
199 if(Hltplacement[
i]!=-1)
200 ++Hltbins[Hltplacement[
i]];
205 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements filled";
209 MonitorElement* hL1EffSorted[7] = {
dqm->
bookProfile(
"L1_Mu",
new TProfile(
"L1_Mu",
"Efficiencies of L1 Muon Triggers",L1bins[0],0,L1bins[0])),
210 dqm->
bookProfile(
"L1_EG",
new TProfile(
"L1_EG",
"Efficiencies of L1 EG Triggers",L1bins[1],0,L1bins[1])),
211 dqm->
bookProfile(
"L1_Jet",
new TProfile(
"L1_Jet",
"Efficiencies of L1 Jet Triggers",L1bins[2],0,L1bins[2])),
212 dqm->
bookProfile(
"L1_ETM_ETT_HTT",
new TProfile(
"L1_ETM_ETT_HTT",
"Efficiencies of L1 ETM, ETT, and HTT Triggers",L1bins[3],0,L1bins[3])),
213 dqm->
bookProfile(
"L1_TauJet",
new TProfile(
"L1_TauJet",
"Efficiencies of L1 TauJet Triggers",L1bins[4],0,L1bins[4])),
214 dqm->
bookProfile(
"L1_XTrigger",
new TProfile(
"L1_XTrigger",
"Efficiencies of L1 Cross Triggers",L1bins[5],0,L1bins[5])),
215 dqm->
bookProfile(
"L1_Overflow",
new TProfile(
"L1_Overflow",
"Efficiencies of L1 Unsorted Triggers",L1bins[6],0,L1bins[6])) };
217 MonitorElement* hHltEffSorted[8] = {
dqm->
bookProfile(
"Hlt_Mu",
new TProfile(
"Hlt_Mu",
"Efficiencies of HL Muon Triggers",Hltbins[0],0,Hltbins[0])),
218 dqm->
bookProfile(
"Hlt_Ele",
new TProfile(
"Hlt_Ele",
"Efficiencies of HL Electron Triggers",Hltbins[1],0,Hltbins[1])),
219 dqm->
bookProfile(
"Hlt_Jet",
new TProfile(
"Hlt_Jet",
"Efficiencies of HL Jet Triggers",Hltbins[2],0,Hltbins[2],
"s")),
220 dqm->
bookProfile(
"Hlt_Photon",
new TProfile(
"Hlt_Photon",
"Efficiencies of HL Photon Triggers",Hltbins[3],0,Hltbins[3])),
221 dqm->
bookProfile(
"Hlt_MET_HT",
new TProfile(
"Hlt_MET_HT",
"Efficiencies of HL MET and HT Triggers",Hltbins[4],0,Hltbins[4])),
222 dqm->
bookProfile(
"Hlt_Tau_BTag",
new TProfile(
"Hlt_Tau_Btag",
"Efficiencies of HL Tau and BTag Triggers",Hltbins[5],0,Hltbins[5])),
223 dqm->
bookProfile(
"Hlt_XTrigger",
new TProfile(
"Hlt_XTrigger",
"Efficiencies of HL Cross Triggers",Hltbins[6],0,Hltbins[6])),
224 dqm->
bookProfile(
"Hlt_Overflow",
new TProfile(
"Hlt_Overflow",
"Efficiencies of HL Unsorted Triggers",Hltbins[7],0,Hltbins[7])) };
226 int L1bincounter[8];
for(
unsigned int i=0;
i<
sizeof(L1bincounter)/
sizeof(L1bincounter[0]); ++
i) L1bincounter[
i]=0;
227 int Hltbincounter[8];
for(
unsigned int i=0;
i<
sizeof(Hltbincounter)/
sizeof(Hltbincounter[0]); ++
i) Hltbincounter[
i]=0;
228 TProfile* hL1_ = (TProfile*)hL1EffBeforeCuts->
getTProfile();
229 TProfile* hHlt_ = (TProfile*)hHltEffBeforeCuts->
getTProfile();
231 for(
unsigned int i=0;
i<L1placement.size(); ++
i)
233 if(L1placement[
i]!=-1)
235 hL1EffSorted[L1placement[
i]]->
setBinLabel(L1bincounter[L1placement[
i]]+1, hL1_->GetXaxis()->GetBinLabel(
i+1));
236 hL1EffSorted[L1placement[
i]]->
setBinContent(L1bincounter[L1placement[
i]]+1, hL1_->GetBinContent(
i+1));
237 hL1EffSorted[L1placement[
i]]->
setBinEntries(L1bincounter[L1placement[
i]]+1, 1);
238 hL1EffSorted[L1placement[
i]]->
setBinError(L1bincounter[L1placement[
i]]+1, hL1_->GetBinError(
i+1));
239 ++L1bincounter[L1placement[
i]];
242 for(
unsigned int i=0;
i<Hltplacement.size(); ++
i)
244 if(Hltplacement[
i]!=-1)
246 hHltEffSorted[Hltplacement[
i]]->
setBinLabel(Hltbincounter[Hltplacement[
i]]+1, hHlt_->GetXaxis()->GetBinLabel(
i+1));
247 hHltEffSorted[Hltplacement[
i]]->
setBinContent(Hltbincounter[Hltplacement[
i]]+1, hHlt_->GetBinContent(
i+1));
248 hHltEffSorted[Hltplacement[
i]]->
setBinEntries(Hltbincounter[Hltplacement[
i]]+1, 1);
249 hHltEffSorted[Hltplacement[
i]]->
setBinError(Hltbincounter[Hltplacement[
i]]+1, hHlt_->GetBinError(
i+1));
250 ++Hltbincounter[Hltplacement[
i]];
259 char set_name_L1[256], set_name_Hlt[256];
260 sprintf(set_name_L1,
"L1Eff_%s",
mc_dirs[i].c_str());
261 sprintf(set_name_Hlt,
"HltEff_%s",
mc_dirs[i].c_str());
264 hL1EffAfterMcCuts->
setTitle(
"L1 Efficiencies for " +
mc_dirs[i] +
" selection");
267 hHltEffAfterMcCuts->
setTitle(
"HLT Efficiencies for " +
mc_dirs[i] +
" selection");
269 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements for " <<
mc_dirs[
i] <<
" selection booked";
273 float nTotalAfterMcCuts;
279 LogDebug(
"HltSusyExoPostProcessor") <<
"Total number of events = " << nTotalAfterMcCuts;
283 char buffer1[256], buffer2[256];
284 string L1_nametags[7] = {
"Mu",
"EG",
"Jet",
"ETM_ETT_HTT",
"TauJet",
"XTrigger",
"Overflow"};
285 string L1_titletags[7] = {
"Muon",
"EG",
"Jet",
"ETM, ETT, and HTT",
"TauJet",
"Cross",
"Unsorted"};
286 string Hlt_nametags[8] = {
"Mu",
"Ele",
"Jet",
"Photon",
"MET_HT",
"Tau_BTag",
"XTrigger",
"Overflow"};
287 string Hlt_titletags[8] = {
"Muon",
"Electron",
"Jet",
"Photon",
"MET and HT",
"Tau and BTag",
"Cross",
"Unsorted"};
288 for(
unsigned int j=0;
j<
sizeof(hL1EffSorted_mc)/
sizeof(hL1EffSorted_mc[0]); ++
j)
290 sprintf(buffer1,
"L1_%s_%s",
mc_dirs[i].c_str(),L1_nametags[
j].c_str());
291 sprintf(buffer2,
"Efficiencies of L1 %s Triggers for %s Selection",L1_titletags[
j].c_str(),
mc_dirs[i].c_str());
292 hL1EffSorted_mc[
j] =
dqm->
bookProfile(buffer1,
new TProfile(buffer1,buffer2,L1bins[
j],0,L1bins[j]));
294 for(
unsigned int j=0;
j<
sizeof(hHltEffSorted_mc)/
sizeof(hHltEffSorted_mc[0]); ++
j)
296 sprintf(buffer1,
"Hlt_%s_%s",
mc_dirs[i].c_str(),Hlt_nametags[
j].c_str());
297 sprintf(buffer2,
"Efficiencies of HL %s Triggers for %s Selection",Hlt_titletags[
j].c_str(),
mc_dirs[i].c_str());
298 hHltEffSorted_mc[
j] =
dqm->
bookProfile(buffer1,
new TProfile(buffer1,buffer2,Hltbins[
j],0,Hltbins[j]));
318 int L1bincounter_mc[8];
for(
unsigned int j=0;
j<
sizeof(L1bincounter_mc)/
sizeof(L1bincounter_mc[0]); ++
j) L1bincounter_mc[
j]=0;
319 int Hltbincounter_mc[8];
for(
unsigned int j=0;
j<
sizeof(Hltbincounter_mc)/
sizeof(Hltbincounter_mc[0]); ++
j) Hltbincounter_mc[
j]=0;
320 TProfile* hL1_mc = (TProfile*)hL1EffAfterMcCuts->
getTProfile();
321 TProfile* hHlt_mc = (TProfile*)hHltEffAfterMcCuts->
getTProfile();
322 for(
unsigned int j=0;
j<L1placement.size();
j++) {
324 error = nTotalAfterMcCuts ?
sqrt(value*(1-value)/nTotalAfterMcCuts) : 0;
328 if(L1placement[
j]!=-1)
330 hL1EffSorted_mc[L1placement[
j]]->
setBinLabel(L1bincounter_mc[L1placement[
j]]+1, hL1_mc->GetXaxis()->GetBinLabel(
j+1));
331 hL1EffSorted_mc[L1placement[
j]]->
setBinContent(L1bincounter_mc[L1placement[
j]]+1, hL1_mc->GetBinContent(
j+1));
332 hL1EffSorted_mc[L1placement[
j]]->
setBinEntries(L1bincounter_mc[L1placement[
j]]+1, 1);
333 hL1EffSorted_mc[L1placement[
j]]->
setBinError(L1bincounter_mc[L1placement[
j]]+1, hL1_mc->GetBinError(
j+1));
334 ++L1bincounter_mc[L1placement[
j]];
337 if(nL1bins!=
int(L1placement.size()))
340 error = nTotalAfterMcCuts ?
sqrt(value*(1-value)/nTotalAfterMcCuts) : 0;
345 for(
unsigned int j=0;
j<Hltplacement.size();
j++) {
347 error = nTotalAfterMcCuts ?
sqrt(value*(1-value)/nTotalAfterMcCuts) : 0;
351 if(Hltplacement[
j]!=-1)
353 hHltEffSorted_mc[Hltplacement[
j]]->
setBinLabel(Hltbincounter_mc[Hltplacement[
j]]+1, hHlt_mc->GetXaxis()->GetBinLabel(
j+1));
354 hHltEffSorted_mc[Hltplacement[
j]]->
setBinContent(Hltbincounter_mc[Hltplacement[
j]]+1, hHlt_mc->GetBinContent(
j+1));
355 hHltEffSorted_mc[Hltplacement[
j]]->
setBinEntries(Hltbincounter_mc[Hltplacement[
j]]+1, 1);
356 hHltEffSorted_mc[Hltplacement[
j]]->
setBinError(Hltbincounter_mc[Hltplacement[
j]]+1, hHlt_mc->GetBinError(
j+1));
357 ++Hltbincounter_mc[Hltplacement[
j]];
360 if(nHltbins!=
int(Hltplacement.size()))
363 error = nTotalAfterMcCuts ?
sqrt(value*(1-value)/nTotalAfterMcCuts) : 0;
368 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements filled for " <<
mc_dirs[
i] <<
" selection";
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());
381 hL1EffAfterRecoCuts->
setTitle(
"L1 Efficiencies for " +
reco_dirs[i] +
" selection");
384 hHltEffAfterRecoCuts->
setTitle(
"HLT Efficiencies for " +
reco_dirs[i] +
" selection");
386 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements for " <<
reco_dirs[
i] <<
" selection booked";
389 float nTotalAfterRecoCuts;
395 LogDebug(
"HltSusyExoPostProcessor") <<
"Total number of events = " << nTotalAfterRecoCuts;
399 char buffer1[256], buffer2[256];
400 string L1_nametags[7] = {
"Mu",
"EG",
"Jet",
"ETM_ETT_HTT",
"TauJet",
"XTrigger",
"Overflow"};
401 string L1_titletags[7] = {
"Muon",
"EG",
"Jet",
"ETM, ETT, and HTT",
"TauJet",
"Cross",
"Unsorted"};
402 string Hlt_nametags[8] = {
"Mu",
"Ele",
"Jet",
"Photon",
"MET_HT",
"Tau_BTag",
"XTrigger",
"Overflow"};
403 string Hlt_titletags[8] = {
"Muon",
"Electron",
"Jet",
"Photon",
"MET and HT",
"Tau and BTag",
"Cross",
"Unsorted"};
404 for(
unsigned int j=0;
j<
sizeof(hL1EffSorted_reco)/
sizeof(hL1EffSorted_reco[0]); ++
j)
406 sprintf(buffer1,
"L1_%s_%s",
reco_dirs[i].c_str(),L1_nametags[
j].c_str());
407 sprintf(buffer2,
"Efficiencies of L1 %s Triggers for %s Selection",L1_titletags[
j].c_str(),
reco_dirs[i].c_str());
408 hL1EffSorted_reco[
j] =
dqm->
bookProfile(buffer1,
new TProfile(buffer1,buffer2,L1bins[
j],0,L1bins[j]));
410 for(
unsigned int j=0;
j<
sizeof(hHltEffSorted_reco)/
sizeof(hHltEffSorted_reco[0]); ++
j)
412 sprintf(buffer1,
"Hlt_%s_%s",
reco_dirs[i].c_str(),Hlt_nametags[
j].c_str());
413 sprintf(buffer2,
"Efficiencies of HL %s Triggers for %s Selection",Hlt_titletags[
j].c_str(),
reco_dirs[i].c_str());
414 hHltEffSorted_reco[
j] =
dqm->
bookProfile(buffer1,
new TProfile(buffer1,buffer2,Hltbins[
j],0,Hltbins[j]));
435 int L1bincounter_reco[8];
for(
unsigned int j=0;
j<
sizeof(L1bincounter_reco)/
sizeof(L1bincounter_reco[0]); ++
j) L1bincounter_reco[
j]=0;
436 int Hltbincounter_reco[8];
for(
unsigned int j=0;
j<
sizeof(Hltbincounter_reco)/
sizeof(Hltbincounter_reco[0]); ++
j) Hltbincounter_reco[
j]=0;
437 TProfile* hL1_reco = (TProfile*)hL1EffAfterRecoCuts->
getTProfile();
438 TProfile* hHlt_reco = (TProfile*)hHltEffAfterRecoCuts->
getTProfile();
439 for(
unsigned int j=0;
j<L1placement.size();
j++) {
441 error = nTotalAfterRecoCuts ?
sqrt(value*(1-value)/nTotalAfterRecoCuts) : 0;
445 if(L1placement[
j]!=-1)
447 hL1EffSorted_reco[L1placement[
j]]->
setBinLabel(L1bincounter_reco[L1placement[
j]]+1, hL1_reco->GetXaxis()->GetBinLabel(
j+1));
448 hL1EffSorted_reco[L1placement[
j]]->
setBinContent(L1bincounter_reco[L1placement[
j]]+1, hL1_reco->GetBinContent(
j+1));
449 hL1EffSorted_reco[L1placement[
j]]->
setBinEntries(L1bincounter_reco[L1placement[
j]]+1, 1);
450 hL1EffSorted_reco[L1placement[
j]]->
setBinError(L1bincounter_reco[L1placement[
j]]+1, hL1_reco->GetBinError(
j+1));
451 ++L1bincounter_reco[L1placement[
j]];
454 if(nL1bins!=
int(L1placement.size()))
457 error = nTotalAfterRecoCuts ?
sqrt(value*(1-value)/nTotalAfterRecoCuts) : 0;
462 for(
unsigned int j=0;
j<Hltplacement.size();
j++) {
464 error = nTotalAfterRecoCuts ?
sqrt(value*(1-value)/nTotalAfterRecoCuts) : 0;
468 if(Hltplacement[
j]!=-1)
470 hHltEffSorted_reco[Hltplacement[
j]]->
setBinLabel(Hltbincounter_reco[Hltplacement[
j]]+1, hHlt_reco->GetXaxis()->GetBinLabel(
j+1));
471 hHltEffSorted_reco[Hltplacement[
j]]->
setBinContent(Hltbincounter_reco[Hltplacement[
j]]+1, hHlt_reco->GetBinContent(
j+1));
472 hHltEffSorted_reco[Hltplacement[
j]]->
setBinEntries(Hltbincounter_reco[Hltplacement[
j]]+1, 1);
473 hHltEffSorted_reco[Hltplacement[
j]]->
setBinError(Hltbincounter_reco[Hltplacement[
j]]+1, hHlt_reco->GetBinError(
j+1));
474 ++Hltbincounter_reco[Hltplacement[
j]];
477 if(nHltbins!=
int(Hltplacement.size()))
480 error = nTotalAfterRecoCuts ?
sqrt(value*(1-value)/nTotalAfterRecoCuts) : 0;
485 LogDebug(
"HltSusyExoPostProcessor") <<
"MonitorElements filled";
488 int pt_bins=100, eta_bins=100;
489 double pt_floor=0., pt_ceiling = 200., eta_floor=-3.5, eta_ceiling=3.5;
491 MonitorElement* hPt_1_ByEvent =
dqm->
book1D(
"Pt_1_ByEvent",
"Turn on as a Function of P_{t}, |Eta|<1.2, By Event",pt_bins, pt_floor, pt_ceiling);
492 MonitorElement* hEta_1_ByEvent=
dqm->
book1D(
"Eta_1_ByEvent",
"Efficiency as a Function of Eta, P_{t}>0, By Event", eta_bins, eta_floor,eta_ceiling);
493 MonitorElement* hPt_2_ByEvent =
dqm->
book1D(
"Pt_2_ByEvent",
"Turn on as a Function of P_{t}, 1.2<|Eta|<2.1, By Event",pt_bins, pt_floor, pt_ceiling);
494 MonitorElement* hEta_2_ByEvent=
dqm->
book1D(
"Eta_2_ByEvent",
"Efficiency as a Function of Eta, P_{t}>10, By Event", eta_bins, eta_floor,eta_ceiling);
495 MonitorElement* hPt_3_ByEvent =
dqm->
book1D(
"Pt_3_ByEvent",
"Turn on as a Function of P_{t}, |Eta|>2.1, By Event",pt_bins, pt_floor, pt_ceiling);
496 MonitorElement* hEta_3_ByEvent=
dqm->
book1D(
"Eta_3_ByEvent",
"Efficiency as a Function of Eta, P_{t}>20, By Event", eta_bins, eta_floor,eta_ceiling);
498 MonitorElement* hPt_1_ByMuon =
dqm->
book1D(
"Pt_1_ByMuon",
"Turn on as a Function of P_{t}, |Eta|<1.2, By Muon",pt_bins, pt_floor, pt_ceiling);
499 MonitorElement* hEta_1_ByMuon=
dqm->
book1D(
"Eta_1_ByMuon",
"Efficiency as a Function of Eta, P_{t}>0, By Muon", eta_bins, eta_floor,eta_ceiling);
500 MonitorElement* hPt_2_ByMuon =
dqm->
book1D(
"Pt_2_ByMuon",
"Turn on as a Function of P_{t}, 1.2<|Eta|<2.1, By Muon",pt_bins, pt_floor, pt_ceiling);
501 MonitorElement* hEta_2_ByMuon=
dqm->
book1D(
"Eta_2_ByMuon",
"Efficiency as a Function of Eta, P_{t}>10, By Muon", eta_bins, eta_floor,eta_ceiling);
502 MonitorElement* hPt_3_ByMuon =
dqm->
book1D(
"Pt_3_ByMuon",
"Turn on as a Function of P_{t}, |Eta|>2.1, By Muon",pt_bins, pt_floor, pt_ceiling);
503 MonitorElement* hEta_3_ByMuon=
dqm->
book1D(
"Eta_3_ByMuon",
"Efficiency as a Function of Eta, P_{t}>20, By Muon", eta_bins, eta_floor,eta_ceiling);
509 double value = (n2!=0 ? n1/n2 : 0);
510 double error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
516 value = (n2!=0 ? n1/n2 : 0);
517 error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
523 value = (n2!=0 ? n1/n2 : 0);
524 error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
530 value = (n2!=0 ? n1/n2 : 0);
531 error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
537 value = (n2!=0 ? n1/n2 : 0);
538 error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
544 value = (n2!=0 ? n1/n2 : 0);
545 error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
554 double value = (n2!=0 ? n1/n2 : 0);
555 double error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
561 value = (n2!=0 ? n1/n2 : 0);
562 error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
568 value = (n2!=0 ? n1/n2 : 0);
569 error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
575 value = (n2!=0 ? n1/n2 : 0);
576 error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
582 value = (n2!=0 ? n1/n2 : 0);
583 error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
589 value = (n2!=0 ? n1/n2 : 0);
590 error = (n2!=0 ?
sqrt(value*(1-value)/n2) : 0);
603 myEffME =
dqm->
bookProfile((std::string) (
"Eff_"+((std::string) histo->GetName())), ((std::string) histo->GetTitle()), histo->GetXaxis()->GetNbins(), histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax(), 100, 0, 1,
"");
606 myEffME =
dqm->
bookProfile(name,
new TProfile(name.c_str(), histo->GetTitle(), histo->GetXaxis()->GetNbins(), histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()));
608 for(
int i=0;
i<histo->GetXaxis()->GetNbins();
i++) {
609 myEffME->
setBinLabel(
i+1, histo->GetXaxis()->GetBinLabel(
i+1),1);
std::vector< std::string > mc_dirs
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void cd(void)
go to top directory (ie. root)
#define DEFINE_FWK_MODULE(type)
std::vector< ParameterSet > VParameterSet
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)
std::vector< edm::ParameterSet > mc_parametersets
HltSusyExoPostProcessor(const edm::ParameterSet &pset)
MonitorElement * bookEffMEProfileFromTH1(TH1F *, std::string)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
std::vector< edm::ParameterSet > reco_parametersets
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void setTitle(const std::string &title)
set (ie. change) histogram/profile title
bool dirExists(const std::string &path) const
true if directory exists
std::vector< std::string > reco_dirs
TH1F * getTH1F(void) const
double getBinContent(int binx) const
get content of bin (1-D)
void endRun(edm::Run const &, edm::EventSetup const &)
TProfile * getTProfile(void) const
int getNbinsX(void) const
get # of bins in X-axis
void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
void setCurrentFolder(const std::string &fullpath)
const std::string & pwd(void) const