Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
D0_BUP2020_AN_3yr.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file D0_BUP2020_AN_3yr.C
2 {
3 //=========Macro generated from canvas: D0_BUP2020_AN_3yr/D0_BUP2020OOArArO_AN_3yr
4 //========= (Wed May 12 23:46:28 2021) by ROOT version 6.22/02
5  TCanvas *D0_BUP2020_AN_3yr = new TCanvas("D0_BUP2020_AN_3yr", "D0_BUP2020OOArArO_AN_3yr",0,0,1100,800);
6  gStyle->SetOptFit(1);
7  gStyle->SetOptStat(0);
8  gStyle->SetOptTitle(0);
9  D0_BUP2020_AN_3yr->SetHighLightColor(2);
10  D0_BUP2020_AN_3yr->Range(0,0,1,1);
11  D0_BUP2020_AN_3yr->SetFillColor(0);
12  D0_BUP2020_AN_3yr->SetBorderMode(0);
13  D0_BUP2020_AN_3yr->SetBorderSize(2);
14  D0_BUP2020_AN_3yr->SetTickx(1);
15  D0_BUP2020_AN_3yr->SetTicky(1);
16  D0_BUP2020_AN_3yr->SetLeftMargin(0.16);
17  D0_BUP2020_AN_3yr->SetRightMargin(0.05);
18  D0_BUP2020_AN_3yr->SetTopMargin(0.05);
19  D0_BUP2020_AN_3yr->SetBottomMargin(0.16);
20  D0_BUP2020_AN_3yr->SetFrameBorderMode(0);
21 
22 // ------------>Primitives in pad: D0_BUP2020_AN_3yr_1
23  TPad *D0_BUP2020_AN_3yr_1 = new TPad("D0_BUP2020_AN_3yr_1", "D0_BUP2020_AN_3yr_1",0.01,0.01,0.99,0.99);
24  D0_BUP2020_AN_3yr_1->Draw();
25  D0_BUP2020_AN_3yr_1->cd();
26  D0_BUP2020_AN_3yr_1->Range(-1.012658,-0.0371519,5.316456,0.03879747);
27  D0_BUP2020_AN_3yr_1->SetFillColor(0);
28  D0_BUP2020_AN_3yr_1->SetBorderMode(0);
29  D0_BUP2020_AN_3yr_1->SetBorderSize(2);
30  D0_BUP2020_AN_3yr_1->SetTickx(1);
31  D0_BUP2020_AN_3yr_1->SetTicky(1);
32  D0_BUP2020_AN_3yr_1->SetLeftMargin(0.16);
33  D0_BUP2020_AN_3yr_1->SetRightMargin(0.05);
34  D0_BUP2020_AN_3yr_1->SetTopMargin(0.05);
35  D0_BUP2020_AN_3yr_1->SetBottomMargin(0.16);
36  D0_BUP2020_AN_3yr_1->SetFrameBorderMode(0);
37  D0_BUP2020_AN_3yr_1->SetFrameBorderMode(0);
38 
39  TH1F *hframe__27 = new TH1F("hframe__27","",1000,0,5);
40  hframe__27->SetMinimum(-0.025);
41  hframe__27->SetMaximum(0.035);
42  hframe__27->SetDirectory(0);
43  hframe__27->SetStats(0);
44  hframe__27->SetLineWidth(2);
45  hframe__27->SetMarkerStyle(20);
46  hframe__27->SetMarkerSize(1.2);
47  hframe__27->GetXaxis()->SetTitle("#it{p}_{T} [GeV]");
48  hframe__27->GetXaxis()->SetLabelFont(42);
49  hframe__27->GetXaxis()->SetLabelSize(0.05);
50  hframe__27->GetXaxis()->SetTitleSize(0.05);
51  hframe__27->GetXaxis()->SetTitleOffset(1.4);
52  hframe__27->GetXaxis()->SetTitleFont(42);
53  hframe__27->GetYaxis()->SetTitle("A_{N}");
54  hframe__27->GetYaxis()->SetLabelFont(42);
55  hframe__27->GetYaxis()->SetLabelSize(0.05);
56  hframe__27->GetYaxis()->SetTitleSize(0.05);
57  hframe__27->GetYaxis()->SetTitleOffset(1.4);
58  hframe__27->GetYaxis()->SetTitleFont(42);
59  hframe__27->GetZaxis()->SetLabelFont(42);
60  hframe__27->GetZaxis()->SetLabelSize(0.05);
61  hframe__27->GetZaxis()->SetTitleSize(0.05);
62  hframe__27->GetZaxis()->SetTitleOffset(1);
63  hframe__27->GetZaxis()->SetTitleFont(42);
64  hframe__27->Draw(" ");
65  TLine *line = new TLine(0,-0,5,0);
66  line->Draw();
67 
68  Double_t Graph0_fx35[30] = {
69  1,
70  1.1,
71  1.2,
72  1.3,
73  1.4,
74  1.5,
75  1.6,
76  1.7,
77  1.8,
78  1.9,
79  2,
80  2.1,
81  2.2,
82  2.3,
83  2.4,
84  2.5,
85  2.6,
86  2.7,
87  2.8,
88  2.9,
89  3,
90  3.1,
91  3.2,
92  3.3,
93  3.4,
94  3.5,
95  3.6,
96  3.7,
97  3.8,
98  3.9};
99  Double_t Graph0_fy35[30] = {
100  -0.0003416974,
101  -0.0003446386,
102  -0.0003737235,
103  -0.0003766647,
104  -0.0003796059,
105  -0.0003825471,
106  -0.000423376,
107  -0.000447253,
108  -0.0004501941,
109  -0.0004531353,
110  -0.0004560765,
111  -0.0004821873,
112  -0.0005190058,
113  -0.000522962,
114  -0.0005266647,
115  -0.0005394398,
116  -0.0005668878,
117  -0.0005917628,
118  -0.0006011655,
119  -0.0006393142,
120  -0.0006619588,
121  -0.0006768133,
122  -0.0007164591,
123  -0.0007296059,
124  -0.0007325471,
125  -0.0007447225,
126  -0.000784316,
127  -0.0008001941,
128  -0.0008463742,
129  -0.0008649};
130  TGraph *graph = new TGraph(30,Graph0_fx35,Graph0_fy35);
131  graph->SetName("Graph0");
132  graph->SetTitle("Graph");
133  graph->SetFillStyle(1000);
134 
135  Int_t ci; // for color index setting
136  TColor *color; // for color definition with alpha
137  ci = TColor::GetColor("#006666");
138  graph->SetLineColor(ci);
139  graph->SetLineWidth(5);
140  graph->SetMarkerStyle(20);
141  graph->SetMarkerSize(1.2);
142 
143  TH1F *Graph_Graph035 = new TH1F("Graph_Graph035","Graph",100,0.71,4.19);
144  Graph_Graph035->SetMinimum(-0.0009172203);
145  Graph_Graph035->SetMaximum(-0.0002893771);
146  Graph_Graph035->SetDirectory(0);
147  Graph_Graph035->SetStats(0);
148  Graph_Graph035->SetLineWidth(2);
149  Graph_Graph035->SetMarkerStyle(20);
150  Graph_Graph035->SetMarkerSize(1.2);
151  Graph_Graph035->GetXaxis()->SetLabelFont(42);
152  Graph_Graph035->GetXaxis()->SetLabelSize(0.05);
153  Graph_Graph035->GetXaxis()->SetTitleSize(0.05);
154  Graph_Graph035->GetXaxis()->SetTitleOffset(1.4);
155  Graph_Graph035->GetXaxis()->SetTitleFont(42);
156  Graph_Graph035->GetYaxis()->SetLabelFont(42);
157  Graph_Graph035->GetYaxis()->SetLabelSize(0.05);
158  Graph_Graph035->GetYaxis()->SetTitleSize(0.05);
159  Graph_Graph035->GetYaxis()->SetTitleOffset(1.4);
160  Graph_Graph035->GetYaxis()->SetTitleFont(42);
161  Graph_Graph035->GetZaxis()->SetLabelFont(42);
162  Graph_Graph035->GetZaxis()->SetLabelSize(0.05);
163  Graph_Graph035->GetZaxis()->SetTitleSize(0.05);
164  Graph_Graph035->GetZaxis()->SetTitleOffset(1);
165  Graph_Graph035->GetZaxis()->SetTitleFont(42);
166  graph->SetHistogram(Graph_Graph035);
167 
168  graph->Draw("l");
169 
170  Double_t Graph1_fx36[30] = {
171  1,
172  1.1,
173  1.2,
174  1.3,
175  1.4,
176  1.5,
177  1.6,
178  1.7,
179  1.8,
180  1.9,
181  2,
182  2.1,
183  2.2,
184  2.3,
185  2.4,
186  2.5,
187  2.6,
188  2.7,
189  2.8,
190  2.9,
191  3,
192  3.1,
193  3.2,
194  3.3,
195  3.4,
196  3.5,
197  3.6,
198  3.7,
199  3.8,
200  3.9};
201  Double_t Graph1_fy36[30] = {
202  -0.01879963,
203  -0.01869631,
204  -0.0185394,
205  -0.01832259,
206  -0.01809963,
207  -0.01782545,
208  -0.01752092,
209  -0.01718923,
210  -0.01673616,
211  -0.01626995,
212  -0.01585206,
213  -0.0153734,
214  -0.01496127,
215  -0.01456491,
216  -0.01422932,
217  -0.01387782,
218  -0.01353845,
219  -0.01321867,
220  -0.01285432,
221  -0.01258897,
222  -0.01229654,
223  -0.01199905,
224  -0.01177594,
225  -0.01148847,
226  -0.01129233,
227  -0.01101149,
228  -0.01081373,
229  -0.01058588,
230  -0.01039728,
231  -0.01018889};
232  graph = new TGraph(30,Graph1_fx36,Graph1_fy36);
233  graph->SetName("Graph1");
234  graph->SetTitle("Graph");
235  graph->SetFillStyle(1000);
236 
237  ci = TColor::GetColor("#000099");
238  graph->SetLineColor(ci);
239  graph->SetLineStyle(2);
240  graph->SetLineWidth(5);
241  graph->SetMarkerStyle(20);
242  graph->SetMarkerSize(1.2);
243 
244  TH1F *Graph_Graph136 = new TH1F("Graph_Graph136","Graph",100,0.71,4.19);
245  Graph_Graph136->SetMinimum(-0.0196607);
246  Graph_Graph136->SetMaximum(-0.009327811);
247  Graph_Graph136->SetDirectory(0);
248  Graph_Graph136->SetStats(0);
249  Graph_Graph136->SetLineWidth(2);
250  Graph_Graph136->SetMarkerStyle(20);
251  Graph_Graph136->SetMarkerSize(1.2);
252  Graph_Graph136->GetXaxis()->SetLabelFont(42);
253  Graph_Graph136->GetXaxis()->SetLabelSize(0.05);
254  Graph_Graph136->GetXaxis()->SetTitleSize(0.05);
255  Graph_Graph136->GetXaxis()->SetTitleOffset(1.4);
256  Graph_Graph136->GetXaxis()->SetTitleFont(42);
257  Graph_Graph136->GetYaxis()->SetLabelFont(42);
258  Graph_Graph136->GetYaxis()->SetLabelSize(0.05);
259  Graph_Graph136->GetYaxis()->SetTitleSize(0.05);
260  Graph_Graph136->GetYaxis()->SetTitleOffset(1.4);
261  Graph_Graph136->GetYaxis()->SetTitleFont(42);
262  Graph_Graph136->GetZaxis()->SetLabelFont(42);
263  Graph_Graph136->GetZaxis()->SetLabelSize(0.05);
264  Graph_Graph136->GetZaxis()->SetTitleSize(0.05);
265  Graph_Graph136->GetZaxis()->SetTitleOffset(1);
266  Graph_Graph136->GetZaxis()->SetTitleFont(42);
267  graph->SetHistogram(Graph_Graph136);
268 
269  graph->Draw("l");
270 
271  Double_t Graph2_fx1022[10] = {
272  0.5,
273  1.5,
274  2.5,
275  3.5,
276  4.5,
277  5.5,
278  6.5,
279  7.5,
280  8.5,
281  9.5};
282  Double_t Graph2_fy1022[10] = {
283  0,
284  0,
285  0,
286  0,
287  0,
288  0,
289  0,
290  0,
291  0,
292  0};
293  Double_t Graph2_fex1022[10] = {
294  0,
295  0,
296  0,
297  0,
298  0,
299  0,
300  0,
301  0,
302  0,
303  0};
304  Double_t Graph2_fey1022[10] = {
305  0.005320126,
306  0.0029488,
307  0.003264666,
308  0.00434972,
309  0.007306244,
310  0.01219333,
311  0.02030859,
312  0.02902563,
313  0.04762935,
314  0.07544466};
315  TGraphErrors *gre = new TGraphErrors(10,Graph2_fx1022,Graph2_fy1022,Graph2_fex1022,Graph2_fey1022);
316  gre->SetName("Graph2");
317  gre->SetTitle("Graph");
318  gre->SetFillStyle(1000);
319 
320  ci = TColor::GetColor("#000000");
321  gre->SetLineColor(ci);
322  gre->SetLineWidth(4);
323 
324  ci = TColor::GetColor("#000000");
325  gre->SetMarkerColor(ci);
326  gre->SetMarkerStyle(20);
327  gre->SetMarkerSize(2);
328 
329  TH1F *Graph_Graph21022 = new TH1F("Graph_Graph21022","Graph",100,0,10.4);
330  Graph_Graph21022->SetMinimum(-0.0905336);
331  Graph_Graph21022->SetMaximum(0.0905336);
332  Graph_Graph21022->SetDirectory(0);
333  Graph_Graph21022->SetStats(0);
334  Graph_Graph21022->SetLineWidth(2);
335  Graph_Graph21022->SetMarkerStyle(20);
336  Graph_Graph21022->SetMarkerSize(1.2);
337  Graph_Graph21022->GetXaxis()->SetLabelFont(42);
338  Graph_Graph21022->GetXaxis()->SetLabelSize(0.05);
339  Graph_Graph21022->GetXaxis()->SetTitleSize(0.05);
340  Graph_Graph21022->GetXaxis()->SetTitleOffset(1.4);
341  Graph_Graph21022->GetXaxis()->SetTitleFont(42);
342  Graph_Graph21022->GetYaxis()->SetLabelFont(42);
343  Graph_Graph21022->GetYaxis()->SetLabelSize(0.05);
344  Graph_Graph21022->GetYaxis()->SetTitleSize(0.05);
345  Graph_Graph21022->GetYaxis()->SetTitleOffset(1.4);
346  Graph_Graph21022->GetYaxis()->SetTitleFont(42);
347  Graph_Graph21022->GetZaxis()->SetLabelFont(42);
348  Graph_Graph21022->GetZaxis()->SetLabelSize(0.05);
349  Graph_Graph21022->GetZaxis()->SetTitleSize(0.05);
350  Graph_Graph21022->GetZaxis()->SetTitleOffset(1);
351  Graph_Graph21022->GetZaxis()->SetTitleFont(42);
352  gre->SetHistogram(Graph_Graph21022);
353 
354  gre->Draw("p");
355 
356  TLegend *leg = new TLegend(0,0.8,0.83,0.95,NULL,"brNDC");
357  leg->SetBorderSize(0);
358  leg->SetLineColor(1);
359  leg->SetLineStyle(1);
360  leg->SetLineWidth(1);
361  leg->SetFillColor(0);
362  leg->SetFillStyle(0);
363  TLegendEntry *entry=leg->AddEntry("NULL","#it{#bf{sPHENIX}} Projection, #it{p}^{#uparrow}+#it{p}#rightarrowD^{0}/#bar{D}^{0}+X, P=0.57","");
364  entry->SetLineColor(1);
365  entry->SetLineStyle(1);
366  entry->SetLineWidth(1);
367  entry->SetMarkerColor(1);
368  entry->SetMarkerStyle(21);
369  entry->SetMarkerSize(1);
370  entry->SetTextFont(42);
371  leg->Draw();
372 
373  leg = new TLegend(0.2,0.58,0.85,0.83,NULL,"brNDC");
374  leg->SetBorderSize(0);
375  leg->SetLineColor(1);
376  leg->SetLineStyle(1);
377  leg->SetLineWidth(1);
378  leg->SetFillColor(0);
379  leg->SetFillStyle(0);
380  entry=leg->AddEntry("Graph","6.2 pb^{-1} str. #it{p}+#it{p}, Years 1-3","pl");
381 
382  ci = TColor::GetColor("#000000");
383  entry->SetLineColor(ci);
384  entry->SetLineStyle(1);
385  entry->SetLineWidth(4);
386 
387  ci = TColor::GetColor("#000000");
388  entry->SetMarkerColor(ci);
389  entry->SetMarkerStyle(20);
390  entry->SetMarkerSize(2);
391  entry->SetTextFont(42);
392  entry=leg->AddEntry("Graph0","Kang, PRD#bf{78}, #lambda_{f} = #lambda_{d} = 0","l");
393 
394  ci = TColor::GetColor("#006666");
395  entry->SetLineColor(ci);
396  entry->SetLineStyle(1);
397  entry->SetLineWidth(5);
398  entry->SetMarkerColor(1);
399  entry->SetMarkerStyle(21);
400  entry->SetMarkerSize(1);
401  entry->SetTextFont(42);
402  entry=leg->AddEntry("Graph1","Kang, PRD#bf{78}, #lambda_{f} = -#lambda_{d} = 70 MeV","l");
403 
404  ci = TColor::GetColor("#000099");
405  entry->SetLineColor(ci);
406  entry->SetLineStyle(2);
407  entry->SetLineWidth(5);
408  entry->SetMarkerColor(1);
409  entry->SetMarkerStyle(21);
410  entry->SetMarkerSize(1);
411  entry->SetTextFont(42);
412  leg->Draw();
413  D0_BUP2020_AN_3yr_1->Modified();
414  D0_BUP2020_AN_3yr->cd();
415  D0_BUP2020_AN_3yr->Modified();
416  D0_BUP2020_AN_3yr->cd();
417  D0_BUP2020_AN_3yr->SetSelected(D0_BUP2020_AN_3yr);
418 }