ThreeVector
- class coffea.nanoevents.methods.vector.ThreeVector[source]
Bases:
TwoVector
A 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
rho
Squared
p
Alias for
z
Distance from origin in 3D
Squared
rho
Inclination 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
, andz
componentscross
(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
, andz
componentsnegative
()Returns the negative of the vector
subtract
(other)Subtract a vector from another elementwise using
x
,y
, andz
componentssum
([axis])Sum an array of vectors elementwise using
x
,y
, andz
componentsAttributes 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