// This macro is to be used on a root file produced with the // event.C selector. #include "chain_fine.h" #include "chain_course.h" #include "StandardLabels.C" void theta_res_vs_E_vs_theta(const char *who="fine") { gROOT->Reset(); gStyle->SetPadRightMargin(0.15); char fname[256]; sprintf(fname,"event_%s.root", who); TFile *f = new TFile(fname); TH3D *theta_diff = (TH3D*)gROOT->FindObject("theta_diff"); theta_diff->FitSlicesZ(); TH2D *theta_diff_2 = (TH2D*)gROOT->FindObject("theta_diff_2"); TCanvas *c1 = new TCanvas(); c1->SetTicks(); c1->SetGrid(); char title[256]; sprintf(title, "BCAL #theta Res. (%s)", who); TH2D *axes = new TH2D("axes",title, 100, 10.0, 110.0, 100, 0.0, 3.0); axes->SetStats(0); axes->SetXTitle("#theta (degrees)"); axes->SetYTitle("Energy (GeV)"); axes->Draw(); theta_diff_2->GetZaxis()->SetRangeUser(0.0, 10.0); theta_diff_2->Draw("same colz"); TLatex *l = new TLatex(125.0, 1.5, "#theta Resolution (degrees)"); l->SetTextAlign(22); l->SetTextAngle(270); l->Draw(); StandardLabels(axes, "20M events No cuts on primary conversion point.", "Single #gamma"); sprintf(fname,"theta_res_vs_E_vs_theta_%s.png", who); c1->SaveAs(fname); sprintf(fname,"theta_res_vs_E_vs_theta_%s.pdf", who); c1->SaveAs(fname); }