Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sphenix_han.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file sphenix_han.C
1 void sphenix_han()
2 {
3 //=========Macro generated from canvas: sphenix_han/sphenix_han
4 //========= (Fri Aug 28 14:59:02 2020) by ROOT version 6.16/00
5  TCanvas *sphenix_han = new TCanvas("sphenix_han", "sphenix_han",621,585,1100,800);
6  gStyle->SetOptStat(0);
7  gStyle->SetOptTitle(0);
8  sphenix_han->Range(0,0,1,1);
9  sphenix_han->SetFillColor(0);
10  sphenix_han->SetBorderMode(0);
11  sphenix_han->SetBorderSize(2);
12  sphenix_han->SetTickx(1);
13  sphenix_han->SetTicky(1);
14  sphenix_han->SetLeftMargin(0.16);
15  sphenix_han->SetRightMargin(0.05);
16  sphenix_han->SetTopMargin(0.05);
17  sphenix_han->SetBottomMargin(0.16);
18  sphenix_han->SetFrameBorderMode(0);
19 
20 // ------------>Primitives in pad: sphenix_han_1
21  TPad *sphenix_han_1 = new TPad("sphenix_han_1", "sphenix_han_1",0.01,0.01,0.99,0.99);
22  sphenix_han_1->Draw();
23  sphenix_han_1->cd();
24  sphenix_han_1->Range(-2.43038,-0.01316456,12.75949,0.06911392);
25  sphenix_han_1->SetFillColor(0);
26  sphenix_han_1->SetBorderMode(0);
27  sphenix_han_1->SetBorderSize(2);
28  sphenix_han_1->SetTickx(1);
29  sphenix_han_1->SetTicky(1);
30  sphenix_han_1->SetLeftMargin(0.16);
31  sphenix_han_1->SetRightMargin(0.05);
32  sphenix_han_1->SetTopMargin(0.05);
33  sphenix_han_1->SetBottomMargin(0.16);
34  sphenix_han_1->SetFrameBorderMode(0);
35  sphenix_han_1->SetFrameBorderMode(0);
36 
37  TH1F *hframe__1 = new TH1F("hframe__1","",1000,0,12);
38  hframe__1->SetMinimum(-0);
39  hframe__1->SetMaximum(0.065);
40  hframe__1->SetDirectory(0);
41  hframe__1->SetStats(0);
42  hframe__1->SetLineWidth(2);
43  hframe__1->SetMarkerStyle(20);
44  hframe__1->SetMarkerSize(1.2);
45  hframe__1->GetXaxis()->SetTitle("#it{p}_{T} [GeV]");
46  hframe__1->GetXaxis()->SetLabelFont(42);
47  hframe__1->GetXaxis()->SetLabelSize(0.05);
48  hframe__1->GetXaxis()->SetTitleSize(0.05);
49  hframe__1->GetXaxis()->SetTitleOffset(1.4);
50  hframe__1->GetXaxis()->SetTitleFont(42);
51  hframe__1->GetYaxis()->SetTitle("A_{N}");
52  hframe__1->GetYaxis()->SetLabelFont(42);
53  hframe__1->GetYaxis()->SetLabelSize(0.05);
54  hframe__1->GetYaxis()->SetTitleSize(0.05);
55  hframe__1->GetYaxis()->SetTitleOffset(1.4);
56  hframe__1->GetYaxis()->SetTitleFont(42);
57  hframe__1->GetZaxis()->SetLabelFont(42);
58  hframe__1->GetZaxis()->SetLabelSize(0.05);
59  hframe__1->GetZaxis()->SetTitleSize(0.05);
60  hframe__1->GetZaxis()->SetTitleOffset(1);
61  hframe__1->GetZaxis()->SetTitleFont(42);
62  hframe__1->Draw(" ");
63  TArrow *arrow = new TArrow(1.8,0.025,7,0.025,0.025,"<|>");
64  arrow->SetFillColor(29);
65  arrow->SetFillStyle(1001);
66  arrow->SetLineColor(29);
67  arrow->SetLineWidth(10);
68  arrow->Draw();
69  arrow = new TArrow(4.4,0.0213,4.4,0.0287,0.025,"<|>");
70  arrow->SetFillColor(29);
71  arrow->SetFillStyle(1001);
72  arrow->SetLineColor(29);
73  arrow->SetLineWidth(10);
74  arrow->Draw();
75 
76  Double_t Graph0_fx1001[5] = {
77  1,
78  3,
79  5,
80  7,
81  9};
82  Double_t Graph0_fy1001[5] = {
83  0.01,
84  0.01,
85  0.01,
86  0.01,
87  0.01};
88  Double_t Graph0_fex1001[5] = {
89  0,
90  0,
91  0,
92  0,
93  0};
94  Double_t Graph0_fey1001[5] = {
95  0.0001695041,
96  0.0001827427,
97  0.0008802428,
98  0.003831069,
99  0.01164666};
100  TGraphErrors *gre = new TGraphErrors(5,Graph0_fx1001,Graph0_fy1001,Graph0_fex1001,Graph0_fey1001);
101  gre->SetName("Graph0");
102  gre->SetTitle("Graph");
103  gre->SetFillStyle(1000);
104 
105  Int_t ci; // for color index setting
106  TColor *color; // for color definition with alpha
107  ci = TColor::GetColor("#cc0000");
108  gre->SetLineColor(ci);
109  gre->SetLineWidth(4);
110 
111  ci = TColor::GetColor("#cc0000");
112  gre->SetMarkerColor(ci);
113  gre->SetMarkerStyle(20);
114  gre->SetMarkerSize(2);
115 
116  TH1F *Graph_Graph01001 = new TH1F("Graph_Graph01001","Graph",100,0.2,9.8);
117  Graph_Graph01001->SetMinimum(-0.003975996);
118  Graph_Graph01001->SetMaximum(0.023976);
119  Graph_Graph01001->SetDirectory(0);
120  Graph_Graph01001->SetStats(0);
121  Graph_Graph01001->SetLineWidth(2);
122  Graph_Graph01001->SetMarkerStyle(20);
123  Graph_Graph01001->SetMarkerSize(1.2);
124  Graph_Graph01001->GetXaxis()->SetLabelFont(42);
125  Graph_Graph01001->GetXaxis()->SetLabelSize(0.05);
126  Graph_Graph01001->GetXaxis()->SetTitleSize(0.05);
127  Graph_Graph01001->GetXaxis()->SetTitleOffset(1.4);
128  Graph_Graph01001->GetXaxis()->SetTitleFont(42);
129  Graph_Graph01001->GetYaxis()->SetLabelFont(42);
130  Graph_Graph01001->GetYaxis()->SetLabelSize(0.05);
131  Graph_Graph01001->GetYaxis()->SetTitleSize(0.05);
132  Graph_Graph01001->GetYaxis()->SetTitleOffset(1.4);
133  Graph_Graph01001->GetYaxis()->SetTitleFont(42);
134  Graph_Graph01001->GetZaxis()->SetLabelFont(42);
135  Graph_Graph01001->GetZaxis()->SetLabelSize(0.05);
136  Graph_Graph01001->GetZaxis()->SetTitleSize(0.05);
137  Graph_Graph01001->GetZaxis()->SetTitleOffset(1);
138  Graph_Graph01001->GetZaxis()->SetTitleFont(42);
139  gre->SetHistogram(Graph_Graph01001);
140 
141  gre->Draw("p");
142  TLatex * tex = new TLatex(9.5,0.0097,"x_{F}=0.05-0.10");
143  tex->SetTextFont(42);
144  tex->SetTextSize(0.035);
145  tex->SetLineWidth(2);
146  tex->Draw();
147 
148  Double_t Graph1_fx1002[4] = {
149  1,
150  3,
151  5,
152  7};
153  Double_t Graph1_fy1002[4] = {
154  0.02,
155  0.02,
156  0.02,
157  0.02};
158  Double_t Graph1_fex1002[4] = {
159  0,
160  0,
161  0,
162  0};
163  Double_t Graph1_fey1002[4] = {
164  0.006527352,
165  0.0008190469,
166  0.001524963,
167  0.005482558};
168  gre = new TGraphErrors(4,Graph1_fx1002,Graph1_fy1002,Graph1_fex1002,Graph1_fey1002);
169  gre->SetName("Graph1");
170  gre->SetTitle("Graph");
171  gre->SetFillStyle(1000);
172 
173  ci = TColor::GetColor("#cc0000");
174  gre->SetLineColor(ci);
175  gre->SetLineWidth(4);
176 
177  ci = TColor::GetColor("#cc0000");
178  gre->SetMarkerColor(ci);
179  gre->SetMarkerStyle(20);
180  gre->SetMarkerSize(2);
181 
182  TH1F *Graph_Graph11002 = new TH1F("Graph_Graph11002","Graph",100,0.4,7.6);
183  Graph_Graph11002->SetMinimum(0.01216718);
184  Graph_Graph11002->SetMaximum(0.02783282);
185  Graph_Graph11002->SetDirectory(0);
186  Graph_Graph11002->SetStats(0);
187  Graph_Graph11002->SetLineWidth(2);
188  Graph_Graph11002->SetMarkerStyle(20);
189  Graph_Graph11002->SetMarkerSize(1.2);
190  Graph_Graph11002->GetXaxis()->SetLabelFont(42);
191  Graph_Graph11002->GetXaxis()->SetLabelSize(0.05);
192  Graph_Graph11002->GetXaxis()->SetTitleSize(0.05);
193  Graph_Graph11002->GetXaxis()->SetTitleOffset(1.4);
194  Graph_Graph11002->GetXaxis()->SetTitleFont(42);
195  Graph_Graph11002->GetYaxis()->SetLabelFont(42);
196  Graph_Graph11002->GetYaxis()->SetLabelSize(0.05);
197  Graph_Graph11002->GetYaxis()->SetTitleSize(0.05);
198  Graph_Graph11002->GetYaxis()->SetTitleOffset(1.4);
199  Graph_Graph11002->GetYaxis()->SetTitleFont(42);
200  Graph_Graph11002->GetZaxis()->SetLabelFont(42);
201  Graph_Graph11002->GetZaxis()->SetLabelSize(0.05);
202  Graph_Graph11002->GetZaxis()->SetTitleSize(0.05);
203  Graph_Graph11002->GetZaxis()->SetTitleOffset(1);
204  Graph_Graph11002->GetZaxis()->SetTitleFont(42);
205  gre->SetHistogram(Graph_Graph11002);
206 
207  gre->Draw("p");
208  tex = new TLatex(9.5,0.0197,"x_{F}=0.10-0.15");
209  tex->SetTextFont(42);
210  tex->SetTextSize(0.035);
211  tex->SetLineWidth(2);
212  tex->Draw();
213 
214  Double_t Graph2_fx1003[3] = {
215  3,
216  5,
217  7};
218  Double_t Graph2_fy1003[3] = {
219  0.03,
220  0.03,
221  0.03};
222  Double_t Graph2_fex1003[3] = {
223  0,
224  0,
225  0};
226  Double_t Graph2_fey1003[3] = {
227  0.004575613,
228  0.003459797,
229  0.008584451};
230  gre = new TGraphErrors(3,Graph2_fx1003,Graph2_fy1003,Graph2_fex1003,Graph2_fey1003);
231  gre->SetName("Graph2");
232  gre->SetTitle("Graph");
233  gre->SetFillStyle(1000);
234 
235  ci = TColor::GetColor("#cc0000");
236  gre->SetLineColor(ci);
237  gre->SetLineWidth(4);
238 
239  ci = TColor::GetColor("#cc0000");
240  gre->SetMarkerColor(ci);
241  gre->SetMarkerStyle(20);
242  gre->SetMarkerSize(2);
243 
244  TH1F *Graph_Graph21003 = new TH1F("Graph_Graph21003","Graph",100,2.6,7.4);
245  Graph_Graph21003->SetMinimum(0.01969866);
246  Graph_Graph21003->SetMaximum(0.04030134);
247  Graph_Graph21003->SetDirectory(0);
248  Graph_Graph21003->SetStats(0);
249  Graph_Graph21003->SetLineWidth(2);
250  Graph_Graph21003->SetMarkerStyle(20);
251  Graph_Graph21003->SetMarkerSize(1.2);
252  Graph_Graph21003->GetXaxis()->SetLabelFont(42);
253  Graph_Graph21003->GetXaxis()->SetLabelSize(0.05);
254  Graph_Graph21003->GetXaxis()->SetTitleSize(0.05);
255  Graph_Graph21003->GetXaxis()->SetTitleOffset(1.4);
256  Graph_Graph21003->GetXaxis()->SetTitleFont(42);
257  Graph_Graph21003->GetYaxis()->SetLabelFont(42);
258  Graph_Graph21003->GetYaxis()->SetLabelSize(0.05);
259  Graph_Graph21003->GetYaxis()->SetTitleSize(0.05);
260  Graph_Graph21003->GetYaxis()->SetTitleOffset(1.4);
261  Graph_Graph21003->GetYaxis()->SetTitleFont(42);
262  Graph_Graph21003->GetZaxis()->SetLabelFont(42);
263  Graph_Graph21003->GetZaxis()->SetLabelSize(0.05);
264  Graph_Graph21003->GetZaxis()->SetTitleSize(0.05);
265  Graph_Graph21003->GetZaxis()->SetTitleOffset(1);
266  Graph_Graph21003->GetZaxis()->SetTitleFont(42);
267  gre->SetHistogram(Graph_Graph21003);
268 
269  gre->Draw("p");
270  tex = new TLatex(9.5,0.0297,"x_{F}=0.15-0.20");
271  tex->SetTextFont(42);
272  tex->SetTextSize(0.035);
273  tex->SetLineWidth(2);
274  tex->Draw();
275 
276  Double_t Graph3_fx1004[1] = {
277  5};
278  Double_t Graph3_fy1004[1] = {
279  0.04};
280  Double_t Graph3_fex1004[1] = {
281  0};
282  Double_t Graph3_fey1004[1] = {
283  0.01008074};
284  gre = new TGraphErrors(1,Graph3_fx1004,Graph3_fy1004,Graph3_fex1004,Graph3_fey1004);
285  gre->SetName("Graph3");
286  gre->SetTitle("Graph");
287  gre->SetFillStyle(1000);
288 
289  ci = TColor::GetColor("#cc0000");
290  gre->SetLineColor(ci);
291  gre->SetLineWidth(4);
292 
293  ci = TColor::GetColor("#cc0000");
294  gre->SetMarkerColor(ci);
295  gre->SetMarkerStyle(20);
296  gre->SetMarkerSize(2);
297 
298  TH1F *Graph_Graph31004 = new TH1F("Graph_Graph31004","Graph",100,4.9,6.1);
299  Graph_Graph31004->SetMinimum(0.02790311);
300  Graph_Graph31004->SetMaximum(0.05209689);
301  Graph_Graph31004->SetDirectory(0);
302  Graph_Graph31004->SetStats(0);
303  Graph_Graph31004->SetLineWidth(2);
304  Graph_Graph31004->SetMarkerStyle(20);
305  Graph_Graph31004->SetMarkerSize(1.2);
306  Graph_Graph31004->GetXaxis()->SetLabelFont(42);
307  Graph_Graph31004->GetXaxis()->SetLabelSize(0.05);
308  Graph_Graph31004->GetXaxis()->SetTitleSize(0.05);
309  Graph_Graph31004->GetXaxis()->SetTitleOffset(1.4);
310  Graph_Graph31004->GetXaxis()->SetTitleFont(42);
311  Graph_Graph31004->GetYaxis()->SetLabelFont(42);
312  Graph_Graph31004->GetYaxis()->SetLabelSize(0.05);
313  Graph_Graph31004->GetYaxis()->SetTitleSize(0.05);
314  Graph_Graph31004->GetYaxis()->SetTitleOffset(1.4);
315  Graph_Graph31004->GetYaxis()->SetTitleFont(42);
316  Graph_Graph31004->GetZaxis()->SetLabelFont(42);
317  Graph_Graph31004->GetZaxis()->SetLabelSize(0.05);
318  Graph_Graph31004->GetZaxis()->SetTitleSize(0.05);
319  Graph_Graph31004->GetZaxis()->SetTitleOffset(1);
320  Graph_Graph31004->GetZaxis()->SetTitleFont(42);
321  gre->SetHistogram(Graph_Graph31004);
322 
323  gre->Draw("p");
324  tex = new TLatex(9.5,0.0397,"x_{F}=0.20-0.25");
325  tex->SetTextFont(42);
326  tex->SetTextSize(0.035);
327  tex->SetLineWidth(2);
328  tex->Draw();
329  tex = new TLatex(0.4,0.0025,"Shown only points with #delta(A_{N}) <~ 1%");
330  tex->SetTextFont(42);
331  tex->SetTextSize(0.035);
332  tex->SetLineWidth(2);
333  tex->Draw();
334 
335  TLegend *leg = new TLegend(0,0.75,0.83,0.9,NULL,"brNDC");
336  leg->SetBorderSize(0);
337  leg->SetLineColor(1);
338  leg->SetLineStyle(1);
339  leg->SetLineWidth(1);
340  leg->SetFillColor(0);
341  leg->SetFillStyle(0);
342  TLegendEntry *entry=leg->AddEntry("","#it{#bf{sPHENIX}} Projection, Years 1-3","");
343  entry->SetLineColor(1);
344  entry->SetLineStyle(1);
345  entry->SetLineWidth(1);
346  entry->SetMarkerColor(1);
347  entry->SetMarkerStyle(21);
348  entry->SetMarkerSize(1);
349  entry->SetTextFont(42);
350  entry=leg->AddEntry("","6.2 pb^{-1} str. #it{p}^{#uparrow}+#it{p}#rightarrow h^{+} + X, P=0.57","");
351  entry->SetLineColor(1);
352  entry->SetLineStyle(1);
353  entry->SetLineWidth(1);
354  entry->SetMarkerColor(1);
355  entry->SetMarkerStyle(21);
356  entry->SetMarkerSize(1);
357  entry->SetTextFont(42);
358  leg->Draw();
359  sphenix_han_1->Modified();
360  sphenix_han->cd();
361  sphenix_han->Modified();
362  sphenix_han->cd();
363  sphenix_han->SetSelected(sphenix_han);
364 }