#include #include #include void make_plots(TFile* event_file, TTree* T, TFile* out_file) { TH1F* hNumPE = new TH1F("hNumPE", "Number of photoelectrons/keV", 40, 1, 10); hNumPE->SetYTitle("Events per bin"); hNumPE->SetXTitle("detected photoelectrons/keV"); T->Draw("numPE/(mc.particle.ke*1000)>>hNumPE","","goff"); hNumPE->Fit("gaus"); out_file->cd(); hNumPE->Write(); }