void plot_lrres2(){ double p[7]={0.5,1.0,1.5,2.0,2.5,3.0,3.5}; double lr0[7]={0.552,0.581,0.573,0.563,0.562,0.563,0.543}; double lr15[7]={0.653,0.715,0.722,0.724,0.729,0.722,0.718}; double lr30[7]={0.677,0.746,0.748,0.745,0.747,0.744,0.745}; double lr45[7]={0.701,0.764,0.768,0.774,0.767,0.770,0.763}; double lr60[7]={0.729,0.771,0.779,0.782,0.782,0.787,0.776}; double lr75[7]={0.706,0.731,0.742,0.748,0.746,0.756,0.752}; 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,lr0); g0->SetMarkerStyle(kFullCircle); g0->SetMarkerColor(1); g0->SetLineColor(1); TGraph *g1=new TGraph(7,p,lr15); g1->SetMarkerStyle(kOpenCircle); g1->SetMarkerColor(1); g1->SetLineColor(1); TGraph *g2=new TGraph(7,p,lr30); g2->SetMarkerStyle(kFullCircle); g2->SetMarkerColor(2); g2->SetLineColor(2); TGraph *g3=new TGraph(7,p,lr45); g3->SetMarkerStyle(kOpenCircle); g3->SetMarkerColor(2); g3->SetLineColor(2); TGraph *g4=new TGraph(7,p,lr60); g4->SetMarkerStyle(kFullCircle); g4->SetMarkerColor(4); g4->SetLineColor(4); TGraph *g5=new TGraph(7,p,lr75); g5->SetMarkerStyle(kOpenCircle); g5->SetMarkerColor(4); g5->SetLineColor(4); g0->Draw("pl"); g1->Draw("pl"); g2->Draw("pl"); g3->Draw("pl"); g4->Draw("pl"); g5->Draw("pl"); TLegend *legend=new TLegend(0.25,0.15,0.6,0.4); legend->AddEntry(g0,"0/0/0 degree rotation","pl"); legend->AddEntry(g1,"0/15/-15 degree rotation","pl"); legend->AddEntry(g2,"0/30/-30 degree rotation","pl"); legend->AddEntry(g3,"0/45/-45 degree rotation","pl"); legend->AddEntry(g4,"0/60/-60 degree rotation","pl"); legend->AddEntry(g5,"0/75/-75 degree rotation","pl"); legend->Draw(); double angle[6]={0,15,30,45,60,75}; double lr[6]={0.573,0.722,0.748,0.768,0.779,0.742}; TH2F *hr13 = new TH2F("hr13","Left-right resolution for p=1.5 GeV/c", 2,-15,90.,2,0,1); hr13->SetXTitle("Rotation angle (degrees)"); hr13->SetYTitle("Ratio of correctly corrected points/all points"); hr13->Draw(); TGraph *g6=new TGraph(6,angle,lr); g6->SetMarkerStyle(kFullCircle); g6->SetMarkerColor(2); g6->SetLineColor(2); g6->Draw("p"); }