Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
D0_BUP2020_AN_5yr_comparison.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file D0_BUP2020_AN_5yr_comparison.C
2 {
3 //=========Macro generated from canvas: D0_BUP2020_AN_5yr_comparison/D0_BUP2020OOArArO_AN_5yr_comparison
4 //========= (Wed May 12 23:46:28 2021) by ROOT version 6.22/02
5  TCanvas *D0_BUP2020_AN_5yr_comparison = new TCanvas("D0_BUP2020_AN_5yr_comparison", "D0_BUP2020OOArArO_AN_5yr_comparison",0,0,1100,800);
6  gStyle->SetOptFit(1);
7  gStyle->SetOptStat(0);
8  gStyle->SetOptTitle(0);
9  D0_BUP2020_AN_5yr_comparison->SetHighLightColor(2);
10  D0_BUP2020_AN_5yr_comparison->Range(0,0,1,1);
11  D0_BUP2020_AN_5yr_comparison->SetFillColor(0);
12  D0_BUP2020_AN_5yr_comparison->SetBorderMode(0);
13  D0_BUP2020_AN_5yr_comparison->SetBorderSize(2);
14  D0_BUP2020_AN_5yr_comparison->SetTickx(1);
15  D0_BUP2020_AN_5yr_comparison->SetTicky(1);
16  D0_BUP2020_AN_5yr_comparison->SetLeftMargin(0.16);
17  D0_BUP2020_AN_5yr_comparison->SetRightMargin(0.05);
18  D0_BUP2020_AN_5yr_comparison->SetTopMargin(0.05);
19  D0_BUP2020_AN_5yr_comparison->SetBottomMargin(0.16);
20  D0_BUP2020_AN_5yr_comparison->SetFrameBorderMode(0);
21 
22 // ------------>Primitives in pad: D0_BUP2020_AN_5yr_comparison_1
23  TPad *D0_BUP2020_AN_5yr_comparison_1 = new TPad("D0_BUP2020_AN_5yr_comparison_1", "D0_BUP2020_AN_5yr_comparison_1",0.01,0.01,0.99,0.99);
24  D0_BUP2020_AN_5yr_comparison_1->Draw();
25  D0_BUP2020_AN_5yr_comparison_1->cd();
26  D0_BUP2020_AN_5yr_comparison_1->Range(-1.012658,-0.0371519,5.316456,0.03879747);
27  D0_BUP2020_AN_5yr_comparison_1->SetFillColor(0);
28  D0_BUP2020_AN_5yr_comparison_1->SetBorderMode(0);
29  D0_BUP2020_AN_5yr_comparison_1->SetBorderSize(2);
30  D0_BUP2020_AN_5yr_comparison_1->SetTickx(1);
31  D0_BUP2020_AN_5yr_comparison_1->SetTicky(1);
32  D0_BUP2020_AN_5yr_comparison_1->SetLeftMargin(0.16);
33  D0_BUP2020_AN_5yr_comparison_1->SetRightMargin(0.05);
34  D0_BUP2020_AN_5yr_comparison_1->SetTopMargin(0.05);
35  D0_BUP2020_AN_5yr_comparison_1->SetBottomMargin(0.16);
36  D0_BUP2020_AN_5yr_comparison_1->SetFrameBorderMode(0);
37  D0_BUP2020_AN_5yr_comparison_1->SetFrameBorderMode(0);
38 
39  TH1F *hframe__28 = new TH1F("hframe__28","",1000,0,5);
40  hframe__28->SetMinimum(-0.025);
41  hframe__28->SetMaximum(0.035);
42  hframe__28->SetDirectory(0);
43  hframe__28->SetStats(0);
44  hframe__28->SetLineWidth(2);
45  hframe__28->SetMarkerStyle(20);
46  hframe__28->SetMarkerSize(1.2);
47  hframe__28->GetXaxis()->SetTitle("#it{p}_{T} [GeV]");
48  hframe__28->GetXaxis()->SetLabelFont(42);
49  hframe__28->GetXaxis()->SetLabelSize(0.05);
50  hframe__28->GetXaxis()->SetTitleSize(0.05);
51  hframe__28->GetXaxis()->SetTitleOffset(1.4);
52  hframe__28->GetXaxis()->SetTitleFont(42);
53  hframe__28->GetYaxis()->SetTitle("A_{N}");
54  hframe__28->GetYaxis()->SetLabelFont(42);
55  hframe__28->GetYaxis()->SetLabelSize(0.05);
56  hframe__28->GetYaxis()->SetTitleSize(0.05);
57  hframe__28->GetYaxis()->SetTitleOffset(1.4);
58  hframe__28->GetYaxis()->SetTitleFont(42);
59  hframe__28->GetZaxis()->SetLabelFont(42);
60  hframe__28->GetZaxis()->SetLabelSize(0.05);
61  hframe__28->GetZaxis()->SetTitleSize(0.05);
62  hframe__28->GetZaxis()->SetTitleOffset(1);
63  hframe__28->GetZaxis()->SetTitleFont(42);
64  hframe__28->Draw(" ");
65  TLine *line = new TLine(0,-0,5,0);
66  line->Draw();
67 
68  Double_t Graph0_fx37[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_fy37[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_fx37,Graph0_fy37);
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_Graph037 = new TH1F("Graph_Graph037","Graph",100,0.71,4.19);
144  Graph_Graph037->SetMinimum(-0.0009172203);
145  Graph_Graph037->SetMaximum(-0.0002893771);
146  Graph_Graph037->SetDirectory(0);
147  Graph_Graph037->SetStats(0);
148  Graph_Graph037->SetLineWidth(2);
149  Graph_Graph037->SetMarkerStyle(20);
150  Graph_Graph037->SetMarkerSize(1.2);
151  Graph_Graph037->GetXaxis()->SetLabelFont(42);
152  Graph_Graph037->GetXaxis()->SetLabelSize(0.05);
153  Graph_Graph037->GetXaxis()->SetTitleSize(0.05);
154  Graph_Graph037->GetXaxis()->SetTitleOffset(1.4);
155  Graph_Graph037->GetXaxis()->SetTitleFont(42);
156  Graph_Graph037->GetYaxis()->SetLabelFont(42);
157  Graph_Graph037->GetYaxis()->SetLabelSize(0.05);
158  Graph_Graph037->GetYaxis()->SetTitleSize(0.05);
159  Graph_Graph037->GetYaxis()->SetTitleOffset(1.4);
160  Graph_Graph037->GetYaxis()->SetTitleFont(42);
161  Graph_Graph037->GetZaxis()->SetLabelFont(42);
162  Graph_Graph037->GetZaxis()->SetLabelSize(0.05);
163  Graph_Graph037->GetZaxis()->SetTitleSize(0.05);
164  Graph_Graph037->GetZaxis()->SetTitleOffset(1);
165  Graph_Graph037->GetZaxis()->SetTitleFont(42);
166  graph->SetHistogram(Graph_Graph037);
167 
168  graph->Draw("l");
169 
170  Double_t Graph1_fx38[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_fy38[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_fx38,Graph1_fy38);
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_Graph138 = new TH1F("Graph_Graph138","Graph",100,0.71,4.19);
245  Graph_Graph138->SetMinimum(-0.0196607);
246  Graph_Graph138->SetMaximum(-0.009327811);
247  Graph_Graph138->SetDirectory(0);
248  Graph_Graph138->SetStats(0);
249  Graph_Graph138->SetLineWidth(2);
250  Graph_Graph138->SetMarkerStyle(20);
251  Graph_Graph138->SetMarkerSize(1.2);
252  Graph_Graph138->GetXaxis()->SetLabelFont(42);
253  Graph_Graph138->GetXaxis()->SetLabelSize(0.05);
254  Graph_Graph138->GetXaxis()->SetTitleSize(0.05);
255  Graph_Graph138->GetXaxis()->SetTitleOffset(1.4);
256  Graph_Graph138->GetXaxis()->SetTitleFont(42);
257  Graph_Graph138->GetYaxis()->SetLabelFont(42);
258  Graph_Graph138->GetYaxis()->SetLabelSize(0.05);
259  Graph_Graph138->GetYaxis()->SetTitleSize(0.05);
260  Graph_Graph138->GetYaxis()->SetTitleOffset(1.4);
261  Graph_Graph138->GetYaxis()->SetTitleFont(42);
262  Graph_Graph138->GetZaxis()->SetLabelFont(42);
263  Graph_Graph138->GetZaxis()->SetLabelSize(0.05);
264  Graph_Graph138->GetZaxis()->SetTitleSize(0.05);
265  Graph_Graph138->GetZaxis()->SetTitleOffset(1);
266  Graph_Graph138->GetZaxis()->SetTitleFont(42);
267  graph->SetHistogram(Graph_Graph138);
268 
269  graph->Draw("l");
270 
271  Double_t Graph2_fx1023[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_fy1023[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_fex1023[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_fey1023[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_fx1023,Graph2_fy1023,Graph2_fex1023,Graph2_fey1023);
316  gre->SetName("Graph2");
317  gre->SetTitle("Graph");
318  gre->SetFillStyle(1000);
319 
320  ci = TColor::GetColor("#999999");
321  gre->SetLineColor(ci);
322  gre->SetLineWidth(4);
323 
324  ci = TColor::GetColor("#999999");
325  gre->SetMarkerColor(ci);
326  gre->SetMarkerStyle(24);
327  gre->SetMarkerSize(2);
328 
329  TH1F *Graph_Graph21023 = new TH1F("Graph_Graph21023","Graph",100,0,10.4);
330  Graph_Graph21023->SetMinimum(-0.0905336);
331  Graph_Graph21023->SetMaximum(0.0905336);
332  Graph_Graph21023->SetDirectory(0);
333  Graph_Graph21023->SetStats(0);
334  Graph_Graph21023->SetLineWidth(2);
335  Graph_Graph21023->SetMarkerStyle(20);
336  Graph_Graph21023->SetMarkerSize(1.2);
337  Graph_Graph21023->GetXaxis()->SetLabelFont(42);
338  Graph_Graph21023->GetXaxis()->SetLabelSize(0.05);
339  Graph_Graph21023->GetXaxis()->SetTitleSize(0.05);
340  Graph_Graph21023->GetXaxis()->SetTitleOffset(1.4);
341  Graph_Graph21023->GetXaxis()->SetTitleFont(42);
342  Graph_Graph21023->GetYaxis()->SetLabelFont(42);
343  Graph_Graph21023->GetYaxis()->SetLabelSize(0.05);
344  Graph_Graph21023->GetYaxis()->SetTitleSize(0.05);
345  Graph_Graph21023->GetYaxis()->SetTitleOffset(1.4);
346  Graph_Graph21023->GetYaxis()->SetTitleFont(42);
347  Graph_Graph21023->GetZaxis()->SetLabelFont(42);
348  Graph_Graph21023->GetZaxis()->SetLabelSize(0.05);
349  Graph_Graph21023->GetZaxis()->SetTitleSize(0.05);
350  Graph_Graph21023->GetZaxis()->SetTitleOffset(1);
351  Graph_Graph21023->GetZaxis()->SetTitleFont(42);
352  gre->SetHistogram(Graph_Graph21023);
353 
354  gre->Draw("p");
355 
356  Double_t Graph3_fx1024[20] = {
357  0.25,
358  0.75,
359  1.25,
360  1.75,
361  2.25,
362  2.75,
363  3.25,
364  3.75,
365  4.25,
366  4.75,
367  5.25,
368  5.75,
369  6.25,
370  6.75,
371  7.25,
372  7.75,
373  8.25,
374  8.75,
375  9.25,
376  9.75};
377  Double_t Graph3_fy1024[20] = {
378  0,
379  0,
380  0,
381  0,
382  0,
383  0,
384  0,
385  0,
386  0,
387  0,
388  0,
389  0,
390  0,
391  0,
392  0,
393  0,
394  0,
395  0,
396  0,
397  0};
398  Double_t Graph3_fex1024[20] = {
399  0,
400  0,
401  0,
402  0,
403  0,
404  0,
405  0,
406  0,
407  0,
408  0,
409  0,
410  0,
411  0,
412  0,
413  0,
414  0,
415  0,
416  0,
417  0,
418  0};
419  Double_t Graph3_fey1024[20] = {
420  0.002623881,
421  0.001700133,
422  0.001163185,
423  0.001078443,
424  0.001152524,
425  0.001346386,
426  0.001484601,
427  0.001886026,
428  0.00245292,
429  0.003257298,
430  0.00413699,
431  0.005338863,
432  0.006897833,
433  0.008876149,
434  0.009849684,
435  0.01270509,
436  0.01626371,
437  0.02063689,
438  0.025931,
439  0.03235142};
440  gre = new TGraphErrors(20,Graph3_fx1024,Graph3_fy1024,Graph3_fex1024,Graph3_fey1024);
441  gre->SetName("Graph3");
442  gre->SetTitle("Graph");
443  gre->SetFillStyle(1000);
444 
445  ci = TColor::GetColor("#000000");
446  gre->SetLineColor(ci);
447  gre->SetLineWidth(4);
448 
449  ci = TColor::GetColor("#000000");
450  gre->SetMarkerColor(ci);
451  gre->SetMarkerStyle(20);
452  gre->SetMarkerSize(2);
453 
454  TH1F *Graph_Graph31024 = new TH1F("Graph_Graph31024","Graph",100,0,10.7);
455  Graph_Graph31024->SetMinimum(-0.0388217);
456  Graph_Graph31024->SetMaximum(0.0388217);
457  Graph_Graph31024->SetDirectory(0);
458  Graph_Graph31024->SetStats(0);
459  Graph_Graph31024->SetLineWidth(2);
460  Graph_Graph31024->SetMarkerStyle(20);
461  Graph_Graph31024->SetMarkerSize(1.2);
462  Graph_Graph31024->GetXaxis()->SetLabelFont(42);
463  Graph_Graph31024->GetXaxis()->SetLabelSize(0.05);
464  Graph_Graph31024->GetXaxis()->SetTitleSize(0.05);
465  Graph_Graph31024->GetXaxis()->SetTitleOffset(1.4);
466  Graph_Graph31024->GetXaxis()->SetTitleFont(42);
467  Graph_Graph31024->GetYaxis()->SetLabelFont(42);
468  Graph_Graph31024->GetYaxis()->SetLabelSize(0.05);
469  Graph_Graph31024->GetYaxis()->SetTitleSize(0.05);
470  Graph_Graph31024->GetYaxis()->SetTitleOffset(1.4);
471  Graph_Graph31024->GetYaxis()->SetTitleFont(42);
472  Graph_Graph31024->GetZaxis()->SetLabelFont(42);
473  Graph_Graph31024->GetZaxis()->SetLabelSize(0.05);
474  Graph_Graph31024->GetZaxis()->SetTitleSize(0.05);
475  Graph_Graph31024->GetZaxis()->SetTitleOffset(1);
476  Graph_Graph31024->GetZaxis()->SetTitleFont(42);
477  gre->SetHistogram(Graph_Graph31024);
478 
479  gre->Draw("p");
480 
481  TLegend *leg = new TLegend(0,0.8,0.83,0.95,NULL,"brNDC");
482  leg->SetBorderSize(0);
483  leg->SetLineColor(1);
484  leg->SetLineStyle(1);
485  leg->SetLineWidth(1);
486  leg->SetFillColor(0);
487  leg->SetFillStyle(0);
488  TLegendEntry *entry=leg->AddEntry("NULL","#it{#bf{sPHENIX}} Projection, #it{p}^{#uparrow}+#it{p}#rightarrowD^{0}/#bar{D}^{0}+X, P=0.57","");
489  entry->SetLineColor(1);
490  entry->SetLineStyle(1);
491  entry->SetLineWidth(1);
492  entry->SetMarkerColor(1);
493  entry->SetMarkerStyle(21);
494  entry->SetMarkerSize(1);
495  entry->SetTextFont(42);
496  leg->Draw();
497 
498  leg = new TLegend(0.2,0.58,0.85,0.83,NULL,"brNDC");
499  leg->SetBorderSize(0);
500  leg->SetLineColor(1);
501  leg->SetLineStyle(1);
502  leg->SetLineWidth(1);
503  leg->SetFillColor(0);
504  leg->SetFillStyle(0);
505  entry=leg->AddEntry("Graph","6.2 pb^{-1} str. #it{p}+#it{p}, Years 1-3","pl");
506 
507  ci = TColor::GetColor("#999999");
508  entry->SetLineColor(ci);
509  entry->SetLineStyle(1);
510  entry->SetLineWidth(4);
511 
512  ci = TColor::GetColor("#999999");
513  entry->SetMarkerColor(ci);
514  entry->SetMarkerStyle(24);
515  entry->SetMarkerSize(2);
516  entry->SetTextFont(42);
517  entry=leg->AddEntry("Graph","86 pb^{-1} str. #it{p}+#it{p}, Years 1-5","lp");
518 
519  ci = TColor::GetColor("#000000");
520  entry->SetLineColor(ci);
521  entry->SetLineStyle(1);
522  entry->SetLineWidth(4);
523 
524  ci = TColor::GetColor("#000000");
525  entry->SetMarkerColor(ci);
526  entry->SetMarkerStyle(20);
527  entry->SetMarkerSize(2);
528  entry->SetTextFont(42);
529  entry=leg->AddEntry("Graph0","Kang, PRD#bf{78}, #lambda_{f} = #lambda_{d} = 0","l");
530 
531  ci = TColor::GetColor("#006666");
532  entry->SetLineColor(ci);
533  entry->SetLineStyle(1);
534  entry->SetLineWidth(5);
535  entry->SetMarkerColor(1);
536  entry->SetMarkerStyle(21);
537  entry->SetMarkerSize(1);
538  entry->SetTextFont(42);
539  entry=leg->AddEntry("Graph1","Kang, PRD#bf{78}, #lambda_{f} = -#lambda_{d} = 70 MeV","l");
540 
541  ci = TColor::GetColor("#000099");
542  entry->SetLineColor(ci);
543  entry->SetLineStyle(2);
544  entry->SetLineWidth(5);
545  entry->SetMarkerColor(1);
546  entry->SetMarkerStyle(21);
547  entry->SetMarkerSize(1);
548  entry->SetTextFont(42);
549  leg->Draw();
550  D0_BUP2020_AN_5yr_comparison_1->Modified();
551  D0_BUP2020_AN_5yr_comparison->cd();
552  D0_BUP2020_AN_5yr_comparison->Modified();
553  D0_BUP2020_AN_5yr_comparison->cd();
554  D0_BUP2020_AN_5yr_comparison->SetSelected(D0_BUP2020_AN_5yr_comparison);
555 }