void plot_ptres(){ double p[7]={0.5,1.0,1.5,2.0,2.5,3.0,3.5}; double dpt_corr[7]={0.064,0.066,0.076,0.090,0.113,0.133,0.138}; double dpt_uncorr[7]={0.08,0.106,0.179,0.221,0.258,0.345,0.381}; TH2F *hr13 = new TH2F("hr13","Transverse momentum resolution from package 1", 2,0,4.,2,0,0.4); hr13->SetXTitle("p (GeV/c)"); hr13->SetYTitle("#sigma(#deltapT/pT)"); hr13->Draw(); TGraph *g0=new TGraph(7,p,dpt_corr); g0->SetMarkerStyle(kFullCircle); g0->SetMarkerColor(1); g0->SetLineColor(1); g0->Draw("p"); TGraph *g1=new TGraph(7,p,dpt_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(); }