Skip to content

Commit

Permalink
Merge branch 'master' into main_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
lgray authored Jun 2, 2023
2 parents 7d4e9c6 + 98f7874 commit d156275
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions coffea/nanoevents/methods/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,12 @@ def pvec(self):
behavior=self.behavior,
)

@property
def rapidity(self):
pz = self.z
e = self.energy
return 0.5 * (numpy.log(e + pz) - numpy.log(e - pz))

@property
def boostvec(self):
"""The `x`, `y` and `z` components divided by `t` as a `ThreeVector`
Expand Down

0 comments on commit d156275

Please sign in to comment.