-
Notifications
You must be signed in to change notification settings - Fork 39
Boosting by sum #85
Comments
This is actually an issue in uproot-methods, since it deals with physics calculations. I've opened a PR on that repo: scikit-hep/uproot3-methods#43, but I'm not entirely sure if this fixes the problem because I don't have good test cases. (When I make up values of 4-vectors, I get Could you give that a test? Thanks! |
You could use setptetaphim to generate four vectors |
I used If I don't hear from you today about the correctness of the calculation, I'll take that pull request and leave everything else the same. (The pull request itself fixes an issue unrelated to the calculation of boost: it's that TLorentzVectors, projected to TVector3s, incorrectly kept their identities as TLorentzVectors and then there was an attempt to add some TVector3s and some supposed TLorentzVectors, which would be wrong if that's what they actually were.) |
EDIT: For anyone trying to do this themselves, a boost to the rest frame should actually be
p4.boost(-p4.sum().boostp3)
.I have a
JaggedArray
ofTLorentzVectors
. I want to boost the vectors in each row to the rest frame of that row.I'm using
p4 = p4.boost(p4.sum().boostp3)
(well the equivalent, sincehh = p4.sum()
), but I get the error:The text was updated successfully, but these errors were encountered: