ThreeVector
- class coffea.nanoevents.methods.vector.ThreeVector[source]
Bases:
TwoVectorA cartesian 3-dimensional vector
A heavy emphasis towards a momentum vector interpretation is assumed. This mixin class requires the parent class to provide items
x,y, andz.Attributes Summary
Alias for
rhoSquared
pAlias for
zDistance from origin in 3D
Squared
rhoInclination angle from XY plane
Unit vector, a vector of length 1 pointing in the same direction
Methods Summary
absolute()Returns magnitude of the 3D vector
add(other)Add two vectors together elementwise using
x,y, andzcomponentscross(other)Compute the cross product of two vectors
dot(other)Compute the dot product of two vectors
multiply(other)Multiply this vector by a scalar elementwise using
x,y, andzcomponentsnegative()Returns the negative of the vector
subtract(other)Subtract a vector from another elementwise using
x,y, andzcomponentssum([axis])Sum an array of vectors elementwise using
x,y, andzcomponentsAttributes Documentation
- 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)\)
- unit
Unit vector, a vector of length 1 pointing in the same direction
Methods Documentation