PolarTwoVector

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

Bases: TwoVector

A polar coordinate 2-dimensional vector

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

Attributes Summary

phi

Azimuthal angle relative to X axis in XY plane

r

Distance from origin in XY plane

r2

Squared r

x

Cartesian x value

y

Cartesian y value

Methods Summary

multiply(other)

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

negative()

Returns the negative of the vector

Attributes Documentation

phi

Azimuthal angle relative to X axis in XY plane

\(\text{arctan2}(y, x)\)

r

Distance from origin in XY plane

\(\sqrt{x^2+y^2}\)

r2

Squared r

x

Cartesian x value

\(r \cos{\phi}\)

y

Cartesian y value

\(r \sin{\phi}\)

Methods Documentation

multiply(other)[source]

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

In reality, this directly adjusts r and phi for performance

negative()[source]

Returns the negative of the vector