Process ExRootAnalysis files / access nested branches

ExRootAnalysis provides a number of converter tools that create root files from inputs such as stdhep or lhe files. These root files (for the stdhep case) contain a tree called “STDHEP” containing only few actual branches. All event information is stored as leaves (?) or sub branches within the ‘GenParticle’ branch (such as GenParticle.PT etc., see attached print() output). I’ve tried different approaches but I haven’t been able to access any of that data from pyROOT. The naive approach

f = ROOT.TFile(“events.root”)
t = f.Get(“STDHEP”)
for evt in t:
print evt.GenParticle.PT[0]

results in this error message:
File “”, line 2, in
AttributeError: ‘TClonesArray’ object has no attribute ‘PT’

How can I access these entries? Or is my interpretation of the structure wrong?
stdhep_tree_print_output.txt (10.6 KB)


any chance to get access to the file (or snippet thereof) and the corresponding dictionaries describing the classes? (For the latter, in particular, does “ROOT.GenParticle” exist as a class?)