#include "StandardLabels.C" void pres_vs_theta(void) { TFile *fil = new TFile("rezest.root"); TH1D *pres_vs_theta = (TH1D*)gROOT->FindObject("pres_vs_theta"); TCanvas *c1 = new TCanvas("c1"); c1->SetGrid(); c1->SetTicks(); TH2D *axes = new TH2D("axes", "Momentum resolution as calculated by REZEST", 100, 0.0, 90.0, 100, 0.0, 0.30); axes->SetStats(0); axes->SetXTitle("#theta (degrees)"); axes->SetYTitle("#deltap/p"); axes->Draw(); pres_vs_theta->Draw("same"); StandardLabels(axes, "#pi at p=1.5GeV/c"); c1->SaveAs("pres_vs_theta.png"); c1->SaveAs("pres_vs_theta.pdf"); }