#include void calc_all_yields(){ // .L /work/halld2/home/staylor/src/macros/calc_3pi_yields.C //.L /work/halld2/home/staylor/src/macros/calc_3g_yields.C double omega_3pi[45],domega_3pi[45]; double omega_3g[45],domega_3g[45]; double eta_3piq[45],deta_3piq[45]; double phi_3pi[45],dphi_3pi[45]; double phi_3g[45],dphi_3g[45]; for (unsigned int i=0;i<45;i++){ double yields[3]; double uncs[3]; calc_3pi_yields(i+1,yields,uncs); eta_3piq[i]=yields[0]; deta_3piq[i]=uncs[0]; omega_3pi[i]=yields[1]; domega_3pi[i]=uncs[1]; phi_3pi[i]=yields[2]; dphi_3pi[i]=uncs[2]; calc_3g_yields(i+1,yields,uncs); omega_3g[i]=yields[1]; domega_3g[i]=uncs[1]; phi_3g[i]=yields[2]; dphi_3g[i]=uncs[2]; } cout << "Done!" <Draw(); TGraphErrors *g2=new TGraphErrors(45,egamma,phi_3pi,0,dphi_3pi); g2->Draw("same"); TGraphErrors *g3=new TGraphErrors(45,egamma,eta_3piq,0,deta_3piq); g3->Draw("same"); }