void plot_lrres(){ double p[7]={0.5,1.0,1.5,2.0,2.5,3.0,3.5}; // correct once double lr[7]={0.689,0.735,0.745,0.741,0.739,0.741,0.733}; // correct twice, ref planes 0 and 0 double lr2[7]={0.729,0.771,0.779,0.782,0.782,0.787,0.776}; // correct twice ref planes 2 and 0 double lr3[7]={0.78,0.85,0.86,0.86,0.86,0.86,0.86}; TH2F *hr13 = new TH2F("hr13","Left-right resolution", 2,0,4.,2,0,1); hr13->SetXTitle("p (GeV/c)"); hr13->SetYTitle("Ratio of correctly corrected points/all points"); hr13->Draw(); TGraph *g0=new TGraph(7,p,lr3); g0->SetMarkerStyle(kFullCircle); g0->SetMarkerColor(2); g0->SetLineColor(2); TGraph *g1=new TGraph(7,p,lr2); g1->SetMarkerStyle(kOpenCircle); g1->SetMarkerColor(1); g1->SetLineColor(1); g0->Draw("p"); g1->Draw("p"); TLegend *legend=new TLegend(0.25,0.25,0.6,0.35); legend->AddEntry(g0,"Ref. planes 2 + 0","p"); legend->AddEntry(g1,"Ref. planes 0 + 0","p"); legend->Draw(); }