Skip to content

Instantly share code, notes, and snippets.

@sparticlesteve
Created November 11, 2016 06:25
Show Gist options
  • Save sparticlesteve/446f1490d20426fc6c275d33f1af46a1 to your computer and use it in GitHub Desktop.
Save sparticlesteve/446f1490d20426fc6c275d33f1af46a1 to your computer and use it in GitHub Desktop.
from __future__ import print_function
import h5py
input_file = '/project/projectdirs/atlas/sfarrell/atlas_dl/hdf5/prod002_2016_11_10/GG_RPV10_1400_850.h5'
with h5py.File(input_file, 'r') as hf:
keys = hf.keys()
print('Loading %d events' % len(keys))
print('Contents of the first event:')
event = hf.get(keys[0])
print(event.keys())
print('Number of clusters:', event['clusE'].len())
print('Gluino mass:', event['mGlu'].value)
print('Neutralino mass:', event['mNeu'].value)
print('Passes SR:', event['passSR'].value)
print('Event weight:', event['weight'].value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment