Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 void D0_BUP2020_pAu_C0_5_v2_3yr()
0002 {
0003 //=========Macro generated from canvas: D0_BUP2020_pAu_C0_5_v2_3yr/D0_BUP2020_pAu_C0_5_v2_3yr
0004 //=========  (Wed May 12 23:46:27 2021) by ROOT version 6.22/02
0005    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);
0006    gStyle->SetOptFit(1);
0007    gStyle->SetOptStat(0);
0008    gStyle->SetOptTitle(0);
0009    D0_BUP2020_pAu_C0_5_v2_3yr->SetHighLightColor(2);
0010    D0_BUP2020_pAu_C0_5_v2_3yr->Range(0,0,1,1);
0011    D0_BUP2020_pAu_C0_5_v2_3yr->SetFillColor(0);
0012    D0_BUP2020_pAu_C0_5_v2_3yr->SetBorderMode(0);
0013    D0_BUP2020_pAu_C0_5_v2_3yr->SetBorderSize(2);
0014    D0_BUP2020_pAu_C0_5_v2_3yr->SetTickx(1);
0015    D0_BUP2020_pAu_C0_5_v2_3yr->SetTicky(1);
0016    D0_BUP2020_pAu_C0_5_v2_3yr->SetLeftMargin(0.16);
0017    D0_BUP2020_pAu_C0_5_v2_3yr->SetRightMargin(0.05);
0018    D0_BUP2020_pAu_C0_5_v2_3yr->SetTopMargin(0.05);
0019    D0_BUP2020_pAu_C0_5_v2_3yr->SetBottomMargin(0.16);
0020    D0_BUP2020_pAu_C0_5_v2_3yr->SetFrameBorderMode(0);
0021   
0022 // ------------>Primitives in pad: D0_BUP2020_pAu_C0_5_v2_3yr_1
0023    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);
0024    D0_BUP2020_pAu_C0_5_v2_3yr_1->Draw();
0025    D0_BUP2020_pAu_C0_5_v2_3yr_1->cd();
0026    D0_BUP2020_pAu_C0_5_v2_3yr_1->Range(-1.518987,-0.2613924,7.974684,0.4348101);
0027    D0_BUP2020_pAu_C0_5_v2_3yr_1->SetFillColor(0);
0028    D0_BUP2020_pAu_C0_5_v2_3yr_1->SetBorderMode(0);
0029    D0_BUP2020_pAu_C0_5_v2_3yr_1->SetBorderSize(2);
0030    D0_BUP2020_pAu_C0_5_v2_3yr_1->SetTickx(1);
0031    D0_BUP2020_pAu_C0_5_v2_3yr_1->SetTicky(1);
0032    D0_BUP2020_pAu_C0_5_v2_3yr_1->SetLeftMargin(0.16);
0033    D0_BUP2020_pAu_C0_5_v2_3yr_1->SetRightMargin(0.05);
0034    D0_BUP2020_pAu_C0_5_v2_3yr_1->SetTopMargin(0.05);
0035    D0_BUP2020_pAu_C0_5_v2_3yr_1->SetBottomMargin(0.16);
0036    D0_BUP2020_pAu_C0_5_v2_3yr_1->SetFrameBorderMode(0);
0037    D0_BUP2020_pAu_C0_5_v2_3yr_1->SetFrameBorderMode(0);
0038    
0039    TH1F *hframe__25 = new TH1F("hframe__25","",1000,0,7.5);
0040    hframe__25->SetMinimum(-0.15);
0041    hframe__25->SetMaximum(0.4);
0042    hframe__25->SetDirectory(0);
0043    hframe__25->SetStats(0);
0044    hframe__25->SetLineWidth(2);
0045    hframe__25->SetMarkerStyle(20);
0046    hframe__25->SetMarkerSize(1.2);
0047    hframe__25->GetXaxis()->SetTitle("#it{p}_{T} [GeV]");
0048    hframe__25->GetXaxis()->SetLabelFont(42);
0049    hframe__25->GetXaxis()->SetLabelSize(0.05);
0050    hframe__25->GetXaxis()->SetTitleSize(0.05);
0051    hframe__25->GetXaxis()->SetTitleOffset(1.4);
0052    hframe__25->GetXaxis()->SetTitleFont(42);
0053    hframe__25->GetYaxis()->SetTitle("v_{2}");
0054    hframe__25->GetYaxis()->SetLabelFont(42);
0055    hframe__25->GetYaxis()->SetLabelSize(0.05);
0056    hframe__25->GetYaxis()->SetTitleSize(0.05);
0057    hframe__25->GetYaxis()->SetTitleOffset(1.4);
0058    hframe__25->GetYaxis()->SetTitleFont(42);
0059    hframe__25->GetZaxis()->SetLabelFont(42);
0060    hframe__25->GetZaxis()->SetLabelSize(0.05);
0061    hframe__25->GetZaxis()->SetTitleSize(0.05);
0062    hframe__25->GetZaxis()->SetTitleOffset(1);
0063    hframe__25->GetZaxis()->SetTitleFont(42);
0064    hframe__25->Draw(" ");
0065    TLine *line = new TLine(0,-0,7.5,0);
0066    line->Draw();
0067    
0068    Double_t Graph0_fx1019[10] = {
0069    0.7,
0070    1.7,
0071    2.7,
0072    3.7,
0073    4.7,
0074    5.7,
0075    6.7,
0076    7.7,
0077    8.7,
0078    9.7};
0079    Double_t Graph0_fy1019[10] = {
0080    0,
0081    0,
0082    0,
0083    0,
0084    0,
0085    0,
0086    0,
0087    0,
0088    0,
0089    0};
0090    Double_t Graph0_fex1019[10] = {
0091    0,
0092    0,
0093    0,
0094    0,
0095    0,
0096    0,
0097    0,
0098    0,
0099    0,
0100    0};
0101    Double_t Graph0_fey1019[10] = {
0102    0.04950462,
0103    0.02743905,
0104    0.03037824,
0105    0.04047483,
0106    0.06798576,
0107    0.1134608,
0108    0.1889746,
0109    0.2700881,
0110    0.4431987,
0111    0.7020246};
0112    TGraphErrors *gre = new TGraphErrors(10,Graph0_fx1019,Graph0_fy1019,Graph0_fex1019,Graph0_fey1019);
0113    gre->SetName("Graph0");
0114    gre->SetTitle("Graph");
0115    gre->SetFillStyle(1000);
0116 
0117    Int_t ci;      // for color index setting
0118    TColor *color; // for color definition with alpha
0119    ci = TColor::GetColor("#000000");
0120    gre->SetLineColor(ci);
0121    gre->SetLineWidth(4);
0122 
0123    ci = TColor::GetColor("#000000");
0124    gre->SetMarkerColor(ci);
0125    gre->SetMarkerStyle(20);
0126    gre->SetMarkerSize(2);
0127    
0128    TH1F *Graph_Graph01019 = new TH1F("Graph_Graph01019","Graph",100,0,10.6);
0129    Graph_Graph01019->SetMinimum(-0.8424295);
0130    Graph_Graph01019->SetMaximum(0.8424295);
0131    Graph_Graph01019->SetDirectory(0);
0132    Graph_Graph01019->SetStats(0);
0133    Graph_Graph01019->SetLineWidth(2);
0134    Graph_Graph01019->SetMarkerStyle(20);
0135    Graph_Graph01019->SetMarkerSize(1.2);
0136    Graph_Graph01019->GetXaxis()->SetLabelFont(42);
0137    Graph_Graph01019->GetXaxis()->SetLabelSize(0.05);
0138    Graph_Graph01019->GetXaxis()->SetTitleSize(0.05);
0139    Graph_Graph01019->GetXaxis()->SetTitleOffset(1.4);
0140    Graph_Graph01019->GetXaxis()->SetTitleFont(42);
0141    Graph_Graph01019->GetYaxis()->SetLabelFont(42);
0142    Graph_Graph01019->GetYaxis()->SetLabelSize(0.05);
0143    Graph_Graph01019->GetYaxis()->SetTitleSize(0.05);
0144    Graph_Graph01019->GetYaxis()->SetTitleOffset(1.4);
0145    Graph_Graph01019->GetYaxis()->SetTitleFont(42);
0146    Graph_Graph01019->GetZaxis()->SetLabelFont(42);
0147    Graph_Graph01019->GetZaxis()->SetLabelSize(0.05);
0148    Graph_Graph01019->GetZaxis()->SetTitleSize(0.05);
0149    Graph_Graph01019->GetZaxis()->SetTitleOffset(1);
0150    Graph_Graph01019->GetZaxis()->SetTitleFont(42);
0151    gre->SetHistogram(Graph_Graph01019);
0152    
0153    gre->Draw("p");
0154    
0155    Double_t v2_D_fx33[20] = {
0156    0.25,
0157    0.75,
0158    1.25,
0159    1.75,
0160    2.25,
0161    2.75,
0162    3.25,
0163    3.75,
0164    4.25,
0165    4.75,
0166    5.25,
0167    5.75,
0168    6.25,
0169    6.75,
0170    7.25,
0171    7.75,
0172    8.25,
0173    8.75,
0174    9.25,
0175    9.75};
0176    Double_t v2_D_fy33[20] = {
0177    0.003230484,
0178    0.02045627,
0179    0.05875515,
0180    0.1035772,
0181    0.1351997,
0182    0.1468273,
0183    0.1426436,
0184    0.1296975,
0185    0.1135213,
0186    0.09734482,
0187    0.08267526,
0188    0.07001466,
0189    0.05936532,
0190    0.05052002,
0191    0.04320955,
0192    0.03716986,
0193    0.03216805,
0194    0.02800891,
0195    0.02453305,
0196    0.0216121};
0197    TGraph *graph = new TGraph(20,v2_D_fx33,v2_D_fy33);
0198    graph->SetName("v2_D");
0199    graph->SetTitle("Graph");
0200 
0201    ci = TColor::GetColor("#000000");
0202    graph->SetLineColor(ci);
0203    graph->SetLineStyle(2);
0204    graph->SetLineWidth(2);
0205    graph->SetMarkerStyle(20);
0206    graph->SetMarkerSize(1.2);
0207    
0208    TH1F *Graph_v2_D33 = new TH1F("Graph_v2_D33","Graph",100,0,10.7);
0209    Graph_v2_D33->SetMinimum(0);
0210    Graph_v2_D33->SetMaximum(0.1611869);
0211    Graph_v2_D33->SetDirectory(0);
0212    Graph_v2_D33->SetLineWidth(2);
0213    Graph_v2_D33->SetMarkerStyle(20);
0214    Graph_v2_D33->SetMarkerSize(1.2);
0215    Graph_v2_D33->GetXaxis()->SetLabelFont(42);
0216    Graph_v2_D33->GetXaxis()->SetLabelSize(0.05);
0217    Graph_v2_D33->GetXaxis()->SetTitleSize(0.05);
0218    Graph_v2_D33->GetXaxis()->SetTitleOffset(1.4);
0219    Graph_v2_D33->GetXaxis()->SetTitleFont(42);
0220    Graph_v2_D33->GetYaxis()->SetLabelFont(42);
0221    Graph_v2_D33->GetYaxis()->SetLabelSize(0.05);
0222    Graph_v2_D33->GetYaxis()->SetTitleSize(0.05);
0223    Graph_v2_D33->GetYaxis()->SetTitleOffset(1.4);
0224    Graph_v2_D33->GetYaxis()->SetTitleFont(42);
0225    Graph_v2_D33->GetZaxis()->SetLabelFont(42);
0226    Graph_v2_D33->GetZaxis()->SetLabelSize(0.05);
0227    Graph_v2_D33->GetZaxis()->SetTitleSize(0.05);
0228    Graph_v2_D33->GetZaxis()->SetTitleOffset(1);
0229    Graph_v2_D33->GetZaxis()->SetTitleFont(42);
0230    graph->SetHistogram(Graph_v2_D33);
0231    
0232    graph->Draw("");
0233    
0234    TLegend *leg = new TLegend(0.1,0.75,0.55,0.9,NULL,"brNDC");
0235    leg->SetBorderSize(0);
0236    leg->SetLineColor(1);
0237    leg->SetLineStyle(1);
0238    leg->SetLineWidth(1);
0239    leg->SetFillColor(0);
0240    leg->SetFillStyle(0);
0241    TLegendEntry *entry=leg->AddEntry("NULL","#it{#bf{sPHENIX}} Projection, Years 1-3","");
0242    entry->SetLineColor(1);
0243    entry->SetLineStyle(1);
0244    entry->SetLineWidth(1);
0245    entry->SetMarkerColor(1);
0246    entry->SetMarkerStyle(21);
0247    entry->SetMarkerSize(1);
0248    entry->SetTextFont(42);
0249    entry=leg->AddEntry("NULL","0-5% p+Au, 50 nb^{-1} trig., Res(#Psi_{2})=0.2","");
0250    entry->SetLineColor(1);
0251    entry->SetLineStyle(1);
0252    entry->SetLineWidth(1);
0253    entry->SetMarkerColor(1);
0254    entry->SetMarkerStyle(21);
0255    entry->SetMarkerSize(1);
0256    entry->SetTextFont(42);
0257    leg->Draw();
0258    
0259    leg = new TLegend(0.2,0.6,0.7,0.72,NULL,"brNDC");
0260    leg->SetBorderSize(0);
0261    leg->SetLineColor(1);
0262    leg->SetLineStyle(1);
0263    leg->SetLineWidth(1);
0264    leg->SetFillColor(0);
0265    leg->SetFillStyle(0);
0266    entry=leg->AddEntry("Graph","Prompt #it{D}^{0}","lp");
0267 
0268    ci = TColor::GetColor("#000000");
0269    entry->SetLineColor(ci);
0270    entry->SetLineStyle(1);
0271    entry->SetLineWidth(4);
0272 
0273    ci = TColor::GetColor("#000000");
0274    entry->SetMarkerColor(ci);
0275    entry->SetMarkerStyle(20);
0276    entry->SetMarkerSize(2);
0277    entry->SetTextFont(42);
0278    entry=leg->AddEntry("v2_D","#it{D}-meson (Au+Au)","l");
0279 
0280    ci = TColor::GetColor("#000000");
0281    entry->SetLineColor(ci);
0282    entry->SetLineStyle(2);
0283    entry->SetLineWidth(2);
0284    entry->SetMarkerColor(1);
0285    entry->SetMarkerStyle(21);
0286    entry->SetMarkerSize(1);
0287    entry->SetTextFont(42);
0288    leg->Draw();
0289    D0_BUP2020_pAu_C0_5_v2_3yr_1->Modified();
0290    D0_BUP2020_pAu_C0_5_v2_3yr->cd();
0291    D0_BUP2020_pAu_C0_5_v2_3yr->Modified();
0292    D0_BUP2020_pAu_C0_5_v2_3yr->cd();
0293    D0_BUP2020_pAu_C0_5_v2_3yr->SetSelected(D0_BUP2020_pAu_C0_5_v2_3yr);
0294 }