Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:13:47

0001 void D0_BUP2020_pAu_v2_3yr()
0002 {
0003 //=========Macro generated from canvas: D0_BUP2020_pAu_v2_3yr/D0_BUP2020_pAu_v2_3yr
0004 //=========  (Wed May 12 23:46:27 2021) by ROOT version 6.22/02
0005    TCanvas *D0_BUP2020_pAu_v2_3yr = new TCanvas("D0_BUP2020_pAu_v2_3yr", "D0_BUP2020_pAu_v2_3yr",0,0,1100,800);
0006    gStyle->SetOptFit(1);
0007    gStyle->SetOptStat(0);
0008    gStyle->SetOptTitle(0);
0009    D0_BUP2020_pAu_v2_3yr->SetHighLightColor(2);
0010    D0_BUP2020_pAu_v2_3yr->Range(0,0,1,1);
0011    D0_BUP2020_pAu_v2_3yr->SetFillColor(0);
0012    D0_BUP2020_pAu_v2_3yr->SetBorderMode(0);
0013    D0_BUP2020_pAu_v2_3yr->SetBorderSize(2);
0014    D0_BUP2020_pAu_v2_3yr->SetTickx(1);
0015    D0_BUP2020_pAu_v2_3yr->SetTicky(1);
0016    D0_BUP2020_pAu_v2_3yr->SetLeftMargin(0.16);
0017    D0_BUP2020_pAu_v2_3yr->SetRightMargin(0.05);
0018    D0_BUP2020_pAu_v2_3yr->SetTopMargin(0.05);
0019    D0_BUP2020_pAu_v2_3yr->SetBottomMargin(0.16);
0020    D0_BUP2020_pAu_v2_3yr->SetFrameBorderMode(0);
0021   
0022 // ------------>Primitives in pad: D0_BUP2020_pAu_v2_3yr_1
0023    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);
0024    D0_BUP2020_pAu_v2_3yr_1->Draw();
0025    D0_BUP2020_pAu_v2_3yr_1->cd();
0026    D0_BUP2020_pAu_v2_3yr_1->Range(-1.620253,-0.2512658,8.506329,0.3816456);
0027    D0_BUP2020_pAu_v2_3yr_1->SetFillColor(0);
0028    D0_BUP2020_pAu_v2_3yr_1->SetBorderMode(0);
0029    D0_BUP2020_pAu_v2_3yr_1->SetBorderSize(2);
0030    D0_BUP2020_pAu_v2_3yr_1->SetTickx(1);
0031    D0_BUP2020_pAu_v2_3yr_1->SetTicky(1);
0032    D0_BUP2020_pAu_v2_3yr_1->SetLeftMargin(0.16);
0033    D0_BUP2020_pAu_v2_3yr_1->SetRightMargin(0.05);
0034    D0_BUP2020_pAu_v2_3yr_1->SetTopMargin(0.05);
0035    D0_BUP2020_pAu_v2_3yr_1->SetBottomMargin(0.16);
0036    D0_BUP2020_pAu_v2_3yr_1->SetFrameBorderMode(0);
0037    D0_BUP2020_pAu_v2_3yr_1->SetFrameBorderMode(0);
0038    
0039    TH1F *hframe__26 = new TH1F("hframe__26","",1000,0,8);
0040    hframe__26->SetMinimum(-0.15);
0041    hframe__26->SetMaximum(0.35);
0042    hframe__26->SetDirectory(0);
0043    hframe__26->SetStats(0);
0044    hframe__26->SetLineWidth(2);
0045    hframe__26->SetMarkerStyle(20);
0046    hframe__26->SetMarkerSize(1.2);
0047    hframe__26->GetXaxis()->SetTitle("#it{p}_{T} [GeV]");
0048    hframe__26->GetXaxis()->SetLabelFont(42);
0049    hframe__26->GetXaxis()->SetLabelSize(0.05);
0050    hframe__26->GetXaxis()->SetTitleSize(0.05);
0051    hframe__26->GetXaxis()->SetTitleOffset(1.4);
0052    hframe__26->GetXaxis()->SetTitleFont(42);
0053    hframe__26->GetYaxis()->SetTitle("v_{2}");
0054    hframe__26->GetYaxis()->SetLabelFont(42);
0055    hframe__26->GetYaxis()->SetLabelSize(0.05);
0056    hframe__26->GetYaxis()->SetTitleSize(0.05);
0057    hframe__26->GetYaxis()->SetTitleOffset(1.4);
0058    hframe__26->GetYaxis()->SetTitleFont(42);
0059    hframe__26->GetZaxis()->SetLabelFont(42);
0060    hframe__26->GetZaxis()->SetLabelSize(0.05);
0061    hframe__26->GetZaxis()->SetTitleSize(0.05);
0062    hframe__26->GetZaxis()->SetTitleOffset(1);
0063    hframe__26->GetZaxis()->SetTitleFont(42);
0064    hframe__26->Draw(" ");
0065    
0066    Double_t Graph0_fx1020[10] = {
0067    0.7,
0068    1.7,
0069    2.7,
0070    3.7,
0071    4.7,
0072    5.7,
0073    6.7,
0074    7.7,
0075    8.7,
0076    9.7};
0077    Double_t Graph0_fy1020[10] = {
0078    0,
0079    0,
0080    0,
0081    0,
0082    0,
0083    0,
0084    0,
0085    0,
0086    0,
0087    0};
0088    Double_t Graph0_fex1020[10] = {
0089    0,
0090    0,
0091    0,
0092    0,
0093    0,
0094    0,
0095    0,
0096    0,
0097    0,
0098    0};
0099    Double_t Graph0_fey1020[10] = {
0100    0.03555925,
0101    0.01970952,
0102    0.02182074,
0103    0.02907315,
0104    0.0488343,
0105    0.08149913,
0106    0.1357408,
0107    0.1940048,
0108    0.3183504,
0109    0.5042655};
0110    TGraphErrors *gre = new TGraphErrors(10,Graph0_fx1020,Graph0_fy1020,Graph0_fex1020,Graph0_fey1020);
0111    gre->SetName("Graph0");
0112    gre->SetTitle("Graph");
0113    gre->SetFillStyle(1000);
0114 
0115    Int_t ci;      // for color index setting
0116    TColor *color; // for color definition with alpha
0117    ci = TColor::GetColor("#000000");
0118    gre->SetLineColor(ci);
0119    gre->SetLineWidth(4);
0120 
0121    ci = TColor::GetColor("#000000");
0122    gre->SetMarkerColor(ci);
0123    gre->SetMarkerStyle(20);
0124    gre->SetMarkerSize(2);
0125    
0126    TH1F *Graph_Graph01020 = new TH1F("Graph_Graph01020","Graph",100,0,10.6);
0127    Graph_Graph01020->SetMinimum(-0.6051186);
0128    Graph_Graph01020->SetMaximum(0.6051186);
0129    Graph_Graph01020->SetDirectory(0);
0130    Graph_Graph01020->SetStats(0);
0131    Graph_Graph01020->SetLineWidth(2);
0132    Graph_Graph01020->SetMarkerStyle(20);
0133    Graph_Graph01020->SetMarkerSize(1.2);
0134    Graph_Graph01020->GetXaxis()->SetLabelFont(42);
0135    Graph_Graph01020->GetXaxis()->SetLabelSize(0.05);
0136    Graph_Graph01020->GetXaxis()->SetTitleSize(0.05);
0137    Graph_Graph01020->GetXaxis()->SetTitleOffset(1.4);
0138    Graph_Graph01020->GetXaxis()->SetTitleFont(42);
0139    Graph_Graph01020->GetYaxis()->SetLabelFont(42);
0140    Graph_Graph01020->GetYaxis()->SetLabelSize(0.05);
0141    Graph_Graph01020->GetYaxis()->SetTitleSize(0.05);
0142    Graph_Graph01020->GetYaxis()->SetTitleOffset(1.4);
0143    Graph_Graph01020->GetYaxis()->SetTitleFont(42);
0144    Graph_Graph01020->GetZaxis()->SetLabelFont(42);
0145    Graph_Graph01020->GetZaxis()->SetLabelSize(0.05);
0146    Graph_Graph01020->GetZaxis()->SetTitleSize(0.05);
0147    Graph_Graph01020->GetZaxis()->SetTitleOffset(1);
0148    Graph_Graph01020->GetZaxis()->SetTitleFont(42);
0149    gre->SetHistogram(Graph_Graph01020);
0150    
0151    gre->Draw("p");
0152    
0153    Double_t Graph1_fx1021[1] = {
0154    4.8};
0155    Double_t Graph1_fy1021[1] = {
0156    0};
0157    Double_t Graph1_fex1021[1] = {
0158    0};
0159    Double_t Graph1_fey1021[1] = {
0160    0.251405};
0161    gre = new TGraphErrors(1,Graph1_fx1021,Graph1_fy1021,Graph1_fex1021,Graph1_fey1021);
0162    gre->SetName("Graph1");
0163    gre->SetTitle("Graph");
0164    gre->SetFillStyle(1000);
0165 
0166    ci = TColor::GetColor("#000099");
0167    gre->SetLineColor(ci);
0168    gre->SetLineWidth(4);
0169 
0170    ci = TColor::GetColor("#000099");
0171    gre->SetMarkerColor(ci);
0172    gre->SetMarkerStyle(21);
0173    gre->SetMarkerSize(2);
0174    
0175    TH1F *Graph_Graph11021 = new TH1F("Graph_Graph11021","Graph",100,4.7,5.9);
0176    Graph_Graph11021->SetMinimum(-0.301686);
0177    Graph_Graph11021->SetMaximum(0.301686);
0178    Graph_Graph11021->SetDirectory(0);
0179    Graph_Graph11021->SetStats(0);
0180    Graph_Graph11021->SetLineWidth(2);
0181    Graph_Graph11021->SetMarkerStyle(20);
0182    Graph_Graph11021->SetMarkerSize(1.2);
0183    Graph_Graph11021->GetXaxis()->SetLabelFont(42);
0184    Graph_Graph11021->GetXaxis()->SetLabelSize(0.05);
0185    Graph_Graph11021->GetXaxis()->SetTitleSize(0.05);
0186    Graph_Graph11021->GetXaxis()->SetTitleOffset(1.4);
0187    Graph_Graph11021->GetXaxis()->SetTitleFont(42);
0188    Graph_Graph11021->GetYaxis()->SetLabelFont(42);
0189    Graph_Graph11021->GetYaxis()->SetLabelSize(0.05);
0190    Graph_Graph11021->GetYaxis()->SetTitleSize(0.05);
0191    Graph_Graph11021->GetYaxis()->SetTitleOffset(1.4);
0192    Graph_Graph11021->GetYaxis()->SetTitleFont(42);
0193    Graph_Graph11021->GetZaxis()->SetLabelFont(42);
0194    Graph_Graph11021->GetZaxis()->SetLabelSize(0.05);
0195    Graph_Graph11021->GetZaxis()->SetTitleSize(0.05);
0196    Graph_Graph11021->GetZaxis()->SetTitleOffset(1);
0197    Graph_Graph11021->GetZaxis()->SetTitleFont(42);
0198    gre->SetHistogram(Graph_Graph11021);
0199    
0200    gre->Draw("p");
0201    
0202    Double_t v2_D_fx34[20] = {
0203    0.25,
0204    0.75,
0205    1.25,
0206    1.75,
0207    2.25,
0208    2.75,
0209    3.25,
0210    3.75,
0211    4.25,
0212    4.75,
0213    5.25,
0214    5.75,
0215    6.25,
0216    6.75,
0217    7.25,
0218    7.75,
0219    8.25,
0220    8.75,
0221    9.25,
0222    9.75};
0223    Double_t v2_D_fy34[20] = {
0224    0.003230484,
0225    0.02045627,
0226    0.05875515,
0227    0.1035772,
0228    0.1351997,
0229    0.1468273,
0230    0.1426436,
0231    0.1296975,
0232    0.1135213,
0233    0.09734482,
0234    0.08267526,
0235    0.07001466,
0236    0.05936532,
0237    0.05052002,
0238    0.04320955,
0239    0.03716986,
0240    0.03216805,
0241    0.02800891,
0242    0.02453305,
0243    0.0216121};
0244    TGraph *graph = new TGraph(20,v2_D_fx34,v2_D_fy34);
0245    graph->SetName("v2_D");
0246    graph->SetTitle("Graph");
0247 
0248    ci = TColor::GetColor("#000000");
0249    graph->SetLineColor(ci);
0250    graph->SetLineStyle(2);
0251    graph->SetLineWidth(2);
0252    graph->SetMarkerStyle(20);
0253    graph->SetMarkerSize(1.2);
0254    
0255    TH1F *Graph_v2_D34 = new TH1F("Graph_v2_D34","Graph",100,0,10.7);
0256    Graph_v2_D34->SetMinimum(0);
0257    Graph_v2_D34->SetMaximum(0.1611869);
0258    Graph_v2_D34->SetDirectory(0);
0259    Graph_v2_D34->SetLineWidth(2);
0260    Graph_v2_D34->SetMarkerStyle(20);
0261    Graph_v2_D34->SetMarkerSize(1.2);
0262    Graph_v2_D34->GetXaxis()->SetLabelFont(42);
0263    Graph_v2_D34->GetXaxis()->SetLabelSize(0.05);
0264    Graph_v2_D34->GetXaxis()->SetTitleSize(0.05);
0265    Graph_v2_D34->GetXaxis()->SetTitleOffset(1.4);
0266    Graph_v2_D34->GetXaxis()->SetTitleFont(42);
0267    Graph_v2_D34->GetYaxis()->SetLabelFont(42);
0268    Graph_v2_D34->GetYaxis()->SetLabelSize(0.05);
0269    Graph_v2_D34->GetYaxis()->SetTitleSize(0.05);
0270    Graph_v2_D34->GetYaxis()->SetTitleOffset(1.4);
0271    Graph_v2_D34->GetYaxis()->SetTitleFont(42);
0272    Graph_v2_D34->GetZaxis()->SetLabelFont(42);
0273    Graph_v2_D34->GetZaxis()->SetLabelSize(0.05);
0274    Graph_v2_D34->GetZaxis()->SetTitleSize(0.05);
0275    Graph_v2_D34->GetZaxis()->SetTitleOffset(1);
0276    Graph_v2_D34->GetZaxis()->SetTitleFont(42);
0277    graph->SetHistogram(Graph_v2_D34);
0278    
0279    graph->Draw("");
0280    
0281    TLegend *leg = new TLegend(0.1,0.75,0.55,0.9,NULL,"brNDC");
0282    leg->SetBorderSize(0);
0283    leg->SetLineColor(1);
0284    leg->SetLineStyle(1);
0285    leg->SetLineWidth(1);
0286    leg->SetFillColor(0);
0287    leg->SetFillStyle(0);
0288    TLegendEntry *entry=leg->AddEntry("NULL","#it{#bf{sPHENIX}} Projection, Years 1-3","");
0289    entry->SetLineColor(1);
0290    entry->SetLineStyle(1);
0291    entry->SetLineWidth(1);
0292    entry->SetMarkerColor(1);
0293    entry->SetMarkerStyle(21);
0294    entry->SetMarkerSize(1);
0295    entry->SetTextFont(42);
0296    entry=leg->AddEntry("NULL","M.B. p+Au, 10 nb^{-1} str.","");
0297    entry->SetLineColor(1);
0298    entry->SetLineStyle(1);
0299    entry->SetLineWidth(1);
0300    entry->SetMarkerColor(1);
0301    entry->SetMarkerStyle(21);
0302    entry->SetMarkerSize(1);
0303    entry->SetTextFont(42);
0304    leg->Draw();
0305    
0306    leg = new TLegend(0.65,0.65,0.9,0.8,NULL,"brNDC");
0307    leg->SetBorderSize(0);
0308    leg->SetLineColor(1);
0309    leg->SetLineStyle(1);
0310    leg->SetLineWidth(1);
0311    leg->SetFillColor(0);
0312    leg->SetFillStyle(0);
0313    entry=leg->AddEntry("Graph","Prompt #it{D}^{0}","lp");
0314 
0315    ci = TColor::GetColor("#000000");
0316    entry->SetLineColor(ci);
0317    entry->SetLineStyle(1);
0318    entry->SetLineWidth(4);
0319 
0320    ci = TColor::GetColor("#000000");
0321    entry->SetMarkerColor(ci);
0322    entry->SetMarkerStyle(20);
0323    entry->SetMarkerSize(2);
0324    entry->SetTextFont(42);
0325    entry=leg->AddEntry("Graph","#it{B}#rightarrow#it{D}^{0}","lp");
0326 
0327    ci = TColor::GetColor("#000099");
0328    entry->SetLineColor(ci);
0329    entry->SetLineStyle(1);
0330    entry->SetLineWidth(4);
0331 
0332    ci = TColor::GetColor("#000099");
0333    entry->SetMarkerColor(ci);
0334    entry->SetMarkerStyle(21);
0335    entry->SetMarkerSize(2);
0336    entry->SetTextFont(42);
0337    leg->Draw();
0338    
0339    leg = new TLegend(0.2,0.2,0.7,0.3,NULL,"brNDC");
0340    leg->SetBorderSize(0);
0341    leg->SetLineColor(1);
0342    leg->SetLineStyle(1);
0343    leg->SetLineWidth(1);
0344    leg->SetFillColor(0);
0345    leg->SetFillStyle(0);
0346    entry=leg->AddEntry("v2_D","#it{D}-meson (Au+Au)","l");
0347 
0348    ci = TColor::GetColor("#000000");
0349    entry->SetLineColor(ci);
0350    entry->SetLineStyle(2);
0351    entry->SetLineWidth(2);
0352    entry->SetMarkerColor(1);
0353    entry->SetMarkerStyle(21);
0354    entry->SetMarkerSize(1);
0355    entry->SetTextFont(42);
0356    leg->Draw();
0357    D0_BUP2020_pAu_v2_3yr_1->Modified();
0358    D0_BUP2020_pAu_v2_3yr->cd();
0359    D0_BUP2020_pAu_v2_3yr->Modified();
0360    D0_BUP2020_pAu_v2_3yr->cd();
0361    D0_BUP2020_pAu_v2_3yr->SetSelected(D0_BUP2020_pAu_v2_3yr);
0362 }