#include "../macros/StandardLabels.C" void Ediff_vs_E_90degrees_clean(const char *who="fine") { //gROOT->Reset(); char fname[256]; sprintf(fname,"hd_root_%s.root", who); TFile *f = new TFile(fname); TTree *event = (TTree*)gROOT->FindObject("event"); TH2D *Eres = new TH2D("Eres", "", 25, 120, 685, 120, -0.1, 0.5); event->Project("Eres", "(A.recon.p.E() - A.thrown.E()):A.thrown.E()*1000.0"); Eres->FitSlicesY(); TH1D *Eres_2 = (TH1D*)gROOT->FindObject("Eres_2"); TCanvas *c1 = new TCanvas(); c1->SetTicks(); c1->SetGrid(); TH2D *axes = new TH2D("axes", "BCAL Energy Difference for #theta=90^{o}", 100, 120, 685, 100, 0.0, 0.06); axes->SetStats(0); axes->SetXTitle("Generated E_{#gamma} (MeV)"); axes->SetYTitle("Energy residual #sigma(#deltaE)"); axes->Draw(); Eres_2->SetMarkerStyle(20); Eres_2->SetMarkerColor(kRed); Eres_2->Draw("Psame"); StandardLabels(axes, "1M events No cuts on primary conversion point.", "Single #gamma at 90^{o}", who); sprintf(fname,"Ediff_vs_E_90degrees_clean_%s.png", who); c1->SaveAs(fname); sprintf(fname,"Ediff_vs_E_90degrees_clean_%s.pdf", who); c1->SaveAs(fname); }