Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 void D0_BUP2020_AuAu_v2_3yr()
0002 {
0003 //=========Macro generated from canvas: D0_BUP2020_AuAu_v2_3yr/D0_BUP2020_AuAu_v2_3yr
0004 //=========  (Wed May 12 23:46:26 2021) by ROOT version 6.22/02
0005    TCanvas *D0_BUP2020_AuAu_v2_3yr = new TCanvas("D0_BUP2020_AuAu_v2_3yr", "D0_BUP2020_AuAu_v2_3yr",0,0,1100,800);
0006    gStyle->SetOptFit(1);
0007    gStyle->SetOptStat(0);
0008    gStyle->SetOptTitle(0);
0009    D0_BUP2020_AuAu_v2_3yr->SetHighLightColor(2);
0010    D0_BUP2020_AuAu_v2_3yr->Range(0,0,1,1);
0011    D0_BUP2020_AuAu_v2_3yr->SetFillColor(0);
0012    D0_BUP2020_AuAu_v2_3yr->SetBorderMode(0);
0013    D0_BUP2020_AuAu_v2_3yr->SetBorderSize(2);
0014    D0_BUP2020_AuAu_v2_3yr->SetTickx(1);
0015    D0_BUP2020_AuAu_v2_3yr->SetTicky(1);
0016    D0_BUP2020_AuAu_v2_3yr->SetLeftMargin(0.16);
0017    D0_BUP2020_AuAu_v2_3yr->SetRightMargin(0.05);
0018    D0_BUP2020_AuAu_v2_3yr->SetTopMargin(0.05);
0019    D0_BUP2020_AuAu_v2_3yr->SetBottomMargin(0.16);
0020    D0_BUP2020_AuAu_v2_3yr->SetFrameBorderMode(0);
0021   
0022 // ------------>Primitives in pad: D0_BUP2020_AuAu_v2_3yr_1
0023    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);
0024    D0_BUP2020_AuAu_v2_3yr_1->Draw();
0025    D0_BUP2020_AuAu_v2_3yr_1->cd();
0026    D0_BUP2020_AuAu_v2_3yr_1->Range(-2.227848,-0.1708861,11.6962,0.2721519);
0027    D0_BUP2020_AuAu_v2_3yr_1->SetFillColor(0);
0028    D0_BUP2020_AuAu_v2_3yr_1->SetBorderMode(0);
0029    D0_BUP2020_AuAu_v2_3yr_1->SetBorderSize(2);
0030    D0_BUP2020_AuAu_v2_3yr_1->SetTickx(1);
0031    D0_BUP2020_AuAu_v2_3yr_1->SetTicky(1);
0032    D0_BUP2020_AuAu_v2_3yr_1->SetLeftMargin(0.16);
0033    D0_BUP2020_AuAu_v2_3yr_1->SetRightMargin(0.05);
0034    D0_BUP2020_AuAu_v2_3yr_1->SetTopMargin(0.05);
0035    D0_BUP2020_AuAu_v2_3yr_1->SetBottomMargin(0.16);
0036    D0_BUP2020_AuAu_v2_3yr_1->SetFrameBorderMode(0);
0037    D0_BUP2020_AuAu_v2_3yr_1->SetFrameBorderMode(0);
0038    
0039    TH1F *hframe__22 = new TH1F("hframe__22","",1000,0,11);
0040    hframe__22->SetMinimum(-0.1);
0041    hframe__22->SetMaximum(0.25);
0042    hframe__22->SetDirectory(0);
0043    hframe__22->SetStats(0);
0044    hframe__22->SetLineWidth(2);
0045    hframe__22->SetMarkerStyle(20);
0046    hframe__22->SetMarkerSize(1.2);
0047    hframe__22->GetXaxis()->SetTitle("#it{p}_{T} [GeV]");
0048    hframe__22->GetXaxis()->SetLabelFont(42);
0049    hframe__22->GetXaxis()->SetLabelSize(0.05);
0050    hframe__22->GetXaxis()->SetTitleSize(0.05);
0051    hframe__22->GetXaxis()->SetTitleOffset(1.4);
0052    hframe__22->GetXaxis()->SetTitleFont(42);
0053    hframe__22->GetYaxis()->SetTitle("v_{2}");
0054    hframe__22->GetYaxis()->SetLabelFont(42);
0055    hframe__22->GetYaxis()->SetLabelSize(0.05);
0056    hframe__22->GetYaxis()->SetTitleSize(0.05);
0057    hframe__22->GetYaxis()->SetTitleOffset(1.4);
0058    hframe__22->GetYaxis()->SetTitleFont(42);
0059    hframe__22->GetZaxis()->SetLabelFont(42);
0060    hframe__22->GetZaxis()->SetLabelSize(0.05);
0061    hframe__22->GetZaxis()->SetTitleSize(0.05);
0062    hframe__22->GetZaxis()->SetTitleOffset(1);
0063    hframe__22->GetZaxis()->SetTitleFont(42);
0064    hframe__22->Draw(" ");
0065    TLine *line = new TLine(0,-0,11,0);
0066    line->Draw();
0067    
0068    Double_t v2_B_fx29[20] = {
0069    0.4200009,
0070    1.246444,
0071    2.039168,
0072    2.791197,
0073    3.50468,
0074    4.185221,
0075    4.838745,
0076    5.470381,
0077    6.084274,
0078    6.683685,
0079    7.271172,
0080    7.848745,
0081    8.418,
0082    8.980208,
0083    9.5364,
0084    10.08741,
0085    10.63394,
0086    11.17655,
0087    11.71573,
0088    12.25187};
0089    Double_t v2_B_fy29[20] = {
0090    0.003230484,
0091    0.02045627,
0092    0.05875515,
0093    0.1035772,
0094    0.1351997,
0095    0.1468273,
0096    0.1426436,
0097    0.1296975,
0098    0.1135213,
0099    0.09734482,
0100    0.08267526,
0101    0.07001466,
0102    0.05936532,
0103    0.05052002,
0104    0.04320955,
0105    0.03716986,
0106    0.03216805,
0107    0.02800891,
0108    0.02453305,
0109    0.0216121};
0110    TGraph *graph = new TGraph(20,v2_B_fx29,v2_B_fy29);
0111    graph->SetName("v2_B");
0112    graph->SetTitle("Graph");
0113 
0114    Int_t ci;      // for color index setting
0115    TColor *color; // for color definition with alpha
0116    ci = TColor::GetColor("#3333ff");
0117    graph->SetLineColor(ci);
0118    graph->SetLineWidth(2);
0119    graph->SetMarkerStyle(20);
0120    graph->SetMarkerSize(1.2);
0121    
0122    TH1F *Graph_v2_B29 = new TH1F("Graph_v2_B29","Graph",100,0,13.43505);
0123    Graph_v2_B29->SetMinimum(0);
0124    Graph_v2_B29->SetMaximum(0.1611869);
0125    Graph_v2_B29->SetDirectory(0);
0126    Graph_v2_B29->SetLineWidth(2);
0127    Graph_v2_B29->SetMarkerStyle(20);
0128    Graph_v2_B29->SetMarkerSize(1.2);
0129    Graph_v2_B29->GetXaxis()->SetLabelFont(42);
0130    Graph_v2_B29->GetXaxis()->SetLabelSize(0.05);
0131    Graph_v2_B29->GetXaxis()->SetTitleSize(0.05);
0132    Graph_v2_B29->GetXaxis()->SetTitleOffset(1.4);
0133    Graph_v2_B29->GetXaxis()->SetTitleFont(42);
0134    Graph_v2_B29->GetYaxis()->SetLabelFont(42);
0135    Graph_v2_B29->GetYaxis()->SetLabelSize(0.05);
0136    Graph_v2_B29->GetYaxis()->SetTitleSize(0.05);
0137    Graph_v2_B29->GetYaxis()->SetTitleOffset(1.4);
0138    Graph_v2_B29->GetYaxis()->SetTitleFont(42);
0139    Graph_v2_B29->GetZaxis()->SetLabelFont(42);
0140    Graph_v2_B29->GetZaxis()->SetLabelSize(0.05);
0141    Graph_v2_B29->GetZaxis()->SetTitleSize(0.05);
0142    Graph_v2_B29->GetZaxis()->SetTitleOffset(1);
0143    Graph_v2_B29->GetZaxis()->SetTitleFont(42);
0144    graph->SetHistogram(Graph_v2_B29);
0145    
0146    graph->Draw("");
0147    
0148    Double_t v2_D_fx30[20] = {
0149    0.25,
0150    0.75,
0151    1.25,
0152    1.75,
0153    2.25,
0154    2.75,
0155    3.25,
0156    3.75,
0157    4.25,
0158    4.75,
0159    5.25,
0160    5.75,
0161    6.25,
0162    6.75,
0163    7.25,
0164    7.75,
0165    8.25,
0166    8.75,
0167    9.25,
0168    9.75};
0169    Double_t v2_D_fy30[20] = {
0170    0.003230484,
0171    0.02045627,
0172    0.05875515,
0173    0.1035772,
0174    0.1351997,
0175    0.1468273,
0176    0.1426436,
0177    0.1296975,
0178    0.1135213,
0179    0.09734482,
0180    0.08267526,
0181    0.07001466,
0182    0.05936532,
0183    0.05052002,
0184    0.04320955,
0185    0.03716986,
0186    0.03216805,
0187    0.02800891,
0188    0.02453305,
0189    0.0216121};
0190    graph = new TGraph(20,v2_D_fx30,v2_D_fy30);
0191    graph->SetName("v2_D");
0192    graph->SetTitle("Graph");
0193 
0194    ci = TColor::GetColor("#000000");
0195    graph->SetLineColor(ci);
0196    graph->SetLineStyle(2);
0197    graph->SetLineWidth(2);
0198    graph->SetMarkerStyle(20);
0199    graph->SetMarkerSize(1.2);
0200    
0201    TH1F *Graph_v2_D30 = new TH1F("Graph_v2_D30","Graph",100,0,10.7);
0202    Graph_v2_D30->SetMinimum(0);
0203    Graph_v2_D30->SetMaximum(0.1611869);
0204    Graph_v2_D30->SetDirectory(0);
0205    Graph_v2_D30->SetLineWidth(2);
0206    Graph_v2_D30->SetMarkerStyle(20);
0207    Graph_v2_D30->SetMarkerSize(1.2);
0208    Graph_v2_D30->GetXaxis()->SetLabelFont(42);
0209    Graph_v2_D30->GetXaxis()->SetLabelSize(0.05);
0210    Graph_v2_D30->GetXaxis()->SetTitleSize(0.05);
0211    Graph_v2_D30->GetXaxis()->SetTitleOffset(1.4);
0212    Graph_v2_D30->GetXaxis()->SetTitleFont(42);
0213    Graph_v2_D30->GetYaxis()->SetLabelFont(42);
0214    Graph_v2_D30->GetYaxis()->SetLabelSize(0.05);
0215    Graph_v2_D30->GetYaxis()->SetTitleSize(0.05);
0216    Graph_v2_D30->GetYaxis()->SetTitleOffset(1.4);
0217    Graph_v2_D30->GetYaxis()->SetTitleFont(42);
0218    Graph_v2_D30->GetZaxis()->SetLabelFont(42);
0219    Graph_v2_D30->GetZaxis()->SetLabelSize(0.05);
0220    Graph_v2_D30->GetZaxis()->SetTitleSize(0.05);
0221    Graph_v2_D30->GetZaxis()->SetTitleOffset(1);
0222    Graph_v2_D30->GetZaxis()->SetTitleFont(42);
0223    graph->SetHistogram(Graph_v2_D30);
0224    
0225    graph->Draw("");
0226    
0227    Double_t Graph0_fx1011[20] = {
0228    0.25,
0229    0.75,
0230    1.25,
0231    1.75,
0232    2.25,
0233    2.75,
0234    3.25,
0235    3.75,
0236    4.25,
0237    4.75,
0238    5.25,
0239    5.75,
0240    6.25,
0241    6.75,
0242    7.25,
0243    7.75,
0244    8.25,
0245    8.75,
0246    9.25,
0247    9.75};
0248    Double_t Graph0_fy1011[20] = {
0249    0.025,
0250    0.025,
0251    0.025,
0252    0.025,
0253    0.025,
0254    0.025,
0255    0.025,
0256    0.025,
0257    0.025,
0258    0.025,
0259    0.025,
0260    0.025,
0261    0.025,
0262    0.025,
0263    0.025,
0264    0.025,
0265    0.025,
0266    0.025,
0267    0.025,
0268    0.025};
0269    Double_t Graph0_fex1011[20] = {
0270    0,
0271    0,
0272    0,
0273    0,
0274    0,
0275    0,
0276    0,
0277    0,
0278    0,
0279    0,
0280    0,
0281    0,
0282    0,
0283    0,
0284    0,
0285    0,
0286    0,
0287    0,
0288    0,
0289    0};
0290    Double_t Graph0_fey1011[20] = {
0291    0.002133623,
0292    0.001356161,
0293    0.0008824884,
0294    0.000720938,
0295    0.0007165389,
0296    0.0008040748,
0297    0.001092407,
0298    0.001410594,
0299    0.001853328,
0300    0.002409361,
0301    0.003082667,
0302    0.004021513,
0303    0.005262816,
0304    0.006880724,
0305    0.008858975,
0306    0.01154967,
0307    0.01498844,
0308    0.01921445,
0309    0.02463416,
0310    0.03110009};
0311    TGraphErrors *gre = new TGraphErrors(20,Graph0_fx1011,Graph0_fy1011,Graph0_fex1011,Graph0_fey1011);
0312    gre->SetName("Graph0");
0313    gre->SetTitle("Graph");
0314    gre->SetFillStyle(1000);
0315 
0316    ci = TColor::GetColor("#000000");
0317    gre->SetLineColor(ci);
0318    gre->SetLineWidth(4);
0319 
0320    ci = TColor::GetColor("#000000");
0321    gre->SetMarkerColor(ci);
0322    gre->SetMarkerStyle(20);
0323    gre->SetMarkerSize(2);
0324    
0325    TH1F *Graph_Graph01011 = new TH1F("Graph_Graph01011","Graph",100,0,10.7);
0326    Graph_Graph01011->SetMinimum(-0.0123201);
0327    Graph_Graph01011->SetMaximum(0.0623201);
0328    Graph_Graph01011->SetDirectory(0);
0329    Graph_Graph01011->SetStats(0);
0330    Graph_Graph01011->SetLineWidth(2);
0331    Graph_Graph01011->SetMarkerStyle(20);
0332    Graph_Graph01011->SetMarkerSize(1.2);
0333    Graph_Graph01011->GetXaxis()->SetLabelFont(42);
0334    Graph_Graph01011->GetXaxis()->SetLabelSize(0.05);
0335    Graph_Graph01011->GetXaxis()->SetTitleSize(0.05);
0336    Graph_Graph01011->GetXaxis()->SetTitleOffset(1.4);
0337    Graph_Graph01011->GetXaxis()->SetTitleFont(42);
0338    Graph_Graph01011->GetYaxis()->SetLabelFont(42);
0339    Graph_Graph01011->GetYaxis()->SetLabelSize(0.05);
0340    Graph_Graph01011->GetYaxis()->SetTitleSize(0.05);
0341    Graph_Graph01011->GetYaxis()->SetTitleOffset(1.4);
0342    Graph_Graph01011->GetYaxis()->SetTitleFont(42);
0343    Graph_Graph01011->GetZaxis()->SetLabelFont(42);
0344    Graph_Graph01011->GetZaxis()->SetLabelSize(0.05);
0345    Graph_Graph01011->GetZaxis()->SetTitleSize(0.05);
0346    Graph_Graph01011->GetZaxis()->SetTitleOffset(1);
0347    Graph_Graph01011->GetZaxis()->SetTitleFont(42);
0348    gre->SetHistogram(Graph_Graph01011);
0349    
0350    gre->Draw("p");
0351    
0352    Double_t Graph1_fx1012[8] = {
0353    2.5,
0354    3.5,
0355    4.5,
0356    5.5,
0357    6.5,
0358    7.5,
0359    8.5,
0360    9.5};
0361    Double_t Graph1_fy1012[8] = {
0362    0,
0363    0,
0364    0,
0365    0,
0366    0,
0367    0,
0368    0,
0369    0};
0370    Double_t Graph1_fex1012[8] = {
0371    0,
0372    0,
0373    0,
0374    0,
0375    0,
0376    0,
0377    0,
0378    0};
0379    Double_t Graph1_fey1012[8] = {
0380    0.02921846,
0381    0.01773862,
0382    0.01631992,
0383    0.01913001,
0384    0.02379811,
0385    0.03436945,
0386    0.04452312,
0387    0.06111874};
0388    gre = new TGraphErrors(8,Graph1_fx1012,Graph1_fy1012,Graph1_fex1012,Graph1_fey1012);
0389    gre->SetName("Graph1");
0390    gre->SetTitle("Graph");
0391    gre->SetFillStyle(1000);
0392 
0393    ci = TColor::GetColor("#0000cc");
0394    gre->SetLineColor(ci);
0395    gre->SetLineWidth(4);
0396 
0397    ci = TColor::GetColor("#0000cc");
0398    gre->SetMarkerColor(ci);
0399    gre->SetMarkerStyle(21);
0400    gre->SetMarkerSize(2);
0401    
0402    TH1F *Graph_Graph11012 = new TH1F("Graph_Graph11012","Graph",100,1.8,10.2);
0403    Graph_Graph11012->SetMinimum(-0.07334249);
0404    Graph_Graph11012->SetMaximum(0.07334249);
0405    Graph_Graph11012->SetDirectory(0);
0406    Graph_Graph11012->SetStats(0);
0407    Graph_Graph11012->SetLineWidth(2);
0408    Graph_Graph11012->SetMarkerStyle(20);
0409    Graph_Graph11012->SetMarkerSize(1.2);
0410    Graph_Graph11012->GetXaxis()->SetLabelFont(42);
0411    Graph_Graph11012->GetXaxis()->SetLabelSize(0.05);
0412    Graph_Graph11012->GetXaxis()->SetTitleSize(0.05);
0413    Graph_Graph11012->GetXaxis()->SetTitleOffset(1.4);
0414    Graph_Graph11012->GetXaxis()->SetTitleFont(42);
0415    Graph_Graph11012->GetYaxis()->SetLabelFont(42);
0416    Graph_Graph11012->GetYaxis()->SetLabelSize(0.05);
0417    Graph_Graph11012->GetYaxis()->SetTitleSize(0.05);
0418    Graph_Graph11012->GetYaxis()->SetTitleOffset(1.4);
0419    Graph_Graph11012->GetYaxis()->SetTitleFont(42);
0420    Graph_Graph11012->GetZaxis()->SetLabelFont(42);
0421    Graph_Graph11012->GetZaxis()->SetLabelSize(0.05);
0422    Graph_Graph11012->GetZaxis()->SetTitleSize(0.05);
0423    Graph_Graph11012->GetZaxis()->SetTitleOffset(1);
0424    Graph_Graph11012->GetZaxis()->SetTitleFont(42);
0425    gre->SetHistogram(Graph_Graph11012);
0426    
0427    gre->Draw("p");
0428    
0429    TLegend *leg = new TLegend(0,0.78,0.85,0.9,NULL,"brNDC");
0430    leg->SetBorderSize(0);
0431    leg->SetLineColor(1);
0432    leg->SetLineStyle(1);
0433    leg->SetLineWidth(1);
0434    leg->SetFillColor(0);
0435    leg->SetFillStyle(0);
0436    TLegendEntry *entry=leg->AddEntry("NULL","#it{#bf{sPHENIX}} Projection, 0-80% Au+Au, Years 1-3","");
0437    entry->SetLineColor(1);
0438    entry->SetLineStyle(1);
0439    entry->SetLineWidth(1);
0440    entry->SetMarkerColor(1);
0441    entry->SetMarkerStyle(21);
0442    entry->SetMarkerSize(1);
0443    entry->SetTextFont(42);
0444    entry=leg->AddEntry("NULL","21 nb^{-1} rec. Au+Au, Res(#Psi_{2})=0.5","");
0445    entry->SetLineColor(1);
0446    entry->SetLineStyle(1);
0447    entry->SetLineWidth(1);
0448    entry->SetMarkerColor(1);
0449    entry->SetMarkerStyle(21);
0450    entry->SetMarkerSize(1);
0451    entry->SetTextFont(42);
0452    leg->Draw();
0453    
0454    leg = new TLegend(0.65,0.6,0.9,0.77,NULL,"brNDC");
0455    leg->SetBorderSize(0);
0456    leg->SetLineColor(1);
0457    leg->SetLineStyle(1);
0458    leg->SetLineWidth(1);
0459    leg->SetFillColor(0);
0460    leg->SetFillStyle(0);
0461    entry=leg->AddEntry("Graph","#it{B}#rightarrow#it{D}^{0}","lp");
0462 
0463    ci = TColor::GetColor("#0000cc");
0464    entry->SetLineColor(ci);
0465    entry->SetLineStyle(1);
0466    entry->SetLineWidth(4);
0467 
0468    ci = TColor::GetColor("#0000cc");
0469    entry->SetMarkerColor(ci);
0470    entry->SetMarkerStyle(21);
0471    entry->SetMarkerSize(2);
0472    entry->SetTextFont(42);
0473    entry=leg->AddEntry("Graph","Prompt #it{D}^{0}","lp");
0474 
0475    ci = TColor::GetColor("#000000");
0476    entry->SetLineColor(ci);
0477    entry->SetLineStyle(1);
0478    entry->SetLineWidth(4);
0479 
0480    ci = TColor::GetColor("#000000");
0481    entry->SetMarkerColor(ci);
0482    entry->SetMarkerStyle(20);
0483    entry->SetMarkerSize(2);
0484    entry->SetTextFont(42);
0485    leg->Draw();
0486    
0487    leg = new TLegend(0.2,0.2,0.7,0.3,NULL,"brNDC");
0488    leg->SetBorderSize(0);
0489    leg->SetLineColor(1);
0490    leg->SetLineStyle(1);
0491    leg->SetLineWidth(1);
0492    leg->SetFillColor(0);
0493    leg->SetFillStyle(0);
0494    entry=leg->AddEntry("v2_D","#it{D}-meson (fit to STAR PRL#bf{118})","l");
0495 
0496    ci = TColor::GetColor("#000000");
0497    entry->SetLineColor(ci);
0498    entry->SetLineStyle(2);
0499    entry->SetLineWidth(2);
0500    entry->SetMarkerColor(1);
0501    entry->SetMarkerStyle(21);
0502    entry->SetMarkerSize(1);
0503    entry->SetTextFont(42);
0504    entry=leg->AddEntry("v2_B","#it{B}-meson (m_{T} scaling)","l");
0505 
0506    ci = TColor::GetColor("#3333ff");
0507    entry->SetLineColor(ci);
0508    entry->SetLineStyle(1);
0509    entry->SetLineWidth(2);
0510    entry->SetMarkerColor(1);
0511    entry->SetMarkerStyle(21);
0512    entry->SetMarkerSize(1);
0513    entry->SetTextFont(42);
0514    leg->Draw();
0515    D0_BUP2020_AuAu_v2_3yr_1->Modified();
0516    D0_BUP2020_AuAu_v2_3yr->cd();
0517    D0_BUP2020_AuAu_v2_3yr->Modified();
0518    D0_BUP2020_AuAu_v2_3yr->cd();
0519    D0_BUP2020_AuAu_v2_3yr->SetSelected(D0_BUP2020_AuAu_v2_3yr);
0520 }