3 sys.path.append(
'../..')
6 import matplotlib.pyplot
as plt
10 df = tables[
'rec.vtx.elastic.fuzzyk.png'][
'calE']
11 return df.groupby(level = KL).
sum()
18 df = tables[
'rec.vtx.elastic']
19 return (df[
'vtx.x'] < 180) & \
20 (df[
'vtx.x'] > -180) & \
21 (df[
'vtx.y'] < 180) & \
22 (df[
'vtx.y'] > -180) & \
23 (df[
'vtx.z'] < 1000) & \
25 kFiducial =
Cut(kFiducial)
27 if __name__ ==
'__main__':
29 loc =
'/pnfs/nova/persistent/users/karlwarb/HDF5-Training-19-02-26/FD-FluxSwap-FHC' 30 files = [os.path.join(loc, f)
for f
in os.listdir(loc)
if 'h5caf.h5' in f]
34 myspectrum =
spectrum(tables, kFiducial, kPngE)
39 print(
'myspectrum internal dataframe: ')
42 n, bins = myspectrum.histogram(bins=20, range=(1,4))
44 print(
'Selected '+
str(n.sum()) +
' events')
46 plt.hist(bins[:-1], bins=bins, weights=n)
48 plt.xlabel(
'Prong Energy')
51 plt.legend(loc=
'upper right')
Eigen::Matrix< T, Eigen::Dynamic, 1 > head(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)