{ gROOT->Reset(); TCanvas *c1 = new TCanvas("c1","",500,10,600,600); c1->SetBottomMargin(.2); c1->SetLeftMargin(.15); c1->SetFillColor(0); c1->SetHighLightColor(0); //obwodka rysunku //c1->SetLogx(1); //lub: gPad->SetLogx(1); //tworzymy pusty histogram (uzyjemy go do zdefiniowania zakresow obu osi) TH2D *hRadii = new TH2D("hRadii","",100, 1, 1000, 100, -0.05, 1.1); hRadii->SetStats(kFALSE); hRadii->GetYaxis()->SetNdivisions(7, kTRUE); hRadii->GetXaxis()->SetNdivisions(5, kTRUE); hRadii->GetXaxis()->SetLabelSize(0.04); hRadii->GetXaxis()->SetTitleOffset(1.4); //odleglosc opisu od osi hRadii->GetYaxis()->SetLabelSize(0.04); hRadii->GetYaxis()->SetTitleOffset(1.4); //odleglosc opisu od osi hRadii->SetXTitle("#LTN_{W}#GT"); hRadii->SetYTitle("#LTK*(892)^{0}#GT/#LTK^{+/-}#GT"); hRadii->GetXaxis()->SetTitleSize(0.045); hRadii->GetYaxis()->SetTitleSize(0.045); hRadii->Draw(); legend = new TLegend(0.43, 0.7, 0.7, 0.87); //od lewej, od dolu, od prawej, od gory legend->SetBorderSize(0); legend->SetTextSize(0.03); legend->SetFillColor(0); //TLine *line2 = new TLine(1,0,1000,0); //line2->SetLineStyle(2); //line2->Draw(); //NA49 K*/K+ double x1[4]={2, 14, 37, 262}; double y1[4]={0.317, 0.315, 0.296, 0.138}; double ex1[4]={0, 2, 3, 6}; double ey1[4]={0.042, 0.100, 0.094, 0.035}; gr1 = new TGraphErrors(4,x1,y1,ex1,ey1); gr1->SetTitle(""); gr1->SetMarkerColor(623); //gr1->SetLineColor(1); gr1->SetMarkerStyle(22); gr1->SetMarkerSize(2); //legend->AddEntry(gr1,"NA49: #LTK^{*}(892)^{0}#GT/#LTK^{+}#GT","P"); gr1->Draw("P"); //NA49 K*/K- double x2[4]={2, 14, 37, 262}; double y2[4]={0.561, 0.537, 0.498, 0.274}; double ex2[4]={0, 2, 3, 6}; double ey2[4]={0.080, 0.171, 0.157, 0.070}; gr2 = new TGraphErrors(4,x2,y2,ex2,ey2); gr2->SetTitle(""); gr2->SetMarkerColor(856); //gr2->SetLineColor(1); gr2->SetMarkerStyle(23); gr2->SetMarkerSize(2); //legend->AddEntry(gr2,"NA49: #LTK^{*}(892)^{0}#GT/#LTK^{-}#GT","P"); gr2->Draw("P"); //NA61 K*/K+ double x3[1]={2.5}; double y3[1]={0.335}; double ex3[1]={0}; double ey3[1]={0.041}; gr3 = new TGraphErrors(1,x3,y3,ex3,ey3); gr3->SetTitle(""); gr3->SetMarkerColor(2); gr3->SetLineColor(2); gr3->SetLineWidth(3); gr3->SetMarkerStyle(20); gr3->SetMarkerSize(2); legend->AddEntry(gr3,"NA61/SHINE: #LTK*(892)^{0}#GT/#LTK^{+}#GT","P"); gr3->Draw("P"); //NA61 K*/K- double x4[1]={2.5}; double y4[1]={0.594}; double ex4[1]={0}; double ey4[1]={0.079}; gr4 = new TGraphErrors(1,x4,y4,ex4,ey4); gr4->SetTitle(""); gr4->SetMarkerColor(4); //1-black, 2-red, 3-green, 4-blue gr4->SetLineColor(4); gr4->SetLineWidth(3); gr4->SetMarkerStyle(21); gr4->SetMarkerSize(1.8); legend->AddEntry(gr4,"NA61/SHINE: #LTK*(892)^{0}#GT/#LTK^{-}#GT","P"); gr4->Draw("P"); legend->AddEntry(gr1,"#LTK*(892)^{0}#GT_{NA49} / #LTK^{+}#GT_{NA49 (p+p: NA61)}","P"); legend->AddEntry(gr2,"#LTK*(892)^{0}#GT_{NA49} / #LTK^{-}#GT_{NA49 (p+p: NA61)}","P"); legend->Draw(); }