#include "StandardLabels.C" void pres_vs_p_vs_theta(const char *suffix="") { gROOT->Reset(); gStyle->SetPalette(1); gStyle->SetPadRightMargin(0.15); TCanvas *c1 = new TCanvas("c1"); c1->SetTicks(); TFile *f = new TFile("hd_res_charged.root"); TH2D *h = (TH2D*)gROOT->FindObject("dp_over_p_sigma"); h->SetStats(0); h->SetTitle("#pi^{+} momentum resolution (relative)"); h->GetXaxis()->SetRangeUser(0.0, 130.0); h->GetZaxis()->SetRangeUser(0.0, 0.15); h->SetZTitle("#sigma(#deltap/p)"); h->Draw("colz"); StandardLabels2D(h); char fname[256]; sprintf(fname, "pres_vs_p_vs_theta%s.gif", suffix); c1->SaveAs(fname); sprintf(fname, "pres_vs_p_vs_theta%s.pdf", suffix); c1->SaveAs(fname); }