void plot_dlres(){ double p[7]={0.5,1.0,1.5,2.0,2.5,3.0,3.5}; double dl_corr[7]={8.0,3.8,2.3,1.7,1.5,1.3,1.2}; double dl_uncorr[7]={8.7,3.9,2.5,2.0,1.6,1.4,1.3}; TH2F *hr13 = new TH2F("hr13","Dip angle resolution from package 1", 2,0,4.,2,0,10.0); hr13->SetXTitle("p (GeV/c)"); hr13->SetYTitle("#sigma(#delta#lambda) (mrad)"); hr13->Draw(); TGraph *g0=new TGraph(7,p,dl_corr); g0->SetMarkerStyle(kFullCircle); g0->SetMarkerColor(1); g0->SetLineColor(1); g0->Draw("p"); TGraph *g1=new TGraph(7,p,dl_uncorr); g1->SetMarkerStyle(kOpenCircle); g1->SetMarkerColor(1); g1->SetLineColor(1); g1->Draw("p"); TLegend *legend=new TLegend(0.25,0.75,0.6,0.85); legend->AddEntry(g0,"Lorentz-effect correction","p"); legend->AddEntry(g1,"No Lorentz-effect correction","p"); legend->Draw(); }