Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
D0_BUP2020_pAu_C0_5_v2_3yr.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file D0_BUP2020_pAu_C0_5_v2_3yr.C
2 {
3 //=========Macro generated from canvas: D0_BUP2020_pAu_C0_5_v2_3yr/D0_BUP2020_pAu_C0_5_v2_3yr
4 //========= (Wed May 12 23:46:27 2021) by ROOT version 6.22/02
5  TCanvas *D0_BUP2020_pAu_C0_5_v2_3yr = new TCanvas("D0_BUP2020_pAu_C0_5_v2_3yr", "D0_BUP2020_pAu_C0_5_v2_3yr",0,0,1100,800);
6  gStyle->SetOptFit(1);
7  gStyle->SetOptStat(0);
8  gStyle->SetOptTitle(0);
9  D0_BUP2020_pAu_C0_5_v2_3yr->SetHighLightColor(2);
10  D0_BUP2020_pAu_C0_5_v2_3yr->Range(0,0,1,1);
11  D0_BUP2020_pAu_C0_5_v2_3yr->SetFillColor(0);
12  D0_BUP2020_pAu_C0_5_v2_3yr->SetBorderMode(0);
13  D0_BUP2020_pAu_C0_5_v2_3yr->SetBorderSize(2);
14  D0_BUP2020_pAu_C0_5_v2_3yr->SetTickx(1);
15  D0_BUP2020_pAu_C0_5_v2_3yr->SetTicky(1);
16  D0_BUP2020_pAu_C0_5_v2_3yr->SetLeftMargin(0.16);
17  D0_BUP2020_pAu_C0_5_v2_3yr->SetRightMargin(0.05);
18  D0_BUP2020_pAu_C0_5_v2_3yr->SetTopMargin(0.05);
19  D0_BUP2020_pAu_C0_5_v2_3yr->SetBottomMargin(0.16);
20  D0_BUP2020_pAu_C0_5_v2_3yr->SetFrameBorderMode(0);
21 
22 // ------------>Primitives in pad: D0_BUP2020_pAu_C0_5_v2_3yr_1
23  TPad *D0_BUP2020_pAu_C0_5_v2_3yr_1 = new TPad("D0_BUP2020_pAu_C0_5_v2_3yr_1", "D0_BUP2020_pAu_C0_5_v2_3yr_1",0.01,0.01,0.99,0.99);
24  D0_BUP2020_pAu_C0_5_v2_3yr_1->Draw();
25  D0_BUP2020_pAu_C0_5_v2_3yr_1->cd();
26  D0_BUP2020_pAu_C0_5_v2_3yr_1->Range(-1.518987,-0.2613924,7.974684,0.4348101);
27  D0_BUP2020_pAu_C0_5_v2_3yr_1->SetFillColor(0);
28  D0_BUP2020_pAu_C0_5_v2_3yr_1->SetBorderMode(0);
29  D0_BUP2020_pAu_C0_5_v2_3yr_1->SetBorderSize(2);
30  D0_BUP2020_pAu_C0_5_v2_3yr_1->SetTickx(1);
31  D0_BUP2020_pAu_C0_5_v2_3yr_1->SetTicky(1);
32  D0_BUP2020_pAu_C0_5_v2_3yr_1->SetLeftMargin(0.16);
33  D0_BUP2020_pAu_C0_5_v2_3yr_1->SetRightMargin(0.05);
34  D0_BUP2020_pAu_C0_5_v2_3yr_1->SetTopMargin(0.05);
35  D0_BUP2020_pAu_C0_5_v2_3yr_1->SetBottomMargin(0.16);
36  D0_BUP2020_pAu_C0_5_v2_3yr_1->SetFrameBorderMode(0);
37  D0_BUP2020_pAu_C0_5_v2_3yr_1->SetFrameBorderMode(0);
38 
39  TH1F *hframe__25 = new TH1F("hframe__25","",1000,0,7.5);
40  hframe__25->SetMinimum(-0.15);
41  hframe__25->SetMaximum(0.4);
42  hframe__25->SetDirectory(0);
43  hframe__25->SetStats(0);
44  hframe__25->SetLineWidth(2);
45  hframe__25->SetMarkerStyle(20);
46  hframe__25->SetMarkerSize(1.2);
47  hframe__25->GetXaxis()->SetTitle("#it{p}_{T} [GeV]");
48  hframe__25->GetXaxis()->SetLabelFont(42);
49  hframe__25->GetXaxis()->SetLabelSize(0.05);
50  hframe__25->GetXaxis()->SetTitleSize(0.05);
51  hframe__25->GetXaxis()->SetTitleOffset(1.4);
52  hframe__25->GetXaxis()->SetTitleFont(42);
53  hframe__25->GetYaxis()->SetTitle("v_{2}");
54  hframe__25->GetYaxis()->SetLabelFont(42);
55  hframe__25->GetYaxis()->SetLabelSize(0.05);
56  hframe__25->GetYaxis()->SetTitleSize(0.05);
57  hframe__25->GetYaxis()->SetTitleOffset(1.4);
58  hframe__25->GetYaxis()->SetTitleFont(42);
59  hframe__25->GetZaxis()->SetLabelFont(42);
60  hframe__25->GetZaxis()->SetLabelSize(0.05);
61  hframe__25->GetZaxis()->SetTitleSize(0.05);
62  hframe__25->GetZaxis()->SetTitleOffset(1);
63  hframe__25->GetZaxis()->SetTitleFont(42);
64  hframe__25->Draw(" ");
65  TLine *line = new TLine(0,-0,7.5,0);
66  line->Draw();
67 
68  Double_t Graph0_fx1019[10] = {
69  0.7,
70  1.7,
71  2.7,
72  3.7,
73  4.7,
74  5.7,
75  6.7,
76  7.7,
77  8.7,
78  9.7};
79  Double_t Graph0_fy1019[10] = {
80  0,
81  0,
82  0,
83  0,
84  0,
85  0,
86  0,
87  0,
88  0,
89  0};
90  Double_t Graph0_fex1019[10] = {
91  0,
92  0,
93  0,
94  0,
95  0,
96  0,
97  0,
98  0,
99  0,
100  0};
101  Double_t Graph0_fey1019[10] = {
102  0.04950462,
103  0.02743905,
104  0.03037824,
105  0.04047483,
106  0.06798576,
107  0.1134608,
108  0.1889746,
109  0.2700881,
110  0.4431987,
111  0.7020246};
112  TGraphErrors *gre = new TGraphErrors(10,Graph0_fx1019,Graph0_fy1019,Graph0_fex1019,Graph0_fey1019);
113  gre->SetName("Graph0");
114  gre->SetTitle("Graph");
115  gre->SetFillStyle(1000);
116 
117  Int_t ci; // for color index setting
118  TColor *color; // for color definition with alpha
119  ci = TColor::GetColor("#000000");
120  gre->SetLineColor(ci);
121  gre->SetLineWidth(4);
122 
123  ci = TColor::GetColor("#000000");
124  gre->SetMarkerColor(ci);
125  gre->SetMarkerStyle(20);
126  gre->SetMarkerSize(2);
127 
128  TH1F *Graph_Graph01019 = new TH1F("Graph_Graph01019","Graph",100,0,10.6);
129  Graph_Graph01019->SetMinimum(-0.8424295);
130  Graph_Graph01019->SetMaximum(0.8424295);
131  Graph_Graph01019->SetDirectory(0);
132  Graph_Graph01019->SetStats(0);
133  Graph_Graph01019->SetLineWidth(2);
134  Graph_Graph01019->SetMarkerStyle(20);
135  Graph_Graph01019->SetMarkerSize(1.2);
136  Graph_Graph01019->GetXaxis()->SetLabelFont(42);
137  Graph_Graph01019->GetXaxis()->SetLabelSize(0.05);
138  Graph_Graph01019->GetXaxis()->SetTitleSize(0.05);
139  Graph_Graph01019->GetXaxis()->SetTitleOffset(1.4);
140  Graph_Graph01019->GetXaxis()->SetTitleFont(42);
141  Graph_Graph01019->GetYaxis()->SetLabelFont(42);
142  Graph_Graph01019->GetYaxis()->SetLabelSize(0.05);
143  Graph_Graph01019->GetYaxis()->SetTitleSize(0.05);
144  Graph_Graph01019->GetYaxis()->SetTitleOffset(1.4);
145  Graph_Graph01019->GetYaxis()->SetTitleFont(42);
146  Graph_Graph01019->GetZaxis()->SetLabelFont(42);
147  Graph_Graph01019->GetZaxis()->SetLabelSize(0.05);
148  Graph_Graph01019->GetZaxis()->SetTitleSize(0.05);
149  Graph_Graph01019->GetZaxis()->SetTitleOffset(1);
150  Graph_Graph01019->GetZaxis()->SetTitleFont(42);
151  gre->SetHistogram(Graph_Graph01019);
152 
153  gre->Draw("p");
154 
155  Double_t v2_D_fx33[20] = {
156  0.25,
157  0.75,
158  1.25,
159  1.75,
160  2.25,
161  2.75,
162  3.25,
163  3.75,
164  4.25,
165  4.75,
166  5.25,
167  5.75,
168  6.25,
169  6.75,
170  7.25,
171  7.75,
172  8.25,
173  8.75,
174  9.25,
175  9.75};
176  Double_t v2_D_fy33[20] = {
177  0.003230484,
178  0.02045627,
179  0.05875515,
180  0.1035772,
181  0.1351997,
182  0.1468273,
183  0.1426436,
184  0.1296975,
185  0.1135213,
186  0.09734482,
187  0.08267526,
188  0.07001466,
189  0.05936532,
190  0.05052002,
191  0.04320955,
192  0.03716986,
193  0.03216805,
194  0.02800891,
195  0.02453305,
196  0.0216121};
197  TGraph *graph = new TGraph(20,v2_D_fx33,v2_D_fy33);
198  graph->SetName("v2_D");
199  graph->SetTitle("Graph");
200 
201  ci = TColor::GetColor("#000000");
202  graph->SetLineColor(ci);
203  graph->SetLineStyle(2);
204  graph->SetLineWidth(2);
205  graph->SetMarkerStyle(20);
206  graph->SetMarkerSize(1.2);
207 
208  TH1F *Graph_v2_D33 = new TH1F("Graph_v2_D33","Graph",100,0,10.7);
209  Graph_v2_D33->SetMinimum(0);
210  Graph_v2_D33->SetMaximum(0.1611869);
211  Graph_v2_D33->SetDirectory(0);
212  Graph_v2_D33->SetLineWidth(2);
213  Graph_v2_D33->SetMarkerStyle(20);
214  Graph_v2_D33->SetMarkerSize(1.2);
215  Graph_v2_D33->GetXaxis()->SetLabelFont(42);
216  Graph_v2_D33->GetXaxis()->SetLabelSize(0.05);
217  Graph_v2_D33->GetXaxis()->SetTitleSize(0.05);
218  Graph_v2_D33->GetXaxis()->SetTitleOffset(1.4);
219  Graph_v2_D33->GetXaxis()->SetTitleFont(42);
220  Graph_v2_D33->GetYaxis()->SetLabelFont(42);
221  Graph_v2_D33->GetYaxis()->SetLabelSize(0.05);
222  Graph_v2_D33->GetYaxis()->SetTitleSize(0.05);
223  Graph_v2_D33->GetYaxis()->SetTitleOffset(1.4);
224  Graph_v2_D33->GetYaxis()->SetTitleFont(42);
225  Graph_v2_D33->GetZaxis()->SetLabelFont(42);
226  Graph_v2_D33->GetZaxis()->SetLabelSize(0.05);
227  Graph_v2_D33->GetZaxis()->SetTitleSize(0.05);
228  Graph_v2_D33->GetZaxis()->SetTitleOffset(1);
229  Graph_v2_D33->GetZaxis()->SetTitleFont(42);
230  graph->SetHistogram(Graph_v2_D33);
231 
232  graph->Draw("");
233 
234  TLegend *leg = new TLegend(0.1,0.75,0.55,0.9,NULL,"brNDC");
235  leg->SetBorderSize(0);
236  leg->SetLineColor(1);
237  leg->SetLineStyle(1);
238  leg->SetLineWidth(1);
239  leg->SetFillColor(0);
240  leg->SetFillStyle(0);
241  TLegendEntry *entry=leg->AddEntry("NULL","#it{#bf{sPHENIX}} Projection, Years 1-3","");
242  entry->SetLineColor(1);
243  entry->SetLineStyle(1);
244  entry->SetLineWidth(1);
245  entry->SetMarkerColor(1);
246  entry->SetMarkerStyle(21);
247  entry->SetMarkerSize(1);
248  entry->SetTextFont(42);
249  entry=leg->AddEntry("NULL","0-5% p+Au, 50 nb^{-1} trig., Res(#Psi_{2})=0.2","");
250  entry->SetLineColor(1);
251  entry->SetLineStyle(1);
252  entry->SetLineWidth(1);
253  entry->SetMarkerColor(1);
254  entry->SetMarkerStyle(21);
255  entry->SetMarkerSize(1);
256  entry->SetTextFont(42);
257  leg->Draw();
258 
259  leg = new TLegend(0.2,0.6,0.7,0.72,NULL,"brNDC");
260  leg->SetBorderSize(0);
261  leg->SetLineColor(1);
262  leg->SetLineStyle(1);
263  leg->SetLineWidth(1);
264  leg->SetFillColor(0);
265  leg->SetFillStyle(0);
266  entry=leg->AddEntry("Graph","Prompt #it{D}^{0}","lp");
267 
268  ci = TColor::GetColor("#000000");
269  entry->SetLineColor(ci);
270  entry->SetLineStyle(1);
271  entry->SetLineWidth(4);
272 
273  ci = TColor::GetColor("#000000");
274  entry->SetMarkerColor(ci);
275  entry->SetMarkerStyle(20);
276  entry->SetMarkerSize(2);
277  entry->SetTextFont(42);
278  entry=leg->AddEntry("v2_D","#it{D}-meson (Au+Au)","l");
279 
280  ci = TColor::GetColor("#000000");
281  entry->SetLineColor(ci);
282  entry->SetLineStyle(2);
283  entry->SetLineWidth(2);
284  entry->SetMarkerColor(1);
285  entry->SetMarkerStyle(21);
286  entry->SetMarkerSize(1);
287  entry->SetTextFont(42);
288  leg->Draw();
289  D0_BUP2020_pAu_C0_5_v2_3yr_1->Modified();
290  D0_BUP2020_pAu_C0_5_v2_3yr->cd();
291  D0_BUP2020_pAu_C0_5_v2_3yr->Modified();
292  D0_BUP2020_pAu_C0_5_v2_3yr->cd();
293  D0_BUP2020_pAu_C0_5_v2_3yr->SetSelected(D0_BUP2020_pAu_C0_5_v2_3yr);
294 }