Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
D0_BUP2020_pAu_v2_3yr.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file D0_BUP2020_pAu_v2_3yr.C
2 {
3 //=========Macro generated from canvas: D0_BUP2020_pAu_v2_3yr/D0_BUP2020_pAu_v2_3yr
4 //========= (Wed May 12 23:46:27 2021) by ROOT version 6.22/02
5  TCanvas *D0_BUP2020_pAu_v2_3yr = new TCanvas("D0_BUP2020_pAu_v2_3yr", "D0_BUP2020_pAu_v2_3yr",0,0,1100,800);
6  gStyle->SetOptFit(1);
7  gStyle->SetOptStat(0);
8  gStyle->SetOptTitle(0);
9  D0_BUP2020_pAu_v2_3yr->SetHighLightColor(2);
10  D0_BUP2020_pAu_v2_3yr->Range(0,0,1,1);
11  D0_BUP2020_pAu_v2_3yr->SetFillColor(0);
12  D0_BUP2020_pAu_v2_3yr->SetBorderMode(0);
13  D0_BUP2020_pAu_v2_3yr->SetBorderSize(2);
14  D0_BUP2020_pAu_v2_3yr->SetTickx(1);
15  D0_BUP2020_pAu_v2_3yr->SetTicky(1);
16  D0_BUP2020_pAu_v2_3yr->SetLeftMargin(0.16);
17  D0_BUP2020_pAu_v2_3yr->SetRightMargin(0.05);
18  D0_BUP2020_pAu_v2_3yr->SetTopMargin(0.05);
19  D0_BUP2020_pAu_v2_3yr->SetBottomMargin(0.16);
20  D0_BUP2020_pAu_v2_3yr->SetFrameBorderMode(0);
21 
22 // ------------>Primitives in pad: D0_BUP2020_pAu_v2_3yr_1
23  TPad *D0_BUP2020_pAu_v2_3yr_1 = new TPad("D0_BUP2020_pAu_v2_3yr_1", "D0_BUP2020_pAu_v2_3yr_1",0.01,0.01,0.99,0.99);
24  D0_BUP2020_pAu_v2_3yr_1->Draw();
25  D0_BUP2020_pAu_v2_3yr_1->cd();
26  D0_BUP2020_pAu_v2_3yr_1->Range(-1.620253,-0.2512658,8.506329,0.3816456);
27  D0_BUP2020_pAu_v2_3yr_1->SetFillColor(0);
28  D0_BUP2020_pAu_v2_3yr_1->SetBorderMode(0);
29  D0_BUP2020_pAu_v2_3yr_1->SetBorderSize(2);
30  D0_BUP2020_pAu_v2_3yr_1->SetTickx(1);
31  D0_BUP2020_pAu_v2_3yr_1->SetTicky(1);
32  D0_BUP2020_pAu_v2_3yr_1->SetLeftMargin(0.16);
33  D0_BUP2020_pAu_v2_3yr_1->SetRightMargin(0.05);
34  D0_BUP2020_pAu_v2_3yr_1->SetTopMargin(0.05);
35  D0_BUP2020_pAu_v2_3yr_1->SetBottomMargin(0.16);
36  D0_BUP2020_pAu_v2_3yr_1->SetFrameBorderMode(0);
37  D0_BUP2020_pAu_v2_3yr_1->SetFrameBorderMode(0);
38 
39  TH1F *hframe__26 = new TH1F("hframe__26","",1000,0,8);
40  hframe__26->SetMinimum(-0.15);
41  hframe__26->SetMaximum(0.35);
42  hframe__26->SetDirectory(0);
43  hframe__26->SetStats(0);
44  hframe__26->SetLineWidth(2);
45  hframe__26->SetMarkerStyle(20);
46  hframe__26->SetMarkerSize(1.2);
47  hframe__26->GetXaxis()->SetTitle("#it{p}_{T} [GeV]");
48  hframe__26->GetXaxis()->SetLabelFont(42);
49  hframe__26->GetXaxis()->SetLabelSize(0.05);
50  hframe__26->GetXaxis()->SetTitleSize(0.05);
51  hframe__26->GetXaxis()->SetTitleOffset(1.4);
52  hframe__26->GetXaxis()->SetTitleFont(42);
53  hframe__26->GetYaxis()->SetTitle("v_{2}");
54  hframe__26->GetYaxis()->SetLabelFont(42);
55  hframe__26->GetYaxis()->SetLabelSize(0.05);
56  hframe__26->GetYaxis()->SetTitleSize(0.05);
57  hframe__26->GetYaxis()->SetTitleOffset(1.4);
58  hframe__26->GetYaxis()->SetTitleFont(42);
59  hframe__26->GetZaxis()->SetLabelFont(42);
60  hframe__26->GetZaxis()->SetLabelSize(0.05);
61  hframe__26->GetZaxis()->SetTitleSize(0.05);
62  hframe__26->GetZaxis()->SetTitleOffset(1);
63  hframe__26->GetZaxis()->SetTitleFont(42);
64  hframe__26->Draw(" ");
65 
66  Double_t Graph0_fx1020[10] = {
67  0.7,
68  1.7,
69  2.7,
70  3.7,
71  4.7,
72  5.7,
73  6.7,
74  7.7,
75  8.7,
76  9.7};
77  Double_t Graph0_fy1020[10] = {
78  0,
79  0,
80  0,
81  0,
82  0,
83  0,
84  0,
85  0,
86  0,
87  0};
88  Double_t Graph0_fex1020[10] = {
89  0,
90  0,
91  0,
92  0,
93  0,
94  0,
95  0,
96  0,
97  0,
98  0};
99  Double_t Graph0_fey1020[10] = {
100  0.03555925,
101  0.01970952,
102  0.02182074,
103  0.02907315,
104  0.0488343,
105  0.08149913,
106  0.1357408,
107  0.1940048,
108  0.3183504,
109  0.5042655};
110  TGraphErrors *gre = new TGraphErrors(10,Graph0_fx1020,Graph0_fy1020,Graph0_fex1020,Graph0_fey1020);
111  gre->SetName("Graph0");
112  gre->SetTitle("Graph");
113  gre->SetFillStyle(1000);
114 
115  Int_t ci; // for color index setting
116  TColor *color; // for color definition with alpha
117  ci = TColor::GetColor("#000000");
118  gre->SetLineColor(ci);
119  gre->SetLineWidth(4);
120 
121  ci = TColor::GetColor("#000000");
122  gre->SetMarkerColor(ci);
123  gre->SetMarkerStyle(20);
124  gre->SetMarkerSize(2);
125 
126  TH1F *Graph_Graph01020 = new TH1F("Graph_Graph01020","Graph",100,0,10.6);
127  Graph_Graph01020->SetMinimum(-0.6051186);
128  Graph_Graph01020->SetMaximum(0.6051186);
129  Graph_Graph01020->SetDirectory(0);
130  Graph_Graph01020->SetStats(0);
131  Graph_Graph01020->SetLineWidth(2);
132  Graph_Graph01020->SetMarkerStyle(20);
133  Graph_Graph01020->SetMarkerSize(1.2);
134  Graph_Graph01020->GetXaxis()->SetLabelFont(42);
135  Graph_Graph01020->GetXaxis()->SetLabelSize(0.05);
136  Graph_Graph01020->GetXaxis()->SetTitleSize(0.05);
137  Graph_Graph01020->GetXaxis()->SetTitleOffset(1.4);
138  Graph_Graph01020->GetXaxis()->SetTitleFont(42);
139  Graph_Graph01020->GetYaxis()->SetLabelFont(42);
140  Graph_Graph01020->GetYaxis()->SetLabelSize(0.05);
141  Graph_Graph01020->GetYaxis()->SetTitleSize(0.05);
142  Graph_Graph01020->GetYaxis()->SetTitleOffset(1.4);
143  Graph_Graph01020->GetYaxis()->SetTitleFont(42);
144  Graph_Graph01020->GetZaxis()->SetLabelFont(42);
145  Graph_Graph01020->GetZaxis()->SetLabelSize(0.05);
146  Graph_Graph01020->GetZaxis()->SetTitleSize(0.05);
147  Graph_Graph01020->GetZaxis()->SetTitleOffset(1);
148  Graph_Graph01020->GetZaxis()->SetTitleFont(42);
149  gre->SetHistogram(Graph_Graph01020);
150 
151  gre->Draw("p");
152 
153  Double_t Graph1_fx1021[1] = {
154  4.8};
155  Double_t Graph1_fy1021[1] = {
156  0};
157  Double_t Graph1_fex1021[1] = {
158  0};
159  Double_t Graph1_fey1021[1] = {
160  0.251405};
161  gre = new TGraphErrors(1,Graph1_fx1021,Graph1_fy1021,Graph1_fex1021,Graph1_fey1021);
162  gre->SetName("Graph1");
163  gre->SetTitle("Graph");
164  gre->SetFillStyle(1000);
165 
166  ci = TColor::GetColor("#000099");
167  gre->SetLineColor(ci);
168  gre->SetLineWidth(4);
169 
170  ci = TColor::GetColor("#000099");
171  gre->SetMarkerColor(ci);
172  gre->SetMarkerStyle(21);
173  gre->SetMarkerSize(2);
174 
175  TH1F *Graph_Graph11021 = new TH1F("Graph_Graph11021","Graph",100,4.7,5.9);
176  Graph_Graph11021->SetMinimum(-0.301686);
177  Graph_Graph11021->SetMaximum(0.301686);
178  Graph_Graph11021->SetDirectory(0);
179  Graph_Graph11021->SetStats(0);
180  Graph_Graph11021->SetLineWidth(2);
181  Graph_Graph11021->SetMarkerStyle(20);
182  Graph_Graph11021->SetMarkerSize(1.2);
183  Graph_Graph11021->GetXaxis()->SetLabelFont(42);
184  Graph_Graph11021->GetXaxis()->SetLabelSize(0.05);
185  Graph_Graph11021->GetXaxis()->SetTitleSize(0.05);
186  Graph_Graph11021->GetXaxis()->SetTitleOffset(1.4);
187  Graph_Graph11021->GetXaxis()->SetTitleFont(42);
188  Graph_Graph11021->GetYaxis()->SetLabelFont(42);
189  Graph_Graph11021->GetYaxis()->SetLabelSize(0.05);
190  Graph_Graph11021->GetYaxis()->SetTitleSize(0.05);
191  Graph_Graph11021->GetYaxis()->SetTitleOffset(1.4);
192  Graph_Graph11021->GetYaxis()->SetTitleFont(42);
193  Graph_Graph11021->GetZaxis()->SetLabelFont(42);
194  Graph_Graph11021->GetZaxis()->SetLabelSize(0.05);
195  Graph_Graph11021->GetZaxis()->SetTitleSize(0.05);
196  Graph_Graph11021->GetZaxis()->SetTitleOffset(1);
197  Graph_Graph11021->GetZaxis()->SetTitleFont(42);
198  gre->SetHistogram(Graph_Graph11021);
199 
200  gre->Draw("p");
201 
202  Double_t v2_D_fx34[20] = {
203  0.25,
204  0.75,
205  1.25,
206  1.75,
207  2.25,
208  2.75,
209  3.25,
210  3.75,
211  4.25,
212  4.75,
213  5.25,
214  5.75,
215  6.25,
216  6.75,
217  7.25,
218  7.75,
219  8.25,
220  8.75,
221  9.25,
222  9.75};
223  Double_t v2_D_fy34[20] = {
224  0.003230484,
225  0.02045627,
226  0.05875515,
227  0.1035772,
228  0.1351997,
229  0.1468273,
230  0.1426436,
231  0.1296975,
232  0.1135213,
233  0.09734482,
234  0.08267526,
235  0.07001466,
236  0.05936532,
237  0.05052002,
238  0.04320955,
239  0.03716986,
240  0.03216805,
241  0.02800891,
242  0.02453305,
243  0.0216121};
244  TGraph *graph = new TGraph(20,v2_D_fx34,v2_D_fy34);
245  graph->SetName("v2_D");
246  graph->SetTitle("Graph");
247 
248  ci = TColor::GetColor("#000000");
249  graph->SetLineColor(ci);
250  graph->SetLineStyle(2);
251  graph->SetLineWidth(2);
252  graph->SetMarkerStyle(20);
253  graph->SetMarkerSize(1.2);
254 
255  TH1F *Graph_v2_D34 = new TH1F("Graph_v2_D34","Graph",100,0,10.7);
256  Graph_v2_D34->SetMinimum(0);
257  Graph_v2_D34->SetMaximum(0.1611869);
258  Graph_v2_D34->SetDirectory(0);
259  Graph_v2_D34->SetLineWidth(2);
260  Graph_v2_D34->SetMarkerStyle(20);
261  Graph_v2_D34->SetMarkerSize(1.2);
262  Graph_v2_D34->GetXaxis()->SetLabelFont(42);
263  Graph_v2_D34->GetXaxis()->SetLabelSize(0.05);
264  Graph_v2_D34->GetXaxis()->SetTitleSize(0.05);
265  Graph_v2_D34->GetXaxis()->SetTitleOffset(1.4);
266  Graph_v2_D34->GetXaxis()->SetTitleFont(42);
267  Graph_v2_D34->GetYaxis()->SetLabelFont(42);
268  Graph_v2_D34->GetYaxis()->SetLabelSize(0.05);
269  Graph_v2_D34->GetYaxis()->SetTitleSize(0.05);
270  Graph_v2_D34->GetYaxis()->SetTitleOffset(1.4);
271  Graph_v2_D34->GetYaxis()->SetTitleFont(42);
272  Graph_v2_D34->GetZaxis()->SetLabelFont(42);
273  Graph_v2_D34->GetZaxis()->SetLabelSize(0.05);
274  Graph_v2_D34->GetZaxis()->SetTitleSize(0.05);
275  Graph_v2_D34->GetZaxis()->SetTitleOffset(1);
276  Graph_v2_D34->GetZaxis()->SetTitleFont(42);
277  graph->SetHistogram(Graph_v2_D34);
278 
279  graph->Draw("");
280 
281  TLegend *leg = new TLegend(0.1,0.75,0.55,0.9,NULL,"brNDC");
282  leg->SetBorderSize(0);
283  leg->SetLineColor(1);
284  leg->SetLineStyle(1);
285  leg->SetLineWidth(1);
286  leg->SetFillColor(0);
287  leg->SetFillStyle(0);
288  TLegendEntry *entry=leg->AddEntry("NULL","#it{#bf{sPHENIX}} Projection, Years 1-3","");
289  entry->SetLineColor(1);
290  entry->SetLineStyle(1);
291  entry->SetLineWidth(1);
292  entry->SetMarkerColor(1);
293  entry->SetMarkerStyle(21);
294  entry->SetMarkerSize(1);
295  entry->SetTextFont(42);
296  entry=leg->AddEntry("NULL","M.B. p+Au, 10 nb^{-1} str.","");
297  entry->SetLineColor(1);
298  entry->SetLineStyle(1);
299  entry->SetLineWidth(1);
300  entry->SetMarkerColor(1);
301  entry->SetMarkerStyle(21);
302  entry->SetMarkerSize(1);
303  entry->SetTextFont(42);
304  leg->Draw();
305 
306  leg = new TLegend(0.65,0.65,0.9,0.8,NULL,"brNDC");
307  leg->SetBorderSize(0);
308  leg->SetLineColor(1);
309  leg->SetLineStyle(1);
310  leg->SetLineWidth(1);
311  leg->SetFillColor(0);
312  leg->SetFillStyle(0);
313  entry=leg->AddEntry("Graph","Prompt #it{D}^{0}","lp");
314 
315  ci = TColor::GetColor("#000000");
316  entry->SetLineColor(ci);
317  entry->SetLineStyle(1);
318  entry->SetLineWidth(4);
319 
320  ci = TColor::GetColor("#000000");
321  entry->SetMarkerColor(ci);
322  entry->SetMarkerStyle(20);
323  entry->SetMarkerSize(2);
324  entry->SetTextFont(42);
325  entry=leg->AddEntry("Graph","#it{B}#rightarrow#it{D}^{0}","lp");
326 
327  ci = TColor::GetColor("#000099");
328  entry->SetLineColor(ci);
329  entry->SetLineStyle(1);
330  entry->SetLineWidth(4);
331 
332  ci = TColor::GetColor("#000099");
333  entry->SetMarkerColor(ci);
334  entry->SetMarkerStyle(21);
335  entry->SetMarkerSize(2);
336  entry->SetTextFont(42);
337  leg->Draw();
338 
339  leg = new TLegend(0.2,0.2,0.7,0.3,NULL,"brNDC");
340  leg->SetBorderSize(0);
341  leg->SetLineColor(1);
342  leg->SetLineStyle(1);
343  leg->SetLineWidth(1);
344  leg->SetFillColor(0);
345  leg->SetFillStyle(0);
346  entry=leg->AddEntry("v2_D","#it{D}-meson (Au+Au)","l");
347 
348  ci = TColor::GetColor("#000000");
349  entry->SetLineColor(ci);
350  entry->SetLineStyle(2);
351  entry->SetLineWidth(2);
352  entry->SetMarkerColor(1);
353  entry->SetMarkerStyle(21);
354  entry->SetMarkerSize(1);
355  entry->SetTextFont(42);
356  leg->Draw();
357  D0_BUP2020_pAu_v2_3yr_1->Modified();
358  D0_BUP2020_pAu_v2_3yr->cd();
359  D0_BUP2020_pAu_v2_3yr->Modified();
360  D0_BUP2020_pAu_v2_3yr->cd();
361  D0_BUP2020_pAu_v2_3yr->SetSelected(D0_BUP2020_pAu_v2_3yr);
362 }