void plot_xsec_scale_dep_comp(){ double Eg[15],dEg[15]; for (int i=0;i<15;i++){ Eg[i]=2.9+0.2*i; dEg[i]=0.1; } double dsdt[15],ddsdt[15]; ifstream in_file("phi_parms.dat"); for (int i=0;i<15;i++){ double dummy; in_file >> dummy; in_file >> dsdt[i]; in_file >> ddsdt[i]; in_file >> dummy; in_file >> dummy; } double dsdt1[15],ddsdt1[15]; ifstream in_file1("phi_parms_method1.dat"); for (int i=0;i<15;i++){ double dummy; in_file1 >> dummy; in_file1 >> dsdt1[i]; in_file1 >> ddsdt1[i]; in_file1 >> dummy; in_file1 >> dummy; } TH2F *h=new TH2F("h","d#sigma/dt|_{t=0} dependence",15,2.6,5.8,10,0,2.5); h->SetXTitle("E_{#gamma} [GeV]"); h->SetYTitle("B=d#sigma/dt|_{t=0} [#mub GeV^{-2}]"); h->Draw(); TGraphErrors *g1=new TGraphErrors(15,Eg,dsdt,0,ddsdt); g1->SetMarkerColor(4); g1->SetMarkerStyle(21); g1->SetLineColor(4); g1->Draw("p"); TGraphErrors *g3=new TGraphErrors(15,Eg,dsdt1,0,ddsdt1); g3->SetMarkerColor(2); g3->SetMarkerStyle(20); g3->SetLineColor(2); g3->Draw("p"); double ballamE[2]={2.8,4.7}; double ballamdE[2]={0.5,0.6}; double ballamB[2]={1.7,1.6}; double ballamdB[2]={0.7,0.6}; TGraphErrors *g2=new TGraphErrors(2,ballamE,ballamB,ballamdE,ballamdB); g2->SetLineColor(8); g2->SetMarkerColor(8); g2->SetMarkerStyle(22); g2->Draw("p"); TLegend *legend =new TLegend(0.25,0.7,0.5,0.85); legend->AddEntry(g3,"Method 1","p"); legend->AddEntry(g1,"Method 2","p"); legend->AddEntry(g2,"Ballam 1973","p"); legend->Draw(); }