34 |
|
//////////////////////////////////////////////////////////////////////////////// |
35 |
|
|
36 |
|
//______________________________________________________________________________ |
37 |
< |
void setBinomialErrors(TH1F* hEff,const TH1F* hFake, const TH1F* hAll); |
37 |
> |
void setBinomialErrors(TH1F* hEff,const TH1F* hFake, const TH1F* hAll); |
38 |
> |
string getLegLabel(const string& jetalg); |
39 |
|
|
40 |
|
//////////////////////////////////////////////////////////////////////////////// |
41 |
|
// main |
162 |
|
int nevts=t->GetEntries(); |
163 |
|
|
164 |
|
for (int ievt=0;ievt<nevts;ievt++) { |
165 |
+ |
|
166 |
|
t->GetEntry(ievt); |
167 |
+ |
|
168 |
|
for (int ijt=0;ijt<njt;ijt++) { |
169 |
|
|
170 |
|
float dr = jtgendr[ijt]; |
227 |
|
color = kBlack; |
228 |
|
for (unsigned int i=0;i<emfHistos.size();i++) { |
229 |
|
TH1F* h = emfHistos[i]; |
230 |
< |
lEmfEff->AddEntry(h,jetalgs[i].c_str(),"lp"); |
230 |
> |
lEmfEff->AddEntry(h,getLegLabel(jetalgs[i]).c_str(),"lp"); |
231 |
|
h->SetLineWidth(2); |
232 |
|
h->SetMarkerColor(color); |
233 |
|
h->SetLineColor(color++); |
235 |
|
h->SetMarkerSize(0.7); |
236 |
|
if (i==0) { |
237 |
|
h->SetTitle("#epsilon_{FAKE} vs emf"); |
238 |
< |
h->SetXTitle("jet emf"); |
238 |
> |
h->SetXTitle("emf"); |
239 |
|
h->SetYTitle("#epsilon_{FAKE}"); |
240 |
|
h->Draw("E"); |
241 |
|
h->SetMinimum(0.0); |
254 |
|
color = kBlack; |
255 |
|
for (unsigned int i=0;i<phiHistos.size();i++) { |
256 |
|
TH1F* h = phiHistos[i]; |
257 |
< |
lPhiEff->AddEntry(h,jetalgs[i].c_str(),"lp"); |
257 |
> |
lPhiEff->AddEntry(h,getLegLabel(jetalgs[i]).c_str(),"lp"); |
258 |
|
h->SetLineWidth(2); |
259 |
|
h->SetMarkerColor(color); |
260 |
|
h->SetLineColor(color++); |
262 |
|
h->SetMarkerSize(0.7); |
263 |
|
if (i==0) { |
264 |
|
h->SetTitle("#epsilon_{FAKE} vs #phi"); |
265 |
< |
h->SetXTitle("jet #phi"); |
265 |
> |
h->SetXTitle("#phi"); |
266 |
|
h->SetYTitle("#epsilon_{FAKE}"); |
267 |
|
h->Draw("E"); |
268 |
|
h->SetMinimum(0.0); |
281 |
|
color = kBlack; |
282 |
|
for (unsigned int i=0;i<etaHistos.size();i++) { |
283 |
|
TH1F* h = etaHistos[i]; |
284 |
< |
lEtaEff->AddEntry(h,jetalgs[i].c_str(),"lp"); |
284 |
> |
lEtaEff->AddEntry(h,getLegLabel(jetalgs[i]).c_str(),"lp"); |
285 |
|
h->SetLineWidth(2); |
286 |
|
h->SetMarkerColor(color); |
287 |
|
h->SetLineColor(color++); |
289 |
|
h->SetMarkerSize(0.7); |
290 |
|
if (i==0) { |
291 |
|
h->SetTitle("#epsilon_{FAKE} vs #eta"); |
292 |
< |
h->SetXTitle("jet #eta"); |
292 |
> |
h->SetXTitle("#eta"); |
293 |
|
h->SetYTitle("#epsilon_{FAKE}"); |
294 |
|
h->Draw("E"); |
295 |
|
h->SetMinimum(0.0); |
309 |
|
color = kBlack; |
310 |
|
for (unsigned int i=0;i<etHistos.size();i++) { |
311 |
|
TH1F* h = etHistos[i]; |
312 |
< |
lEtEff->AddEntry(h,jetalgs[i].c_str(),"lp"); |
312 |
> |
lEtEff->AddEntry(h,getLegLabel(jetalgs[i]).c_str(),"lp"); |
313 |
|
h->SetLineWidth(2); |
314 |
|
h->SetMarkerColor(color); |
315 |
|
h->SetLineColor(color++); |
317 |
|
h->SetMarkerSize(0.7); |
318 |
|
if (i==0) { |
319 |
|
h->SetTitle("#epsilon_{FAKE} vs E_{T}"); |
320 |
< |
h->SetXTitle("jet E_{T} [GeV]"); |
320 |
> |
h->SetXTitle("E_{T} [GeV]"); |
321 |
|
h->SetYTitle("#epsilon_{FAKE}"); |
322 |
|
h->Draw("E"); |
323 |
|
h->SetMinimum(0.0); |
347 |
|
hEff->SetBinError(i,eeff); |
348 |
|
} |
349 |
|
} |
350 |
+ |
|
351 |
+ |
|
352 |
+ |
//______________________________________________________________________________ |
353 |
+ |
string getLegLabel(const string& jetalg) |
354 |
+ |
{ |
355 |
+ |
string result; |
356 |
+ |
string tmp(jetalg); |
357 |
+ |
|
358 |
+ |
if (tmp.find("fastjet")==0) { |
359 |
+ |
result = "fast k_{T}, D="; |
360 |
+ |
tmp=tmp.substr(7); |
361 |
+ |
} |
362 |
+ |
else if (tmp.find("icone")==0) { |
363 |
+ |
result = "icone, R="; |
364 |
+ |
tmp = tmp.substr(5); |
365 |
+ |
} |
366 |
+ |
else if (tmp.find("mcone")==0) { |
367 |
+ |
result = "mcone, R="; |
368 |
+ |
tmp = tmp.substr(5); |
369 |
+ |
} |
370 |
+ |
else return result; |
371 |
+ |
|
372 |
+ |
stringstream ssparam; |
373 |
+ |
ssparam<<tmp; |
374 |
+ |
float param; |
375 |
+ |
ssparam>>param; |
376 |
+ |
param = 0.1*param; |
377 |
+ |
stringstream ssparam2; |
378 |
+ |
ssparam2<<param; |
379 |
+ |
result += ssparam2.str(); |
380 |
+ |
|
381 |
+ |
return result; |
382 |
+ |
} |