Fork me on GitHub

source: svn/trunk/paper/sourceCode/JETResol.C@ 683

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

* empty log message *

File size: 7.2 KB
Line 
1{
2//=========Macro generated from canvas: c2/JET resol
3//========= (Fri Jun 19 15:50:00 2009) by ROOT version5.20/00
4 TCanvas *c2 = new TCanvas("c2", "JET resol",342,203,597,450);
5 gStyle->SetOptFit(1);
6 gStyle->SetOptStat(0);
7 c2->Range(-121.1613,0.8152498,874.2716,34.27834);
8 c2->SetFillColor(0);
9 c2->SetBorderMode(0);
10 c2->SetBorderSize(2);
11 c2->SetTickx(1);
12 c2->SetTicky(1);
13 c2->SetLeftMargin(0.13);
14 c2->SetRightMargin(0.05);
15 c2->SetTopMargin(0.05);
16 c2->SetBottomMargin(0.13);
17 c2->SetFrameFillStyle(0);
18 c2->SetFrameBorderMode(0);
19 c2->SetFrameFillStyle(0);
20 c2->SetFrameBorderMode(0);
21
22 TGraph *graph = new TGraph(15);
23 graph->SetName("Graph");
24 graph->SetTitle("");
25
26 Int_t ci; // for color index setting
27 ci = TColor::GetColor("#3333ff");
28 graph->SetFillColor(ci);
29 graph->SetMarkerStyle(3);
30 graph->SetPoint(0,5,19.11605);
31 graph->SetPoint(1,15,25.27396);
32 graph->SetPoint(2,25,22.45308);
33 graph->SetPoint(3,35,18.30321);
34 graph->SetPoint(4,45,17.1514);
35 graph->SetPoint(5,55,15.73424);
36 graph->SetPoint(6,65,14.17836);
37 graph->SetPoint(7,85.94222,12.10961);
38 graph->SetPoint(8,74.25089,13.14307);
39 graph->SetPoint(9,110,11.51238);
40 graph->SetPoint(10,130,10.83168);
41 graph->SetPoint(11,160,9.330358);
42 graph->SetPoint(12,200,8.666195);
43 graph->SetPoint(13,260,8.09707);
44 graph->SetPoint(14,750,6.974951);
45
46 TH1 *Graph112 = new TH1F("Graph112","",100,0,824.5);
47 Graph112->SetMinimum(5.165452);
48 Graph112->SetMaximum(32.60519);
49 Graph112->SetDirectory(0);
50 Graph112->SetStats(0);
51 Graph112->SetLineStyle(0);
52 Graph112->SetMarkerStyle(20);
53 Graph112->GetXaxis()->SetTitle("E_{T}^{MC} [GeV]");
54 Graph112->GetXaxis()->SetRange(2,100);
55 Graph112->GetXaxis()->SetLabelFont(42);
56 Graph112->GetXaxis()->SetLabelOffset(0.007);
57 Graph112->GetXaxis()->SetTitleSize(0.05);
58 Graph112->GetXaxis()->SetTitleOffset(0.9);
59 Graph112->GetXaxis()->SetTitleFont(42);
60 Graph112->GetYaxis()->SetTitle("#sigma(E_{T}^{rec}/E_{T}^{MC})_{fit}/<E_{T}^{rec}/E_{T}^{MC}>_{fit}");
61 Graph112->GetYaxis()->SetLabelFont(42);
62 Graph112->GetYaxis()->SetLabelOffset(0.007);
63 Graph112->GetYaxis()->SetTitleSize(0.05);
64 Graph112->GetYaxis()->SetTitleOffset(1.05);
65 Graph112->GetYaxis()->SetTitleFont(42);
66 Graph112->GetZaxis()->SetLabelFont(42);
67 Graph112->GetZaxis()->SetLabelOffset(0.007);
68 Graph112->GetZaxis()->SetTitleSize(0.05);
69 Graph112->GetZaxis()->SetTitleFont(42);
70 graph->SetHistogram(Graph112);
71
72
73 TF1 *user = new TF1("user","sqrt(pow([0]/x,2)+pow([1]/sqrt(x),2)+pow([2],2))",10,800);
74 user->SetFillColor(19);
75 user->SetFillStyle(596);
76
77 ci = TColor::GetColor("#3333ff");
78 user->SetMarkerColor(ci);
79 user->SetMarkerStyle(3);
80
81 ci = TColor::GetColor("#3333ff");
82 user->SetLineColor(ci);
83 user->SetLineWidth(1);
84 user->SetLineStyle(7);
85 user->SetChisquare(7.655612);
86 user->GetXaxis()->SetLabelFont(42);
87 user->GetXaxis()->SetLabelOffset(0.007);
88 user->GetXaxis()->SetTitleSize(0.05);
89 user->GetXaxis()->SetTitleOffset(0.9);
90 user->GetXaxis()->SetTitleFont(42);
91 user->GetYaxis()->SetLabelFont(42);
92 user->GetYaxis()->SetLabelOffset(0.007);
93 user->GetYaxis()->SetTitleSize(0.05);
94 user->GetYaxis()->SetTitleOffset(1.05);
95 user->GetYaxis()->SetTitleFont(42);
96 user->SetParameter(0,4.23081e-08);
97 user->SetParError(0,75.81953);
98 user->SetParLimits(0,0,0);
99 user->SetParameter(1,102.0147);
100 user->SetParError(1,2.576386);
101 user->SetParLimits(1,0,0);
102 user->SetParameter(2,5.687143);
103 user->SetParError(2,0.6450141);
104 user->SetParLimits(2,0,0);
105 graph->GetListOfFunctions()->Add(user);
106
107 TPaveStats *ptstats = new TPaveStats(0.5946463,0.760218,0.8642447,0.8855586,"brNDC");
108 ptstats->SetName("stats");
109 ptstats->SetBorderSize(1);
110 ptstats->SetFillColor(19);
111 ptstats->SetTextAlign(12);
112 ptstats->SetTextFont(42);
113 ptstats->SetOptStat(0);
114 ptstats->SetOptFit(0);
115 ptstats->Draw();
116 graph->GetListOfFunctions()->Add(ptstats);
117 ptstats->SetParent(graph->GetListOfFunctions());
118 graph->Draw("ap");
119
120 TF1 *userDelphes = new TF1("userDelphes","sqrt(pow(102.0/sqrt(x),2)+pow(5.7,2))",7,1000);
121 userDelphes->SetFillColor(19);
122 userDelphes->SetFillStyle(0);
123 userDelphes->SetMarkerStyle(20);
124 userDelphes->SetLineWidth(1);
125 userDelphes->SetLineStyle(7);
126 userDelphes->GetXaxis()->SetLabelFont(42);
127 userDelphes->GetXaxis()->SetLabelOffset(0.007);
128 userDelphes->GetXaxis()->SetTitleSize(0.05);
129 userDelphes->GetXaxis()->SetTitleOffset(0.9);
130 userDelphes->GetXaxis()->SetTitleFont(42);
131 userDelphes->GetYaxis()->SetLabelFont(42);
132 userDelphes->GetYaxis()->SetLabelOffset(0.007);
133 userDelphes->GetYaxis()->SetTitleSize(0.05);
134 userDelphes->GetYaxis()->SetTitleOffset(1.05);
135 userDelphes->GetYaxis()->SetTitleFont(42);
136 userDelphes->Draw("same");
137
138 TF1 *userCMS = new TF1("userCMS","sqrt(pow(1.17*100/sqrt(x),2)+pow(0.042*100,2))",10,800);
139 userCMS->SetFillColor(19);
140 userCMS->SetFillStyle(0);
141 userCMS->SetMarkerStyle(20);
142
143 ci = TColor::GetColor("#3333ff");
144 userCMS->SetLineColor(ci);
145 userCMS->SetLineWidth(1);
146 userCMS->GetXaxis()->SetLabelFont(42);
147 userCMS->GetXaxis()->SetLabelOffset(0.007);
148 userCMS->GetXaxis()->SetTitleSize(0.05);
149 userCMS->GetXaxis()->SetTitleOffset(0.9);
150 userCMS->GetXaxis()->SetTitleFont(42);
151 userCMS->GetYaxis()->SetLabelFont(42);
152 userCMS->GetYaxis()->SetLabelOffset(0.007);
153 userCMS->GetYaxis()->SetTitleSize(0.05);
154 userCMS->GetYaxis()->SetTitleOffset(1.05);
155 userCMS->GetYaxis()->SetTitleFont(42);
156 userCMS->Draw("same");
157
158 TPaveText *pt = new TPaveText(0.5440613,0.5081967,0.6954023,0.557377,"brNDC");
159 pt->SetBorderSize(0);
160 pt->SetFillColor(10);
161 pt->SetTextFont(42);
162 pt->SetTextSize(0.04098361);
163 TText *text = pt->AddText("Events: pp #rightarrow gg ");
164 pt->Draw();
165
166 pt = new TPaveText(0.6080306,0.3569482,0.7590822,0.4059946,"brNDC");
167 pt->SetBorderSize(0);
168 pt->SetFillColor(10);
169 pt->SetTextFont(42);
170 pt->SetTextSize(0.04098361);
171 text = pt->AddText("MG/ME + Pythia + Delphes");
172 pt->Draw();
173
174 pt = new TPaveText(0.6398467,0.431694,0.7911877,0.4808743,"brNDC");
175 pt->SetBorderSize(0);
176 pt->SetFillColor(10);
177 pt->SetTextFont(42);
178 pt->SetTextSize(0.04098361);
179 text = pt->AddText("MidPoint cone algorithm, #Delta R=0.7");
180 pt->Draw();
181
182 TLegend *leg = new TLegend(0.1988528,0.6594005,0.8986616,0.9073569,NULL,"brNDC");
183 leg->SetBorderSize(0);
184 leg->SetTextFont(62);
185 leg->SetLineColor(1);
186 leg->SetLineStyle(1);
187 leg->SetLineWidth(1);
188 leg->SetFillColor(10);
189 leg->SetFillStyle(1001);
190 TLegendEntry *entry=leg->AddEntry("userCMS","CMS resolution","l");
191
192 ci = TColor::GetColor("#3333ff");
193 entry->SetLineColor(ci);
194 entry->SetLineStyle(1);
195 entry->SetLineWidth(1);
196 entry->SetMarkerColor(1);
197 entry->SetMarkerStyle(21);
198 entry->SetMarkerSize(1);
199 entry=leg->AddEntry("userDelphes","Delphes resolution: #frac{#sigma(E_{T}^{rec}/E_{T}^{MC})}{<E_{T}^{rec}/E_{T}^{MC}>} = #frac{102.0}{#sqrt{E_{T}^{MC}}} #oplus 5.7","l");
200 entry->SetLineColor(1);
201 entry->SetLineStyle(7);
202 entry->SetLineWidth(1);
203 entry->SetMarkerColor(1);
204 entry->SetMarkerStyle(21);
205 entry->SetMarkerSize(1);
206 leg->Draw();
207 c2->Modified();
208 c2->cd();
209 c2->SetSelected(c2);
210}
Note: See TracBrowser for help on using the repository browser.