5 fname =
'/pnfs/icarus/persistent/users/dmendez/SBNAnaFiles/test/icarus/gen-prodcorsika_genie_nooverburden__nuetest.caf.root'
7 loader = cafana.SpectrumLoader(fname)
9 kTruthEnergy = cafana.CSliceVar(
'if(sr.truth.index > 0) return sr.truth.E; else return -1.;')
11 binsEnergy = cafana.Binning.Simple(50, 0, 5)
13 axEnergy = cafana.HistAxis(
'True energy (GeV)', binsEnergy, kTruthEnergy)
14 sEnergy = cafana.Spectrum(loader, axEnergy, cafana.kNoCut)
18 sEnergy.ToTH1(sEnergy.POT()).Draw(
'hist')