Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 void D0_BUP2020_AuAu_v2_3yr_20wk_comp()
0002 {
0003 //=========Macro generated from canvas: D0_BUP2020_AuAu_v2_3yr_20wk_comp/D0_BUP2020_AuAu_v2_3yr_20wk_comp
0004 //=========  (Wed May 12 23:46:26 2021) by ROOT version 6.22/02
0005    TCanvas *D0_BUP2020_AuAu_v2_3yr_20wk_comp = new TCanvas("D0_BUP2020_AuAu_v2_3yr_20wk_comp", "D0_BUP2020_AuAu_v2_3yr_20wk_comp",0,0,1100,800);
0006    gStyle->SetOptFit(1);
0007    gStyle->SetOptStat(0);
0008    gStyle->SetOptTitle(0);
0009    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetHighLightColor(2);
0010    D0_BUP2020_AuAu_v2_3yr_20wk_comp->Range(0,0,1,1);
0011    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetFillColor(0);
0012    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetBorderMode(0);
0013    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetBorderSize(2);
0014    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetTickx(1);
0015    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetTicky(1);
0016    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetLeftMargin(0.16);
0017    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetRightMargin(0.05);
0018    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetTopMargin(0.05);
0019    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetBottomMargin(0.16);
0020    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetFrameBorderMode(0);
0021   
0022 // ------------>Primitives in pad: D0_BUP2020_AuAu_v2_3yr_20wk_comp_1
0023    TPad *D0_BUP2020_AuAu_v2_3yr_20wk_comp_1 = new TPad("D0_BUP2020_AuAu_v2_3yr_20wk_comp_1", "D0_BUP2020_AuAu_v2_3yr_20wk_comp_1",0.01,0.01,0.99,0.99);
0024    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->Draw();
0025    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->cd();
0026    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->Range(-2.227848,-0.1708861,11.6962,0.2721519);
0027    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->SetFillColor(0);
0028    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->SetBorderMode(0);
0029    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->SetBorderSize(2);
0030    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->SetTickx(1);
0031    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->SetTicky(1);
0032    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->SetLeftMargin(0.16);
0033    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->SetRightMargin(0.05);
0034    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->SetTopMargin(0.05);
0035    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->SetBottomMargin(0.16);
0036    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->SetFrameBorderMode(0);
0037    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->SetFrameBorderMode(0);
0038    
0039    TH1F *hframe__23 = new TH1F("hframe__23","",1000,0,11);
0040    hframe__23->SetMinimum(-0.1);
0041    hframe__23->SetMaximum(0.25);
0042    hframe__23->SetDirectory(0);
0043    hframe__23->SetStats(0);
0044    hframe__23->SetLineWidth(2);
0045    hframe__23->SetMarkerStyle(20);
0046    hframe__23->SetMarkerSize(1.2);
0047    hframe__23->GetXaxis()->SetTitle("#it{p}_{T} [GeV]");
0048    hframe__23->GetXaxis()->SetLabelFont(42);
0049    hframe__23->GetXaxis()->SetLabelSize(0.05);
0050    hframe__23->GetXaxis()->SetTitleSize(0.05);
0051    hframe__23->GetXaxis()->SetTitleOffset(1.4);
0052    hframe__23->GetXaxis()->SetTitleFont(42);
0053    hframe__23->GetYaxis()->SetTitle("v_{2}");
0054    hframe__23->GetYaxis()->SetLabelFont(42);
0055    hframe__23->GetYaxis()->SetLabelSize(0.05);
0056    hframe__23->GetYaxis()->SetTitleSize(0.05);
0057    hframe__23->GetYaxis()->SetTitleOffset(1.4);
0058    hframe__23->GetYaxis()->SetTitleFont(42);
0059    hframe__23->GetZaxis()->SetLabelFont(42);
0060    hframe__23->GetZaxis()->SetLabelSize(0.05);
0061    hframe__23->GetZaxis()->SetTitleSize(0.05);
0062    hframe__23->GetZaxis()->SetTitleOffset(1);
0063    hframe__23->GetZaxis()->SetTitleFont(42);
0064    hframe__23->Draw(" ");
0065    TLine *line = new TLine(0,-0,11,0);
0066    line->Draw();
0067    
0068    Double_t v2_B_fx31[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_fy31[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_fx31,v2_B_fy31);
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_B31 = new TH1F("Graph_v2_B31","Graph",100,0,13.43505);
0123    Graph_v2_B31->SetMinimum(0);
0124    Graph_v2_B31->SetMaximum(0.1611869);
0125    Graph_v2_B31->SetDirectory(0);
0126    Graph_v2_B31->SetLineWidth(2);
0127    Graph_v2_B31->SetMarkerStyle(20);
0128    Graph_v2_B31->SetMarkerSize(1.2);
0129    Graph_v2_B31->GetXaxis()->SetLabelFont(42);
0130    Graph_v2_B31->GetXaxis()->SetLabelSize(0.05);
0131    Graph_v2_B31->GetXaxis()->SetTitleSize(0.05);
0132    Graph_v2_B31->GetXaxis()->SetTitleOffset(1.4);
0133    Graph_v2_B31->GetXaxis()->SetTitleFont(42);
0134    Graph_v2_B31->GetYaxis()->SetLabelFont(42);
0135    Graph_v2_B31->GetYaxis()->SetLabelSize(0.05);
0136    Graph_v2_B31->GetYaxis()->SetTitleSize(0.05);
0137    Graph_v2_B31->GetYaxis()->SetTitleOffset(1.4);
0138    Graph_v2_B31->GetYaxis()->SetTitleFont(42);
0139    Graph_v2_B31->GetZaxis()->SetLabelFont(42);
0140    Graph_v2_B31->GetZaxis()->SetLabelSize(0.05);
0141    Graph_v2_B31->GetZaxis()->SetTitleSize(0.05);
0142    Graph_v2_B31->GetZaxis()->SetTitleOffset(1);
0143    Graph_v2_B31->GetZaxis()->SetTitleFont(42);
0144    graph->SetHistogram(Graph_v2_B31);
0145    
0146    graph->Draw("");
0147    
0148    Double_t v2_D_fx32[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_fy32[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_fx32,v2_D_fy32);
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_D32 = new TH1F("Graph_v2_D32","Graph",100,0,10.7);
0202    Graph_v2_D32->SetMinimum(0);
0203    Graph_v2_D32->SetMaximum(0.1611869);
0204    Graph_v2_D32->SetDirectory(0);
0205    Graph_v2_D32->SetLineWidth(2);
0206    Graph_v2_D32->SetMarkerStyle(20);
0207    Graph_v2_D32->SetMarkerSize(1.2);
0208    Graph_v2_D32->GetXaxis()->SetLabelFont(42);
0209    Graph_v2_D32->GetXaxis()->SetLabelSize(0.05);
0210    Graph_v2_D32->GetXaxis()->SetTitleSize(0.05);
0211    Graph_v2_D32->GetXaxis()->SetTitleOffset(1.4);
0212    Graph_v2_D32->GetXaxis()->SetTitleFont(42);
0213    Graph_v2_D32->GetYaxis()->SetLabelFont(42);
0214    Graph_v2_D32->GetYaxis()->SetLabelSize(0.05);
0215    Graph_v2_D32->GetYaxis()->SetTitleSize(0.05);
0216    Graph_v2_D32->GetYaxis()->SetTitleOffset(1.4);
0217    Graph_v2_D32->GetYaxis()->SetTitleFont(42);
0218    Graph_v2_D32->GetZaxis()->SetLabelFont(42);
0219    Graph_v2_D32->GetZaxis()->SetLabelSize(0.05);
0220    Graph_v2_D32->GetZaxis()->SetTitleSize(0.05);
0221    Graph_v2_D32->GetZaxis()->SetTitleOffset(1);
0222    Graph_v2_D32->GetZaxis()->SetTitleFont(42);
0223    graph->SetHistogram(Graph_v2_D32);
0224    
0225    graph->Draw("");
0226    
0227    Double_t Graph0_fx1013[8] = {
0228    2.5,
0229    3.5,
0230    4.5,
0231    5.5,
0232    6.5,
0233    7.5,
0234    8.5,
0235    9.5};
0236    Double_t Graph0_fy1013[8] = {
0237    0,
0238    0,
0239    0,
0240    0,
0241    0,
0242    0,
0243    0,
0244    0};
0245    Double_t Graph0_fex1013[8] = {
0246    0,
0247    0,
0248    0,
0249    0,
0250    0,
0251    0,
0252    0,
0253    0};
0254    Double_t Graph0_fey1013[8] = {
0255    0.02921846,
0256    0.01773862,
0257    0.01631992,
0258    0.01913001,
0259    0.02379811,
0260    0.03436945,
0261    0.04452312,
0262    0.06111874};
0263    TGraphErrors *gre = new TGraphErrors(8,Graph0_fx1013,Graph0_fy1013,Graph0_fex1013,Graph0_fey1013);
0264    gre->SetName("Graph0");
0265    gre->SetTitle("Graph");
0266    gre->SetFillStyle(1000);
0267 
0268    ci = TColor::GetColor("#0000cc");
0269    gre->SetLineColor(ci);
0270    gre->SetLineWidth(4);
0271 
0272    ci = TColor::GetColor("#0000cc");
0273    gre->SetMarkerColor(ci);
0274    gre->SetMarkerStyle(21);
0275    gre->SetMarkerSize(2);
0276    
0277    TH1F *Graph_Graph01013 = new TH1F("Graph_Graph01013","Graph",100,1.8,10.2);
0278    Graph_Graph01013->SetMinimum(-0.07334249);
0279    Graph_Graph01013->SetMaximum(0.07334249);
0280    Graph_Graph01013->SetDirectory(0);
0281    Graph_Graph01013->SetStats(0);
0282    Graph_Graph01013->SetLineWidth(2);
0283    Graph_Graph01013->SetMarkerStyle(20);
0284    Graph_Graph01013->SetMarkerSize(1.2);
0285    Graph_Graph01013->GetXaxis()->SetLabelFont(42);
0286    Graph_Graph01013->GetXaxis()->SetLabelSize(0.05);
0287    Graph_Graph01013->GetXaxis()->SetTitleSize(0.05);
0288    Graph_Graph01013->GetXaxis()->SetTitleOffset(1.4);
0289    Graph_Graph01013->GetXaxis()->SetTitleFont(42);
0290    Graph_Graph01013->GetYaxis()->SetLabelFont(42);
0291    Graph_Graph01013->GetYaxis()->SetLabelSize(0.05);
0292    Graph_Graph01013->GetYaxis()->SetTitleSize(0.05);
0293    Graph_Graph01013->GetYaxis()->SetTitleOffset(1.4);
0294    Graph_Graph01013->GetYaxis()->SetTitleFont(42);
0295    Graph_Graph01013->GetZaxis()->SetLabelFont(42);
0296    Graph_Graph01013->GetZaxis()->SetLabelSize(0.05);
0297    Graph_Graph01013->GetZaxis()->SetTitleSize(0.05);
0298    Graph_Graph01013->GetZaxis()->SetTitleOffset(1);
0299    Graph_Graph01013->GetZaxis()->SetTitleFont(42);
0300    gre->SetHistogram(Graph_Graph01013);
0301    
0302    gre->Draw("p");
0303    
0304    Double_t Graph1_fx1014[8] = {
0305    2.75,
0306    3.75,
0307    4.75,
0308    5.75,
0309    6.75,
0310    7.75,
0311    8.75,
0312    9.75};
0313    Double_t Graph1_fy1014[8] = {
0314    0.025,
0315    0.025,
0316    0.025,
0317    0.025,
0318    0.025,
0319    0.025,
0320    0.025,
0321    0.025};
0322    Double_t Graph1_fex1014[8] = {
0323    0,
0324    0,
0325    0,
0326    0,
0327    0,
0328    0,
0329    0,
0330    0};
0331    Double_t Graph1_fey1014[8] = {
0332    0.03884449,
0333    0.02358262,
0334    0.02169652,
0335    0.02543239,
0336    0.0316384,
0337    0.04569247,
0338    0.05919128,
0339    0.08125433};
0340    gre = new TGraphErrors(8,Graph1_fx1014,Graph1_fy1014,Graph1_fex1014,Graph1_fey1014);
0341    gre->SetName("Graph1");
0342    gre->SetTitle("Graph");
0343    gre->SetFillStyle(1000);
0344 
0345    ci = TColor::GetColor("#00cccc");
0346    gre->SetLineColor(ci);
0347    gre->SetLineWidth(4);
0348 
0349    ci = TColor::GetColor("#00cccc");
0350    gre->SetMarkerColor(ci);
0351    gre->SetMarkerStyle(20);
0352    gre->SetMarkerSize(2);
0353    
0354    TH1F *Graph_Graph11014 = new TH1F("Graph_Graph11014","Graph",100,2.05,10.45);
0355    Graph_Graph11014->SetMinimum(-0.07250519);
0356    Graph_Graph11014->SetMaximum(0.1225052);
0357    Graph_Graph11014->SetDirectory(0);
0358    Graph_Graph11014->SetStats(0);
0359    Graph_Graph11014->SetLineWidth(2);
0360    Graph_Graph11014->SetMarkerStyle(20);
0361    Graph_Graph11014->SetMarkerSize(1.2);
0362    Graph_Graph11014->GetXaxis()->SetLabelFont(42);
0363    Graph_Graph11014->GetXaxis()->SetLabelSize(0.05);
0364    Graph_Graph11014->GetXaxis()->SetTitleSize(0.05);
0365    Graph_Graph11014->GetXaxis()->SetTitleOffset(1.4);
0366    Graph_Graph11014->GetXaxis()->SetTitleFont(42);
0367    Graph_Graph11014->GetYaxis()->SetLabelFont(42);
0368    Graph_Graph11014->GetYaxis()->SetLabelSize(0.05);
0369    Graph_Graph11014->GetYaxis()->SetTitleSize(0.05);
0370    Graph_Graph11014->GetYaxis()->SetTitleOffset(1.4);
0371    Graph_Graph11014->GetYaxis()->SetTitleFont(42);
0372    Graph_Graph11014->GetZaxis()->SetLabelFont(42);
0373    Graph_Graph11014->GetZaxis()->SetLabelSize(0.05);
0374    Graph_Graph11014->GetZaxis()->SetTitleSize(0.05);
0375    Graph_Graph11014->GetZaxis()->SetTitleOffset(1);
0376    Graph_Graph11014->GetZaxis()->SetTitleFont(42);
0377    gre->SetHistogram(Graph_Graph11014);
0378    
0379    gre->Draw("p");
0380    
0381    TLegend *leg = new TLegend(0,0.78,0.85,0.9,NULL,"brNDC");
0382    leg->SetBorderSize(0);
0383    leg->SetLineColor(1);
0384    leg->SetLineStyle(1);
0385    leg->SetLineWidth(1);
0386    leg->SetFillColor(0);
0387    leg->SetFillStyle(0);
0388    TLegendEntry *entry=leg->AddEntry("NULL","#it{#bf{sPHENIX}} Projection, 0-80% Au+Au, Years 1-3","");
0389    entry->SetLineColor(1);
0390    entry->SetLineStyle(1);
0391    entry->SetLineWidth(1);
0392    entry->SetMarkerColor(1);
0393    entry->SetMarkerStyle(21);
0394    entry->SetMarkerSize(1);
0395    entry->SetTextFont(42);
0396    entry=leg->AddEntry("NULL","#it{B}#rightarrow#it{D}^{0}, Res(#Psi_{2})=0.5","");
0397    entry->SetLineColor(1);
0398    entry->SetLineStyle(1);
0399    entry->SetLineWidth(1);
0400    entry->SetMarkerColor(1);
0401    entry->SetMarkerStyle(21);
0402    entry->SetMarkerSize(1);
0403    entry->SetTextFont(42);
0404    leg->Draw();
0405    
0406    leg = new TLegend(0.55,0.65,0.85,0.83,NULL,"brNDC");
0407    leg->SetBorderSize(0);
0408    leg->SetLineColor(1);
0409    leg->SetLineStyle(1);
0410    leg->SetLineWidth(1);
0411    leg->SetFillColor(0);
0412    leg->SetFillStyle(0);
0413    entry=leg->AddEntry("Graph","28wk: 21 nb^{-1} rec. ","lp");
0414 
0415    ci = TColor::GetColor("#0000cc");
0416    entry->SetLineColor(ci);
0417    entry->SetLineStyle(1);
0418    entry->SetLineWidth(4);
0419 
0420    ci = TColor::GetColor("#0000cc");
0421    entry->SetMarkerColor(ci);
0422    entry->SetMarkerStyle(21);
0423    entry->SetMarkerSize(2);
0424    entry->SetTextFont(42);
0425    entry=leg->AddEntry("Graph","20wk: 12 nb^{-1} rec.","lp");
0426 
0427    ci = TColor::GetColor("#00cccc");
0428    entry->SetLineColor(ci);
0429    entry->SetLineStyle(1);
0430    entry->SetLineWidth(4);
0431 
0432    ci = TColor::GetColor("#00cccc");
0433    entry->SetMarkerColor(ci);
0434    entry->SetMarkerStyle(20);
0435    entry->SetMarkerSize(2);
0436    entry->SetTextFont(42);
0437    leg->Draw();
0438    
0439    leg = new TLegend(0.2,0.2,0.7,0.3,NULL,"brNDC");
0440    leg->SetBorderSize(0);
0441    leg->SetLineColor(1);
0442    leg->SetLineStyle(1);
0443    leg->SetLineWidth(1);
0444    leg->SetFillColor(0);
0445    leg->SetFillStyle(0);
0446    entry=leg->AddEntry("v2_D","#it{D}-meson (fit to STAR PRL#bf{118})","l");
0447 
0448    ci = TColor::GetColor("#000000");
0449    entry->SetLineColor(ci);
0450    entry->SetLineStyle(2);
0451    entry->SetLineWidth(2);
0452    entry->SetMarkerColor(1);
0453    entry->SetMarkerStyle(21);
0454    entry->SetMarkerSize(1);
0455    entry->SetTextFont(42);
0456    entry=leg->AddEntry("v2_B","#it{B}-meson (m_{T} scaling)","l");
0457 
0458    ci = TColor::GetColor("#3333ff");
0459    entry->SetLineColor(ci);
0460    entry->SetLineStyle(1);
0461    entry->SetLineWidth(2);
0462    entry->SetMarkerColor(1);
0463    entry->SetMarkerStyle(21);
0464    entry->SetMarkerSize(1);
0465    entry->SetTextFont(42);
0466    leg->Draw();
0467    D0_BUP2020_AuAu_v2_3yr_20wk_comp_1->Modified();
0468    D0_BUP2020_AuAu_v2_3yr_20wk_comp->cd();
0469    D0_BUP2020_AuAu_v2_3yr_20wk_comp->Modified();
0470    D0_BUP2020_AuAu_v2_3yr_20wk_comp->cd();
0471    D0_BUP2020_AuAu_v2_3yr_20wk_comp->SetSelected(D0_BUP2020_AuAu_v2_3yr_20wk_comp);
0472 }