33 |
|
|
34 |
|
|
35 |
|
|
36 |
< |
void find_one_peak_combination(TCut specialcut, float &MCPeak,float &MCPeakError, float &DataPeak, float &DataPeakError, float &MCSigma, float &DataSigma, stringstream &result, bool doPUreweighting = true, string saveas="") |
36 |
> |
void find_one_peak_combination(TCut specialcut, float &MCPeak,float &MCPeakError, float &DataPeak, float &DataPeakError, float &MCSigma, float &MCSigmaError, float &DataSigma, float& DataSigmaError, stringstream &result, bool doPUreweighting = true, string saveas="") |
37 |
|
{ |
38 |
|
// Temporarily switch off PU reweighting, if asked |
39 |
|
TCut weightbackup=cutWeight; |
52 |
|
if(method==doKM) { |
53 |
|
//we only need this histo for the KM fitting... |
54 |
|
rawttbarjzbeemmMC = allsamples.Draw("rawttbarjzbeemmMC",jzbvariablemc,nbins, -50,50, "JZB [GeV]", "events",cutmass&&cutOSSF&&cutnJets&&specialcut,mc,luminosity,allsamples.FindSample("TTJet")); |
55 |
< |
MCPeak=find_peak(rawJZBeemmMC, rawttbarjzbeemmMC, -40, 40, mc, MCPeakError,MCSigma,method,saveas); |
56 |
< |
DataPeak=find_peak(rawJZBeemmData, rawJZBeemmData, -40, 40, data, DataPeakError,DataSigma,method,saveas); |
55 |
> |
MCPeak=find_peak(rawJZBeemmMC, rawttbarjzbeemmMC, -40, 40, mc, MCPeakError,MCSigma,MCSigmaError,method,saveas); |
56 |
> |
DataPeak=find_peak(rawJZBeemmData, rawJZBeemmData, -40, 40, data, DataPeakError,DataSigma,DataSigmaError,method,saveas); |
57 |
|
delete rawttbarjzbeemmMC; |
58 |
|
} |
59 |
|
else { |
62 |
|
reducedMC->Add(rawJZBemMC,-1); |
63 |
|
reducedData->Add(rawJZBemData,-1); |
64 |
|
//this is Kostas' way of doing it - we subtract em to get rid of some of the ttbar contribution (in reality, of flavor-symmetric contribution) |
65 |
< |
MCPeak=find_peak(reducedMC, rawttbarjzbeemmMC, -40, 40, mc, MCPeakError,MCSigma,method,saveas); |
66 |
< |
DataPeak=find_peak(reducedData, rawJZBeemmData, -40, 40, data, DataPeakError,DataSigma,method,saveas); |
65 |
> |
MCPeak=find_peak(reducedMC, rawttbarjzbeemmMC, -40, 40, mc, MCPeakError,MCSigma,MCSigmaError,method,saveas); |
66 |
> |
DataPeak=find_peak(reducedData, rawJZBeemmData, -40, 40, data, DataPeakError,DataSigma,DataSigmaError,method,saveas); |
67 |
|
delete reducedMC; |
68 |
|
delete reducedData; |
69 |
|
} |
73 |
|
|
74 |
|
// MCPeak=find_peak(rawJZBeemmMC, rawttbarjzbeemmMC, -40, 40, mc, MCPeakError,MCSigma,method); |
75 |
|
// DataPeak=find_peak(rawJZBeemmData, rawJZBeemmData, -40, 40, data, DataPeakError,DataSigma,method); |
76 |
< |
dout << " We have found the peak in Data at " << DataPeak << " +/- " << DataPeakError << " with sigma=" << DataSigma << " +/- ?? (not impl.)" << endl; |
77 |
< |
result << " We have found the peak in Data at " << DataPeak << " +/- " << DataPeakError << " with sigma=" << DataSigma << " +/- ?? (not impl.)" << endl; |
78 |
< |
dout << " We have found the peak in MC at " << MCPeak << " +/- " << MCPeakError << " with sigma=" << MCSigma << " +/- ?? (not impl.)" << endl; |
79 |
< |
result << " We have found the peak in MC at " << MCPeak << " +/- " << MCPeakError << " with sigma=" << MCSigma << " +/- ?? (not impl.)" << endl; |
76 |
> |
dout << " We have found the peak in Data at " << DataPeak << " +/- " << DataPeakError << " with sigma=" << DataSigma << " +/- " << DataSigmaError << endl; |
77 |
> |
result << " We have found the peak in Data at " << DataPeak << " +/- " << DataPeakError << " with sigma=" << DataSigma << " +/- " << DataSigmaError << endl; |
78 |
> |
dout << " We have found the peak in MC at " << MCPeak << " +/- " << MCPeakError << " with sigma=" << MCSigma << " +/- " << MCSigmaError << endl; |
79 |
> |
result << " We have found the peak in MC at " << MCPeak << " +/- " << MCPeakError << " with sigma=" << MCSigma << " +/- " << MCSigmaError << endl; |
80 |
|
delete rawJZBeemmData; |
81 |
|
delete rawJZBeemmMC; |
82 |
|
delete rawJZBemData; |
98 |
|
float datammpeak,dataeepeak; |
99 |
|
float datammpeakerr,dataeepeakerr; |
100 |
|
|
101 |
< |
float mcSigma, dataSigma; |
101 |
> |
float mcSigma,mcSigmaError, dataSigma, dataSigmaError; |
102 |
|
|
103 |
|
dout << "Finding global peak : " << endl; |
104 |
< |
find_one_peak_combination(TCut(""),mcpeak,mcpeakerr, datapeak,datapeakerr,mcSigma, dataSigma,result,doPUreweighting,""); |
104 |
> |
find_one_peak_combination(TCut(""),mcpeak,mcpeakerr, datapeak,datapeakerr,mcSigma,mcSigmaError, dataSigma,dataSigmaError,result,doPUreweighting,""); |
105 |
|
|
106 |
|
if(DoInvidualeemmPeaks) { |
107 |
|
dout << "Finding peak for electrons : " << endl; |
108 |
< |
find_one_peak_combination(TCut("id1==0"),mceepeak,mceepeakerr, dataeepeak,dataeepeakerr,mcSigma, dataSigma,result,doPUreweighting,"_ele"); |
108 |
> |
find_one_peak_combination(TCut("id1==0"),mceepeak,mceepeakerr,dataeepeak,dataeepeakerr,mcSigma,mcSigmaError,dataSigma,dataSigmaError,result,doPUreweighting,"_ele"); |
109 |
|
dout << "Finding peak for muons : " << endl; |
110 |
< |
find_one_peak_combination(TCut("id1==1"),mcmmpeak,mcmmpeakerr, datammpeak,datammpeakerr,mcSigma, dataSigma,result,doPUreweighting,"_mu"); |
110 |
> |
find_one_peak_combination(TCut("id1==1"),mcmmpeak,mcmmpeakerr,datammpeak,datammpeakerr,mcSigma,mcSigmaError,dataSigma,dataSigmaError,result,doPUreweighting,"_mu"); |
111 |
|
|
112 |
|
datajzb << "(" << jzbvariabledata; |
113 |
|
mcjzb << "(" << jzbvariablemc; |
151 |
|
|
152 |
|
} |
153 |
|
|
154 |
< |
void make_special_obs_pred_mll_plot(string datajzb, string mcjzb, float jzbthreshold) { |
154 |
> |
void make_special_obs_pred_mll_plot(string datajzb, string mcjzb, float jzbthreshold, float binWidth = 5.0) { |
155 |
|
float min=70.0; |
156 |
|
float max=115.0; |
157 |
|
if(!PlottingSetup::RestrictToMassPeak) { |
158 |
|
min=20; |
159 |
< |
max=200; |
159 |
> |
max=300; |
160 |
|
} |
161 |
< |
int nbins=int((max-min)/5); |
161 |
> |
int nbins=int((max-min)/binWidth); |
162 |
|
|
163 |
|
TCanvas *ckin = new TCanvas("ckin","Kinematic Plots (in the making)",600,600); |
164 |
|
|
195 |
|
LcorrJZBSBeemm = allsamples.Draw("LcorrJZBSBeemm","mll",nbins,min,max, "JZB [GeV]", "events", sidebandcut&&cutOSSF&&cutnJets&&smallerzeroD,data, luminosity); |
196 |
|
} |
197 |
|
|
198 |
< |
TH1F *Bpred = (TH1F*)LcorrJZBeemm->Clone("Bpred"); |
199 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
200 |
< |
Bpred->Add(RcorrJZBem,1.0/3.); |
201 |
< |
Bpred->Add(LcorrJZBem,-1.0/3.); |
202 |
< |
Bpred->Add(RcorrJZBSBem,1.0/3.); |
203 |
< |
Bpred->Add(LcorrJZBSBem,-1.0/3.); |
204 |
< |
Bpred->Add(RcorrJZBSBeemm,1.0/3.); |
205 |
< |
Bpred->Add(LcorrJZBSBeemm,-1.0/3.); |
198 |
> |
// Separate predictions |
199 |
> |
TH1F* Zpred = (TH1F*)LcorrJZBeemm->Clone("Zpred"); |
200 |
> |
TH1F* OSpred = (TH1F*)RcorrJZBem->Clone("OSpred"); |
201 |
> |
if(PlottingSetup::RestrictToMassPeak) { |
202 |
> |
OSpred->Scale(1.0/3.0); |
203 |
> |
OSpred->Add(RcorrJZBSBem,1.0/3.); |
204 |
> |
OSpred->Add(RcorrJZBSBeemm,1.0/3.); |
205 |
> |
Zpred->Add(LcorrJZBem,-1.0/3.); |
206 |
> |
Zpred->Add(LcorrJZBSBem,-1.0/3.); |
207 |
> |
Zpred->Add(LcorrJZBSBeemm,-1.0/3.); |
208 |
|
} else { |
209 |
< |
Bpred->Add(RcorrJZBem,1.0); |
208 |
< |
Bpred->Add(LcorrJZBem,-1.0); |
209 |
> |
Zpred->Add(LcorrJZBem,-1.0); |
210 |
|
} |
211 |
< |
|
211 |
> |
|
212 |
> |
TH1F* Bpred = (TH1F*)Zpred->Clone("Bpred"); |
213 |
> |
Bpred->Add(OSpred); |
214 |
|
Bpred->SetLineColor(kRed); |
215 |
|
|
216 |
+ |
// Problem with negative bins: add contents to OSpred |
217 |
+ |
for ( unsigned int i=0; i<=Zpred->GetNbinsX(); ++i ) { |
218 |
+ |
if ( Zpred->GetBinContent(i)<0 ) { |
219 |
+ |
OSpred->SetBinContent(i,OSpred->GetBinContent(i)+Zpred->GetBinContent(i)); |
220 |
+ |
Zpred->SetBinContent(i,0); |
221 |
+ |
} |
222 |
+ |
} |
223 |
+ |
|
224 |
+ |
RcorrJZBeemm->SetTitleOffset(1.3,"y"); |
225 |
|
RcorrJZBeemm->Draw(); |
226 |
|
mcRcorrJZBeemm.Draw("same"); |
227 |
|
Bpred->Draw("histo,same"); |
237 |
|
saveas << "kin/Mll_After_Cut/Cut_At" << jzbthreshold; |
238 |
|
CompleteSave(ckin,saveas.str()); |
239 |
|
|
240 |
< |
|
240 |
> |
// Draw all predictions overlayed |
241 |
> |
Zpred->SetLineColor(kGreen+1); |
242 |
> |
Zpred->SetLineStyle(2); |
243 |
> |
OSpred->SetLineColor(kBlue-2); |
244 |
> |
OSpred->SetLineStyle(3); |
245 |
|
|
246 |
|
RcorrJZBeemm->Draw(); |
247 |
+ |
OSpred->Draw("histo,same"); |
248 |
+ |
Zpred->Draw("histo,same"); |
249 |
|
Bpred->Draw("histo,same"); |
250 |
|
RcorrJZBeemm->Draw("same"); |
251 |
|
|
252 |
< |
TLegend *leg2 = make_legend(); |
253 |
< |
leg2->SetX1(0.58); |
236 |
< |
leg2->AddEntry(RcorrJZBeemm,"observed (data)","l"); |
252 |
> |
TLegend *leg2 = make_legend("",0.52,0.7); |
253 |
> |
leg2->AddEntry(RcorrJZBeemm,"observed (data)","lp"); |
254 |
|
leg2->AddEntry(Bpred,"predicted (data)","l"); |
255 |
+ |
leg2->AddEntry(Zpred, " bkgd w/Z (data)","l"); |
256 |
+ |
leg2->AddEntry(OSpred," bkgd w/o Z (data)","l"); |
257 |
|
leg2->Draw("same"); |
258 |
|
|
259 |
|
saveas.str(""); |
417 |
|
ckin->SetLogy(logscale); |
418 |
|
TH1F *datahisto = allsamples.Draw("datahisto",variable,nbins,min,max, xlabel, "events",cut,data,luminosity); |
419 |
|
datahisto->SetMarkerSize(DataMarkerSize); |
420 |
< |
THStack mcstack = allsamples.DrawStack("mcstack",variable,nbins,min,max, xlabel, "events",cut,mc,luminosity); |
420 |
> |
if ( !logscale ) datahisto->SetMinimum(0); // Defaults |
421 |
> |
else datahisto->SetMinimum(0.5); |
422 |
> |
// Custom max. |
423 |
> |
if(variable=="TMath::Abs(pfJetDphiMet[0])") datahisto->SetMaximum(1.5*datahisto->GetMaximum()); |
424 |
|
if(variable=="pfJetGoodPt[0]") datahisto->SetMaximum(10*datahisto->GetMaximum()); |
425 |
|
if(variable=="pt") datahisto->SetMaximum(10*datahisto->GetMaximum()); |
426 |
|
if(filename=="mll_inclusive"||filename=="mll_inclusive_mm"||filename=="mll_inclusive_ee") datahisto->SetMinimum(1); |
427 |
|
if(filename=="mll_osof") datahisto->SetMaximum(10*datahisto->GetMaximum()); |
428 |
|
if(filename=="mll_osof") datahisto->SetMinimum(9); |
429 |
< |
datahisto->SetMaximum(5.3*datahisto->GetMaximum()); |
430 |
< |
datahisto->Draw("e1"); |
431 |
< |
ckin->Update(); |
429 |
> |
if (logscale) datahisto->SetMaximum(5.3*datahisto->GetMaximum()); |
430 |
> |
else datahisto->SetMaximum(1.3*datahisto->GetMaximum()); |
431 |
> |
|
432 |
|
if(loadlastminmax) { |
433 |
|
datahisto->SetMinimum(lastrange_min); |
434 |
|
datahisto->SetMaximum(lastrange_max); |
438 |
|
} |
439 |
|
} |
440 |
|
|
441 |
+ |
// Draw signal by hand (for some reason I don't manage to use the sample class: it adds it to the stack!) |
442 |
+ |
string signal("LM3"); |
443 |
+ |
TH1F* signalhisto = new TH1F("signalhisto",signal.c_str(),nbins,min,max); |
444 |
+ |
int idx = signalsamples.FindSample(signal)[0]; |
445 |
+ |
(signalsamples.collection)[idx].events->Project("signalhisto",variable.c_str(),cut); |
446 |
+ |
signalhisto->Scale((signalsamples.collection)[idx].weight*luminosity); |
447 |
+ |
signalhisto->SetLineColor((signalsamples.collection)[idx].samplecolor); |
448 |
+ |
|
449 |
+ |
THStack mcstack = allsamples.DrawStack("mcstack", variable,nbins,min,max,xlabel,"events",cut,mc,luminosity); |
450 |
+ |
datahisto->Draw("e1"); |
451 |
+ |
ckin->Update(); |
452 |
|
mcstack.Draw("same"); |
453 |
+ |
|
454 |
|
datahisto->Draw("same,e1"); |
455 |
|
TLegend *kinleg = allsamples.allbglegend(); |
456 |
|
kinleg->Draw(); |
493 |
|
kinpad->SetLogy(logscale); |
494 |
|
datahisto->Draw("e1"); |
495 |
|
mcstack.Draw("same"); |
496 |
+ |
signalhisto->Draw("same"); |
497 |
|
datahisto->Draw("same,e1"); |
498 |
|
datahisto->Draw("same,axis"); |
499 |
|
if(RestrictToMassPeak&&draw_separation_lines) { |
501 |
|
upperboundary->Draw("same"); |
502 |
|
} |
503 |
|
|
504 |
+ |
kinleg->AddEntry("signalihisto",signal.c_str(),"l"); |
505 |
|
kinleg->Draw(); |
506 |
|
write_cut->Draw(); |
507 |
|
DrawPrelim(); |
519 |
|
delete ckin; |
520 |
|
} |
521 |
|
|
522 |
< |
void make_JES_plot() { |
522 |
> |
void make_JES_plot(TCut cut, string name) { |
523 |
|
|
524 |
|
int nbins=10; |
525 |
|
float min=-0.5; |
526 |
|
float max = 9.5; |
527 |
|
bool logscale=true; |
528 |
|
string xlabel="nJets"; |
493 |
– |
TCut cut=cutmass&&cutOSSF&&basiccut; |
529 |
|
|
530 |
|
TCanvas *ckin = new TCanvas("ckin","Kinematic Plots (in the making)",600,600); |
531 |
|
ckin->SetLogy(logscale); |
532 |
< |
TH1F *datahisto = allsamples.Draw("datahisto","pfJetGoodNum",nbins,min,max, xlabel, "events",cut,data,luminosity); |
532 |
> |
TH1F *datahisto = allsamples.Draw("datahisto","pfJetGoodNum40",nbins,min,max, xlabel, "events",cut,data,luminosity); |
533 |
|
datahisto->SetMarkerSize(DataMarkerSize); |
534 |
< |
THStack mcstack = allsamples.DrawStack("mcstack","pfJetGoodNum",nbins,min,max, xlabel, "events",cut,mc,luminosity); |
535 |
< |
TH1F *JESup = allsamples.Draw("JESup","pfJetGoodNump1sigma",nbins,min,max, xlabel, "events",cut,mc,luminosity); |
536 |
< |
TH1F *JESdn = allsamples.Draw("JESdn","pfJetGoodNumn1sigma",nbins,min,max, xlabel, "events",cut,mc,luminosity); |
534 |
> |
THStack mcstack = allsamples.DrawStack("mcstack","pfJetGoodNum40",nbins,min,max, xlabel, "events",cut,mc,luminosity); |
535 |
> |
TH1F *JESup = allsamples.Draw("JESup","pfJetGoodNum40p1sigma",nbins,min,max, xlabel, "events",cut,mc,luminosity); |
536 |
> |
TH1F *JESdn = allsamples.Draw("JESdn","pfJetGoodNum40n1sigma",nbins,min,max, xlabel, "events",cut,mc,luminosity); |
537 |
|
|
538 |
|
datahisto->SetMinimum(1); |
539 |
|
datahisto->SetMaximum(5.3*datahisto->GetMaximum()); // in line with kinematic plots style |
558 |
|
TLegend *kinleg = allsamples.allbglegend(); |
559 |
|
kinleg->AddEntry(JESunc,"JES uncertainty","f"); |
560 |
|
kinleg->Draw(); |
561 |
< |
CompleteSave(ckin,"Systematics/JES"); |
561 |
> |
CompleteSave(ckin,"Systematics/JES"+name); |
562 |
|
datahisto->Delete(); |
563 |
|
delete ckin; |
564 |
|
|
573 |
|
float mll_hi=160; |
574 |
|
if(!PlottingSetup::RestrictToMassPeak) { |
575 |
|
mll_low=20; |
576 |
< |
mll_hi=210; |
576 |
> |
mll_hi=300; |
577 |
|
} |
578 |
< |
|
579 |
< |
make_kin_plot("met[4]","",40,0,200,dolog,"MET [GeV]","met",doPF,true); |
578 |
> |
|
579 |
> |
make_kin_plot("met[4]","",70,0,350,dolog,"MET [GeV]","met",doPF,true); |
580 |
> |
|
581 |
|
make_kin_plot("mll","",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll",doPF,true); |
582 |
|
make_kin_plot("mll","",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_osof",doPF,true,true); |
583 |
|
make_kin_plot("mll","",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_ee",doPF,true); |
584 |
|
make_kin_plot("mll","",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_mm",doPF,true); |
585 |
< |
make_kin_plot("mll","",(int)((mll_hi-mll_low)),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive",doPF,true); |
586 |
< |
make_kin_plot("mll","",(int)((mll_hi-mll_low)),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_ee",doPF,true); |
587 |
< |
make_kin_plot("mll","",(int)((mll_hi-mll_low)),mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_mm",doPF,true); |
588 |
< |
make_kin_plot("mll","",(int)((mll_hi-mll_low))/2,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_osof",doPF,true); |
589 |
< |
make_kin_plot("mll","",(int)((350-mll_low)),mll_low,350,dolog,"m_{ll} [GeV]","mll_inclusive_highrange",doPF); |
590 |
< |
make_kin_plot("numVtx","",(int)(30.5-(-0.5)),-0.5,30.5,nolog,"N(Vtx)","numVtx",doPF); |
591 |
< |
// make_kin_plot("jetpt[0]","",40,0,200,dolog,"leading jet p_{T} [GeV]","pfJetGoodPt_0",doPF); |
592 |
< |
// make_kin_plot("jeteta[0]","",40,-5,5,nolog,"leading jet #eta","pfJetGoodEta_0",doPF); |
593 |
< |
make_kin_plot("pt","",50,0,400,dolog,"Z p_{T} [GeV]","Zpt",doPF); |
594 |
< |
make_kin_plot("pt1","",50,0,100,nolog,"p_{T} [GeV]","pt1",doPF); |
559 |
< |
make_kin_plot("pt2","",50,0,100,nolog,"p_{T} [GeV]","pt2",doPF); |
560 |
< |
make_kin_plot("eta1","",40,-5,5,nolog,"#eta_{l}","eta",doPF); |
561 |
< |
make_kin_plot("jzb[1]","",100,-150,150,dolog,"JZB [GeV]","jzb_ossf",doPF); |
585 |
> |
make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive",doPF,true); |
586 |
> |
make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_ee",doPF,true); |
587 |
> |
make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_mm",doPF,true); |
588 |
> |
make_kin_plot("mll","",(int)((mll_hi-mll_low))/5,mll_low,mll_hi,dolog,"m_{ll} [GeV]","mll_inclusive_osof",doPF,true); |
589 |
> |
make_kin_plot("mll","",(int)((350-mll_low))/5,mll_low,350,dolog,"m_{ll} [GeV]","mll_inclusive_highrange",doPF); |
590 |
> |
if(!doPF) make_special_mll_plot((int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]"); |
591 |
> |
|
592 |
> |
make_kin_plot("pfJetGoodPt[0]/pfJetGoodPt[1]","",45,1,10,dolog,"pt_{j}^{1}/pt_{j}^{2}","j1j2ratio",doPF,true); |
593 |
> |
make_kin_plot("TMath::Abs(pfJetDphiMet[0])","",32,0,3.2,nolog,"|#Delta#phi(jet1,MET)|","dphiJ1MET",doPF,true); |
594 |
> |
|
595 |
|
make_kin_plot("pfJetGoodNum40","",9,-0.5,8.5,dolog,"nJets","nJets",doPF); |
596 |
|
make_kin_plot("pfJetGoodNum40","",9,-0.5,8.5,dolog,"nJets","nJets_osof",doPF); |
597 |
|
make_kin_plot("pfJetGoodNum40","",9,-0.5,8.5,dolog,"nJets","nJets_nocuts_except_mll_ossf",doPF); |
598 |
< |
if(!doPF) make_special_mll_plot((int)((mll_hi-mll_low)/5),mll_low,mll_hi,dolog,"m_{ll} [GeV]"); |
598 |
> |
|
599 |
> |
make_kin_plot("numVtx","",(int)(30.5-(-0.5)),-0.5,30.5,nolog,"N(Vtx)","numVtx",doPF); |
600 |
> |
// make_kin_plot("jetpt[0]","",40,0,200,dolog,"leading jet p_{T} [GeV]","pfJetGoodPt_0",doPF); |
601 |
> |
// make_kin_plot("jeteta[0]","",40,-5,5,nolog,"leading jet #eta","pfJetGoodEta_0",doPF); |
602 |
> |
make_kin_plot("pt","",50,0,500,dolog,"Z p_{T} [GeV]","Zpt",doPF); |
603 |
> |
make_kin_plot("pt1","",50,0,200,nolog,"p_{T} [GeV]","pt1",doPF); |
604 |
> |
make_kin_plot("pt2","",50,0,200,nolog,"p_{T} [GeV]","pt2",doPF); |
605 |
> |
make_kin_plot("eta1","",40,-3,3,nolog,"#eta_{l}","eta",doPF); |
606 |
> |
make_kin_plot("jzb[1]","",100,-150,200,dolog,"JZB [GeV]","jzb_ossf",doPF); |
607 |
|
stringstream jzbcut; |
608 |
|
jzbcut << "((is_data&&("<<datajzb<<")>100)||(!is_data&&("<<mcjzb<<")>100))"; |
609 |
|
make_kin_plot("mll",jzbcut.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_aboveJZB100",doPF,true); |
622 |
|
make_kin_plot("mll",jzbcut3.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_osof_aboveJZB50",doPF,true,true); |
623 |
|
make_kin_plot("mll",jzbcut3.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_ee_aboveJZB50",doPF,true); |
624 |
|
make_kin_plot("mll",jzbcut3.str(),(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV]","mll_mm_aboveJZB50",doPF,true); |
625 |
< |
|
626 |
< |
|
625 |
> |
|
626 |
> |
make_kin_plot("mll","met[4]>100",(int)((mll_hi-mll_low)/5),mll_low,mll_hi,nolog,"m_{ll} [GeV] (MET>100GeV)","mll_met100",doPF,true); |
627 |
> |
|
628 |
|
make_special_obs_pred_mll_plot(datajzb,mcjzb,0); |
629 |
|
make_special_obs_pred_mll_plot(datajzb,mcjzb,50); |
630 |
+ |
make_special_obs_pred_mll_plot(datajzb,mcjzb,80); |
631 |
|
make_special_obs_pred_mll_plot(datajzb,mcjzb,100); |
632 |
< |
make_special_obs_pred_mll_plot(datajzb,mcjzb,150); |
633 |
< |
make_special_obs_pred_mll_plot(datajzb,mcjzb,200); |
634 |
< |
make_special_obs_pred_mll_plot(datajzb,mcjzb,250); |
635 |
< |
|
636 |
< |
make_JES_plot(); |
632 |
> |
// make_special_obs_pred_mll_plot(datajzb,mcjzb,150); |
633 |
> |
// make_special_obs_pred_mll_plot(datajzb,mcjzb,200); |
634 |
> |
// make_special_obs_pred_mll_plot(datajzb,mcjzb,250); |
635 |
> |
|
636 |
> |
make_JES_plot(cutmass&&cutOSSF&&basiccut,"_ossf"); |
637 |
> |
make_JES_plot(cutmass&&cutOSOF&&basiccut,"_osof"); |
638 |
> |
|
639 |
> |
|
640 |
|
} |
641 |
|
|
642 |
|
void make_comp_plot( string var, string xlabel, string filename, float jzbcut, string mcjzb, string datajzb, |
643 |
|
int nbins, float xmin, float xmax, bool log, |
644 |
|
float ymin=0, float ymax=0, bool leftJustified=false ) { |
645 |
< |
flag_this_change(__FUNCTION__,__LINE__,true);//PlottingSetup::RestrictToMassPeak ---- WATCH OUT: the argument in the function changed! |
645 |
> |
flag_this_change(__FUNCTION__,__LINE__,true);//PlottingSetup::RestrictToMassPeak ---- WATCH OUT: the argument in the function changed! |
646 |
|
|
647 |
|
TCut weightbackup=cutWeight;//backing up the correct weight (restoring below!) |
648 |
|
if(weightbackup==TCut("1.0")||weightbackup==TCut("1")) write_warning(__FUNCTION__,"WATCH OUT THE WEIGHT HAS POSSIBLY NOT BEEN RESET!!!! PLEASE CHANGE LINE "+any2string(__LINE__)); |
649 |
< |
if(var=="numVtx") cutWeight=TCut("1.0"); |
649 |
> |
//if(var=="numVtx") cutWeight=TCut("1.0"); |
650 |
|
TCut jzbData[]= { TCut(TString(datajzb+">"+any2string(jzbcut))),TCut(TString(datajzb+"<-"+any2string(jzbcut))) }; |
651 |
|
TCut jzbMC[] = { TCut(TString(mcjzb+">"+any2string(jzbcut))),TCut(TString(mcjzb+"<-"+any2string(jzbcut))) }; |
652 |
|
|
670 |
|
TCanvas *ccomp = new TCanvas("ccomp","Comparison plot",600,400); |
671 |
|
ccomp->SetLogy(log); |
672 |
|
TH1F *datahisto = allsamples.Draw("datahisto", var,nbins,xmin,xmax,xlabel,"events",kRegions[iregion]&&jzbData[ijzb],data,luminosity); |
673 |
< |
TH1F *lm4histo = signalsamples.Draw("lm4histo", var,nbins,xmin,xmax,xlabel,"events",kRegions[iregion]&&jzbData[ijzb],data,luminosity,signalsamples.FindSample("LM")); |
673 |
> |
TH1F *lm3histo = signalsamples.Draw("lm3histo", var,nbins,xmin,xmax,xlabel,"events",kRegions[iregion]&&jzbMC[ijzb],data,luminosity,signalsamples.FindSample("LM3")); |
674 |
|
THStack mcstack = allsamples.DrawStack("mcstack",var,nbins,xmin,xmax,xlabel,"events",kRegions[iregion]&&jzbMC[ijzb], mc, luminosity); |
675 |
|
datahisto->SetMarkerSize(DataMarkerSize); |
676 |
|
if (ymax>ymin) datahisto->SetMaximum(ymax); |
677 |
< |
lm4histo->SetLineStyle(2); |
677 |
> |
lm3histo->SetLineStyle(2); |
678 |
|
datahisto->Draw("e1"); |
679 |
|
mcstack.Draw("same"); |
680 |
|
datahisto->Draw("same,e1"); |
681 |
< |
// lm4histo->Draw("hist,same"); |
681 |
> |
lm3histo->Draw("hist,same"); |
682 |
|
TLegend *kinleg = allsamples.allbglegend((sRegions[iregion]+(ijzb?"neg":"pos")).c_str()); |
683 |
|
if ( leftJustified ) { |
684 |
|
Float_t w = kinleg->GetX2()-kinleg->GetX1(); |
685 |
|
kinleg->SetX1(0.2); |
686 |
|
kinleg->SetX2(0.2+w); |
687 |
|
} |
688 |
< |
// kinleg->AddEntry(lm4histo,"LM4","l"); |
688 |
> |
kinleg->AddEntry(lm3histo,"LM3","l"); |
689 |
|
kinleg->Draw(); |
690 |
|
TText* write_variable = write_text(0.99,0.01,var); |
691 |
|
write_variable->SetTextAlign(31); |
694 |
|
CompleteSave(ccomp,"compare/JZBcut_at_"+any2string(jzbcut)+"/"+filename+"/"+filename+sRegions[iregion]+(ijzb?"neg":"pos")); |
695 |
|
delete datahisto; |
696 |
|
delete ccomp; |
697 |
< |
delete lm4histo; |
697 |
> |
delete lm3histo; |
698 |
|
} |
699 |
|
cutWeight=weightbackup; |
700 |
|
} |
712 |
|
float jzbcut=jzb_cuts[ijzb]; // Comparison plots are done for this JZB cut |
713 |
|
float mll_low=50;float mll_high=170; |
714 |
|
if(!PlottingSetup::RestrictToMassPeak) { |
715 |
< |
mll_high=200; |
716 |
< |
mll_low=50; |
715 |
> |
mll_high=300; |
716 |
> |
mll_low=20; |
717 |
|
} |
718 |
< |
make_comp_plot("mll","m_{ll} [GeV]","mll",jzbcut,mcjzb,datajzb,30,mll_low,mll_high,false,0,16.); |
718 |
> |
make_comp_plot("pfJetGoodPt[0]/pfJetGoodPt[1]","pt_{j}^{1}/pt_{j}^{2}","j1j2ratio",jzbcut,mcjzb,datajzb,100,0,10,true); |
719 |
> |
make_comp_plot("TMath::Abs(pfJetDphiMet[0])","|#Delta#phi(jet1,MET)|","dphiJ1MET",jzbcut,mcjzb,datajzb,32,0,3.2,false,0,0,true); |
720 |
> |
|
721 |
> |
make_comp_plot("mll","m_{ll} [GeV]","mll",jzbcut,mcjzb,datajzb,56,mll_low,mll_high,false,0,16.); |
722 |
|
make_comp_plot("met[4]","pfMET [GeV]","pfmet",jzbcut,mcjzb,datajzb,18,0,360,false,0,16.); |
723 |
< |
make_comp_plot("pfJetGoodNum","#(jets)","njets",jzbcut,mcjzb,datajzb,10,0,10, false,0,35.); |
723 |
> |
make_comp_plot("pfJetGoodNum40","#(jets)","njets",jzbcut,mcjzb,datajzb,10,0,10, false,0,35.); |
724 |
> |
make_comp_plot("pfJetGoodNumBtag","#(b-jets)","nBjets",jzbcut,mcjzb,datajzb,10,0,10, false,0,35.); |
725 |
|
make_comp_plot("pt","Z p_{T} [GeV]","Zpt",jzbcut,mcjzb,datajzb,26,0,525,false,0.,21.); |
726 |
< |
make_comp_plot("numVtx","#(prim. vertices)","nvtx",jzbcut,mcjzb,datajzb,20,0.,20.,false,0,16.); |
726 |
> |
make_comp_plot("numVtx","#(prim. vertices)","nvtx",jzbcut,mcjzb,datajzb,40,0.,40.,false,0,16.); |
727 |
|
make_comp_plot("TMath::Abs(dphi)","#Delta#phi(leptons)","dphilep",jzbcut,mcjzb,datajzb,10,0.,3.1415,false,0,16.,true); |
728 |
|
make_comp_plot("TMath::Abs(dphi_sumJetVSZ[1])","#Delta#phi(Z,jets)","dphiZjets",jzbcut,mcjzb,datajzb,10,0.,3.1415,false,0,16.,true); |
729 |
+ |
make_comp_plot("eta1","#eta_1","eta1",jzbcut,mcjzb,datajzb,10,0.,2.5,false,0,16.); |
730 |
+ |
make_comp_plot("eta2","#eta_2","eta2",jzbcut,mcjzb,datajzb,10,0.,2.5,false,0,16.); |
731 |
|
} |
732 |
|
|
733 |
|
switch_overunderflow(false); // switching overflow/underflow bins off |
2295 |
|
TCanvas *cancorr = new TCanvas("cancorr","Canvas for Response Correction"); |
2296 |
|
cancorr->SetLogz(); |
2297 |
|
cancorr->SetRightMargin(0.13); |
2298 |
< |
TCut zptforresponsepresentation("pt<600"&&cutmass&&cutOSSF&&"((sumJetPt[1]/pt)<5.0)"&&SpecialCut&&passtrig); |
2298 |
> |
TCut zptforresponsepresentation(Restrmasscut&&SpecialCut&&passtrig); |
2299 |
> |
|
2300 |
|
if(PlottingSetup::DoBTag) zptforresponsepresentation=zptforresponsepresentation&&PlottingSetup::bTagRequirement; |
2301 |
|
TH2F *niceresponseplotd = new TH2F("niceresponseplotd","",100,0,600,100,0,5); |
2302 |
+ |
niceresponseplotd->Sumw2(); |
2303 |
+ |
TH2F* emuResponse = (TH2F*)niceresponseplotd->Clone("emuResponse"); |
2304 |
|
vector<int> SampleIndices=allsamples.FindSample(FindKeyword); |
2305 |
|
for(int iSample=0;iSample<(int)SampleIndices.size();iSample++) { |
2306 |
|
if((allsamples.collection)[SampleIndices[iSample]].is_data && !dodata) continue; |
2307 |
|
if((allsamples.collection)[SampleIndices[iSample]].is_data ==false && dodata) continue; |
2308 |
|
|
2309 |
|
dout << " Response correction : Using sample " << (allsamples.collection)[SampleIndices[iSample]].filename << " for " << FindKeyword << endl; |
2310 |
< |
(allsamples.collection)[SampleIndices[iSample]].events->Draw("sumJetPt[1]/pt:pt>>+niceresponseplotd",zptforresponsepresentation*cutWeight); |
2310 |
> |
(allsamples.collection)[SampleIndices[iSample]].events->Draw("sumJetPt[1]/pt:pt>>+niceresponseplotd",(zptforresponsepresentation&&cutOSSF)*cutWeight); |
2311 |
> |
(allsamples.collection)[SampleIndices[iSample]].events->Draw("sumJetPt[1]/pt:pt>>+emuResponse",(zptforresponsepresentation&&cutOSOF)*cutWeight); |
2312 |
|
} |
2313 |
< |
|
2313 |
> |
niceresponseplotd->Add(emuResponse,-1); |
2314 |
> |
|
2315 |
|
niceresponseplotd->SetStats(0); |
2316 |
|
niceresponseplotd->GetXaxis()->SetTitle("Z p_{T} [GeV]"); |
2317 |
|
niceresponseplotd->GetYaxis()->SetTitle("Response"); |
2319 |
|
niceresponseplotd->GetYaxis()->CenterTitle(); |
2320 |
|
niceresponseplotd->Draw("COLZ"); |
2321 |
|
TProfile * profd = (TProfile*)niceresponseplotd->ProfileX(); |
2322 |
+ |
profd->Rebin(2); |
2323 |
|
profd->SetMarkerSize(DataMarkerSize); |
2324 |
|
profd->Fit("pol0","","same,e1",100,400); |
2325 |
|
DrawPrelim(); |
2339 |
|
CompleteSave(cancorr,"ResponseCorrection/Response_Correction_Illustration_New_"+SaveAs); |
2340 |
|
delete cancorr; |
2341 |
|
delete niceresponseplotd; |
2342 |
+ |
delete profd; |
2343 |
|
return correction; |
2344 |
|
} |
2345 |
|
|
2499 |
|
|
2500 |
|
|
2501 |
|
if(!doPURW) { |
2502 |
+ |
dout << "Not doing PU reweighting for ttbar closure test" << endl; |
2503 |
|
cutWeight="1.0"; |
2504 |
|
// Do it without PU re-weighting |
2505 |
|
float MCPeakNoPU=0,MCPeakErrorNoPU=0,DataPeakNoPU=0,DataPeakErrorNoPU=0,MCSigma=0,DataSigma=0; |
2512 |
|
mcjzb = noPUmcjzb.str(); |
2513 |
|
} |
2514 |
|
|
2515 |
< |
|
2456 |
< |
|
2457 |
< |
|
2458 |
< |
|
2459 |
< |
|
2515 |
> |
|
2516 |
|
float simulatedlumi = luminosity; //in pb please - adjust to your likings |
2517 |
|
|
2518 |
< |
TH1F *TZem = systsamples.Draw("TZem",mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2518 |
> |
TH1F *TZem = systsamples.Draw("TZem", mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2519 |
|
TH1F *nTZem = systsamples.Draw("nTZem","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2520 |
|
TH1F *TSem; |
2521 |
|
TH1F *nTSem; |
2522 |
< |
TH1F *TZeemm = systsamples.Draw("TZeemm",mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2522 |
> |
TH1F *TZeemm = systsamples.Draw("TZeemm", mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2523 |
|
TH1F *nTZeemm = systsamples.Draw("nTZeemm","-"+mcjzb,binning,"JZB [GeV]","events",cutmass&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2524 |
|
TH1F *TSeemm; |
2525 |
|
TH1F *nTSeemm; |
2526 |
|
|
2527 |
|
if(PlottingSetup::RestrictToMassPeak) { |
2528 |
< |
TSem = systsamples.Draw("TSem",mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2529 |
< |
nTSem = systsamples.Draw("nTSem","-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2530 |
< |
TSeemm = systsamples.Draw("TSeemm",mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2528 |
> |
TSem = systsamples.Draw("TSem", mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2529 |
> |
nTSem = systsamples.Draw("nTSem", "-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSOF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2530 |
> |
TSeemm = systsamples.Draw("TSeemm", mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2531 |
|
nTSeemm = systsamples.Draw("nTSeemm","-"+mcjzb,binning,"JZB [GeV]","events",sidebandcut&&cutOSSF&&cutnJets,mc,simulatedlumi,systsamples.FindSample("TTJets")); |
2532 |
|
} |
2533 |
|
|
2534 |
|
TCanvas *tcan = new TCanvas("tcan","tcan"); |
2479 |
– |
|
2535 |
|
tcan->SetLogy(1); |
2536 |
|
|
2537 |
|
TZeemm->SetLineColor(kBlack); |
2560 |
|
histos.push_back(TSem); |
2561 |
|
histos.push_back(TSeemm); |
2562 |
|
} |
2563 |
< |
draw_all_ttbar_histos(tcan,histos,"histo",0.04); |
2563 |
> |
draw_all_ttbar_histos(tcan,histos,"histo",1); |
2564 |
|
|
2565 |
|
TLegend *leg = make_legend("MC t#bar{t}",0.6,0.65,false); |
2566 |
|
leg->AddEntry(TZeemm,"SFZP","l"); |
2588 |
|
TSeemm->Divide(TZeemm); |
2589 |
|
TSem->SetMarkerStyle(24); |
2590 |
|
TSeemm->SetMarkerStyle(32); |
2591 |
< |
} |
2591 |
> |
} |
2592 |
|
|
2593 |
|
tcan->SetLogy(0); |
2594 |
|
TZem->GetYaxis()->SetRangeUser(0,2.5); |
2637 |
|
DrawMCPrelim(simulatedlumi); |
2638 |
|
CompleteSave(tcan,"Systematics/"+prestring+"/ttbar_shape_comparison_ratio"); |
2639 |
|
|
2640 |
+ |
if (0) { // Turn this off: we don't need this |
2641 |
|
|
2642 |
< |
///-------------- second part: only look at the quantity we actually care about! |
2643 |
< |
TH1F *leftsfzp = (TH1F*)nTZeemm->Clone("leftsfzp"); |
2644 |
< |
TH1F *rightsfzp = (TH1F*)TZeemmcopy->Clone("rightsfzp"); |
2645 |
< |
rightsfzp->Add(leftsfzp,-1); |
2646 |
< |
TH1F *leftofzp = (TH1F*)nTZem->Clone("leftofzp"); |
2647 |
< |
TH1F *rightofzp = (TH1F*)TZemcopy->Clone("rightofzp"); |
2648 |
< |
rightofzp->Add(leftofzp,-1); |
2649 |
< |
TH1F *leftofsb; |
2650 |
< |
TH1F *rightofsb; |
2651 |
< |
TH1F *leftsfsb; |
2652 |
< |
TH1F *rightsfsb; |
2653 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
2654 |
< |
leftofsb = (TH1F*)nTSem->Clone("leftofsb"); |
2655 |
< |
rightofsb = (TH1F*)TSemcopy->Clone("rightofsb"); |
2656 |
< |
rightofsb->Add(leftofsb,-1); |
2657 |
< |
leftsfsb = (TH1F*)nTSeemm->Clone("leftsfsb"); |
2658 |
< |
rightsfsb = (TH1F*)TSeemmcopy->Clone("rightsfsb"); |
2659 |
< |
rightsfsb->Add(leftsfsb,-1); |
2660 |
< |
} |
2642 |
> |
///-------------- second part: only look at the quantity we actually care about! |
2643 |
> |
TH1F *leftsfzp = (TH1F*)nTZeemm->Clone("leftsfzp"); |
2644 |
> |
TH1F *rightsfzp = (TH1F*)TZeemmcopy->Clone("rightsfzp"); |
2645 |
> |
rightsfzp->Add(leftsfzp,-1); |
2646 |
> |
TH1F *leftofzp = (TH1F*)nTZem->Clone("leftofzp"); |
2647 |
> |
TH1F *rightofzp = (TH1F*)TZemcopy->Clone("rightofzp"); |
2648 |
> |
rightofzp->Add(leftofzp,-1); |
2649 |
> |
TH1F *leftofsb; |
2650 |
> |
TH1F *rightofsb; |
2651 |
> |
TH1F *leftsfsb; |
2652 |
> |
TH1F *rightsfsb; |
2653 |
> |
if(PlottingSetup::RestrictToMassPeak) { |
2654 |
> |
leftofsb = (TH1F*)nTSem->Clone("leftofsb"); |
2655 |
> |
rightofsb = (TH1F*)TSemcopy->Clone("rightofsb"); |
2656 |
> |
rightofsb->Add(leftofsb,-1); |
2657 |
> |
leftsfsb = (TH1F*)nTSeemm->Clone("leftsfsb"); |
2658 |
> |
rightsfsb = (TH1F*)TSeemmcopy->Clone("rightsfsb"); |
2659 |
> |
rightsfsb->Add(leftsfsb,-1); |
2660 |
> |
} |
2661 |
|
|
2662 |
< |
tcan->SetLogy(1); |
2663 |
< |
rightsfzp->GetXaxis()->SetRangeUser(0,binning[binning.size()-1]); |
2664 |
< |
rightsfzp->GetYaxis()->SetTitle("#deltaJZB / 25 GeV"); |
2665 |
< |
rightsfzp->Draw("histo"); |
2666 |
< |
rightofzp->Draw("histo,same"); |
2667 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
2668 |
< |
rightofsb->Draw("histo,same"); |
2669 |
< |
rightsfsb->Draw("histo,same"); |
2670 |
< |
} |
2671 |
< |
DrawMCPrelim(simulatedlumi); |
2662 |
> |
tcan->SetLogy(1); |
2663 |
> |
rightsfzp->GetXaxis()->SetRangeUser(0,binning[binning.size()-1]); |
2664 |
> |
rightsfzp->GetYaxis()->SetTitle("#deltaJZB / 25 GeV"); |
2665 |
> |
rightsfzp->Draw("histo"); |
2666 |
> |
rightofzp->Draw("histo,same"); |
2667 |
> |
if(PlottingSetup::RestrictToMassPeak) { |
2668 |
> |
rightofsb->Draw("histo,same"); |
2669 |
> |
rightsfsb->Draw("histo,same"); |
2670 |
> |
} |
2671 |
> |
DrawMCPrelim(simulatedlumi); |
2672 |
|
|
2673 |
< |
TLegend *legA = make_legend("MC t#bar{t}",0.6,0.65,false); |
2674 |
< |
legA->AddEntry(rightsfzp,"SFZP","l"); |
2675 |
< |
legA->AddEntry(rightofzp,"OFZP","l"); |
2676 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
2677 |
< |
legA->AddEntry(rightofsb,"SFSB","l"); |
2678 |
< |
legA->AddEntry(rightsfsb,"OFSB","l"); |
2679 |
< |
} |
2680 |
< |
legA->Draw(); |
2673 |
> |
TLegend *legA = make_legend("MC t#bar{t}",0.6,0.65,false); |
2674 |
> |
legA->AddEntry(rightsfzp,"SFZP","l"); |
2675 |
> |
legA->AddEntry(rightofzp,"OFZP","l"); |
2676 |
> |
if(PlottingSetup::RestrictToMassPeak) { |
2677 |
> |
legA->AddEntry(rightofsb,"SFSB","l"); |
2678 |
> |
legA->AddEntry(rightsfsb,"OFSB","l"); |
2679 |
> |
} |
2680 |
> |
legA->Draw(); |
2681 |
|
|
2682 |
< |
CompleteSave(tcan,"Systematics/"+prestring+"/ttbar_deltajzb_comparison"); |
2682 |
> |
CompleteSave(tcan,"Systematics/"+prestring+"/ttbar_deltajzb_comparison"); |
2683 |
|
|
2684 |
< |
tcan->SetLogy(0); |
2685 |
< |
rightofzp->Divide(rightsfzp); |
2686 |
< |
rightofzp->GetXaxis()->SetRangeUser(0.0,binning[binning.size()-1]); |
2687 |
< |
rightofzp->GetYaxis()->SetRangeUser(0.0,2.5); |
2688 |
< |
rightofzp->GetYaxis()->SetTitle("#deltaJZB ratio"); |
2689 |
< |
rightofzp->Draw(); |
2690 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
2691 |
< |
rightofsb->Divide(rightsfzp); |
2692 |
< |
rightsfsb->Divide(rightsfzp); |
2693 |
< |
rightofsb->Draw("same"); |
2694 |
< |
rightsfsb->Draw("same"); |
2695 |
< |
} |
2684 |
> |
tcan->SetLogy(0); |
2685 |
> |
rightofzp->Divide(rightsfzp); |
2686 |
> |
rightofzp->GetXaxis()->SetRangeUser(0.0,binning[binning.size()-1]); |
2687 |
> |
rightofzp->GetYaxis()->SetRangeUser(0.0,2.5); |
2688 |
> |
rightofzp->GetYaxis()->SetTitle("#deltaJZB ratio"); |
2689 |
> |
rightofzp->Draw(); |
2690 |
> |
if(PlottingSetup::RestrictToMassPeak) { |
2691 |
> |
rightofsb->Divide(rightsfzp); |
2692 |
> |
rightsfsb->Divide(rightsfzp); |
2693 |
> |
rightofsb->Draw("same"); |
2694 |
> |
rightsfsb->Draw("same"); |
2695 |
> |
} |
2696 |
> |
|
2697 |
> |
TLine *top2 = new TLine(0.0,1.0+linepos,binning[binning.size()-1],1.0+linepos); |
2698 |
> |
TLine *center2 = new TLine(0.0,1.0,binning[binning.size()-1],1.0); |
2699 |
> |
TLine *bottom2 = new TLine(0.0,1.0-linepos,binning[binning.size()-1],1.0-linepos); |
2700 |
> |
|
2701 |
> |
top2->SetLineColor(kBlue);top2->SetLineStyle(2); |
2702 |
> |
bottom2->SetLineColor(kBlue);bottom2->SetLineStyle(2); |
2703 |
> |
center2->SetLineColor(kBlue); |
2704 |
> |
|
2705 |
> |
top2->Draw("same"); |
2706 |
> |
center2->Draw("same"); |
2707 |
> |
bottom2->Draw("same"); |
2708 |
> |
|
2709 |
> |
rightofzp->SetMarkerStyle(21); |
2710 |
> |
if(PlottingSetup::RestrictToMassPeak) { |
2711 |
> |
rightofsb->SetMarkerStyle(24); |
2712 |
> |
rightsfsb->SetMarkerStyle(32); |
2713 |
> |
} |
2714 |
|
|
2715 |
< |
TLine *top2 = new TLine(0.0,1.0+linepos,binning[binning.size()-1],1.0+linepos); |
2716 |
< |
TLine *center2 = new TLine(0.0,1.0,binning[binning.size()-1],1.0); |
2717 |
< |
TLine *bottom2 = new TLine(0.0,1.0-linepos,binning[binning.size()-1],1.0-linepos); |
2715 |
> |
TLegend *leg3 = make_legend("MC t#bar{t}",0.55,0.75,false); |
2716 |
> |
leg3->AddEntry(rightofzp,"OFZP / SFZP","ple"); |
2717 |
> |
if(PlottingSetup::RestrictToMassPeak) { |
2718 |
> |
leg3->AddEntry(rightsfsb,"SFSB / SFZP","ple"); |
2719 |
> |
leg3->AddEntry(rightofsb,"OFSB / SFZP","ple"); |
2720 |
> |
} |
2721 |
> |
leg3->AddEntry(bottom,"syst. envelope","l"); |
2722 |
> |
leg3->SetX1(0.25);leg3->SetX2(0.6); |
2723 |
> |
leg3->SetY1(0.65); |
2724 |
|
|
2725 |
< |
top2->SetLineColor(kBlue);top2->SetLineStyle(2); |
2646 |
< |
bottom2->SetLineColor(kBlue);bottom2->SetLineStyle(2); |
2647 |
< |
center2->SetLineColor(kBlue); |
2725 |
> |
leg3->Draw("same"); |
2726 |
|
|
2727 |
< |
top2->Draw("same"); |
2728 |
< |
center2->Draw("same"); |
2651 |
< |
bottom2->Draw("same"); |
2727 |
> |
DrawMCPrelim(simulatedlumi); |
2728 |
> |
CompleteSave(tcan,"Systematics/"+prestring+"/ttbar_deltajzb_comparison_ratio"); |
2729 |
|
|
2653 |
– |
rightofzp->SetMarkerStyle(21); |
2654 |
– |
if(PlottingSetup::RestrictToMassPeak) { |
2655 |
– |
rightofsb->SetMarkerStyle(24); |
2656 |
– |
rightsfsb->SetMarkerStyle(32); |
2657 |
– |
} |
2658 |
– |
|
2659 |
– |
TLegend *leg3 = make_legend("MC t#bar{t}",0.55,0.75,false); |
2660 |
– |
leg3->AddEntry(rightofzp,"OFZP / SFZP","ple"); |
2661 |
– |
if(PlottingSetup::RestrictToMassPeak) { |
2662 |
– |
leg3->AddEntry(rightsfsb,"SFSB / SFZP","ple"); |
2663 |
– |
leg3->AddEntry(rightofsb,"OFSB / SFZP","ple"); |
2730 |
|
} |
2665 |
– |
leg3->AddEntry(bottom,"syst. envelope","l"); |
2666 |
– |
leg3->SetX1(0.25);leg3->SetX2(0.6); |
2667 |
– |
leg3->SetY1(0.65); |
2668 |
– |
|
2669 |
– |
leg3->Draw("same"); |
2670 |
– |
|
2671 |
– |
DrawMCPrelim(simulatedlumi); |
2672 |
– |
CompleteSave(tcan,"Systematics/"+prestring+"/ttbar_deltajzb_comparison_ratio"); |
2731 |
|
|
2732 |
|
delete TZem; |
2733 |
|
delete nTZem; |
2774 |
|
nicer_binning.push_back(100); |
2775 |
|
nicer_binning.push_back(125); |
2776 |
|
nicer_binning.push_back(150); |
2777 |
< |
nicer_binning.push_back(175); |
2777 |
> |
//nicer_binning.push_back(175); |
2778 |
|
nicer_binning.push_back(200); |
2779 |
< |
nicer_binning.push_back(230); |
2780 |
< |
nicer_binning.push_back(280); |
2779 |
> |
nicer_binning.push_back(250); |
2780 |
> |
nicer_binning.push_back(300); |
2781 |
|
nicer_binning.push_back(400); |
2782 |
|
|
2783 |
|
ttbar_sidebands_comparison(mcjzb,nicer_binning, "ttbar/"); |
2815 |
|
binning.push_back(0); |
2816 |
|
binning.push_back(10); |
2817 |
|
binning.push_back(20); |
2760 |
– |
// binning.push_back(30); |
2818 |
|
binning.push_back(40); |
2819 |
+ |
binning.push_back(60); |
2820 |
|
// binning.push_back(50); |
2821 |
|
// binning.push_back(60); |
2822 |
|
// binning.push_back(70); |
2860 |
|
} |
2861 |
|
|
2862 |
|
zcan->SetLogy(0); |
2863 |
< |
hratio->GetYaxis()->SetRangeUser(0,2.5); |
2863 |
> |
hratio->GetYaxis()->SetRangeUser(0,2.0); |
2864 |
|
hratio->GetYaxis()->SetTitle("Observed/Predicted"); |
2865 |
|
hratio->Draw("e1"); |
2866 |
|
|