blob: e43f5d4b3325c343858648866dd24173a8ed27f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import ROOT
import os.path
ROOT.gROOT.ProcessLine('.L '+os.path.join(os.path.dirname(__file__), 'root.C+g'))
from ROOT import Event
fill_photons = ROOT.fill_photons
fill_hits = ROOT.fill_hits
def make_tree(name, desc=''):
'''Create a ROOT tree for holding event information.
Returns tuple of Event object for filling and TTree.
'''
tree = ROOT.TTree(name, desc)
ev = ROOT.Event()
tree.Branch('ev', ev)
return ev, tree
|