Replies: 1 comment 2 replies
-
Uproot doesn't (currently) write the TLorentzVector or writable_directory.mktree("treename", {"px": np.float64, "py": np.float64, "pz": np.float64, "E": np.float64})
writable_directory["treename"].extend({
"px": [p4.x for p4 in many_lorentz_vectors],
"py": [p4.y for p4 in many_lorentz_vectors],
"pz": [p4.z for p4 in many_lorentz_vectors],
"E": [p4.t for p4 in many_lorentz_vectors],
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am trying to convert data from an .lhe format into a ROOT file and I would like to store a numpy array of the four-momentum of each particle as a branch in a tree, for which I am using the scikit-hep LorentzVector class. What type should I specify for the branch when I do mktree(treename,{'branch1' : } title = "")?
Beta Was this translation helpful? Give feedback.
All reactions