scikit-hep / uproot3-methods

Pythonic behaviors for non-I/O related ROOT classes.
BSD 3-Clause "New" or "Revised" License
21 stars 28 forks source link

ValueError/KeyError after boosting PtEtaPhiMassLorentzVectorArray #86

Open jrueb opened 4 years ago

jrueb commented 4 years ago

When boosting a PtEtaPhiMassLorentzVectorArray, the resulting object is in an invalid state, such that all of the properties (such as x, y, pt, eta) raise errors.

import uproot_methods
vec = uproot_methods.TLorentzVectorArray.from_ptetaphim([1], [1], [1], [1])
boost = uproot_methods.TVector3Array.from_cartesian([0.1],[0.1],[0.1])
vecboosted = vec.boost(boost)
print(vecboosted.pt)

Same is true for rotate_axis and rotate_euler.