Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 void D0_BUP2020_AN_5yr_comparison()
0002 {
0003 //=========Macro generated from canvas: D0_BUP2020_AN_5yr_comparison/D0_BUP2020OOArArO_AN_5yr_comparison
0004 //=========  (Wed May 12 23:46:28 2021) by ROOT version 6.22/02
0005    TCanvas *D0_BUP2020_AN_5yr_comparison = new TCanvas("D0_BUP2020_AN_5yr_comparison", "D0_BUP2020OOArArO_AN_5yr_comparison",0,0,1100,800);
0006    gStyle->SetOptFit(1);
0007    gStyle->SetOptStat(0);
0008    gStyle->SetOptTitle(0);
0009    D0_BUP2020_AN_5yr_comparison->SetHighLightColor(2);
0010    D0_BUP2020_AN_5yr_comparison->Range(0,0,1,1);
0011    D0_BUP2020_AN_5yr_comparison->SetFillColor(0);
0012    D0_BUP2020_AN_5yr_comparison->SetBorderMode(0);
0013    D0_BUP2020_AN_5yr_comparison->SetBorderSize(2);
0014    D0_BUP2020_AN_5yr_comparison->SetTickx(1);
0015    D0_BUP2020_AN_5yr_comparison->SetTicky(1);
0016    D0_BUP2020_AN_5yr_comparison->SetLeftMargin(0.16);
0017    D0_BUP2020_AN_5yr_comparison->SetRightMargin(0.05);
0018    D0_BUP2020_AN_5yr_comparison->SetTopMargin(0.05);
0019    D0_BUP2020_AN_5yr_comparison->SetBottomMargin(0.16);
0020    D0_BUP2020_AN_5yr_comparison->SetFrameBorderMode(0);
0021   
0022 // ------------>Primitives in pad: D0_BUP2020_AN_5yr_comparison_1
0023    TPad *D0_BUP2020_AN_5yr_comparison_1 = new TPad("D0_BUP2020_AN_5yr_comparison_1", "D0_BUP2020_AN_5yr_comparison_1",0.01,0.01,0.99,0.99);
0024    D0_BUP2020_AN_5yr_comparison_1->Draw();
0025    D0_BUP2020_AN_5yr_comparison_1->cd();
0026    D0_BUP2020_AN_5yr_comparison_1->Range(-1.012658,-0.0371519,5.316456,0.03879747);
0027    D0_BUP2020_AN_5yr_comparison_1->SetFillColor(0);
0028    D0_BUP2020_AN_5yr_comparison_1->SetBorderMode(0);
0029    D0_BUP2020_AN_5yr_comparison_1->SetBorderSize(2);
0030    D0_BUP2020_AN_5yr_comparison_1->SetTickx(1);
0031    D0_BUP2020_AN_5yr_comparison_1->SetTicky(1);
0032    D0_BUP2020_AN_5yr_comparison_1->SetLeftMargin(0.16);
0033    D0_BUP2020_AN_5yr_comparison_1->SetRightMargin(0.05);
0034    D0_BUP2020_AN_5yr_comparison_1->SetTopMargin(0.05);
0035    D0_BUP2020_AN_5yr_comparison_1->SetBottomMargin(0.16);
0036    D0_BUP2020_AN_5yr_comparison_1->SetFrameBorderMode(0);
0037    D0_BUP2020_AN_5yr_comparison_1->SetFrameBorderMode(0);
0038    
0039    TH1F *hframe__28 = new TH1F("hframe__28","",1000,0,5);
0040    hframe__28->SetMinimum(-0.025);
0041    hframe__28->SetMaximum(0.035);
0042    hframe__28->SetDirectory(0);
0043    hframe__28->SetStats(0);
0044    hframe__28->SetLineWidth(2);
0045    hframe__28->SetMarkerStyle(20);
0046    hframe__28->SetMarkerSize(1.2);
0047    hframe__28->GetXaxis()->SetTitle("#it{p}_{T} [GeV]");
0048    hframe__28->GetXaxis()->SetLabelFont(42);
0049    hframe__28->GetXaxis()->SetLabelSize(0.05);
0050    hframe__28->GetXaxis()->SetTitleSize(0.05);
0051    hframe__28->GetXaxis()->SetTitleOffset(1.4);
0052    hframe__28->GetXaxis()->SetTitleFont(42);
0053    hframe__28->GetYaxis()->SetTitle("A_{N}");
0054    hframe__28->GetYaxis()->SetLabelFont(42);
0055    hframe__28->GetYaxis()->SetLabelSize(0.05);
0056    hframe__28->GetYaxis()->SetTitleSize(0.05);
0057    hframe__28->GetYaxis()->SetTitleOffset(1.4);
0058    hframe__28->GetYaxis()->SetTitleFont(42);
0059    hframe__28->GetZaxis()->SetLabelFont(42);
0060    hframe__28->GetZaxis()->SetLabelSize(0.05);
0061    hframe__28->GetZaxis()->SetTitleSize(0.05);
0062    hframe__28->GetZaxis()->SetTitleOffset(1);
0063    hframe__28->GetZaxis()->SetTitleFont(42);
0064    hframe__28->Draw(" ");
0065    TLine *line = new TLine(0,-0,5,0);
0066    line->Draw();
0067    
0068    Double_t Graph0_fx37[30] = {
0069    1,
0070    1.1,
0071    1.2,
0072    1.3,
0073    1.4,
0074    1.5,
0075    1.6,
0076    1.7,
0077    1.8,
0078    1.9,
0079    2,
0080    2.1,
0081    2.2,
0082    2.3,
0083    2.4,
0084    2.5,
0085    2.6,
0086    2.7,
0087    2.8,
0088    2.9,
0089    3,
0090    3.1,
0091    3.2,
0092    3.3,
0093    3.4,
0094    3.5,
0095    3.6,
0096    3.7,
0097    3.8,
0098    3.9};
0099    Double_t Graph0_fy37[30] = {
0100    -0.0003416974,
0101    -0.0003446386,
0102    -0.0003737235,
0103    -0.0003766647,
0104    -0.0003796059,
0105    -0.0003825471,
0106    -0.000423376,
0107    -0.000447253,
0108    -0.0004501941,
0109    -0.0004531353,
0110    -0.0004560765,
0111    -0.0004821873,
0112    -0.0005190058,
0113    -0.000522962,
0114    -0.0005266647,
0115    -0.0005394398,
0116    -0.0005668878,
0117    -0.0005917628,
0118    -0.0006011655,
0119    -0.0006393142,
0120    -0.0006619588,
0121    -0.0006768133,
0122    -0.0007164591,
0123    -0.0007296059,
0124    -0.0007325471,
0125    -0.0007447225,
0126    -0.000784316,
0127    -0.0008001941,
0128    -0.0008463742,
0129    -0.0008649};
0130    TGraph *graph = new TGraph(30,Graph0_fx37,Graph0_fy37);
0131    graph->SetName("Graph0");
0132    graph->SetTitle("Graph");
0133    graph->SetFillStyle(1000);
0134 
0135    Int_t ci;      // for color index setting
0136    TColor *color; // for color definition with alpha
0137    ci = TColor::GetColor("#006666");
0138    graph->SetLineColor(ci);
0139    graph->SetLineWidth(5);
0140    graph->SetMarkerStyle(20);
0141    graph->SetMarkerSize(1.2);
0142    
0143    TH1F *Graph_Graph037 = new TH1F("Graph_Graph037","Graph",100,0.71,4.19);
0144    Graph_Graph037->SetMinimum(-0.0009172203);
0145    Graph_Graph037->SetMaximum(-0.0002893771);
0146    Graph_Graph037->SetDirectory(0);
0147    Graph_Graph037->SetStats(0);
0148    Graph_Graph037->SetLineWidth(2);
0149    Graph_Graph037->SetMarkerStyle(20);
0150    Graph_Graph037->SetMarkerSize(1.2);
0151    Graph_Graph037->GetXaxis()->SetLabelFont(42);
0152    Graph_Graph037->GetXaxis()->SetLabelSize(0.05);
0153    Graph_Graph037->GetXaxis()->SetTitleSize(0.05);
0154    Graph_Graph037->GetXaxis()->SetTitleOffset(1.4);
0155    Graph_Graph037->GetXaxis()->SetTitleFont(42);
0156    Graph_Graph037->GetYaxis()->SetLabelFont(42);
0157    Graph_Graph037->GetYaxis()->SetLabelSize(0.05);
0158    Graph_Graph037->GetYaxis()->SetTitleSize(0.05);
0159    Graph_Graph037->GetYaxis()->SetTitleOffset(1.4);
0160    Graph_Graph037->GetYaxis()->SetTitleFont(42);
0161    Graph_Graph037->GetZaxis()->SetLabelFont(42);
0162    Graph_Graph037->GetZaxis()->SetLabelSize(0.05);
0163    Graph_Graph037->GetZaxis()->SetTitleSize(0.05);
0164    Graph_Graph037->GetZaxis()->SetTitleOffset(1);
0165    Graph_Graph037->GetZaxis()->SetTitleFont(42);
0166    graph->SetHistogram(Graph_Graph037);
0167    
0168    graph->Draw("l");
0169    
0170    Double_t Graph1_fx38[30] = {
0171    1,
0172    1.1,
0173    1.2,
0174    1.3,
0175    1.4,
0176    1.5,
0177    1.6,
0178    1.7,
0179    1.8,
0180    1.9,
0181    2,
0182    2.1,
0183    2.2,
0184    2.3,
0185    2.4,
0186    2.5,
0187    2.6,
0188    2.7,
0189    2.8,
0190    2.9,
0191    3,
0192    3.1,
0193    3.2,
0194    3.3,
0195    3.4,
0196    3.5,
0197    3.6,
0198    3.7,
0199    3.8,
0200    3.9};
0201    Double_t Graph1_fy38[30] = {
0202    -0.01879963,
0203    -0.01869631,
0204    -0.0185394,
0205    -0.01832259,
0206    -0.01809963,
0207    -0.01782545,
0208    -0.01752092,
0209    -0.01718923,
0210    -0.01673616,
0211    -0.01626995,
0212    -0.01585206,
0213    -0.0153734,
0214    -0.01496127,
0215    -0.01456491,
0216    -0.01422932,
0217    -0.01387782,
0218    -0.01353845,
0219    -0.01321867,
0220    -0.01285432,
0221    -0.01258897,
0222    -0.01229654,
0223    -0.01199905,
0224    -0.01177594,
0225    -0.01148847,
0226    -0.01129233,
0227    -0.01101149,
0228    -0.01081373,
0229    -0.01058588,
0230    -0.01039728,
0231    -0.01018889};
0232    graph = new TGraph(30,Graph1_fx38,Graph1_fy38);
0233    graph->SetName("Graph1");
0234    graph->SetTitle("Graph");
0235    graph->SetFillStyle(1000);
0236 
0237    ci = TColor::GetColor("#000099");
0238    graph->SetLineColor(ci);
0239    graph->SetLineStyle(2);
0240    graph->SetLineWidth(5);
0241    graph->SetMarkerStyle(20);
0242    graph->SetMarkerSize(1.2);
0243    
0244    TH1F *Graph_Graph138 = new TH1F("Graph_Graph138","Graph",100,0.71,4.19);
0245    Graph_Graph138->SetMinimum(-0.0196607);
0246    Graph_Graph138->SetMaximum(-0.009327811);
0247    Graph_Graph138->SetDirectory(0);
0248    Graph_Graph138->SetStats(0);
0249    Graph_Graph138->SetLineWidth(2);
0250    Graph_Graph138->SetMarkerStyle(20);
0251    Graph_Graph138->SetMarkerSize(1.2);
0252    Graph_Graph138->GetXaxis()->SetLabelFont(42);
0253    Graph_Graph138->GetXaxis()->SetLabelSize(0.05);
0254    Graph_Graph138->GetXaxis()->SetTitleSize(0.05);
0255    Graph_Graph138->GetXaxis()->SetTitleOffset(1.4);
0256    Graph_Graph138->GetXaxis()->SetTitleFont(42);
0257    Graph_Graph138->GetYaxis()->SetLabelFont(42);
0258    Graph_Graph138->GetYaxis()->SetLabelSize(0.05);
0259    Graph_Graph138->GetYaxis()->SetTitleSize(0.05);
0260    Graph_Graph138->GetYaxis()->SetTitleOffset(1.4);
0261    Graph_Graph138->GetYaxis()->SetTitleFont(42);
0262    Graph_Graph138->GetZaxis()->SetLabelFont(42);
0263    Graph_Graph138->GetZaxis()->SetLabelSize(0.05);
0264    Graph_Graph138->GetZaxis()->SetTitleSize(0.05);
0265    Graph_Graph138->GetZaxis()->SetTitleOffset(1);
0266    Graph_Graph138->GetZaxis()->SetTitleFont(42);
0267    graph->SetHistogram(Graph_Graph138);
0268    
0269    graph->Draw("l");
0270    
0271    Double_t Graph2_fx1023[10] = {
0272    0.5,
0273    1.5,
0274    2.5,
0275    3.5,
0276    4.5,
0277    5.5,
0278    6.5,
0279    7.5,
0280    8.5,
0281    9.5};
0282    Double_t Graph2_fy1023[10] = {
0283    0,
0284    0,
0285    0,
0286    0,
0287    0,
0288    0,
0289    0,
0290    0,
0291    0,
0292    0};
0293    Double_t Graph2_fex1023[10] = {
0294    0,
0295    0,
0296    0,
0297    0,
0298    0,
0299    0,
0300    0,
0301    0,
0302    0,
0303    0};
0304    Double_t Graph2_fey1023[10] = {
0305    0.005320126,
0306    0.0029488,
0307    0.003264666,
0308    0.00434972,
0309    0.007306244,
0310    0.01219333,
0311    0.02030859,
0312    0.02902563,
0313    0.04762935,
0314    0.07544466};
0315    TGraphErrors *gre = new TGraphErrors(10,Graph2_fx1023,Graph2_fy1023,Graph2_fex1023,Graph2_fey1023);
0316    gre->SetName("Graph2");
0317    gre->SetTitle("Graph");
0318    gre->SetFillStyle(1000);
0319 
0320    ci = TColor::GetColor("#999999");
0321    gre->SetLineColor(ci);
0322    gre->SetLineWidth(4);
0323 
0324    ci = TColor::GetColor("#999999");
0325    gre->SetMarkerColor(ci);
0326    gre->SetMarkerStyle(24);
0327    gre->SetMarkerSize(2);
0328    
0329    TH1F *Graph_Graph21023 = new TH1F("Graph_Graph21023","Graph",100,0,10.4);
0330    Graph_Graph21023->SetMinimum(-0.0905336);
0331    Graph_Graph21023->SetMaximum(0.0905336);
0332    Graph_Graph21023->SetDirectory(0);
0333    Graph_Graph21023->SetStats(0);
0334    Graph_Graph21023->SetLineWidth(2);
0335    Graph_Graph21023->SetMarkerStyle(20);
0336    Graph_Graph21023->SetMarkerSize(1.2);
0337    Graph_Graph21023->GetXaxis()->SetLabelFont(42);
0338    Graph_Graph21023->GetXaxis()->SetLabelSize(0.05);
0339    Graph_Graph21023->GetXaxis()->SetTitleSize(0.05);
0340    Graph_Graph21023->GetXaxis()->SetTitleOffset(1.4);
0341    Graph_Graph21023->GetXaxis()->SetTitleFont(42);
0342    Graph_Graph21023->GetYaxis()->SetLabelFont(42);
0343    Graph_Graph21023->GetYaxis()->SetLabelSize(0.05);
0344    Graph_Graph21023->GetYaxis()->SetTitleSize(0.05);
0345    Graph_Graph21023->GetYaxis()->SetTitleOffset(1.4);
0346    Graph_Graph21023->GetYaxis()->SetTitleFont(42);
0347    Graph_Graph21023->GetZaxis()->SetLabelFont(42);
0348    Graph_Graph21023->GetZaxis()->SetLabelSize(0.05);
0349    Graph_Graph21023->GetZaxis()->SetTitleSize(0.05);
0350    Graph_Graph21023->GetZaxis()->SetTitleOffset(1);
0351    Graph_Graph21023->GetZaxis()->SetTitleFont(42);
0352    gre->SetHistogram(Graph_Graph21023);
0353    
0354    gre->Draw("p");
0355    
0356    Double_t Graph3_fx1024[20] = {
0357    0.25,
0358    0.75,
0359    1.25,
0360    1.75,
0361    2.25,
0362    2.75,
0363    3.25,
0364    3.75,
0365    4.25,
0366    4.75,
0367    5.25,
0368    5.75,
0369    6.25,
0370    6.75,
0371    7.25,
0372    7.75,
0373    8.25,
0374    8.75,
0375    9.25,
0376    9.75};
0377    Double_t Graph3_fy1024[20] = {
0378    0,
0379    0,
0380    0,
0381    0,
0382    0,
0383    0,
0384    0,
0385    0,
0386    0,
0387    0,
0388    0,
0389    0,
0390    0,
0391    0,
0392    0,
0393    0,
0394    0,
0395    0,
0396    0,
0397    0};
0398    Double_t Graph3_fex1024[20] = {
0399    0,
0400    0,
0401    0,
0402    0,
0403    0,
0404    0,
0405    0,
0406    0,
0407    0,
0408    0,
0409    0,
0410    0,
0411    0,
0412    0,
0413    0,
0414    0,
0415    0,
0416    0,
0417    0,
0418    0};
0419    Double_t Graph3_fey1024[20] = {
0420    0.002623881,
0421    0.001700133,
0422    0.001163185,
0423    0.001078443,
0424    0.001152524,
0425    0.001346386,
0426    0.001484601,
0427    0.001886026,
0428    0.00245292,
0429    0.003257298,
0430    0.00413699,
0431    0.005338863,
0432    0.006897833,
0433    0.008876149,
0434    0.009849684,
0435    0.01270509,
0436    0.01626371,
0437    0.02063689,
0438    0.025931,
0439    0.03235142};
0440    gre = new TGraphErrors(20,Graph3_fx1024,Graph3_fy1024,Graph3_fex1024,Graph3_fey1024);
0441    gre->SetName("Graph3");
0442    gre->SetTitle("Graph");
0443    gre->SetFillStyle(1000);
0444 
0445    ci = TColor::GetColor("#000000");
0446    gre->SetLineColor(ci);
0447    gre->SetLineWidth(4);
0448 
0449    ci = TColor::GetColor("#000000");
0450    gre->SetMarkerColor(ci);
0451    gre->SetMarkerStyle(20);
0452    gre->SetMarkerSize(2);
0453    
0454    TH1F *Graph_Graph31024 = new TH1F("Graph_Graph31024","Graph",100,0,10.7);
0455    Graph_Graph31024->SetMinimum(-0.0388217);
0456    Graph_Graph31024->SetMaximum(0.0388217);
0457    Graph_Graph31024->SetDirectory(0);
0458    Graph_Graph31024->SetStats(0);
0459    Graph_Graph31024->SetLineWidth(2);
0460    Graph_Graph31024->SetMarkerStyle(20);
0461    Graph_Graph31024->SetMarkerSize(1.2);
0462    Graph_Graph31024->GetXaxis()->SetLabelFont(42);
0463    Graph_Graph31024->GetXaxis()->SetLabelSize(0.05);
0464    Graph_Graph31024->GetXaxis()->SetTitleSize(0.05);
0465    Graph_Graph31024->GetXaxis()->SetTitleOffset(1.4);
0466    Graph_Graph31024->GetXaxis()->SetTitleFont(42);
0467    Graph_Graph31024->GetYaxis()->SetLabelFont(42);
0468    Graph_Graph31024->GetYaxis()->SetLabelSize(0.05);
0469    Graph_Graph31024->GetYaxis()->SetTitleSize(0.05);
0470    Graph_Graph31024->GetYaxis()->SetTitleOffset(1.4);
0471    Graph_Graph31024->GetYaxis()->SetTitleFont(42);
0472    Graph_Graph31024->GetZaxis()->SetLabelFont(42);
0473    Graph_Graph31024->GetZaxis()->SetLabelSize(0.05);
0474    Graph_Graph31024->GetZaxis()->SetTitleSize(0.05);
0475    Graph_Graph31024->GetZaxis()->SetTitleOffset(1);
0476    Graph_Graph31024->GetZaxis()->SetTitleFont(42);
0477    gre->SetHistogram(Graph_Graph31024);
0478    
0479    gre->Draw("p");
0480    
0481    TLegend *leg = new TLegend(0,0.8,0.83,0.95,NULL,"brNDC");
0482    leg->SetBorderSize(0);
0483    leg->SetLineColor(1);
0484    leg->SetLineStyle(1);
0485    leg->SetLineWidth(1);
0486    leg->SetFillColor(0);
0487    leg->SetFillStyle(0);
0488    TLegendEntry *entry=leg->AddEntry("NULL","#it{#bf{sPHENIX}} Projection, #it{p}^{#uparrow}+#it{p}#rightarrowD^{0}/#bar{D}^{0}+X, P=0.57","");
0489    entry->SetLineColor(1);
0490    entry->SetLineStyle(1);
0491    entry->SetLineWidth(1);
0492    entry->SetMarkerColor(1);
0493    entry->SetMarkerStyle(21);
0494    entry->SetMarkerSize(1);
0495    entry->SetTextFont(42);
0496    leg->Draw();
0497    
0498    leg = new TLegend(0.2,0.58,0.85,0.83,NULL,"brNDC");
0499    leg->SetBorderSize(0);
0500    leg->SetLineColor(1);
0501    leg->SetLineStyle(1);
0502    leg->SetLineWidth(1);
0503    leg->SetFillColor(0);
0504    leg->SetFillStyle(0);
0505    entry=leg->AddEntry("Graph","6.2 pb^{-1} str. #it{p}+#it{p}, Years 1-3","pl");
0506 
0507    ci = TColor::GetColor("#999999");
0508    entry->SetLineColor(ci);
0509    entry->SetLineStyle(1);
0510    entry->SetLineWidth(4);
0511 
0512    ci = TColor::GetColor("#999999");
0513    entry->SetMarkerColor(ci);
0514    entry->SetMarkerStyle(24);
0515    entry->SetMarkerSize(2);
0516    entry->SetTextFont(42);
0517    entry=leg->AddEntry("Graph","86 pb^{-1} str. #it{p}+#it{p}, Years 1-5","lp");
0518 
0519    ci = TColor::GetColor("#000000");
0520    entry->SetLineColor(ci);
0521    entry->SetLineStyle(1);
0522    entry->SetLineWidth(4);
0523 
0524    ci = TColor::GetColor("#000000");
0525    entry->SetMarkerColor(ci);
0526    entry->SetMarkerStyle(20);
0527    entry->SetMarkerSize(2);
0528    entry->SetTextFont(42);
0529    entry=leg->AddEntry("Graph0","Kang, PRD#bf{78}, #lambda_{f} = #lambda_{d} = 0","l");
0530 
0531    ci = TColor::GetColor("#006666");
0532    entry->SetLineColor(ci);
0533    entry->SetLineStyle(1);
0534    entry->SetLineWidth(5);
0535    entry->SetMarkerColor(1);
0536    entry->SetMarkerStyle(21);
0537    entry->SetMarkerSize(1);
0538    entry->SetTextFont(42);
0539    entry=leg->AddEntry("Graph1","Kang, PRD#bf{78}, #lambda_{f} = -#lambda_{d} = 70 MeV","l");
0540 
0541    ci = TColor::GetColor("#000099");
0542    entry->SetLineColor(ci);
0543    entry->SetLineStyle(2);
0544    entry->SetLineWidth(5);
0545    entry->SetMarkerColor(1);
0546    entry->SetMarkerStyle(21);
0547    entry->SetMarkerSize(1);
0548    entry->SetTextFont(42);
0549    leg->Draw();
0550    D0_BUP2020_AN_5yr_comparison_1->Modified();
0551    D0_BUP2020_AN_5yr_comparison->cd();
0552    D0_BUP2020_AN_5yr_comparison->Modified();
0553    D0_BUP2020_AN_5yr_comparison->cd();
0554    D0_BUP2020_AN_5yr_comparison->SetSelected(D0_BUP2020_AN_5yr_comparison);
0555 }