SphericalThreeVector

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

Bases: ThreeVector, PolarTwoVector

A spherical coordinate 3-dimensional vector

This mixin class requires the parent class to provide items rho, theta, and phi. Some additional properties are overridden for performance

Attributes Summary

p

Alias for rho

p2

Squared p

r

Distance from origin in XY plane

rho

Distance from origin in 3D

theta

Inclination angle from XY plane

z

Cartesian z value

Methods Summary

multiply(other)

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

negative()

Returns the negative of the vector

Attributes Documentation

p

Alias for rho

p2

Squared p

r

Distance from origin in XY plane

\(\sqrt{x^2+y^2} = \rho \sin(\theta)\)

rho

Distance from origin in 3D

\(\sqrt{x^2+y^2+z^2} = \sqrt{r^2+z^2}\)

theta

Inclination angle from XY plane

\(\text{arctan2}(r, z)\)

z

Cartesian z value

\(\rho \cos(\theta)\)

Methods Documentation

multiply(other)[source]

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

In reality, this directly adjusts r, theta and phi for performance

negative()[source]

Returns the negative of the vector