#include "../macros/StandardLabels.C" void thresh_compare(void) { //gROOT->Reset(); TFile *f = new TFile("hd_root_fine.root"); TTree *fine = (TTree*)gROOT->FindObject("bcalHit"); TFile *f = new TFile("hd_root_course.root"); TTree *course = (TTree*)gROOT->FindObject("bcalHit"); TH1D *thresh_fine = new TH1D("thresh_fine", "", 100, 1, 40.0); TH1D *thresh_course = (TH1D*)thresh_fine->Clone("thresh_course"); fine->Project("thresh_fine", "Eup*1000.0"); course->Project("thresh_course", "Eup*1000.0"); thresh_fine->SetLineColor(kRed); thresh_course->SetLineColor(kBlue); TCanvas *c1 = new TCanvas(); c1->SetTicks(); c1->SetGrid(); thresh_fine->SetStats(0); thresh_fine->SetXTitle("Attenuated Energy on upstream SiPM (MeV)"); thresh_fine->Draw(); thresh_course->Draw("same"); StandardLabels1D(thresh_fine, "40k events No cuts on primary conversion point.", "Single #gamma at 90^{o}"); c1->SaveAs("thresh_compare.png"); c1->SaveAs("thresh_compare.pdf"); }