LorentzVector

class coffea.nanoevents.methods.vector.LorentzVector[source]

Bases: ThreeVector

A cartesian Lorentz vector

A heavy emphasis towards a momentum vector interpretation is assumed. (+, -, -, -) metric This mixin class requires the parent class to provide items x, y, z, and t.

Attributes Summary

boostvec

The x, y and z components divided by t as a ThreeVector

energy

Alias for t

eta

Pseudorapidity

mass

Invariant mass (+, -, -, -)

mass2

Squared mass

metric_table

nearest

pvec

The x, y and z components as a ThreeVector

rapidity

Methods Summary

absolute()

Magnitude of this Lorentz vector

add(other)

Add two vectors together elementwise using x, y, z, and t components

boost(other)

Apply a Lorentz boost given by the ThreeVector other and return it

delta_r(other)

Distance between two Lorentz vectors in (eta,phi) plane

delta_r2(other)

Squared delta_r

multiply(other)

Multiply this vector by a scalar elementwise using x, y, z, and t components

negative()

Returns the negative of the vector

subtract(other)

Subtract a vector from another elementwise using x, y, z, and t components

sum([axis])

Sum an array of vectors elementwise using x, y, z, and t components

Attributes Documentation

boostvec

The x, y and z components divided by t as a ThreeVector

This can be used for boosting. For cases where |t| <= rho, this returns the unit vector.

energy

Alias for t

eta

Pseudorapidity

\(-\ln[\tan(\theta/2)] = \text{arcsinh}(z/r)\)

mass

Invariant mass (+, -, -, -)

\(\sqrt{t^2-x^2-y^2-z^2}\)

mass2

Squared mass

metric_table
nearest
pvec

The x, y and z components as a ThreeVector

rapidity

Methods Documentation

absolute()[source]

Magnitude of this Lorentz vector

Alias for mass

add(other)[source]

Add two vectors together elementwise using x, y, z, and t components

boost(other)[source]

Apply a Lorentz boost given by the ThreeVector other and return it

Note that this follows the convention that, for example in order to boost a vector into its own rest frame, one needs to use the negative of its boostvec

delta_r(other)[source]

Distance between two Lorentz vectors in (eta,phi) plane

\(\sqrt{\Delta\eta^2 + \Delta\phi^2}\)

delta_r2(other)[source]

Squared delta_r

multiply(other)[source]

Multiply this vector by a scalar elementwise using x, y, z, and t components

negative()[source]

Returns the negative of the vector

subtract(other)[source]

Subtract a vector from another elementwise using x, y, z, and t components

sum(axis=-1)[source]

Sum an array of vectors elementwise using x, y, z, and t components