Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
D0_BUP2020_AuAu_v2_3yr.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file D0_BUP2020_AuAu_v2_3yr.C
2 {
3 //=========Macro generated from canvas: D0_BUP2020_AuAu_v2_3yr/D0_BUP2020_AuAu_v2_3yr
4 //========= (Wed May 12 23:46:26 2021) by ROOT version 6.22/02
5  TCanvas *D0_BUP2020_AuAu_v2_3yr = new TCanvas("D0_BUP2020_AuAu_v2_3yr", "D0_BUP2020_AuAu_v2_3yr",0,0,1100,800);
6  gStyle->SetOptFit(1);
7  gStyle->SetOptStat(0);
8  gStyle->SetOptTitle(0);
9  D0_BUP2020_AuAu_v2_3yr->SetHighLightColor(2);
10  D0_BUP2020_AuAu_v2_3yr->Range(0,0,1,1);
11  D0_BUP2020_AuAu_v2_3yr->SetFillColor(0);
12  D0_BUP2020_AuAu_v2_3yr->SetBorderMode(0);
13  D0_BUP2020_AuAu_v2_3yr->SetBorderSize(2);
14  D0_BUP2020_AuAu_v2_3yr->SetTickx(1);
15  D0_BUP2020_AuAu_v2_3yr->SetTicky(1);
16  D0_BUP2020_AuAu_v2_3yr->SetLeftMargin(0.16);
17  D0_BUP2020_AuAu_v2_3yr->SetRightMargin(0.05);
18  D0_BUP2020_AuAu_v2_3yr->SetTopMargin(0.05);
19  D0_BUP2020_AuAu_v2_3yr->SetBottomMargin(0.16);
20  D0_BUP2020_AuAu_v2_3yr->SetFrameBorderMode(0);
21 
22 // ------------>Primitives in pad: D0_BUP2020_AuAu_v2_3yr_1
23  TPad *D0_BUP2020_AuAu_v2_3yr_1 = new TPad("D0_BUP2020_AuAu_v2_3yr_1", "D0_BUP2020_AuAu_v2_3yr_1",0.01,0.01,0.99,0.99);
24  D0_BUP2020_AuAu_v2_3yr_1->Draw();
25  D0_BUP2020_AuAu_v2_3yr_1->cd();
26  D0_BUP2020_AuAu_v2_3yr_1->Range(-2.227848,-0.1708861,11.6962,0.2721519);
27  D0_BUP2020_AuAu_v2_3yr_1->SetFillColor(0);
28  D0_BUP2020_AuAu_v2_3yr_1->SetBorderMode(0);
29  D0_BUP2020_AuAu_v2_3yr_1->SetBorderSize(2);
30  D0_BUP2020_AuAu_v2_3yr_1->SetTickx(1);
31  D0_BUP2020_AuAu_v2_3yr_1->SetTicky(1);
32  D0_BUP2020_AuAu_v2_3yr_1->SetLeftMargin(0.16);
33  D0_BUP2020_AuAu_v2_3yr_1->SetRightMargin(0.05);
34  D0_BUP2020_AuAu_v2_3yr_1->SetTopMargin(0.05);
35  D0_BUP2020_AuAu_v2_3yr_1->SetBottomMargin(0.16);
36  D0_BUP2020_AuAu_v2_3yr_1->SetFrameBorderMode(0);
37  D0_BUP2020_AuAu_v2_3yr_1->SetFrameBorderMode(0);
38 
39  TH1F *hframe__22 = new TH1F("hframe__22","",1000,0,11);
40  hframe__22->SetMinimum(-0.1);
41  hframe__22->SetMaximum(0.25);
42  hframe__22->SetDirectory(0);
43  hframe__22->SetStats(0);
44  hframe__22->SetLineWidth(2);
45  hframe__22->SetMarkerStyle(20);
46  hframe__22->SetMarkerSize(1.2);
47  hframe__22->GetXaxis()->SetTitle("#it{p}_{T} [GeV]");
48  hframe__22->GetXaxis()->SetLabelFont(42);
49  hframe__22->GetXaxis()->SetLabelSize(0.05);
50  hframe__22->GetXaxis()->SetTitleSize(0.05);
51  hframe__22->GetXaxis()->SetTitleOffset(1.4);
52  hframe__22->GetXaxis()->SetTitleFont(42);
53  hframe__22->GetYaxis()->SetTitle("v_{2}");
54  hframe__22->GetYaxis()->SetLabelFont(42);
55  hframe__22->GetYaxis()->SetLabelSize(0.05);
56  hframe__22->GetYaxis()->SetTitleSize(0.05);
57  hframe__22->GetYaxis()->SetTitleOffset(1.4);
58  hframe__22->GetYaxis()->SetTitleFont(42);
59  hframe__22->GetZaxis()->SetLabelFont(42);
60  hframe__22->GetZaxis()->SetLabelSize(0.05);
61  hframe__22->GetZaxis()->SetTitleSize(0.05);
62  hframe__22->GetZaxis()->SetTitleOffset(1);
63  hframe__22->GetZaxis()->SetTitleFont(42);
64  hframe__22->Draw(" ");
65  TLine *line = new TLine(0,-0,11,0);
66  line->Draw();
67 
68  Double_t v2_B_fx29[20] = {
69  0.4200009,
70  1.246444,
71  2.039168,
72  2.791197,
73  3.50468,
74  4.185221,
75  4.838745,
76  5.470381,
77  6.084274,
78  6.683685,
79  7.271172,
80  7.848745,
81  8.418,
82  8.980208,
83  9.5364,
84  10.08741,
85  10.63394,
86  11.17655,
87  11.71573,
88  12.25187};
89  Double_t v2_B_fy29[20] = {
90  0.003230484,
91  0.02045627,
92  0.05875515,
93  0.1035772,
94  0.1351997,
95  0.1468273,
96  0.1426436,
97  0.1296975,
98  0.1135213,
99  0.09734482,
100  0.08267526,
101  0.07001466,
102  0.05936532,
103  0.05052002,
104  0.04320955,
105  0.03716986,
106  0.03216805,
107  0.02800891,
108  0.02453305,
109  0.0216121};
110  TGraph *graph = new TGraph(20,v2_B_fx29,v2_B_fy29);
111  graph->SetName("v2_B");
112  graph->SetTitle("Graph");
113 
114  Int_t ci; // for color index setting
115  TColor *color; // for color definition with alpha
116  ci = TColor::GetColor("#3333ff");
117  graph->SetLineColor(ci);
118  graph->SetLineWidth(2);
119  graph->SetMarkerStyle(20);
120  graph->SetMarkerSize(1.2);
121 
122  TH1F *Graph_v2_B29 = new TH1F("Graph_v2_B29","Graph",100,0,13.43505);
123  Graph_v2_B29->SetMinimum(0);
124  Graph_v2_B29->SetMaximum(0.1611869);
125  Graph_v2_B29->SetDirectory(0);
126  Graph_v2_B29->SetLineWidth(2);
127  Graph_v2_B29->SetMarkerStyle(20);
128  Graph_v2_B29->SetMarkerSize(1.2);
129  Graph_v2_B29->GetXaxis()->SetLabelFont(42);
130  Graph_v2_B29->GetXaxis()->SetLabelSize(0.05);
131  Graph_v2_B29->GetXaxis()->SetTitleSize(0.05);
132  Graph_v2_B29->GetXaxis()->SetTitleOffset(1.4);
133  Graph_v2_B29->GetXaxis()->SetTitleFont(42);
134  Graph_v2_B29->GetYaxis()->SetLabelFont(42);
135  Graph_v2_B29->GetYaxis()->SetLabelSize(0.05);
136  Graph_v2_B29->GetYaxis()->SetTitleSize(0.05);
137  Graph_v2_B29->GetYaxis()->SetTitleOffset(1.4);
138  Graph_v2_B29->GetYaxis()->SetTitleFont(42);
139  Graph_v2_B29->GetZaxis()->SetLabelFont(42);
140  Graph_v2_B29->GetZaxis()->SetLabelSize(0.05);
141  Graph_v2_B29->GetZaxis()->SetTitleSize(0.05);
142  Graph_v2_B29->GetZaxis()->SetTitleOffset(1);
143  Graph_v2_B29->GetZaxis()->SetTitleFont(42);
144  graph->SetHistogram(Graph_v2_B29);
145 
146  graph->Draw("");
147 
148  Double_t v2_D_fx30[20] = {
149  0.25,
150  0.75,
151  1.25,
152  1.75,
153  2.25,
154  2.75,
155  3.25,
156  3.75,
157  4.25,
158  4.75,
159  5.25,
160  5.75,
161  6.25,
162  6.75,
163  7.25,
164  7.75,
165  8.25,
166  8.75,
167  9.25,
168  9.75};
169  Double_t v2_D_fy30[20] = {
170  0.003230484,
171  0.02045627,
172  0.05875515,
173  0.1035772,
174  0.1351997,
175  0.1468273,
176  0.1426436,
177  0.1296975,
178  0.1135213,
179  0.09734482,
180  0.08267526,
181  0.07001466,
182  0.05936532,
183  0.05052002,
184  0.04320955,
185  0.03716986,
186  0.03216805,
187  0.02800891,
188  0.02453305,
189  0.0216121};
190  graph = new TGraph(20,v2_D_fx30,v2_D_fy30);
191  graph->SetName("v2_D");
192  graph->SetTitle("Graph");
193 
194  ci = TColor::GetColor("#000000");
195  graph->SetLineColor(ci);
196  graph->SetLineStyle(2);
197  graph->SetLineWidth(2);
198  graph->SetMarkerStyle(20);
199  graph->SetMarkerSize(1.2);
200 
201  TH1F *Graph_v2_D30 = new TH1F("Graph_v2_D30","Graph",100,0,10.7);
202  Graph_v2_D30->SetMinimum(0);
203  Graph_v2_D30->SetMaximum(0.1611869);
204  Graph_v2_D30->SetDirectory(0);
205  Graph_v2_D30->SetLineWidth(2);
206  Graph_v2_D30->SetMarkerStyle(20);
207  Graph_v2_D30->SetMarkerSize(1.2);
208  Graph_v2_D30->GetXaxis()->SetLabelFont(42);
209  Graph_v2_D30->GetXaxis()->SetLabelSize(0.05);
210  Graph_v2_D30->GetXaxis()->SetTitleSize(0.05);
211  Graph_v2_D30->GetXaxis()->SetTitleOffset(1.4);
212  Graph_v2_D30->GetXaxis()->SetTitleFont(42);
213  Graph_v2_D30->GetYaxis()->SetLabelFont(42);
214  Graph_v2_D30->GetYaxis()->SetLabelSize(0.05);
215  Graph_v2_D30->GetYaxis()->SetTitleSize(0.05);
216  Graph_v2_D30->GetYaxis()->SetTitleOffset(1.4);
217  Graph_v2_D30->GetYaxis()->SetTitleFont(42);
218  Graph_v2_D30->GetZaxis()->SetLabelFont(42);
219  Graph_v2_D30->GetZaxis()->SetLabelSize(0.05);
220  Graph_v2_D30->GetZaxis()->SetTitleSize(0.05);
221  Graph_v2_D30->GetZaxis()->SetTitleOffset(1);
222  Graph_v2_D30->GetZaxis()->SetTitleFont(42);
223  graph->SetHistogram(Graph_v2_D30);
224 
225  graph->Draw("");
226 
227  Double_t Graph0_fx1011[20] = {
228  0.25,
229  0.75,
230  1.25,
231  1.75,
232  2.25,
233  2.75,
234  3.25,
235  3.75,
236  4.25,
237  4.75,
238  5.25,
239  5.75,
240  6.25,
241  6.75,
242  7.25,
243  7.75,
244  8.25,
245  8.75,
246  9.25,
247  9.75};
248  Double_t Graph0_fy1011[20] = {
249  0.025,
250  0.025,
251  0.025,
252  0.025,
253  0.025,
254  0.025,
255  0.025,
256  0.025,
257  0.025,
258  0.025,
259  0.025,
260  0.025,
261  0.025,
262  0.025,
263  0.025,
264  0.025,
265  0.025,
266  0.025,
267  0.025,
268  0.025};
269  Double_t Graph0_fex1011[20] = {
270  0,
271  0,
272  0,
273  0,
274  0,
275  0,
276  0,
277  0,
278  0,
279  0,
280  0,
281  0,
282  0,
283  0,
284  0,
285  0,
286  0,
287  0,
288  0,
289  0};
290  Double_t Graph0_fey1011[20] = {
291  0.002133623,
292  0.001356161,
293  0.0008824884,
294  0.000720938,
295  0.0007165389,
296  0.0008040748,
297  0.001092407,
298  0.001410594,
299  0.001853328,
300  0.002409361,
301  0.003082667,
302  0.004021513,
303  0.005262816,
304  0.006880724,
305  0.008858975,
306  0.01154967,
307  0.01498844,
308  0.01921445,
309  0.02463416,
310  0.03110009};
311  TGraphErrors *gre = new TGraphErrors(20,Graph0_fx1011,Graph0_fy1011,Graph0_fex1011,Graph0_fey1011);
312  gre->SetName("Graph0");
313  gre->SetTitle("Graph");
314  gre->SetFillStyle(1000);
315 
316  ci = TColor::GetColor("#000000");
317  gre->SetLineColor(ci);
318  gre->SetLineWidth(4);
319 
320  ci = TColor::GetColor("#000000");
321  gre->SetMarkerColor(ci);
322  gre->SetMarkerStyle(20);
323  gre->SetMarkerSize(2);
324 
325  TH1F *Graph_Graph01011 = new TH1F("Graph_Graph01011","Graph",100,0,10.7);
326  Graph_Graph01011->SetMinimum(-0.0123201);
327  Graph_Graph01011->SetMaximum(0.0623201);
328  Graph_Graph01011->SetDirectory(0);
329  Graph_Graph01011->SetStats(0);
330  Graph_Graph01011->SetLineWidth(2);
331  Graph_Graph01011->SetMarkerStyle(20);
332  Graph_Graph01011->SetMarkerSize(1.2);
333  Graph_Graph01011->GetXaxis()->SetLabelFont(42);
334  Graph_Graph01011->GetXaxis()->SetLabelSize(0.05);
335  Graph_Graph01011->GetXaxis()->SetTitleSize(0.05);
336  Graph_Graph01011->GetXaxis()->SetTitleOffset(1.4);
337  Graph_Graph01011->GetXaxis()->SetTitleFont(42);
338  Graph_Graph01011->GetYaxis()->SetLabelFont(42);
339  Graph_Graph01011->GetYaxis()->SetLabelSize(0.05);
340  Graph_Graph01011->GetYaxis()->SetTitleSize(0.05);
341  Graph_Graph01011->GetYaxis()->SetTitleOffset(1.4);
342  Graph_Graph01011->GetYaxis()->SetTitleFont(42);
343  Graph_Graph01011->GetZaxis()->SetLabelFont(42);
344  Graph_Graph01011->GetZaxis()->SetLabelSize(0.05);
345  Graph_Graph01011->GetZaxis()->SetTitleSize(0.05);
346  Graph_Graph01011->GetZaxis()->SetTitleOffset(1);
347  Graph_Graph01011->GetZaxis()->SetTitleFont(42);
348  gre->SetHistogram(Graph_Graph01011);
349 
350  gre->Draw("p");
351 
352  Double_t Graph1_fx1012[8] = {
353  2.5,
354  3.5,
355  4.5,
356  5.5,
357  6.5,
358  7.5,
359  8.5,
360  9.5};
361  Double_t Graph1_fy1012[8] = {
362  0,
363  0,
364  0,
365  0,
366  0,
367  0,
368  0,
369  0};
370  Double_t Graph1_fex1012[8] = {
371  0,
372  0,
373  0,
374  0,
375  0,
376  0,
377  0,
378  0};
379  Double_t Graph1_fey1012[8] = {
380  0.02921846,
381  0.01773862,
382  0.01631992,
383  0.01913001,
384  0.02379811,
385  0.03436945,
386  0.04452312,
387  0.06111874};
388  gre = new TGraphErrors(8,Graph1_fx1012,Graph1_fy1012,Graph1_fex1012,Graph1_fey1012);
389  gre->SetName("Graph1");
390  gre->SetTitle("Graph");
391  gre->SetFillStyle(1000);
392 
393  ci = TColor::GetColor("#0000cc");
394  gre->SetLineColor(ci);
395  gre->SetLineWidth(4);
396 
397  ci = TColor::GetColor("#0000cc");
398  gre->SetMarkerColor(ci);
399  gre->SetMarkerStyle(21);
400  gre->SetMarkerSize(2);
401 
402  TH1F *Graph_Graph11012 = new TH1F("Graph_Graph11012","Graph",100,1.8,10.2);
403  Graph_Graph11012->SetMinimum(-0.07334249);
404  Graph_Graph11012->SetMaximum(0.07334249);
405  Graph_Graph11012->SetDirectory(0);
406  Graph_Graph11012->SetStats(0);
407  Graph_Graph11012->SetLineWidth(2);
408  Graph_Graph11012->SetMarkerStyle(20);
409  Graph_Graph11012->SetMarkerSize(1.2);
410  Graph_Graph11012->GetXaxis()->SetLabelFont(42);
411  Graph_Graph11012->GetXaxis()->SetLabelSize(0.05);
412  Graph_Graph11012->GetXaxis()->SetTitleSize(0.05);
413  Graph_Graph11012->GetXaxis()->SetTitleOffset(1.4);
414  Graph_Graph11012->GetXaxis()->SetTitleFont(42);
415  Graph_Graph11012->GetYaxis()->SetLabelFont(42);
416  Graph_Graph11012->GetYaxis()->SetLabelSize(0.05);
417  Graph_Graph11012->GetYaxis()->SetTitleSize(0.05);
418  Graph_Graph11012->GetYaxis()->SetTitleOffset(1.4);
419  Graph_Graph11012->GetYaxis()->SetTitleFont(42);
420  Graph_Graph11012->GetZaxis()->SetLabelFont(42);
421  Graph_Graph11012->GetZaxis()->SetLabelSize(0.05);
422  Graph_Graph11012->GetZaxis()->SetTitleSize(0.05);
423  Graph_Graph11012->GetZaxis()->SetTitleOffset(1);
424  Graph_Graph11012->GetZaxis()->SetTitleFont(42);
425  gre->SetHistogram(Graph_Graph11012);
426 
427  gre->Draw("p");
428 
429  TLegend *leg = new TLegend(0,0.78,0.85,0.9,NULL,"brNDC");
430  leg->SetBorderSize(0);
431  leg->SetLineColor(1);
432  leg->SetLineStyle(1);
433  leg->SetLineWidth(1);
434  leg->SetFillColor(0);
435  leg->SetFillStyle(0);
436  TLegendEntry *entry=leg->AddEntry("NULL","#it{#bf{sPHENIX}} Projection, 0-80% Au+Au, Years 1-3","");
437  entry->SetLineColor(1);
438  entry->SetLineStyle(1);
439  entry->SetLineWidth(1);
440  entry->SetMarkerColor(1);
441  entry->SetMarkerStyle(21);
442  entry->SetMarkerSize(1);
443  entry->SetTextFont(42);
444  entry=leg->AddEntry("NULL","21 nb^{-1} rec. Au+Au, Res(#Psi_{2})=0.5","");
445  entry->SetLineColor(1);
446  entry->SetLineStyle(1);
447  entry->SetLineWidth(1);
448  entry->SetMarkerColor(1);
449  entry->SetMarkerStyle(21);
450  entry->SetMarkerSize(1);
451  entry->SetTextFont(42);
452  leg->Draw();
453 
454  leg = new TLegend(0.65,0.6,0.9,0.77,NULL,"brNDC");
455  leg->SetBorderSize(0);
456  leg->SetLineColor(1);
457  leg->SetLineStyle(1);
458  leg->SetLineWidth(1);
459  leg->SetFillColor(0);
460  leg->SetFillStyle(0);
461  entry=leg->AddEntry("Graph","#it{B}#rightarrow#it{D}^{0}","lp");
462 
463  ci = TColor::GetColor("#0000cc");
464  entry->SetLineColor(ci);
465  entry->SetLineStyle(1);
466  entry->SetLineWidth(4);
467 
468  ci = TColor::GetColor("#0000cc");
469  entry->SetMarkerColor(ci);
470  entry->SetMarkerStyle(21);
471  entry->SetMarkerSize(2);
472  entry->SetTextFont(42);
473  entry=leg->AddEntry("Graph","Prompt #it{D}^{0}","lp");
474 
475  ci = TColor::GetColor("#000000");
476  entry->SetLineColor(ci);
477  entry->SetLineStyle(1);
478  entry->SetLineWidth(4);
479 
480  ci = TColor::GetColor("#000000");
481  entry->SetMarkerColor(ci);
482  entry->SetMarkerStyle(20);
483  entry->SetMarkerSize(2);
484  entry->SetTextFont(42);
485  leg->Draw();
486 
487  leg = new TLegend(0.2,0.2,0.7,0.3,NULL,"brNDC");
488  leg->SetBorderSize(0);
489  leg->SetLineColor(1);
490  leg->SetLineStyle(1);
491  leg->SetLineWidth(1);
492  leg->SetFillColor(0);
493  leg->SetFillStyle(0);
494  entry=leg->AddEntry("v2_D","#it{D}-meson (fit to STAR PRL#bf{118})","l");
495 
496  ci = TColor::GetColor("#000000");
497  entry->SetLineColor(ci);
498  entry->SetLineStyle(2);
499  entry->SetLineWidth(2);
500  entry->SetMarkerColor(1);
501  entry->SetMarkerStyle(21);
502  entry->SetMarkerSize(1);
503  entry->SetTextFont(42);
504  entry=leg->AddEntry("v2_B","#it{B}-meson (m_{T} scaling)","l");
505 
506  ci = TColor::GetColor("#3333ff");
507  entry->SetLineColor(ci);
508  entry->SetLineStyle(1);
509  entry->SetLineWidth(2);
510  entry->SetMarkerColor(1);
511  entry->SetMarkerStyle(21);
512  entry->SetMarkerSize(1);
513  entry->SetTextFont(42);
514  leg->Draw();
515  D0_BUP2020_AuAu_v2_3yr_1->Modified();
516  D0_BUP2020_AuAu_v2_3yr->cd();
517  D0_BUP2020_AuAu_v2_3yr->Modified();
518  D0_BUP2020_AuAu_v2_3yr->cd();
519  D0_BUP2020_AuAu_v2_3yr->SetSelected(D0_BUP2020_AuAu_v2_3yr);
520 }