You need branch=tree.Branch(...)
and then branch.Fill()
instead of tree.Fill()
.
BTW. Ensure all branches have precisely the same number of entries (otherwise, expect problems with your tree later).
You need branch=tree.Branch(...)
and then branch.Fill()
instead of tree.Fill()
.
BTW. Ensure all branches have precisely the same number of entries (otherwise, expect problems with your tree later).