#include "StandardLabels.C" void ptres_vs_p_vs_theta(const char *suffix="") { gROOT->Reset(); gStyle->SetPalette(1); gStyle->SetPadRightMargin(0.15); TCanvas *c1 = new TCanvas("c1"); c1->SetTicks(); char fname[256]; sprintf(fname, "hd_res_charged%s.root", suffix); TFile *f = new TFile(fname); TH2D *h = (TH2D*)gROOT->FindObject("dpt_over_pt_sigma"); h->SetStats(0); h->SetTitle("proton momentum resolution"); h->GetXaxis()->SetRangeUser(0.0, 9.0); h->GetZaxis()->SetRangeUser(0.0, 0.15); h->SetXTitle("Polar angle #theta (degrees)"); h->SetYTitle("Total Momentum (GeV/c)"); h->SetZTitle("#sigma(#deltap/p)"); h->Draw("colz"); StandardLabels2D(h, suffix); char fname[256]; sprintf(fname, "ptres_vs_p_vs_theta%s.gif", suffix); c1->SaveAs(fname); sprintf(fname, "ptres_vs_p_vs_theta%s.pdf", suffix); c1->SaveAs(fname); }