Fork me on GitHub

source: svn/trunk/routines/resolutions_atlas.C@ 982

Last change on this file since 982 was 504, checked in by Xavier Rouby, 15 years ago

added ATLAS expectation band for etmis

File size: 19.1 KB
Line 
1/***********************************************************************
2** **
3** /----------------------------------------------\ **
4** | Delphes, a framework for the fast simulation | **
5** | of a generic collider experiment | **
6** \------------- arXiv:0903.2225v1 ------------/ **
7** **
8** **
9** This package uses: **
10** ------------------ **
11** ROOT: Nucl. Inst. & Meth. in Phys. Res. A389 (1997) 81-86 **
12** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **
13** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **
14** FROG: [hep-ex/0901.2718v1] **
15** HepMC: Comput. Phys. Commun.134 (2001) 41 **
16** **
17** ------------------------------------------------------------------ **
18** **
19** Main authors: **
20** ------------- **
21** **
22** Severine Ovyn Xavier Rouby **
23** severine.ovyn@uclouvain.be xavier.rouby@cern **
24** **
25** Center for Particle Physics and Phenomenology (CP3) **
26** Universite catholique de Louvain (UCL) **
27** Louvain-la-Neuve, Belgium **
28** **
29** Copyright (C) 2008-2009, **
30** All rights reserved. **
31** **
32***********************************************************************/
33
34#include "TROOT.h"
35#include "TFile.h"
36#include "TTree.h"
37#include "TCanvas.h"
38#include "TProfile.h"
39#include "TF1.h"
40#include "TGraph.h"
41#include "TMultiGraph.h"
42#include "TGraphErrors.h"
43#include "TLegend.h"
44
45#include "interface/FuncDef.h"
46
47void JetResol()
48{
49 setTDRStyle();
50 gROOT->Reset();
51
52 //TFile *f1 = new TFile("JET2_atlas_jetclu.root","read");
53 //TFile *f1 = new TFile("JET2_atlas_jetclu_new.root","read"); // 40k
54 //TFile *f1 = new TFile("JET2_atlas_siscone.root","read");
55 //TFile *f1 = new TFile("JET2_atlas_antikt.root","read");
56 //TFile *f1 = new TFile("JET2_atlas_midpoint.root","read");
57 //TFile *f1 = new TFile("JET2_atlas_midpoint_eflow.root","read");
58 //TFile *f1 = new TFile("JET2_atlas_midpoint_newCaloRes.root","read");
59 //TFile *f1 = new TFile("JET2_atlas_kt_40k.root","read"); // 40k events
60 //TFile *f1 = new TFile("JET2_atlas_kt_60k.root","read"); // 60k events
61 //TFile *f1 = new TFile("JET2_atlas_jetclu_60k.root","read"); // 60k events
62 //TFile *f1 = new TFile("JET2_atlas.kt_80k.root","read"); // 80k events -- samples jx -- default Delphes
63 //TFile *f1 = new TFile("JET2_atlas.cone_80k.root","read"); // 80k events -- samples jx -- default Delphes + endcaps
64 TFile *f1 = new TFile("JET2_atlas_kt_80k_endcap.root","read"); // 80k events -- samples jx -- default Delphes + endcaps
65
66 if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
67 if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
68 TTree *Analyze = (TTree*)f1->Get("Analysis");
69
70/*
71 const int numBin=16;
72 double bins[numBin]={0,10,20,30,40,50,60,70,80,100,120,140,180,220,300,1200}; // cms-samples bins
73 string cut = "1==1";
74 TF1 *fitfunATLAS = new TF1("userATLAS","sqrt(pow(0.69*100/sqrt(x),2)+pow(0.03*100,2)+pow(6.3*100/x,2))",10,800);
75 TPaveText *etacut = MakeTPave(0.58,0.51,0.65,0.55,"|#eta|<0.5 ");
76*/
77/*
78 const int numBin=25;
79 double bins[numBin]={21,26,32,39,48, 59,72,88,107,130, 158,191,230,278,336, 405,485,581,696,834, 1000,1198,1435,1719,2060};
80 string cut = "1==1";
81 TF1 *fitfunATLAS = new TF1("userATLAS","sqrt(pow(0.69*100/sqrt(x),2)+pow(0.03*100,2)+pow(6.3*100/x,2))",10,800);
82 TPaveText *etacut = MakeTPave(0.58,0.51,0.65,0.55,"|#eta|<0.5 ");
83*/
84/*
85 const int numBin=20;
86 double bins[numBin]={21,26,32,39,48, 59,72,88,107,130, 158,191,230,278,336, 405,485,581,696,834 };
87 string cut = "1==1";
88 TF1 *fitfunATLAS = new TF1("userATLAS","sqrt(pow(0.69*100/sqrt(x),2)+pow(0.03*100,2)+pow(6.3*100/x,2))",10,800);
89 TPaveText *etacut = MakeTPave(0.58,0.51,0.65,0.55,"|#eta|<0.5 ");
90*/
91
92 // for eta < 0.5, use this
93 const int numBin=14;
94 double bins[numBin]={21,26,32,39,48, 59,72,88,130, 191,278, 405,581,834 };
95 string cut = "abs(JetPTResol.Eta)<0.5";
96 TF1 *fitfunATLAS = new TF1("userATLAS","sqrt(pow(0.69*100/sqrt(x),2)+pow(0.03*100,2)+pow(6.3*100/x,2))",10,800);
97 TPaveText *etacut = MakeTPave(0.58,0.51,0.65,0.55,"|#eta|<0.5 ");
98
99/*
100 // for forward 1.5 < eta < 2.0, use this
101 const int numBin=10;
102 double bins[numBin]={48, 59,72,88,130, 191,278, 405,581,834 };
103 string cut = "abs(JetPTResol.Eta)<2.0 && abs(JetPTResol.Eta)>1.5";
104 TF1 *fitfunATLAS= new TF1("userATLAS","sqrt(pow(1.19*100/sqrt(x),2)+pow(0.01*100,2)+pow(10*100/x,2))",10,800);
105 TPaveText *etacut = MakeTPave(0.58,0.51,0.65,0.55,"1.5<|#eta|<2.0 ");
106*/
107 TProfile *ESoverE = new TProfile("ESoverE","Jet resolution for ATLAS ",numBin-1,bins,-10,10);
108
109 double mean[numBin], mean2[numBin];
110
111 TCanvas *c1 = new TCanvas("c1","JET resol: (E_reco - E_gen)/E_gen",0,0,1000,650);
112 c1->cd(); int frame=0;
113 int nc = numBin/2 + numBin%2;
114 c1->Divide(nc,2);
115 TCanvas *c1b = new TCanvas("c1b","JET resol: [(E_reco - E_gen)/E_gen]^2 ",0,0,1000,650);
116 c1b->cd(); int frame2=0;
117 c1b->Divide(nc,2);
118
119 float x[numBin-1];
120 float y[numBin-1];
121 float ex[numBin-1];
122 float ey[numBin-1];
123 float erec_over_etruth[numBin-1];
124
125 float finval=0;//valeur a remplir puis a fitter
126 // available variables:
127 // - E : true Energy
128 // - PT : true transverse energy
129 // - SmearedPT : ratio ET_rec / ET_gen
130 // - dE : ratio (E_rec - E_truth)/E_truth
131 // - dE2 : ( (E_rec - E_truth)/E_truth )^2
132
133
134 for ( int i=0; i<numBin-1; i++) // premiÚre bin : i ==1 et pas i == 0
135 {
136 TAxis *xaxis = ESoverE->GetXaxis();
137 float binCenter = xaxis->GetBinCenter(i+1);
138 int binMin = (int)xaxis->GetBinLowEdge(i+1);
139 int binMax = (int)xaxis->GetBinUpEdge(i+1);
140 char tempMin[500];
141 if(i==0)binMin=5;
142 sprintf(tempMin,"JetPTResol.E > %d",binMin);
143 string mystringMin(tempMin);
144 char tempMax[500];
145 sprintf(tempMax,"JetPTResol.E < %d",binMax);
146 string mystringMax(tempMax);
147 char tempName[500];
148 //sprintf(tempName,"JetPTResol.dE/JetPTResol.SmearedPT>>hdE%d",i);
149 //sprintf(tempName,"JetPTResol.dE>>hdE%d",i);
150 sprintf(tempName,"JetPTResol.dE_reco>>hdE%d",i);
151 string mystringName(tempName);
152 c1->cd(++frame);
153 GaussValuesAsymmetry(Analyze,tempName,mean[i],mystringMin,mystringMax,cut);
154
155 //sprintf(tempName,"JetPTResol.dE2/JetPTResol.SmearedPT>>hdE2%d",i);
156 //sprintf(tempName,"JetPTResol.dE2/JetPTResol.SmearedPT>>hdE2%d",i);
157 sprintf(tempName,"JetPTResol.dE2_reco>>hdE2%d",i);
158 string mystringName2(tempName);
159 c1b->cd(++frame2);
160 GaussValuesAsymmetry2(Analyze,tempName,mean2[i],mystringMin,mystringMax,cut);
161
162 x[i]=binCenter;
163 finval=sqrt(mean2[i] - mean[i]*mean[i]);
164 y[i]=finval*100;
165 ex[i]=0;
166 ey[i]=0;
167 erec_over_etruth[i]=mean[i]+1;
168
169 }
170
171 TCanvas *c3 = new TCanvas("c3","JET linearity",100,100,600,450);
172 c3->cd();
173 //for(int i=0; i<numBin-1; i++) cout << x[i] << "\t\t" << erec_over_etruth[i] << endl;
174 TGraph *linearity = new TGraph(numBin-1,x,erec_over_etruth);
175 linearity->Draw("AP");
176 linearity->SetTitle("");
177 linearity->GetXaxis()->SetTitle("E^{Truth} [GeV]");
178 linearity->GetYaxis()->SetTitle("<E^{Reco}/E^{Truth}>");
179 linearity->GetXaxis()->SetRangeUser(30,1000);
180 linearity->SetMinimum(0.85);
181 linearity->SetMaximum(1.20);
182 gPad->SetLogx();
183
184
185 TCanvas *c2 = new TCanvas("c2","JET resol",100,100,600,450);
186 c2->cd();
187
188 TGraph *gr11 = new TGraph(numBin-1,x,y);
189 gr11->Draw("AP");
190 gr11->SetTitle("");
191 gr11->GetXaxis()->SetTitle("E^{MC} [GeV]");
192 gr11->GetYaxis()->SetRangeUser(0,50);
193 gr11->GetYaxis()->SetTitle("#sigma(E)/E");
194
195 TF1 *fitfun = new TF1("user","sqrt(pow([0]/x,2)+pow([2]/sqrt(x),2)+pow([1],2))",10,800);
196 Double_t* params = fitfun->GetParameters();
197 fitfun->SetLineColor(kBlue);
198 gr11->Fit("user","QRN");
199 gr11->Fit("user","QRN");
200 gr11->Fit("user","QRN");
201 gr11->Fit("user","QRN");
202 gr11->GetXaxis()->SetRangeUser(30,1200);
203 //gPad->SetLogx();
204 char tempResol[100];
205 //sprintf(tempResol,"Delphes resolution: #frac{#sigma(E)}{E} = #sqrt{ <( #frac{E_{reco} - E_{gen}}{E_{gen}} )^{2} > - < #frac{E_{reco}-E_{gen}}{E_{gen}}>^{2} } =\n #frac{%f}{#sqrt{E_{T}^{MC}}} #oplus %f #oplus #frac{%f}{E}",params[1],params[2],params[3]);
206 sprintf(tempResol,"Delphes resolution: #frac{#sigma(E)}{E} = #frac{%.1f}{#sqrt{E^{MC}}} #oplus %.1f #oplus #frac{%.1f}{E^{MC}}",params[2],params[1],params[0]);
207 char tempResol2[100];
208 sprintf(tempResol2,"sqrt(pow(%f/x,2)+pow(%f/sqrt(x),2)+pow(%f,2) )",params[0],params[2],params[1]);
209
210
211 TF1 *fitfunDelphes = new TF1("userDelphes",tempResol2,7,1000);
212 fitfunDelphes->SetLineColor(kBlack);
213 fitfunDelphes->SetLineStyle(7);
214 fitfunDelphes->Draw("same");
215
216 fitfunATLAS->SetLineColor(kBlue);
217 fitfunATLAS->Draw("same");
218
219
220 etacut->Draw();
221
222 TPaveText *events = MakeTPave(0.62,0.43,0.75,0.47,"Events: pp #rightarrow ggX ");
223 events->Draw();
224
225 TPaveText *algo = MakeTPave(0.64,0.36,0.76,0.40,"k_{T} algorithm #Delta R = 0.6");
226 //TPaveText *algo = MakeTPave(0.64,0.36,0.76,0.40,"Cone algorithm #Delta R = 0.7");
227 algo->Draw();
228
229 TPaveText *Delphes = MakeTPave(0.62,0.29,0.85,0.33,"MG/ME + Pythia + Delphes");
230 Delphes->Draw();
231
232 TLegend *legend = new TLegend(0.18,0.72,0.87,0.87,NULL,"NDC");
233 legend->AddEntry(fitfunATLAS,"ATLAS resolution","l");
234 legend->AddEntry(fitfunDelphes,tempResol,"l");
235 legend->SetFillColor(10);
236 legend->SetBorderSize(0);
237 legend->Draw();
238
239
240 delete fitfun;
241}
242
243void ElecResol()
244{
245
246 setTDRStyle();
247 gROOT->Reset();
248
249 TFile *f1 = new TFile("ETMIS2_ATLAS.root","read");
250 if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
251 if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
252 TTree *Analyze = (TTree*)f1->Get("Analysis");
253
254 const Int_t numBin=11;
255 double bins[numBin]={0,10,20,30,40,50,60,70,80,100,120};
256 TProfile *ETSminusET = new TProfile("ETSminusET","Electron resolution: E_{T}^{rec}/E_{T}^{mc}",(numBin-1),bins,-10,10);
257
258 double rms[numBin];
259 double mean[numBin];
260
261 TCanvas *c3 = new TCanvas("c3","ELEC resol",0,0,1000,650);
262 c3->cd(); int frame=0;
263 c3->Divide(6,2);
264
265 float x[numBin-1];
266 float y[numBin-1];
267 float ex[numBin-1];
268 float ey[numBin-1];
269
270 float finval=0;//valeur a remplir puis a fitter
271
272 for ( int i=0; i<(numBin-1); i++) // premiÚre bin : i ==1 et pas i == 0
273 {
274 TAxis *xaxis = ETSminusET->GetXaxis();
275 float binCenter = xaxis->GetBinCenter(i+1);
276 int binMin = (int)xaxis->GetBinLowEdge(i+1);
277 int binMax = (int)xaxis->GetBinUpEdge(i+1);
278 char tempMin[500];
279 if(i==0)binMin=5;
280 sprintf(tempMin,"ElecEResol.E > %d",binMin);
281 string mystringMin(tempMin);
282 char tempMax[500];
283 sprintf(tempMax,"ElecEResol.E < %d",binMax);
284 string mystringMax(tempMax);
285 char tempName[500];
286 sprintf(tempName,"(ElecEResol.E-ElecEResol.SmearedE)>>hETSoverET%d",i);
287 string mystringName(tempName);
288
289 c3->cd(++frame);
290 GaussValuesElec(Analyze,tempName,rms[i],mean[i],mystringMin,mystringMax);
291 //GaussValues(Analyze,tempName,rms[i],mean[i],mystringMin,mystringMax);
292 x[i]=binCenter;
293 finval=rms[i]/binCenter;
294 y[i]=(finval*100);
295 ex[i]=0;
296 ey[i]=0;
297 }
298
299 TCanvas *c4 = new TCanvas("c4","ELEC resol",100,100,600,450);
300 c4->cd();
301
302 TF1 *fitfun = new TF1("user","sqrt(pow([0],2)+pow([1]/sqrt(x),2)+pow([2]/x,2))",1,400);
303
304 TGraphErrors *gr11 = new TGraphErrors((numBin-1),x,y,ex,ey);
305 gr11->Draw("AP");
306 gr11->SetTitle("");
307 gr11->GetXaxis()->SetTitle("E [GeV]");
308 gr11->GetYaxis()->SetRangeUser(0,5);
309 gr11->GetYaxis()->SetTitle("#sigma/E");
310
311 Double_t* params = fitfun->GetParameters();
312
313 gr11->Fit("user","QR");
314 gr11->Fit("user","QRI");
315 gr11->Fit("user","QRI");
316 gr11->Fit("user","QRI");
317 char tempResol[500];
318 sprintf(tempResol,"#frac{#sigma}{E} = #frac{%f}{#sqrt{E}} #oplus #frac{%f}{E} #oplus %f",params[1]/100,params[2]/100,params[0]/100);
319
320 TPaveText *leg1 = MakeTPave(0.4,0.6,0.8,0.65,tempResol);
321 leg1->Draw();
322
323 TPaveText *Delphes = MakeTPave(0.2,0.15,0.35,0.2,"MG/ME + Delphes");
324 Delphes->Draw();
325
326 TPaveText *events = MakeTPave(0.2,0.75,0.35,0.8,"Events: WHq'#rightarrow W#tau#tauq'#rightarrowjjl#tauq', m_{H}=150 GeV ");
327 events->Draw();
328
329 delete fitfun;
330}
331
332void TauJetInfo()
333{
334
335 setTDRStyle();
336 gROOT->Reset();
337
338 TFile *f1 = new TFile("TAUJET2_ATLAS.root","read");
339 if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
340 if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
341 TTree *Analyze = (TTree*)f1->Get("Analysis");
342
343 TCanvas *ct1 = new TCanvas("ct1","Tau information",100,100,600,450);
344 ct1->cd();
345
346 TH1F *tauEnergy =MakeNormTH1F(20,0.8,1,Analyze,"TauJetPTResol.EnergieCen>>tauEnergy",1, 0, 1,2,false);
347 tauEnergy->Draw();
348 tauEnergy->SetTitle("");
349 tauEnergy->GetYaxis()->SetTitle("Fraction of events");
350 tauEnergy->GetXaxis()->SetTitle("C_{#tau}");
351
352
353 TPaveText *Delphes1 = MakeTPave(0.3,0.85,0.45,0.9,"MG/ME + Delphes");
354 Delphes1->Draw();
355 TPaveText *ctau = MakeTPave(0.3,0.75,0.45,0.8,"C_{#tau} = #frac{#sum E^{towers} (#DeltaR = 0.15)}{E^{jet}}");
356 ctau->Draw();
357 TPaveText *events1 = MakeTPave(0.3,0.65,0.45,0.7,"Events: WHq'#rightarrow WWWq'#rightarrow lllq', m_{H}=150 GeV ");
358 events1->Draw();
359
360
361 TCanvas *ct2 = new TCanvas("ct2","Tau information",100,100,600,450);
362 ct2->cd();
363 TH1F *NumTrack =MakeNormTH1F(6,0,6,Analyze,"TauJetPTResol.NumTrack>>NumTrack",1, 0, 1,2,false);
364 NumTrack->Draw();
365 NumTrack->SetTitle("");
366 NumTrack->GetYaxis()->SetTitle("Fraction of events");
367 NumTrack->GetXaxis()->SetTitle("N^{tracks}");
368
369 TPaveText *Delphes = MakeTPave(0.6,0.85,0.85,0.9,"MG/ME + Delphes");
370 Delphes->Draw();
371 TPaveText *numtracks = MakeTPave(0.6,0.75,0.85,0.8,"#DeltaR < 0.4, p_{T}^{track} > 2 GeV");
372 numtracks->Draw();
373 TPaveText *events = MakeTPave(0.6,0.65,0.85,0.7,"Events: WHq'#rightarrow WWWq'#rightarrow lllq', m_{H}=150 GeV ");
374 events->Draw();
375
376}
377
378void ETmisResol()
379{
380
381 setTDRStyle();
382 gROOT->Reset();
383
384 //TFile *f1 = new TFile("JET2_ATLAS.root","read");
385 //TFile *f1 = new TFile("JET2_atlas_midpoint.root","read");
386 //TFile *f1 = new TFile("JET2_atlas_kt_60k.root","read"); // 60k events
387 //TFile *f1 = new TFile("JET2_atlas_kt_80k_endcap.root","read"); // 80k events + endcap
388 TFile *f1 = new TFile("JET2_atlas.cone_80k.root","read"); // 80k events + endcap
389 if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
390 if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
391 TTree *Analyze = (TTree*)f1->Get("Analysis");
392
393 //const Int_t numBin=6; double bins[numBin]={180,260,340,420,500,580};
394 double max = 900;
395 const Int_t numBin=6; double bins[numBin]={100,250,400,550,700,max};
396 //const Int_t numBin=6; double bins[numBin]={180,260,340,420,500,max};
397 TProfile *ETSoverET = new TProfile("ETSoverET","ETmis resol",numBin-1,bins,-1000,1000);
398 TF1 *fitfun = new TF1("user","[0]*sqrt(x)",0,max);
399 fitfun->SetLineColor(kBlack);
400 fitfun->SetLineStyle(2);
401
402
403 double rms[numBin-1];
404
405 TCanvas *c5 = new TCanvas("c5","PTmis resol",0,0,1000,650);
406 c5->cd(); int frame=0;
407 int nb = numBin/2 + numBin%2;
408 c5->Divide(nb,2);
409
410 double x[numBin];
411 double y[numBin];
412
413 for ( int i=0; i<(numBin-1); i++) // premiÚre bin : i ==1 et pas i == 0
414 {
415 TAxis *xaxis = ETSoverET->GetXaxis();
416 float binCenter = xaxis->GetBinCenter(i+1);
417 int binMin = (int)xaxis->GetBinLowEdge(i+1);
418 int binMax = (int)xaxis->GetBinUpEdge(i+1);
419 char tempMin[500];
420 sprintf(tempMin,"ETmisResol.SEt>%d",binMin);
421 string mystringMin(tempMin);
422 char tempMax[500];
423 sprintf(tempMax,"ETmisResol.SEt<%d",binMax);
424 string mystringMax(tempMax);
425
426 char tempName[500];
427 sprintf(tempName,"ETmisResol.ExSmeare>>hETSoverET%d",i);
428 //sprintf(tempName,"ETmisResol.EtSmeare>>hETSoverET%d",i); // non-gaussian, so it does not work properly
429 string mystringName(tempName);
430
431 c5->cd(++frame);
432 GaussValuesETmis(Analyze,tempName,rms[i],mystringMin,mystringMax);
433 x[i]=binCenter;
434 y[i]=rms[i];
435
436 }
437
438 TCanvas *c6 = new TCanvas("c6","ETmis resolution",100,100,600,450);
439 c6->cd();
440
441 TF1 *fdo = new TF1("fdo","0.53*sqrt(x)",1,900);
442 TF1 *fup = new TF1("fup","0.57*sqrt(x)",1,900);
443 int N = 100;
444 float xx[N], yy[N], eex[N], eey[N];
445 for (int i=0; i<N; i++) {
446 xx[i] = 9*i;
447 yy[i] = (fup->Eval(xx[i]) + fdo->Eval(xx[i]))/2.;
448 eex[i] = 0;
449 eey[i] = (fup->Eval(xx[i]) - fdo->Eval(xx[i]))/2.;
450 }
451 TGraphErrors *gr = new TGraphErrors(N,xx,yy,eex,eey);
452 gr->SetFillColor(18);
453
454
455 x[numBin]=0;
456 y[numBin]=0;
457 TGraph *gr11 = new TGraph(numBin,x,rms);
458 gr11->SetTitle("");
459 gr11->SetMarkerStyle(3);
460 gr11->GetXaxis()->SetTitle("#Sigma E_{T} [GeV]");
461 gr11->GetYaxis()->SetTitle("Resolution of x-component of MET [GeV]");
462 gr11->Fit("user","RQ");
463 gr11->Fit("user","RQ");
464 gr11->Fit("user","RQ");
465 gr11->Fit("user","RQ");
466
467 TMultiGraph *mgr = new TMultiGraph("mgr","");
468 mgr->Add(gr,"3");
469 mgr->Add(gr11,"P");
470 mgr->Draw("A");
471 mgr->GetXaxis()->SetTitle("#Sigma E_{T} [GeV]");
472 mgr->GetYaxis()->SetTitle("Resolution of x-component of MET [GeV]");
473 mgr->GetXaxis()->SetRangeUser(1,900);
474 mgr->SetMaximum(16);
475
476 Double_t* params = fitfun->GetParameters();
477
478 char tempResol[500];
479 sprintf(tempResol,"E_{x}^{mis} resolution: %.2f #times #sqrt{E_{T}}",params[0]);
480
481 TPaveText *leg1 = MakeTPave(0.26,0.84,0.43,0.89,tempResol);
482 leg1->Draw();
483
484 TPaveText *leg2 = MakeTPave(0.15,0.75,0.45,0.8,"Events: pp #rightarrow ggX");
485 leg2->Draw();
486
487 TPaveText *Delphes = MakeTPave(0.65,0.19,0.8,0.24,"MG/ME + Pythia + Delphes");
488 Delphes->Draw();
489
490 TPaveText *atlas = MakeTPave(0.65,0.25,0.8,0.30,"ATLAS-like detector");
491 atlas->Draw();
492
493 TLegend *legend = new TLegend(0.69,0.6,0.94,0.74,NULL,"NDC");
494 legend->AddEntry(gr,"ATLAS","f");
495 legend->AddEntry(gr11,"Delphes","l");
496 legend->SetFillColor(10);
497 legend->SetBorderSize(0);
498 legend->Draw();
499
500
501 delete fitfun;
502}
503
504void General()
505{
506 JetResol();
507 ElecResol();
508 ETmisResol();
509 //TauJetInfo();
510
511}
512
513
Note: See TracBrowser for help on using the repository browser.