vector._methods module#
- class vector._methods.Azimuthal#
Bases:
Coordinates
- property elements: tuple[Any, Any]#
Azimuthal coordinates as a tuple.
Each coordinate may be a scalar, a NumPy array, an Awkward Array, etc., but they are not vectors.
- class vector._methods.AzimuthalRhoPhi#
Bases:
Azimuthal
- rho#
The \(\rho\) coordinate(s).
- Type:
scalar,
np.ndarray
,ak.Array
, etc.
- phi#
The \(\phi\) coordinate(s).
- Type:
scalar,
np.ndarray
,ak.Array
, etc.
- phi: Any#
- rho: Any#
- class vector._methods.AzimuthalXY#
Bases:
Azimuthal
- x#
The \(x\) coordinate(s).
- Type:
scalar,
np.ndarray
,ak.Array
, etc.
- y#
The \(y\) coordinate(s).
- Type:
scalar,
np.ndarray
,ak.Array
, etc.
- x: Any#
- y: Any#
- class vector._methods.Coordinates#
Bases:
object
- class vector._methods.Longitudinal#
Bases:
Coordinates
- property elements: tuple[Any]#
Longitudinal coordinates as a tuple.
Each coordinate may be a scalar, a NumPy array, an Awkward Array, etc., but they are not vectors.
- class vector._methods.LongitudinalEta#
Bases:
Longitudinal
- eta#
The \(\eta\) coordinate(s).
- Type:
scalar,
np.ndarray
,ak.Array
, etc.
- eta: Any#
- class vector._methods.LongitudinalTheta#
Bases:
Longitudinal
- theta#
The \(\theta\) coordinate(s).
- Type:
scalar,
np.ndarray
,ak.Array
, etc.
- theta: Any#
- class vector._methods.LongitudinalZ#
Bases:
Longitudinal
- z#
The \(z\) coordinate(s).
- Type:
scalar,
np.ndarray
,ak.Array
, etc.
- z: Any#
- class vector._methods.Lorentz#
Bases:
Spatial
,VectorProtocolLorentz
- add(other: VectorProtocol) VectorProtocol #
Sum of
self
andother
.This method is equivalent to the
+
operator.
- property beta: Any#
The speed(s) of the Lorentz vector or array of vectors, in which lightlike vectors have
beta == 1
.
- boost(booster: VectorProtocolSpatial | VectorProtocolLorentz) SameVectorType #
Boosts the vector or array of vectors using the 3D or 4D
booster
.If
booster
is 3D, it is interpreted as a velocity (in which lightlike velocities havemag == 1
) andvector._methods.VectorProtocolLorentz.boost_beta3()
is called.If
booster
is 4D, it is interpreted as a Lorentz vector andvector._methods.VectorProtocolLorentz.boost_p4()
is called.Note that
v.boost(v)
does not boost into the center-of-mass (CM) frame ofv
; it boosts away from its CM frame. Neither doesv.boost(-v)
, since that negates the time component ofv
as well.To boost to the center-of-mass frame of a vector
v
, usevector._methods.VectorProtocolLorentz.boostCM_of()
. For instance,v.boostCM_of(v)
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- boostCM_of(booster: VectorProtocolSpatial | VectorProtocolLorentz) SameVectorType #
Boosts the vector or array of vectors to the center-of-mass (CM) frame of the 3D or 4D
booster
.If
booster
is 3D, it is interpreted as a velocity (in which lightlike velocities havemag == 1
) andvector._methods.VectorProtocolLorentz.boostCM_of_beta3()
is called.If
booster
is 4D, it is interpreted as a Lorentz vector andvector._methods.VectorProtocolLorentz.boostCM_of_p4()
is called.Note that
v.boostCM_of(v)
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- boostCM_of_beta3(beta3: VectorProtocolSpatial) SameVectorType #
Boosts the vector or array of vectors to the center-of-mass (CM) frame of the 3D velocity or array of velocity vectors
beta3
.Note that
v.boostCM_of_beta3(v.to_beta3())
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- boostCM_of_p4(p4: VectorProtocolLorentz) SameVectorType #
Boosts the vector or array of vectors to the center-of-mass (CM) frame of the 4D vector or array of vectors
p4
.This function is equivalent to but more numerically stable than
boostCM_of_beta3(p4.to_beta3())
Note that
v.boostCM_of_p4(v)
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- boostX(beta: Any | None = None, gamma: Any | None = None) SameVectorType #
Boosts the vector or array of vectors in the \(x\) direction by a speed
beta
(in which lightlike boosts havebeta == 1
) or time dilation/length contraction factorgamma
.Either
beta
xorgamma
must be specified, not both or neither.If
beta
orgamma
is negative, it is taken as a boost in the \(-x\) direction.
- boostY(beta: Any | None = None, gamma: Any | None = None) SameVectorType #
Boosts the vector or array of vectors in the \(y\) direction by a speed
beta
(in which lightlike boosts havebeta == 1
) or time dilation/length contraction factorgamma
.Either
beta
xorgamma
must be specified, not both or neither.If
beta
orgamma
is negative, it is taken as a boost in the \(-y\) direction.
- boostZ(beta: Any | None = None, gamma: Any | None = None) SameVectorType #
Boosts the vector or array of vectors in the \(z\) direction by a speed
beta
(in which lightlike boosts havebeta == 1
) or time dilation/length contraction factorgamma
.Either
beta
xorgamma
must be specified, not both or neither.If
beta
orgamma
is negative, it is taken as a boost in the \(-z\) direction.
- boost_beta3(beta3: VectorProtocolSpatial) SameVectorType #
Boosts the vector or array of vectors in a direction and magnitude given by the 3D velocity or array of velocity vectors
beta3
.Note that
v.boost_beta3(v.to_beta3())
does not boost into the center-of-mass (CM) frame ofv
; it boosts away from its CM frame. Neither doesv.boost_beta3((-v).to_beta3())
, since that negates the time component ofv
as well. On the other hand,v.boost_beta3(-(v.to_beta3()))
would boost to the center-of-mass frame.However, there’s a function for that:
vector._methods.VectorProtocolLorentz.boostCM_of_beta3()
is explicit about boosting to a center-of-mass (CM) frame and it handles the negative sign for you:v.boostCM_of_beta3(v.to_beta3())
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- boost_p4(p4: VectorProtocolLorentz) SameVectorType #
Boosts the vector or array of vectors in a direction and magnitude given by the 4D vector or array of vectors
p4
.This function is equivalent to but more numerically stable than
boost_beta3(p4.to_beta3())
where
vector._methods.VectorProtocolLorentz.to_beta3()
converts a 4D Lorentz vector into a 3D velocity (in which lightlike velocities havemag == 1
).Note that
v.boost_p4(v)
does not boost into the center-of-mass (CM) frame ofv
; it boosts away from its CM frame. Neither doesv.boost_p4(-v)
, since that negates the time component ofv
as well.To boost to the center-of-mass frame of a vector
v
, usevector._methods.VectorProtocolLorentz.boostCM_of_p4()
. For instance,v.boostCM_of_p4(v)
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- deltaRapidityPhi(other: VectorProtocolLorentz) Any #
Sum in quadrature of
vector._methods.VectorProtocolPlanar.deltaphi()
and the difference invector._methods.VectorProtocolLorentz.rapidity
of the two vectors:\[\Delta R_{\mbox{rapidity}} = \sqrt{\Delta\phi^2 + \Delta \mbox{rapidity}^2}\]
- deltaRapidityPhi2(other: VectorProtocolLorentz) Any #
Square of the sum in quadrature of
vector._methods.VectorProtocolPlanar.deltaphi()
and the difference invector._methods.VectorProtocolLorentz.rapidity
of the two vectors:\[\Delta R_{\mbox{rapidity}} = \Delta\phi^2 + \Delta \mbox{rapidity}^2\]
- dot(other: VectorProtocol) Any #
Vector dot product of
self
withother
.This method is equivalent to the
@
operator.
- equal(other: VectorProtocol) Any #
Returns True if
self
is exactly equal toother
(possibly for arrays of vectors), False otherwise.This method is equivalent to the
==
operator.Typically, you’ll want to check
vector._methods.VectorProtocol.isclose()
to allow for numerical errors.
- property gamma: Any#
The time dilation/length contraction factor(s) of the Lorentz vector or array of vectors: \(t/\tau\).
- is_lightlike(tolerance: Any = 1e-05) Any #
Returns True if the vector or a vector in the array is pointing in a lightlike direction,
t**2 == mag**2
, False otherwise.The
tolerance
is in units oft
andmag
. Note thatthe default
tolerance
forvector._methods.VectorProtocolLorentz.is_timelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_spacelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_lightlike()
is1e-5
If you want to use these methods to divide space-time into non-overlapping regions (the light-cone), use the same
tolerance
for each.
- is_spacelike(tolerance: Any = 0) Any #
Returns True if the vector or a vector in the array is pointing in a spacelike direction,
t**2 < mag**2
, False otherwise.The
tolerance
is in units oft
andmag
. Note thatthe default
tolerance
forvector._methods.VectorProtocolLorentz.is_timelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_spacelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_lightlike()
is1e-5
If you want to use these methods to divide space-time into non-overlapping regions (the light-cone), use the same
tolerance
for each.
- is_timelike(tolerance: Any = 0) Any #
Returns True if the vector or a vector in the array is pointing in a timelike direction,
t**2 > mag**2
, False otherwise.The
tolerance
is in units oft
andmag
. Note thatthe default
tolerance
forvector._methods.VectorProtocolLorentz.is_timelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_spacelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_lightlike()
is1e-5
If you want to use these methods to divide space-time into non-overlapping regions (the light-cone), use the same
tolerance
for each.
- isclose(other: VectorProtocol, rtol: Any = 1e-05, atol: Any = 1e-08, equal_nan: Any = False) Any #
Returns True if
self
is approximately equal toother
(possibly for arrays of vectors), False otherwise.The relative tolerance (
rtol
) and absolute tolerance (atol
) are interpreted as innp.isclose
:close_enough = abs(self - other) <= atol + rtol * abs(other)
- property neg2D: SameVectorType#
Returns vector(s) with the 2D part negated, not affecting any longitudinal or temporal parts.
- property neg3D: SameVectorType#
Returns vector(s) with the 3D part negated, not affecting any longitudinal or temporal parts.
- property neg4D: SameVectorType#
Same as multiplying by -1.
- not_equal(other: VectorProtocol) Any #
Returns False if
self
is exactly equal toother
(possibly for arrays of vectors), True otherwise.This method is equivalent to the
!=
operator.Typically, you’ll want to check
vector._methods.VectorProtocol.isclose()
to allow for numerical errors.
- property rapidity: Any#
The rapidity relative to the longitudinal axis of the Lorentz vector or array of vectors.
0.5 * log((t + z) / (t - z))
- scale(factor: Any) SameVectorType #
Returns vector(s) scaled by a
factor
, changing the length(s) but not the direction(s).This method is equivalent to the
*
operator.
- scale2D(factor: Any) SameVectorType #
Returns vector(s) with the 2D part scaled by a
factor
, not affecting any longitudinal or temporal parts.
- scale3D(factor: Any) SameVectorType #
Returns vector(s) with the 3D part scaled by a
factor
, not affecting any longitudinal or temporal parts.
- scale4D(factor: Any) SameVectorType #
Same as
scale
.
- subtract(other: VectorProtocol) VectorProtocol #
Difference of
self
minusother
.This method is equivalent to the
-
operator.
- property t: Any#
The Cartesian \(t\) (time) coordinate of the vector or every vector in the array.
If \(t\) is derived from \(\tau\), it is not allowed to be
NaN
.t = sqrt(max(copysign(tau**2, tau) + mag**2, 0))
- property t2: Any#
The Cartesian \(t\) (time) coordinate squared of the vector or every vector in the array.
If \(t^2\) is derived from \(\tau\), it is not allowed to be negative.
t2 = max(copysign(tau**2, tau) + mag**2, 0)
- property tau: Any#
The Lorentz magnitude \(\tau\) (proper time) of the vector or every vector in the array.
If \(\tau\) is derived from \(t\), spacelike vectors are represented by negative proper times.
tau = copysign(sqrt(abs(t**2 - mag**2)), t**2 - mag**2)
- property tau2: Any#
The Lorentz magnitude \(\tau\) (proper time) squared of the vector or every vector in the array.
tau2 = t**2 - mag**2
- to_beta3() VectorProtocolSpatial #
Converts the 4D Lorentz vector or array of vectors into a 3D velocity vector or array of vectors, in which lightlike velocities have
mag == 1
.
- transform4D(obj: TransformProtocol4D) SameVectorType #
Arbitrarily transforms the vector(s) by
obj["xx"] obj["xy"] obj["xz"] obj["xt"] obj["yx"] obj["yy"] obj["yz"] obj["yt"] obj["zx"] obj["zy"] obj["zz"] obj["zt"] obj["tx"] obj["ty"] obj["tz"] obj["tt"]
There is no restriction on the type of
obj
; it just has to provide those components (which can be arrays if the vectors are in an array).
- unit() SameVectorType #
Returns vector(s) normalized to unit length, which is rho == 1 for 2D vectors, mag == 1 for 3D vectors, and tau == 1 for 4D vectors.
- class vector._methods.LorentzMomentum#
Bases:
SpatialMomentum
,MomentumProtocolLorentz
- property E: Any#
Momentum-synonyor
vector._methods.VectorProtocolLorentz.t
.
- property E2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorent2
.
- property Et: Any#
Transverse energy of the four-momentum vector or array of vectors: \(E_T = E \sin\theta\).
- property Et2: Any#
Transverse energy squared of the four-momentum vector or array of vectors: \(E_T^2 = E^2 \sin^2\theta\).
- property M: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau
.
- property M2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau2
.
- property Mt: Any#
Transverse mass of the four-momentum vector or array of vectors: \(M_T = \sqrt{t^2 - z^2}\).
- property Mt2: Any#
Transverse mass squared of the four-momentum vector or array of vectors: \(M_T^2 = t^2 - z^2\).
- property e: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.t
.
- property e2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.t2
.
- property energy: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.t
.
- property energy2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.t2
.
- property et: Any#
Transverse energy of the four-momentum vector or array of vectors: \(E_T = E \sin\theta\).
- property et2: Any#
Transverse energy squared of the four-momentum vector or array of vectors: \(E_T^2 = E^2 \sin^2\theta\).
- property m: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau
.
- property m2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau2
.
- property mass: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau
.
- property mass2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau2
.
- property mt: Any#
Transverse mass of the four-momentum vector or array of vectors: \(M_T = \sqrt{t^2 - z^2}\).
- property mt2: Any#
Transverse mass squared of the four-momentum vector or array of vectors: \(M_T^2 = t^2 - z^2\).
- property transverse_energy: Any#
Synonym for
vector._methods.MomentumProtocolLorentz.Et
.
- property transverse_energy2: Any#
Synonym for
vector._methods.MomentumProtocolLorentz.Et2
.
- property transverse_mass: Any#
Synonym for
vector._methods.MomentumProtocolLorentz.Mt
.
- property transverse_mass2: Any#
Synonym for
vector._methods.MomentumProtocolLorentz.Mt2
.
- class vector._methods.Momentum#
Bases:
object
- class vector._methods.MomentumProtocolLorentz#
Bases:
VectorProtocolLorentz
,MomentumProtocolSpatial
- property E: Any#
Momentum-synonyor
vector._methods.VectorProtocolLorentz.t
.
- property E2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorent2
.
- property Et: Any#
Transverse energy of the four-momentum vector or array of vectors: \(E_T = E \sin\theta\).
- property Et2: Any#
Transverse energy squared of the four-momentum vector or array of vectors: \(E_T^2 = E^2 \sin^2\theta\).
- property M: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau
.
- property M2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau2
.
- property Mt: Any#
Transverse mass of the four-momentum vector or array of vectors: \(M_T = \sqrt{t^2 - z^2}\).
- property Mt2: Any#
Transverse mass squared of the four-momentum vector or array of vectors: \(M_T^2 = t^2 - z^2\).
- property e: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.t
.
- property e2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.t2
.
- property energy: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.t
.
- property energy2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.t2
.
- property et: Any#
Transverse energy of the four-momentum vector or array of vectors: \(E_T = E \sin\theta\).
- property et2: Any#
Transverse energy squared of the four-momentum vector or array of vectors: \(E_T^2 = E^2 \sin^2\theta\).
- property m: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau
.
- property m2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau2
.
- property mass: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau
.
- property mass2: Any#
Momentum-synonym for
vector._methods.VectorProtocolLorentz.tau2
.
- property mt: Any#
Transverse mass of the four-momentum vector or array of vectors: \(M_T = \sqrt{t^2 - z^2}\).
- property mt2: Any#
Transverse mass squared of the four-momentum vector or array of vectors: \(M_T^2 = t^2 - z^2\).
- property transverse_energy: Any#
Synonym for
vector._methods.MomentumProtocolLorentz.Et
.
- property transverse_energy2: Any#
Synonym for
vector._methods.MomentumProtocolLorentz.Et2
.
- property transverse_mass: Any#
Synonym for
vector._methods.MomentumProtocolLorentz.Mt
.
- property transverse_mass2: Any#
Synonym for
vector._methods.MomentumProtocolLorentz.Mt2
.
- class vector._methods.MomentumProtocolPlanar#
Bases:
VectorProtocolPlanar
- property pt: Any#
Momentum-synonym for
vector._methods.VectorProtocolPlanar.rho
.
- property pt2: Any#
Momentum-synonym for
vector._methods.VectorProtocolPlanar.rho2
.
- property px: Any#
Momentum-synonym for
vector._methods.VectorProtocolPlanar.x
.
- property py: Any#
Momentum-synonym for
vector._methods.VectorProtocolPlanar.y
.
- class vector._methods.MomentumProtocolSpatial#
Bases:
VectorProtocolSpatial
,MomentumProtocolPlanar
- property p: Any#
Momentum-synonym for
vector._methods.VectorProtocolSpatial.mag
.
- property p2: Any#
Momentum-synonym for
vector._methods.VectorProtocolSpatial.mag2
.
- property pseudorapidity: Any#
Momentum-synonym for
vector._methods.VectorProtocolSpatial.eta
.
- property pz: Any#
Momentum-synonym for
vector._methods.VectorProtocolSpatial.z
.
- class vector._methods.Planar#
Bases:
VectorProtocolPlanar
- add(other: VectorProtocol) VectorProtocol #
Sum of
self
andother
.This method is equivalent to the
+
operator.
- deltaphi(other: VectorProtocol) Any #
Signed difference in \(\phi\) of
self
minusother
(in radians).
- dot(other: VectorProtocol) Any #
Vector dot product of
self
withother
.This method is equivalent to the
@
operator.
- equal(other: VectorProtocol) Any #
Returns True if
self
is exactly equal toother
(possibly for arrays of vectors), False otherwise.This method is equivalent to the
==
operator.Typically, you’ll want to check
vector._methods.VectorProtocol.isclose()
to allow for numerical errors.
- is_antiparallel(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in opposite directions (i.e. dot product is nearly-abs(self) * abs(other)
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- is_parallel(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in the same direction (i.e. not “antiparallel”; dot product is nearlyabs(self) * abs(other)
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- is_perpendicular(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in perpendicular directions (i.e. dot product is nearly0
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- isclose(other: VectorProtocol, rtol: Any = 1e-05, atol: Any = 1e-08, equal_nan: Any = False) Any #
Returns True if
self
is approximately equal toother
(possibly for arrays of vectors), False otherwise.The relative tolerance (
rtol
) and absolute tolerance (atol
) are interpreted as innp.isclose
:close_enough = abs(self - other) <= atol + rtol * abs(other)
- property neg2D: SameVectorType#
Returns vector(s) with the 2D part negated, not affecting any longitudinal or temporal parts.
- not_equal(other: VectorProtocol) Any #
Returns False if
self
is exactly equal toother
(possibly for arrays of vectors), True otherwise.This method is equivalent to the
!=
operator.Typically, you’ll want to check
vector._methods.VectorProtocol.isclose()
to allow for numerical errors.
- property phi: Any#
The polar \(\phi\) coordinate of the vector or every vector in the array (in radians, always between \(-\pi\) and \(\pi\)).
- property rho: Any#
The polar \(\rho\) coordinate of the vector or every vector in the array.
This is also the magnitude of the 2D azimuthal part of the vector (not including any longitudinal or temporal parts).
- property rho2: Any#
The polar \(\rho\) coordinate squared of the vector or every vector in the array.
- rotateZ(angle: Any) SameVectorType #
Rotates the vector(s) by a given
angle
(in radians) around the longitudinal axis.Note that the
angle
can be an array with the same length as the vectors, if the vectors are in an array.
- scale(factor: Any) SameVectorType #
Returns vector(s) scaled by a
factor
, changing the length(s) but not the direction(s).This method is equivalent to the
*
operator.
- scale2D(factor: Any) SameVectorType #
Returns vector(s) with the 2D part scaled by a
factor
, not affecting any longitudinal or temporal parts.
- subtract(other: VectorProtocol) VectorProtocol #
Difference of
self
minusother
.This method is equivalent to the
-
operator.
- transform2D(obj: TransformProtocol2D) SameVectorType #
Arbitrarily transforms the vector(s) by
obj["xx"] obj["xy"] obj["yx"] obj["yy"]
leaving any longitudinal or temporal coordinates unchanged. There is no restriction on the type of
obj
; it just has to provide those components (which can be arrays if the vectors are in an array).
- unit() SameVectorType #
Returns vector(s) normalized to unit length, which is rho == 1 for 2D vectors, mag == 1 for 3D vectors, and tau == 1 for 4D vectors.
- property x: Any#
The Cartesian \(x\) coordinate of the vector or every vector in the array.
- property y: Any#
The Cartesian \(y\) coordinate of the vector or every vector in the array.
- class vector._methods.PlanarMomentum#
Bases:
Momentum
,MomentumProtocolPlanar
- property pt: Any#
Momentum-synonym for
vector._methods.VectorProtocolPlanar.rho
.
- property pt2: Any#
Momentum-synonym for
vector._methods.VectorProtocolPlanar.rho2
.
- property px: Any#
Momentum-synonym for
vector._methods.VectorProtocolPlanar.x
.
- property py: Any#
Momentum-synonym for
vector._methods.VectorProtocolPlanar.y
.
- class vector._methods.Spatial#
Bases:
Planar
,VectorProtocolSpatial
- add(other: VectorProtocol) VectorProtocol #
Sum of
self
andother
.This method is equivalent to the
+
operator.
- property costheta: Any#
The \(\cos\theta\) coordinate of the vector or every vector in the array (has the same sign as \(z\)).
- property cottheta: Any#
The \(\cot\theta\) coordinate of the vector or every vector in the array (has the same sign as \(z\)).
- cross(other: VectorProtocolSpatial) VectorProtocolSpatial #
The 3D cross-product of
self
withother
.Even if
self
orother
is 4D, the resulting vector(s) is/are 3D.
- deltaR(other: VectorProtocolSpatial | VectorProtocolLorentz) Any #
Sum in quadrature of
vector._methods.VectorProtocolPlanar.deltaphi()
andvector._methods.VectorProtocolSpatial.deltaeta()
:\[\Delta R = \sqrt{\Delta\phi^2 + \Delta\eta^2}\]
- deltaR2(other: VectorProtocolSpatial | VectorProtocolLorentz) Any #
Square of the sum in quadrature of
vector._methods.VectorProtocolPlanar.deltaphi()
andvector._methods.VectorProtocolSpatial.deltaeta()
:\[\Delta R^2 = \Delta\phi^2 + \Delta\eta^2\]
- deltaangle(other: VectorProtocolSpatial | VectorProtocolLorentz) Any #
Angle in 3D space between
self
andother
, which is always positive, between \(0\) and \(\pi\).
- deltaeta(other: VectorProtocolSpatial | VectorProtocolLorentz) Any #
Signed difference in \(\eta\) of
self
minusother
.
- dot(other: VectorProtocol) Any #
Vector dot product of
self
withother
.This method is equivalent to the
@
operator.
- equal(other: VectorProtocol) Any #
Returns True if
self
is exactly equal toother
(possibly for arrays of vectors), False otherwise.This method is equivalent to the
==
operator.Typically, you’ll want to check
vector._methods.VectorProtocol.isclose()
to allow for numerical errors.
- property eta: Any#
The pseudorapidity \(\eta\) coordinate of the vector or every vector in the array (in radians, always between \(0\) (\(+z\)) and \(\pi\) (\(-z\))).
- is_antiparallel(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in opposite directions (i.e. dot product is nearly-abs(self) * abs(other)
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- is_parallel(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in the same direction (i.e. not “antiparallel”; dot product is nearlyabs(self) * abs(other)
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- is_perpendicular(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in perpendicular directions (i.e. dot product is nearly0
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- isclose(other: VectorProtocol, rtol: Any = 1e-05, atol: Any = 1e-08, equal_nan: Any = False) Any #
Returns True if
self
is approximately equal toother
(possibly for arrays of vectors), False otherwise.The relative tolerance (
rtol
) and absolute tolerance (atol
) are interpreted as innp.isclose
:close_enough = abs(self - other) <= atol + rtol * abs(other)
- property mag: Any#
The magnitude of the vector(s) in 3D (not including any temporal parts).
- property mag2: Any#
The magnitude-squared of the vector(s) in 3D (not including any temporal parts).
- property neg2D: SameVectorType#
Returns vector(s) with the 2D part negated, not affecting any longitudinal or temporal parts.
- property neg3D: SameVectorType#
Returns vector(s) with the 3D part negated, not affecting any longitudinal or temporal parts.
- not_equal(other: VectorProtocol) Any #
Returns False if
self
is exactly equal toother
(possibly for arrays of vectors), True otherwise.This method is equivalent to the
!=
operator.Typically, you’ll want to check
vector._methods.VectorProtocol.isclose()
to allow for numerical errors.
- rotateX(angle: Any) SameVectorType #
Rotates the vector(s) by a given
angle
(in radians) around the \(x\) axis.Note that the
angle
can be an array with the same length as the vectors, if the vectors are in an array.
- rotateY(angle: Any) SameVectorType #
Rotates the vector(s) by a given
angle
(in radians) around the \(y\) axis.Note that the
angle
can be an array with the same length as the vectors, if the vectors are in an array.
- rotate_axis(axis: VectorProtocolSpatial, angle: Any) SameVectorType #
Rotates the vector(s) by a given
angle
(in radians) around the axis indicated by another vector,axis
. The magnitude ofaxis
is ignored.Note that the
axis
andangle
can be arrays with the same length as the vectors, if the vectors are in an array.
- rotate_euler(phi: Any, theta: Any, psi: Any, order: str = 'zxz') SameVectorType #
Rotates the vector(s) by three given angles:
phi
,theta
, andpsi
(in radians). Theorder
string determines which axis each rotation is applied around:"zxz"
,"xyx"
,"yzy"
,"zyz"
,"xzx"
, and"yxy"
are proper Euler angles"zxz"
,"xyx"
,"yzy"
,"zyz"
,"xzx"
, and"yxy"
are Tait-Bryan angles (seevector._methods.VectorProtocolSpatial.rotate_nautical()
)
The names
phi
,theta
, andpsi
agree with Wikipedia’s terminology, and both the names and order agree with ROOT’s Math::EulerAngles. The defaultorder = "zxz"
is also ROOT’s convention.Note that the angles can be arrays with the same lengths as the vectors, if the vectors are in an array.
- rotate_nautical(yaw: Any, pitch: Any, roll: Any) SameVectorType #
Rotates the vector(s) by three given angles:
yaw
,pitch
, androll
(in radians). These are Tait-Bryan angles often used for boats and planes (see this lesson and this lesson).This function is entirely equivalent to
rotate_euler(roll, pitch, yaw, order="zyx")
Note that the angles can be arrays with the same lengths as the vectors, if the vectors are in an array.
- rotate_quaternion(u: Any, i: Any, j: Any, k: Any) SameVectorType #
Rotates the vector(s) by four angles as quaternion coefficients (in radians). Four angles are sometimes preferred over three because the latter has a pathology known as “gimbal lock.”
This function follows the same conventions as ROOT’s Math::Quaternion.
Note that the angles can be arrays with the same lengths as the vectors, if the vectors are in an array.
- scale(factor: Any) SameVectorType #
Returns vector(s) scaled by a
factor
, changing the length(s) but not the direction(s).This method is equivalent to the
*
operator.
- scale2D(factor: Any) SameVectorType #
Returns vector(s) with the 2D part scaled by a
factor
, not affecting any longitudinal or temporal parts.
- scale3D(factor: Any) SameVectorType #
Returns vector(s) with the 3D part scaled by a
factor
, not affecting any longitudinal or temporal parts.
- subtract(other: VectorProtocol) VectorProtocol #
Difference of
self
minusother
.This method is equivalent to the
-
operator.
- property theta: Any#
The spherical \(\theta\) coordinate (polar angle) of the vector or every vector in the array (in radians, always between \(0\) (\(+z\)) and \(\pi\) (\(-z\))).
- transform3D(obj: TransformProtocol3D) SameVectorType #
Arbitrarily transforms the vector(s) by
obj["xx"] obj["xy"] obj["xz"] obj["yx"] obj["yy"] obj["yz"] obj["zx"] obj["zy"] obj["zz"]
leaving any temporal coordinate unchanged. There is no restriction on the type of
obj
; it just has to provide those components (which can be arrays if the vectors are in an array).
- unit() SameVectorType #
Returns vector(s) normalized to unit length, which is rho == 1 for 2D vectors, mag == 1 for 3D vectors, and tau == 1 for 4D vectors.
- property z: Any#
The Cartesian \(z\) coordinate of the vector or every vector in the array.
- class vector._methods.SpatialMomentum#
Bases:
PlanarMomentum
,MomentumProtocolSpatial
- property p: Any#
Momentum-synonym for
vector._methods.VectorProtocolSpatial.mag
.
- property p2: Any#
Momentum-synonym for
vector._methods.VectorProtocolSpatial.mag2
.
- property pseudorapidity: Any#
Momentum-synonym for
vector._methods.VectorProtocolSpatial.eta
.
- property pz: Any#
Momentum-synonym for
vector._methods.VectorProtocolSpatial.z
.
- class vector._methods.Temporal#
Bases:
Coordinates
- property elements: tuple[Any]#
Temporal coordinates as a tuple.
Each coordinate may be a scalar, a NumPy array, an Awkward Array, etc., but they are not vectors.
- class vector._methods.TemporalT#
Bases:
Temporal
- t#
The \(t\) coordinate(s).
- Type:
scalar,
np.ndarray
,ak.Array
, etc.
- t: Any#
- class vector._methods.TemporalTau#
Bases:
Temporal
- tau#
The \(\tau\) coordinate(s).
- Type:
scalar,
np.ndarray
,ak.Array
, etc.
- tau: Any#
- class vector._methods.Vector(*, x: float, y: float)#
- class vector._methods.Vector(*, rho: float, phi: float)
- class vector._methods.Vector(*, x: float, y: float, z: float)
- class vector._methods.Vector(*, x: float, y: float, eta: float)
- class vector._methods.Vector(*, x: float, y: float, theta: float)
- class vector._methods.Vector(*, rho: float, phi: float, z: float)
- class vector._methods.Vector(*, rho: float, phi: float, eta: float)
- class vector._methods.Vector(*, rho: float, phi: float, theta: float)
- class vector._methods.Vector(*, px: float, py: float)
- class vector._methods.Vector(*, x: float, py: float)
- class vector._methods.Vector(*, px: float, y: float)
- class vector._methods.Vector(*, pt: float, phi: float)
- class vector._methods.Vector(*, x: float, y: float, pz: float)
- class vector._methods.Vector(*, x: float, py: float, z: float)
- class vector._methods.Vector(*, x: float, py: float, pz: float)
- class vector._methods.Vector(*, px: float, y: float, z: float)
- class vector._methods.Vector(*, px: float, y: float, pz: float)
- class vector._methods.Vector(*, px: float, py: float, z: float)
- class vector._methods.Vector(*, px: float, py: float, pz: float)
- class vector._methods.Vector(*, rho: float, phi: float, pz: float)
- class vector._methods.Vector(*, pt: float, phi: float, z: float)
- class vector._methods.Vector(*, pt: float, phi: float, pz: float)
- class vector._methods.Vector(*, x: float, py: float, theta: float)
- class vector._methods.Vector(*, px: float, y: float, theta: float)
- class vector._methods.Vector(*, px: float, py: float, theta: float)
- class vector._methods.Vector(*, pt: float, phi: float, theta: float)
- class vector._methods.Vector(*, x: float, py: float, eta: float)
- class vector._methods.Vector(*, px: float, y: float, eta: float)
- class vector._methods.Vector(*, px: float, py: float, eta: float)
- class vector._methods.Vector(*, pt: float, phi: float, eta: float)
- class vector._methods.Vector(*, x: float, y: float, z: float, t: float)
- class vector._methods.Vector(*, x: float, y: float, pz: float, t: float)
- class vector._methods.Vector(*, x: float, py: float, z: float, t: float)
- class vector._methods.Vector(*, x: float, py: float, pz: float, t: float)
- class vector._methods.Vector(*, px: float, y: float, z: float, t: float)
- class vector._methods.Vector(*, px: float, y: float, pz: float, t: float)
- class vector._methods.Vector(*, px: float, py: float, z: float, t: float)
- class vector._methods.Vector(*, px: float, py: float, pz: float, t: float)
- class vector._methods.Vector(*, rho: float, phi: float, z: float, t: float)
- class vector._methods.Vector(*, rho: float, phi: float, pz: float, t: float)
- class vector._methods.Vector(*, pt: float, phi: float, z: float, t: float)
- class vector._methods.Vector(*, pt: float, phi: float, pz: float, t: float)
- class vector._methods.Vector(*, x: float, y: float, theta: float, t: float)
- class vector._methods.Vector(*, x: float, py: float, theta: float, t: float)
- class vector._methods.Vector(*, px: float, y: float, theta: float, t: float)
- class vector._methods.Vector(*, px: float, py: float, theta: float, t: float)
- class vector._methods.Vector(*, rho: float, phi: float, theta: float, t: float)
- class vector._methods.Vector(*, pt: float, phi: float, theta: float, t: float)
- class vector._methods.Vector(*, x: float, y: float, eta: float, t: float)
- class vector._methods.Vector(*, x: float, py: float, eta: float, t: float)
- class vector._methods.Vector(*, px: float, y: float, eta: float, t: float)
- class vector._methods.Vector(*, px: float, py: float, eta: float, t: float)
- class vector._methods.Vector(*, rho: float, phi: float, eta: float, t: float)
- class vector._methods.Vector(*, pt: float, phi: float, eta: float, t: float)
- class vector._methods.Vector(*, x: float, y: float, z: float, tau: float)
- class vector._methods.Vector(*, x: float, y: float, pz: float, tau: float)
- class vector._methods.Vector(*, x: float, py: float, z: float, tau: float)
- class vector._methods.Vector(*, x: float, py: float, pz: float, tau: float)
- class vector._methods.Vector(*, px: float, y: float, z: float, tau: float)
- class vector._methods.Vector(*, px: float, y: float, pz: float, tau: float)
- class vector._methods.Vector(*, px: float, py: float, z: float, tau: float)
- class vector._methods.Vector(*, px: float, py: float, pz: float, tau: float)
- class vector._methods.Vector(*, rho: float, phi: float, z: float, tau: float)
- class vector._methods.Vector(*, rho: float, phi: float, pz: float, tau: float)
- class vector._methods.Vector(*, ptau: float, phi: float, z: float, tau: float)
- class vector._methods.Vector(*, ptau: float, phi: float, pz: float, tau: float)
- class vector._methods.Vector(*, x: float, y: float, theta: float, tau: float)
- class vector._methods.Vector(*, x: float, py: float, theta: float, tau: float)
- class vector._methods.Vector(*, px: float, y: float, theta: float, tau: float)
- class vector._methods.Vector(*, px: float, py: float, theta: float, tau: float)
- class vector._methods.Vector(*, rho: float, phi: float, theta: float, tau: float)
- class vector._methods.Vector(*, ptau: float, phi: float, theta: float, tau: float)
- class vector._methods.Vector(*, x: float, y: float, eta: float, tau: float)
- class vector._methods.Vector(*, x: float, py: float, eta: float, tau: float)
- class vector._methods.Vector(*, px: float, y: float, eta: float, tau: float)
- class vector._methods.Vector(*, px: float, py: float, eta: float, tau: float)
- class vector._methods.Vector(*, rho: float, phi: float, eta: float, tau: float)
- class vector._methods.Vector(*, ptau: float, phi: float, eta: float, tau: float)
- class vector._methods.Vector(*, x: float, y: float, z: float, E: float)
- class vector._methods.Vector(*, x: float, y: float, pz: float, E: float)
- class vector._methods.Vector(*, x: float, py: float, z: float, E: float)
- class vector._methods.Vector(*, x: float, py: float, pz: float, E: float)
- class vector._methods.Vector(*, px: float, y: float, z: float, E: float)
- class vector._methods.Vector(*, px: float, y: float, pz: float, E: float)
- class vector._methods.Vector(*, px: float, py: float, z: float, E: float)
- class vector._methods.Vector(*, px: float, py: float, pz: float, E: float)
- class vector._methods.Vector(*, rho: float, phi: float, z: float, E: float)
- class vector._methods.Vector(*, rho: float, phi: float, pz: float, E: float)
- class vector._methods.Vector(*, pE: float, phi: float, z: float, E: float)
- class vector._methods.Vector(*, pE: float, phi: float, pz: float, E: float)
- class vector._methods.Vector(*, x: float, y: float, theta: float, E: float)
- class vector._methods.Vector(*, x: float, py: float, theta: float, E: float)
- class vector._methods.Vector(*, px: float, y: float, theta: float, E: float)
- class vector._methods.Vector(*, px: float, py: float, theta: float, E: float)
- class vector._methods.Vector(*, rho: float, phi: float, theta: float, E: float)
- class vector._methods.Vector(*, pE: float, phi: float, theta: float, E: float)
- class vector._methods.Vector(*, x: float, y: float, eta: float, E: float)
- class vector._methods.Vector(*, x: float, py: float, eta: float, E: float)
- class vector._methods.Vector(*, px: float, y: float, eta: float, E: float)
- class vector._methods.Vector(*, px: float, py: float, eta: float, E: float)
- class vector._methods.Vector(*, rho: float, phi: float, eta: float, E: float)
- class vector._methods.Vector(*, pE: float, phi: float, eta: float, E: float)
- class vector._methods.Vector(*, x: float, y: float, z: float, e: float)
- class vector._methods.Vector(*, x: float, y: float, pz: float, e: float)
- class vector._methods.Vector(*, x: float, py: float, z: float, e: float)
- class vector._methods.Vector(*, x: float, py: float, pz: float, e: float)
- class vector._methods.Vector(*, px: float, y: float, z: float, e: float)
- class vector._methods.Vector(*, px: float, y: float, pz: float, e: float)
- class vector._methods.Vector(*, px: float, py: float, z: float, e: float)
- class vector._methods.Vector(*, px: float, py: float, pz: float, e: float)
- class vector._methods.Vector(*, rho: float, phi: float, z: float, e: float)
- class vector._methods.Vector(*, rho: float, phi: float, pz: float, e: float)
- class vector._methods.Vector(*, pe: float, phi: float, z: float, e: float)
- class vector._methods.Vector(*, pe: float, phi: float, pz: float, e: float)
- class vector._methods.Vector(*, x: float, y: float, theta: float, e: float)
- class vector._methods.Vector(*, x: float, py: float, theta: float, e: float)
- class vector._methods.Vector(*, px: float, y: float, theta: float, e: float)
- class vector._methods.Vector(*, px: float, py: float, theta: float, e: float)
- class vector._methods.Vector(*, rho: float, phi: float, theta: float, e: float)
- class vector._methods.Vector(*, pe: float, phi: float, theta: float, e: float)
- class vector._methods.Vector(*, x: float, y: float, eta: float, e: float)
- class vector._methods.Vector(*, x: float, py: float, eta: float, e: float)
- class vector._methods.Vector(*, px: float, y: float, eta: float, e: float)
- class vector._methods.Vector(*, px: float, py: float, eta: float, e: float)
- class vector._methods.Vector(*, rho: float, phi: float, eta: float, e: float)
- class vector._methods.Vector(*, pe: float, phi: float, eta: float, e: float)
- class vector._methods.Vector(*, x: float, y: float, z: float, energy: float)
- class vector._methods.Vector(*, x: float, y: float, pz: float, energy: float)
- class vector._methods.Vector(*, x: float, py: float, z: float, energy: float)
- class vector._methods.Vector(*, x: float, py: float, pz: float, energy: float)
- class vector._methods.Vector(*, px: float, y: float, z: float, energy: float)
- class vector._methods.Vector(*, px: float, y: float, pz: float, energy: float)
- class vector._methods.Vector(*, px: float, py: float, z: float, energy: float)
- class vector._methods.Vector(*, px: float, py: float, pz: float, energy: float)
- class vector._methods.Vector(*, rho: float, phi: float, z: float, energy: float)
- class vector._methods.Vector(*, rho: float, phi: float, pz: float, energy: float)
- class vector._methods.Vector(*, pt: float, phi: float, z: float, energy: float)
- class vector._methods.Vector(*, pt: float, phi: float, pz: float, energy: float)
- class vector._methods.Vector(*, x: float, y: float, theta: float, energy: float)
- class vector._methods.Vector(*, x: float, py: float, theta: float, energy: float)
- class vector._methods.Vector(*, px: float, y: float, theta: float, energy: float)
- class vector._methods.Vector(*, px: float, py: float, theta: float, energy: float)
- class vector._methods.Vector(*, rho: float, phi: float, theta: float, energy: float)
- class vector._methods.Vector(*, pt: float, phi: float, theta: float, energy: float)
- class vector._methods.Vector(*, x: float, y: float, eta: float, energy: float)
- class vector._methods.Vector(*, x: float, py: float, eta: float, energy: float)
- class vector._methods.Vector(*, px: float, y: float, eta: float, energy: float)
- class vector._methods.Vector(*, px: float, py: float, eta: float, energy: float)
- class vector._methods.Vector(*, rho: float, phi: float, eta: float, energy: float)
- class vector._methods.Vector(*, pt: float, phi: float, eta: float, energy: float)
- class vector._methods.Vector(*, x: float, y: float, z: float, M: float)
- class vector._methods.Vector(*, x: float, y: float, pz: float, M: float)
- class vector._methods.Vector(*, x: float, py: float, z: float, M: float)
- class vector._methods.Vector(*, x: float, py: float, pz: float, M: float)
- class vector._methods.Vector(*, px: float, y: float, z: float, M: float)
- class vector._methods.Vector(*, px: float, y: float, pz: float, M: float)
- class vector._methods.Vector(*, px: float, py: float, z: float, M: float)
- class vector._methods.Vector(*, px: float, py: float, pz: float, M: float)
- class vector._methods.Vector(*, rho: float, phi: float, z: float, M: float)
- class vector._methods.Vector(*, rho: float, phi: float, pz: float, M: float)
- class vector._methods.Vector(*, pM: float, phi: float, z: float, M: float)
- class vector._methods.Vector(*, pM: float, phi: float, pz: float, M: float)
- class vector._methods.Vector(*, x: float, y: float, theta: float, M: float)
- class vector._methods.Vector(*, x: float, py: float, theta: float, M: float)
- class vector._methods.Vector(*, px: float, y: float, theta: float, M: float)
- class vector._methods.Vector(*, px: float, py: float, theta: float, M: float)
- class vector._methods.Vector(*, rho: float, phi: float, theta: float, M: float)
- class vector._methods.Vector(*, pM: float, phi: float, theta: float, M: float)
- class vector._methods.Vector(*, x: float, y: float, eta: float, M: float)
- class vector._methods.Vector(*, x: float, py: float, eta: float, M: float)
- class vector._methods.Vector(*, px: float, y: float, eta: float, M: float)
- class vector._methods.Vector(*, px: float, py: float, eta: float, M: float)
- class vector._methods.Vector(*, rho: float, phi: float, eta: float, M: float)
- class vector._methods.Vector(*, pM: float, phi: float, eta: float, M: float)
- class vector._methods.Vector(*, x: float, y: float, z: float, m: float)
- class vector._methods.Vector(*, x: float, y: float, pz: float, m: float)
- class vector._methods.Vector(*, x: float, py: float, z: float, m: float)
- class vector._methods.Vector(*, x: float, py: float, pz: float, m: float)
- class vector._methods.Vector(*, px: float, y: float, z: float, m: float)
- class vector._methods.Vector(*, px: float, y: float, pz: float, m: float)
- class vector._methods.Vector(*, px: float, py: float, z: float, m: float)
- class vector._methods.Vector(*, px: float, py: float, pz: float, m: float)
- class vector._methods.Vector(*, rho: float, phi: float, z: float, m: float)
- class vector._methods.Vector(*, rho: float, phi: float, pz: float, m: float)
- class vector._methods.Vector(*, pm: float, phi: float, z: float, m: float)
- class vector._methods.Vector(*, pm: float, phi: float, pz: float, m: float)
- class vector._methods.Vector(*, x: float, y: float, theta: float, m: float)
- class vector._methods.Vector(*, x: float, py: float, theta: float, m: float)
- class vector._methods.Vector(*, px: float, y: float, theta: float, m: float)
- class vector._methods.Vector(*, px: float, py: float, theta: float, m: float)
- class vector._methods.Vector(*, rho: float, phi: float, theta: float, m: float)
- class vector._methods.Vector(*, pm: float, phi: float, theta: float, m: float)
- class vector._methods.Vector(*, x: float, y: float, eta: float, m: float)
- class vector._methods.Vector(*, x: float, py: float, eta: float, m: float)
- class vector._methods.Vector(*, px: float, y: float, eta: float, m: float)
- class vector._methods.Vector(*, px: float, py: float, eta: float, m: float)
- class vector._methods.Vector(*, rho: float, phi: float, eta: float, m: float)
- class vector._methods.Vector(*, pm: float, phi: float, eta: float, m: float)
- class vector._methods.Vector(*, x: float, y: float, z: float, mass: float)
- class vector._methods.Vector(*, x: float, y: float, pz: float, mass: float)
- class vector._methods.Vector(*, x: float, py: float, z: float, mass: float)
- class vector._methods.Vector(*, x: float, py: float, pz: float, mass: float)
- class vector._methods.Vector(*, px: float, y: float, z: float, mass: float)
- class vector._methods.Vector(*, px: float, y: float, pz: float, mass: float)
- class vector._methods.Vector(*, px: float, py: float, z: float, mass: float)
- class vector._methods.Vector(*, px: float, py: float, pz: float, mass: float)
- class vector._methods.Vector(*, rho: float, phi: float, z: float, mass: float)
- class vector._methods.Vector(*, rho: float, phi: float, pz: float, mass: float)
- class vector._methods.Vector(*, pt: float, phi: float, z: float, mass: float)
- class vector._methods.Vector(*, pt: float, phi: float, pz: float, mass: float)
- class vector._methods.Vector(*, x: float, y: float, theta: float, mass: float)
- class vector._methods.Vector(*, x: float, py: float, theta: float, mass: float)
- class vector._methods.Vector(*, px: float, y: float, theta: float, mass: float)
- class vector._methods.Vector(*, px: float, py: float, theta: float, mass: float)
- class vector._methods.Vector(*, rho: float, phi: float, theta: float, mass: float)
- class vector._methods.Vector(*, pt: float, phi: float, theta: float, mass: float)
- class vector._methods.Vector(*, x: float, y: float, eta: float, mass: float)
- class vector._methods.Vector(*, x: float, py: float, eta: float, mass: float)
- class vector._methods.Vector(*, px: float, y: float, eta: float, mass: float)
- class vector._methods.Vector(*, px: float, py: float, eta: float, mass: float)
- class vector._methods.Vector(*, rho: float, phi: float, eta: float, mass: float)
- class vector._methods.Vector(*, pt: float, phi: float, eta: float, mass: float)
- class vector._methods.Vector(__azumthal: Azimuthal)
- class vector._methods.Vector(__azumthal: Azimuthal, __longitudinal: Longitudinal)
- class vector._methods.Vector(__azumthal: Azimuthal, __longitudinal: Longitudinal, __temporal: Temporal)
Bases:
VectorProtocol
- like(other: VectorProtocol) VectorProtocol #
Projects the vector into the geometric coordinates of the other vector.
Value(s) of \(0\) is/are imputed while transforming vector from a lower geometric dimension to a higher geometric dimension.
vec_4d + vec_3d.like(vec_4d)
For more flexibility (passing new coordinate values), see
vector._methods.Vector2D.to_Vector3D()
,vector._methods.Vector2D.to_Vector4D()
, andvector._methods.Vector3D.to_Vector4D()
, which can be used as:vec_2d.to_Vector3D(z=3.0) vec_2d.to_Vector4D(z=3.0, t=4.0) vec_3d.to_Vector4D(t=4.0)
- to_ptphi() VectorProtocolPlanar #
Converts to \(pt\)-\(\phi\) coordinates, possibly eliminating dimensions with a projection.
- to_ptphieta(*, eta: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(pt\)-\(\phi\)-\(\eta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(eta\) coordinate can be passed as a named argument.
- to_ptphietaenergy(*, eta: float | ndarray = 0.0, energy: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(\eta\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(energy\) coordinates can be passed as a named argument.
- to_ptphietamass(*, eta: float | ndarray = 0.0, mass: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(\theta\)-\(mass\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(mass\) coordinates can be passed as a named argument.
- to_ptphipz(*, pz: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(pt\)-\(\phi\)-\(pz\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(pz\) coordinate can be passed as a named argument.
- to_ptphipzenergy(*, pz: float | ndarray = 0.0, energy: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(pz\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(pz\) and \(energy\) coordinates can be passed as a named argument.
- to_ptphipzmass(*, pz: float | ndarray = 0.0, mass: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(pz\)-\(mass\) coordinates, possibly imputing dimensions with a projection.
The \(pz\) and \(mass\) coordinates can be passed as a named argument.
- to_ptphitheta(*, theta: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(pt\)-\(\phi\)-\(\theta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(theta\) coordinate can be passed as a named argument.
- to_ptphithetaenergy(*, theta: float | ndarray = 0.0, energy: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(\theta\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(energy\) coordinates can be passed as a named argument.
- to_ptphithetamass(*, theta: float | ndarray = 0.0, mass: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(\theta\)-\(mass\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(mass\) coordinates can be passed as a named argument.
- to_pxpy() VectorProtocolPlanar #
Converts to \(px\)-\(py\) coordinates, possibly eliminating dimensions with a projection.
- to_pxpyeta(*, eta: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(px\)-\(py\)-\(\eta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(eta\) coordinate can be passed as a named argument.
- to_pxpyetaenergy(*, eta: float | ndarray = 0.0, energy: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(\eta\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(energy\) coordinates can be passed as a named argument.
- to_pxpyetamass(*, eta: float | ndarray = 0.0, mass: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(\eta\)-\(mass\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(mass\) coordinates can be passed as a named argument.
- to_pxpypz(*, pz: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(px\)-\(py\)-\(pz\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(pz\) coordinate can be passed as a named argument.
- to_pxpypzenergy(*, pz: float | ndarray = 0.0, energy: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(pz\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(pz\) and \(energy\) coordinates can be passed as a named argument.
- to_pxpypzmass(*, pz: float | ndarray = 0.0, mass: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(pz\)-\(mass\) coordinates, possibly imputing dimensions with a projection.
The \(pz\) and \(mass\) coordinates can be passed as a named argument.
- to_pxpytheta(*, theta: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(px\)-\(py\)-\(\theta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(theta\) coordinate can be passed as a named argument.
- to_pxpythetaenergy(*, theta: float | ndarray = 0.0, energy: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(\theta\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(energy\) coordinates can be passed as a named argument.
- to_pxpythetamass(*, theta: float | ndarray = 0.0, mass: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(\theta\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(mass\) coordinates can be passed as a named argument.
- to_rhophi() VectorProtocolPlanar #
Converts to \(\rho\)-\(\phi\) coordinates, possibly eliminating dimensions with a projection.
- to_rhophieta(*, eta: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(\rho\)-\(\phi\)-\(\eta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(eta\) coordinate can be passed as a named argument.
- to_rhophietat(*, eta: float | ndarray = 0.0, t: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(\eta\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(t\) coordinates can be passed as a named argument.
- to_rhophietatau(*, eta: float | ndarray = 0.0, tau: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(\eta\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(tau\) coordinates can be passed as a named argument.
- to_rhophitheta(*, theta: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(\rho\)-\(\phi\)-\(\theta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(theta\) coordinate can be passed as a named argument.
- to_rhophithetat(*, theta: float | ndarray = 0.0, t: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(\theta\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(t\) coordinates can be passed as a named argument.
- to_rhophithetatau(*, theta: float | ndarray = 0.0, tau: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(\theta\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(tau\) coordinates can be passed as a named argument.
- to_rhophiz(*, z: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(\rho\)-\(\phi\)-\(z\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(z\) coordinate can be passed as a named argument.
- to_rhophizt(*, z: float | ndarray = 0.0, t: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(z\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(z\) and \(t\) coordinates can be passed as a named argument.
- to_rhophiztau(*, z: float | ndarray = 0.0, tau: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(z\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(z\) and \(tau\) coordinates can be passed as a named argument.
- to_xy() VectorProtocolPlanar #
Converts to \(x\)-\(y\) coordinates, possibly eliminating dimensions with a projection.
- to_xyeta(*, eta: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(x\)-\(y\)-\(\eta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(eta\) coordinate can be passed as a named argument.
- to_xyetat(*, eta: float | ndarray = 0.0, t: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(\eta\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(t\) coordinates can be passed as a named argument.
- to_xyetatau(*, eta: float | ndarray = 0.0, tau: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(\eta\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(tau\) coordinates can be passed as a named argument.
- to_xytheta(*, theta: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(x\)-\(y\)-\(\theta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(theta\) coordinate can be passed as a named argument.
- to_xythetat(*, theta: float | ndarray = 0.0, t: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(\theta\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(t\) coordinates can be passed as a named argument.
- to_xythetatau(*, theta: float | ndarray = 0.0, tau: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(\theta\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(tau\) coordinates can be passed as a named argument.
- to_xyz(*, z: float | ndarray = 0.0) VectorProtocolSpatial #
Converts to \(x\)-\(y\)-\(z\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(z\) coordinate can be passed as a named argument.
- to_xyzt(*, z: float | ndarray = 0.0, t: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(z\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(z\) and \(t\) coordinates can be passed as a named argument.
- to_xyztau(*, z: float | ndarray = 0.0, tau: float | ndarray = 0.0) VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(z\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(z\) and \(tau\) coordinates can be passed as a named argument.
- class vector._methods.Vector2D(*, x: float, y: float)#
- class vector._methods.Vector2D(*, rho: float, phi: float)
- class vector._methods.Vector2D(*, x: float, y: float, z: float)
- class vector._methods.Vector2D(*, x: float, y: float, eta: float)
- class vector._methods.Vector2D(*, x: float, y: float, theta: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, z: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, eta: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, theta: float)
- class vector._methods.Vector2D(*, px: float, py: float)
- class vector._methods.Vector2D(*, x: float, py: float)
- class vector._methods.Vector2D(*, px: float, y: float)
- class vector._methods.Vector2D(*, pt: float, phi: float)
- class vector._methods.Vector2D(*, x: float, y: float, pz: float)
- class vector._methods.Vector2D(*, x: float, py: float, z: float)
- class vector._methods.Vector2D(*, x: float, py: float, pz: float)
- class vector._methods.Vector2D(*, px: float, y: float, z: float)
- class vector._methods.Vector2D(*, px: float, y: float, pz: float)
- class vector._methods.Vector2D(*, px: float, py: float, z: float)
- class vector._methods.Vector2D(*, px: float, py: float, pz: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, pz: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, z: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, pz: float)
- class vector._methods.Vector2D(*, x: float, py: float, theta: float)
- class vector._methods.Vector2D(*, px: float, y: float, theta: float)
- class vector._methods.Vector2D(*, px: float, py: float, theta: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, theta: float)
- class vector._methods.Vector2D(*, x: float, py: float, eta: float)
- class vector._methods.Vector2D(*, px: float, y: float, eta: float)
- class vector._methods.Vector2D(*, px: float, py: float, eta: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, eta: float)
- class vector._methods.Vector2D(*, x: float, y: float, z: float, t: float)
- class vector._methods.Vector2D(*, x: float, y: float, pz: float, t: float)
- class vector._methods.Vector2D(*, x: float, py: float, z: float, t: float)
- class vector._methods.Vector2D(*, x: float, py: float, pz: float, t: float)
- class vector._methods.Vector2D(*, px: float, y: float, z: float, t: float)
- class vector._methods.Vector2D(*, px: float, y: float, pz: float, t: float)
- class vector._methods.Vector2D(*, px: float, py: float, z: float, t: float)
- class vector._methods.Vector2D(*, px: float, py: float, pz: float, t: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, z: float, t: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, pz: float, t: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, z: float, t: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, pz: float, t: float)
- class vector._methods.Vector2D(*, x: float, y: float, theta: float, t: float)
- class vector._methods.Vector2D(*, x: float, py: float, theta: float, t: float)
- class vector._methods.Vector2D(*, px: float, y: float, theta: float, t: float)
- class vector._methods.Vector2D(*, px: float, py: float, theta: float, t: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, theta: float, t: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, theta: float, t: float)
- class vector._methods.Vector2D(*, x: float, y: float, eta: float, t: float)
- class vector._methods.Vector2D(*, x: float, py: float, eta: float, t: float)
- class vector._methods.Vector2D(*, px: float, y: float, eta: float, t: float)
- class vector._methods.Vector2D(*, px: float, py: float, eta: float, t: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, eta: float, t: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, eta: float, t: float)
- class vector._methods.Vector2D(*, x: float, y: float, z: float, tau: float)
- class vector._methods.Vector2D(*, x: float, y: float, pz: float, tau: float)
- class vector._methods.Vector2D(*, x: float, py: float, z: float, tau: float)
- class vector._methods.Vector2D(*, x: float, py: float, pz: float, tau: float)
- class vector._methods.Vector2D(*, px: float, y: float, z: float, tau: float)
- class vector._methods.Vector2D(*, px: float, y: float, pz: float, tau: float)
- class vector._methods.Vector2D(*, px: float, py: float, z: float, tau: float)
- class vector._methods.Vector2D(*, px: float, py: float, pz: float, tau: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, z: float, tau: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, pz: float, tau: float)
- class vector._methods.Vector2D(*, ptau: float, phi: float, z: float, tau: float)
- class vector._methods.Vector2D(*, ptau: float, phi: float, pz: float, tau: float)
- class vector._methods.Vector2D(*, x: float, y: float, theta: float, tau: float)
- class vector._methods.Vector2D(*, x: float, py: float, theta: float, tau: float)
- class vector._methods.Vector2D(*, px: float, y: float, theta: float, tau: float)
- class vector._methods.Vector2D(*, px: float, py: float, theta: float, tau: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, theta: float, tau: float)
- class vector._methods.Vector2D(*, ptau: float, phi: float, theta: float, tau: float)
- class vector._methods.Vector2D(*, x: float, y: float, eta: float, tau: float)
- class vector._methods.Vector2D(*, x: float, py: float, eta: float, tau: float)
- class vector._methods.Vector2D(*, px: float, y: float, eta: float, tau: float)
- class vector._methods.Vector2D(*, px: float, py: float, eta: float, tau: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, eta: float, tau: float)
- class vector._methods.Vector2D(*, ptau: float, phi: float, eta: float, tau: float)
- class vector._methods.Vector2D(*, x: float, y: float, z: float, E: float)
- class vector._methods.Vector2D(*, x: float, y: float, pz: float, E: float)
- class vector._methods.Vector2D(*, x: float, py: float, z: float, E: float)
- class vector._methods.Vector2D(*, x: float, py: float, pz: float, E: float)
- class vector._methods.Vector2D(*, px: float, y: float, z: float, E: float)
- class vector._methods.Vector2D(*, px: float, y: float, pz: float, E: float)
- class vector._methods.Vector2D(*, px: float, py: float, z: float, E: float)
- class vector._methods.Vector2D(*, px: float, py: float, pz: float, E: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, z: float, E: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, pz: float, E: float)
- class vector._methods.Vector2D(*, pE: float, phi: float, z: float, E: float)
- class vector._methods.Vector2D(*, pE: float, phi: float, pz: float, E: float)
- class vector._methods.Vector2D(*, x: float, y: float, theta: float, E: float)
- class vector._methods.Vector2D(*, x: float, py: float, theta: float, E: float)
- class vector._methods.Vector2D(*, px: float, y: float, theta: float, E: float)
- class vector._methods.Vector2D(*, px: float, py: float, theta: float, E: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, theta: float, E: float)
- class vector._methods.Vector2D(*, pE: float, phi: float, theta: float, E: float)
- class vector._methods.Vector2D(*, x: float, y: float, eta: float, E: float)
- class vector._methods.Vector2D(*, x: float, py: float, eta: float, E: float)
- class vector._methods.Vector2D(*, px: float, y: float, eta: float, E: float)
- class vector._methods.Vector2D(*, px: float, py: float, eta: float, E: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, eta: float, E: float)
- class vector._methods.Vector2D(*, pE: float, phi: float, eta: float, E: float)
- class vector._methods.Vector2D(*, x: float, y: float, z: float, e: float)
- class vector._methods.Vector2D(*, x: float, y: float, pz: float, e: float)
- class vector._methods.Vector2D(*, x: float, py: float, z: float, e: float)
- class vector._methods.Vector2D(*, x: float, py: float, pz: float, e: float)
- class vector._methods.Vector2D(*, px: float, y: float, z: float, e: float)
- class vector._methods.Vector2D(*, px: float, y: float, pz: float, e: float)
- class vector._methods.Vector2D(*, px: float, py: float, z: float, e: float)
- class vector._methods.Vector2D(*, px: float, py: float, pz: float, e: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, z: float, e: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, pz: float, e: float)
- class vector._methods.Vector2D(*, pe: float, phi: float, z: float, e: float)
- class vector._methods.Vector2D(*, pe: float, phi: float, pz: float, e: float)
- class vector._methods.Vector2D(*, x: float, y: float, theta: float, e: float)
- class vector._methods.Vector2D(*, x: float, py: float, theta: float, e: float)
- class vector._methods.Vector2D(*, px: float, y: float, theta: float, e: float)
- class vector._methods.Vector2D(*, px: float, py: float, theta: float, e: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, theta: float, e: float)
- class vector._methods.Vector2D(*, pe: float, phi: float, theta: float, e: float)
- class vector._methods.Vector2D(*, x: float, y: float, eta: float, e: float)
- class vector._methods.Vector2D(*, x: float, py: float, eta: float, e: float)
- class vector._methods.Vector2D(*, px: float, y: float, eta: float, e: float)
- class vector._methods.Vector2D(*, px: float, py: float, eta: float, e: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, eta: float, e: float)
- class vector._methods.Vector2D(*, pe: float, phi: float, eta: float, e: float)
- class vector._methods.Vector2D(*, x: float, y: float, z: float, energy: float)
- class vector._methods.Vector2D(*, x: float, y: float, pz: float, energy: float)
- class vector._methods.Vector2D(*, x: float, py: float, z: float, energy: float)
- class vector._methods.Vector2D(*, x: float, py: float, pz: float, energy: float)
- class vector._methods.Vector2D(*, px: float, y: float, z: float, energy: float)
- class vector._methods.Vector2D(*, px: float, y: float, pz: float, energy: float)
- class vector._methods.Vector2D(*, px: float, py: float, z: float, energy: float)
- class vector._methods.Vector2D(*, px: float, py: float, pz: float, energy: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, z: float, energy: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, pz: float, energy: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, z: float, energy: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, pz: float, energy: float)
- class vector._methods.Vector2D(*, x: float, y: float, theta: float, energy: float)
- class vector._methods.Vector2D(*, x: float, py: float, theta: float, energy: float)
- class vector._methods.Vector2D(*, px: float, y: float, theta: float, energy: float)
- class vector._methods.Vector2D(*, px: float, py: float, theta: float, energy: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, theta: float, energy: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, theta: float, energy: float)
- class vector._methods.Vector2D(*, x: float, y: float, eta: float, energy: float)
- class vector._methods.Vector2D(*, x: float, py: float, eta: float, energy: float)
- class vector._methods.Vector2D(*, px: float, y: float, eta: float, energy: float)
- class vector._methods.Vector2D(*, px: float, py: float, eta: float, energy: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, eta: float, energy: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, eta: float, energy: float)
- class vector._methods.Vector2D(*, x: float, y: float, z: float, M: float)
- class vector._methods.Vector2D(*, x: float, y: float, pz: float, M: float)
- class vector._methods.Vector2D(*, x: float, py: float, z: float, M: float)
- class vector._methods.Vector2D(*, x: float, py: float, pz: float, M: float)
- class vector._methods.Vector2D(*, px: float, y: float, z: float, M: float)
- class vector._methods.Vector2D(*, px: float, y: float, pz: float, M: float)
- class vector._methods.Vector2D(*, px: float, py: float, z: float, M: float)
- class vector._methods.Vector2D(*, px: float, py: float, pz: float, M: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, z: float, M: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, pz: float, M: float)
- class vector._methods.Vector2D(*, pM: float, phi: float, z: float, M: float)
- class vector._methods.Vector2D(*, pM: float, phi: float, pz: float, M: float)
- class vector._methods.Vector2D(*, x: float, y: float, theta: float, M: float)
- class vector._methods.Vector2D(*, x: float, py: float, theta: float, M: float)
- class vector._methods.Vector2D(*, px: float, y: float, theta: float, M: float)
- class vector._methods.Vector2D(*, px: float, py: float, theta: float, M: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, theta: float, M: float)
- class vector._methods.Vector2D(*, pM: float, phi: float, theta: float, M: float)
- class vector._methods.Vector2D(*, x: float, y: float, eta: float, M: float)
- class vector._methods.Vector2D(*, x: float, py: float, eta: float, M: float)
- class vector._methods.Vector2D(*, px: float, y: float, eta: float, M: float)
- class vector._methods.Vector2D(*, px: float, py: float, eta: float, M: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, eta: float, M: float)
- class vector._methods.Vector2D(*, pM: float, phi: float, eta: float, M: float)
- class vector._methods.Vector2D(*, x: float, y: float, z: float, m: float)
- class vector._methods.Vector2D(*, x: float, y: float, pz: float, m: float)
- class vector._methods.Vector2D(*, x: float, py: float, z: float, m: float)
- class vector._methods.Vector2D(*, x: float, py: float, pz: float, m: float)
- class vector._methods.Vector2D(*, px: float, y: float, z: float, m: float)
- class vector._methods.Vector2D(*, px: float, y: float, pz: float, m: float)
- class vector._methods.Vector2D(*, px: float, py: float, z: float, m: float)
- class vector._methods.Vector2D(*, px: float, py: float, pz: float, m: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, z: float, m: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, pz: float, m: float)
- class vector._methods.Vector2D(*, pm: float, phi: float, z: float, m: float)
- class vector._methods.Vector2D(*, pm: float, phi: float, pz: float, m: float)
- class vector._methods.Vector2D(*, x: float, y: float, theta: float, m: float)
- class vector._methods.Vector2D(*, x: float, py: float, theta: float, m: float)
- class vector._methods.Vector2D(*, px: float, y: float, theta: float, m: float)
- class vector._methods.Vector2D(*, px: float, py: float, theta: float, m: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, theta: float, m: float)
- class vector._methods.Vector2D(*, pm: float, phi: float, theta: float, m: float)
- class vector._methods.Vector2D(*, x: float, y: float, eta: float, m: float)
- class vector._methods.Vector2D(*, x: float, py: float, eta: float, m: float)
- class vector._methods.Vector2D(*, px: float, y: float, eta: float, m: float)
- class vector._methods.Vector2D(*, px: float, py: float, eta: float, m: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, eta: float, m: float)
- class vector._methods.Vector2D(*, pm: float, phi: float, eta: float, m: float)
- class vector._methods.Vector2D(*, x: float, y: float, z: float, mass: float)
- class vector._methods.Vector2D(*, x: float, y: float, pz: float, mass: float)
- class vector._methods.Vector2D(*, x: float, py: float, z: float, mass: float)
- class vector._methods.Vector2D(*, x: float, py: float, pz: float, mass: float)
- class vector._methods.Vector2D(*, px: float, y: float, z: float, mass: float)
- class vector._methods.Vector2D(*, px: float, y: float, pz: float, mass: float)
- class vector._methods.Vector2D(*, px: float, py: float, z: float, mass: float)
- class vector._methods.Vector2D(*, px: float, py: float, pz: float, mass: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, z: float, mass: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, pz: float, mass: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, z: float, mass: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, pz: float, mass: float)
- class vector._methods.Vector2D(*, x: float, y: float, theta: float, mass: float)
- class vector._methods.Vector2D(*, x: float, py: float, theta: float, mass: float)
- class vector._methods.Vector2D(*, px: float, y: float, theta: float, mass: float)
- class vector._methods.Vector2D(*, px: float, py: float, theta: float, mass: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, theta: float, mass: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, theta: float, mass: float)
- class vector._methods.Vector2D(*, x: float, y: float, eta: float, mass: float)
- class vector._methods.Vector2D(*, x: float, py: float, eta: float, mass: float)
- class vector._methods.Vector2D(*, px: float, y: float, eta: float, mass: float)
- class vector._methods.Vector2D(*, px: float, py: float, eta: float, mass: float)
- class vector._methods.Vector2D(*, rho: float, phi: float, eta: float, mass: float)
- class vector._methods.Vector2D(*, pt: float, phi: float, eta: float, mass: float)
- class vector._methods.Vector2D(__azumthal: Azimuthal)
- class vector._methods.Vector2D(__azumthal: Azimuthal, __longitudinal: Longitudinal)
- class vector._methods.Vector2D(__azumthal: Azimuthal, __longitudinal: Longitudinal, __temporal: Temporal)
Bases:
Vector
,VectorProtocolPlanar
- to_2D() VectorProtocolPlanar #
Alias for
vector._methods.Vector2D.to_Vector2D()
.
- to_3D(**kwargs: float | None) VectorProtocolSpatial #
Alias for
vector._methods.Vector2D.to_Vector3D()
.
- to_4D(**kwargs: float | None) VectorProtocolLorentz #
Alias for
vector._methods.Vector2D.to_Vector4D()
.
- to_Vector2D() VectorProtocolPlanar #
Projects this vector/these vectors onto azimuthal coordinates only.
- to_Vector3D(*, z: float | ndarray | None = None, pz: float | ndarray | None = None, theta: float | ndarray | None = None, eta: float | ndarray | None = None) VectorProtocolSpatial #
Converts a 2D vector to 3D vector.
The scalar longitudinal coordinate is broadcasted for NumPy and Awkward vectors. Only a single longitudinal coordinate should be provided.
Examples
>>> import vector >>> vec = vector.VectorObject2D(x=1, y=2) >>> vec.to_Vector3D(z=1) VectorObject3D(x=1, y=2, z=1) >>> vec = vector.MomentumObject2D(px=1, py=2) >>> vec.to_Vector3D(pz=4) MomentumObject3D(px=1, py=2, pz=4)
- to_Vector4D(*, z: float | ndarray | None = None, pz: float | ndarray | None = None, theta: float | ndarray | None = None, eta: float | ndarray | None = None, t: float | ndarray | None = None, e: float | ndarray | None = None, E: float | ndarray | None = None, energy: float | ndarray | None = None, tau: float | ndarray | None = None, m: float | ndarray | None = None, M: float | ndarray | None = None, mass: float | ndarray | None = None) VectorProtocolLorentz #
Converts a 2D vector to 4D vector.
The scalar longitudinal and temporal coordinates are broadcasted for NumPy and Awkward vectors. Only a single longitudinal and temporal coordinate should be provided.
Examples
>>> import vector >>> vec = vector.VectorObject2D(x=1, y=2) >>> vec.to_Vector4D(z=3, t=4) VectorObject4D(x=1, y=2, z=3, t=4) >>> vec = vector.MomentumObject2D(px=1, py=2) >>> vec.to_Vector4D(pz=4, energy=4) MomentumObject4D(px=1, py=2, pz=4, E=4)
- class vector._methods.Vector3D(*, x: float, y: float)#
- class vector._methods.Vector3D(*, rho: float, phi: float)
- class vector._methods.Vector3D(*, x: float, y: float, z: float)
- class vector._methods.Vector3D(*, x: float, y: float, eta: float)
- class vector._methods.Vector3D(*, x: float, y: float, theta: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, z: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, eta: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, theta: float)
- class vector._methods.Vector3D(*, px: float, py: float)
- class vector._methods.Vector3D(*, x: float, py: float)
- class vector._methods.Vector3D(*, px: float, y: float)
- class vector._methods.Vector3D(*, pt: float, phi: float)
- class vector._methods.Vector3D(*, x: float, y: float, pz: float)
- class vector._methods.Vector3D(*, x: float, py: float, z: float)
- class vector._methods.Vector3D(*, x: float, py: float, pz: float)
- class vector._methods.Vector3D(*, px: float, y: float, z: float)
- class vector._methods.Vector3D(*, px: float, y: float, pz: float)
- class vector._methods.Vector3D(*, px: float, py: float, z: float)
- class vector._methods.Vector3D(*, px: float, py: float, pz: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, pz: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, z: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, pz: float)
- class vector._methods.Vector3D(*, x: float, py: float, theta: float)
- class vector._methods.Vector3D(*, px: float, y: float, theta: float)
- class vector._methods.Vector3D(*, px: float, py: float, theta: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, theta: float)
- class vector._methods.Vector3D(*, x: float, py: float, eta: float)
- class vector._methods.Vector3D(*, px: float, y: float, eta: float)
- class vector._methods.Vector3D(*, px: float, py: float, eta: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, eta: float)
- class vector._methods.Vector3D(*, x: float, y: float, z: float, t: float)
- class vector._methods.Vector3D(*, x: float, y: float, pz: float, t: float)
- class vector._methods.Vector3D(*, x: float, py: float, z: float, t: float)
- class vector._methods.Vector3D(*, x: float, py: float, pz: float, t: float)
- class vector._methods.Vector3D(*, px: float, y: float, z: float, t: float)
- class vector._methods.Vector3D(*, px: float, y: float, pz: float, t: float)
- class vector._methods.Vector3D(*, px: float, py: float, z: float, t: float)
- class vector._methods.Vector3D(*, px: float, py: float, pz: float, t: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, z: float, t: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, pz: float, t: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, z: float, t: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, pz: float, t: float)
- class vector._methods.Vector3D(*, x: float, y: float, theta: float, t: float)
- class vector._methods.Vector3D(*, x: float, py: float, theta: float, t: float)
- class vector._methods.Vector3D(*, px: float, y: float, theta: float, t: float)
- class vector._methods.Vector3D(*, px: float, py: float, theta: float, t: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, theta: float, t: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, theta: float, t: float)
- class vector._methods.Vector3D(*, x: float, y: float, eta: float, t: float)
- class vector._methods.Vector3D(*, x: float, py: float, eta: float, t: float)
- class vector._methods.Vector3D(*, px: float, y: float, eta: float, t: float)
- class vector._methods.Vector3D(*, px: float, py: float, eta: float, t: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, eta: float, t: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, eta: float, t: float)
- class vector._methods.Vector3D(*, x: float, y: float, z: float, tau: float)
- class vector._methods.Vector3D(*, x: float, y: float, pz: float, tau: float)
- class vector._methods.Vector3D(*, x: float, py: float, z: float, tau: float)
- class vector._methods.Vector3D(*, x: float, py: float, pz: float, tau: float)
- class vector._methods.Vector3D(*, px: float, y: float, z: float, tau: float)
- class vector._methods.Vector3D(*, px: float, y: float, pz: float, tau: float)
- class vector._methods.Vector3D(*, px: float, py: float, z: float, tau: float)
- class vector._methods.Vector3D(*, px: float, py: float, pz: float, tau: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, z: float, tau: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, pz: float, tau: float)
- class vector._methods.Vector3D(*, ptau: float, phi: float, z: float, tau: float)
- class vector._methods.Vector3D(*, ptau: float, phi: float, pz: float, tau: float)
- class vector._methods.Vector3D(*, x: float, y: float, theta: float, tau: float)
- class vector._methods.Vector3D(*, x: float, py: float, theta: float, tau: float)
- class vector._methods.Vector3D(*, px: float, y: float, theta: float, tau: float)
- class vector._methods.Vector3D(*, px: float, py: float, theta: float, tau: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, theta: float, tau: float)
- class vector._methods.Vector3D(*, ptau: float, phi: float, theta: float, tau: float)
- class vector._methods.Vector3D(*, x: float, y: float, eta: float, tau: float)
- class vector._methods.Vector3D(*, x: float, py: float, eta: float, tau: float)
- class vector._methods.Vector3D(*, px: float, y: float, eta: float, tau: float)
- class vector._methods.Vector3D(*, px: float, py: float, eta: float, tau: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, eta: float, tau: float)
- class vector._methods.Vector3D(*, ptau: float, phi: float, eta: float, tau: float)
- class vector._methods.Vector3D(*, x: float, y: float, z: float, E: float)
- class vector._methods.Vector3D(*, x: float, y: float, pz: float, E: float)
- class vector._methods.Vector3D(*, x: float, py: float, z: float, E: float)
- class vector._methods.Vector3D(*, x: float, py: float, pz: float, E: float)
- class vector._methods.Vector3D(*, px: float, y: float, z: float, E: float)
- class vector._methods.Vector3D(*, px: float, y: float, pz: float, E: float)
- class vector._methods.Vector3D(*, px: float, py: float, z: float, E: float)
- class vector._methods.Vector3D(*, px: float, py: float, pz: float, E: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, z: float, E: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, pz: float, E: float)
- class vector._methods.Vector3D(*, pE: float, phi: float, z: float, E: float)
- class vector._methods.Vector3D(*, pE: float, phi: float, pz: float, E: float)
- class vector._methods.Vector3D(*, x: float, y: float, theta: float, E: float)
- class vector._methods.Vector3D(*, x: float, py: float, theta: float, E: float)
- class vector._methods.Vector3D(*, px: float, y: float, theta: float, E: float)
- class vector._methods.Vector3D(*, px: float, py: float, theta: float, E: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, theta: float, E: float)
- class vector._methods.Vector3D(*, pE: float, phi: float, theta: float, E: float)
- class vector._methods.Vector3D(*, x: float, y: float, eta: float, E: float)
- class vector._methods.Vector3D(*, x: float, py: float, eta: float, E: float)
- class vector._methods.Vector3D(*, px: float, y: float, eta: float, E: float)
- class vector._methods.Vector3D(*, px: float, py: float, eta: float, E: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, eta: float, E: float)
- class vector._methods.Vector3D(*, pE: float, phi: float, eta: float, E: float)
- class vector._methods.Vector3D(*, x: float, y: float, z: float, e: float)
- class vector._methods.Vector3D(*, x: float, y: float, pz: float, e: float)
- class vector._methods.Vector3D(*, x: float, py: float, z: float, e: float)
- class vector._methods.Vector3D(*, x: float, py: float, pz: float, e: float)
- class vector._methods.Vector3D(*, px: float, y: float, z: float, e: float)
- class vector._methods.Vector3D(*, px: float, y: float, pz: float, e: float)
- class vector._methods.Vector3D(*, px: float, py: float, z: float, e: float)
- class vector._methods.Vector3D(*, px: float, py: float, pz: float, e: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, z: float, e: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, pz: float, e: float)
- class vector._methods.Vector3D(*, pe: float, phi: float, z: float, e: float)
- class vector._methods.Vector3D(*, pe: float, phi: float, pz: float, e: float)
- class vector._methods.Vector3D(*, x: float, y: float, theta: float, e: float)
- class vector._methods.Vector3D(*, x: float, py: float, theta: float, e: float)
- class vector._methods.Vector3D(*, px: float, y: float, theta: float, e: float)
- class vector._methods.Vector3D(*, px: float, py: float, theta: float, e: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, theta: float, e: float)
- class vector._methods.Vector3D(*, pe: float, phi: float, theta: float, e: float)
- class vector._methods.Vector3D(*, x: float, y: float, eta: float, e: float)
- class vector._methods.Vector3D(*, x: float, py: float, eta: float, e: float)
- class vector._methods.Vector3D(*, px: float, y: float, eta: float, e: float)
- class vector._methods.Vector3D(*, px: float, py: float, eta: float, e: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, eta: float, e: float)
- class vector._methods.Vector3D(*, pe: float, phi: float, eta: float, e: float)
- class vector._methods.Vector3D(*, x: float, y: float, z: float, energy: float)
- class vector._methods.Vector3D(*, x: float, y: float, pz: float, energy: float)
- class vector._methods.Vector3D(*, x: float, py: float, z: float, energy: float)
- class vector._methods.Vector3D(*, x: float, py: float, pz: float, energy: float)
- class vector._methods.Vector3D(*, px: float, y: float, z: float, energy: float)
- class vector._methods.Vector3D(*, px: float, y: float, pz: float, energy: float)
- class vector._methods.Vector3D(*, px: float, py: float, z: float, energy: float)
- class vector._methods.Vector3D(*, px: float, py: float, pz: float, energy: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, z: float, energy: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, pz: float, energy: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, z: float, energy: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, pz: float, energy: float)
- class vector._methods.Vector3D(*, x: float, y: float, theta: float, energy: float)
- class vector._methods.Vector3D(*, x: float, py: float, theta: float, energy: float)
- class vector._methods.Vector3D(*, px: float, y: float, theta: float, energy: float)
- class vector._methods.Vector3D(*, px: float, py: float, theta: float, energy: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, theta: float, energy: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, theta: float, energy: float)
- class vector._methods.Vector3D(*, x: float, y: float, eta: float, energy: float)
- class vector._methods.Vector3D(*, x: float, py: float, eta: float, energy: float)
- class vector._methods.Vector3D(*, px: float, y: float, eta: float, energy: float)
- class vector._methods.Vector3D(*, px: float, py: float, eta: float, energy: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, eta: float, energy: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, eta: float, energy: float)
- class vector._methods.Vector3D(*, x: float, y: float, z: float, M: float)
- class vector._methods.Vector3D(*, x: float, y: float, pz: float, M: float)
- class vector._methods.Vector3D(*, x: float, py: float, z: float, M: float)
- class vector._methods.Vector3D(*, x: float, py: float, pz: float, M: float)
- class vector._methods.Vector3D(*, px: float, y: float, z: float, M: float)
- class vector._methods.Vector3D(*, px: float, y: float, pz: float, M: float)
- class vector._methods.Vector3D(*, px: float, py: float, z: float, M: float)
- class vector._methods.Vector3D(*, px: float, py: float, pz: float, M: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, z: float, M: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, pz: float, M: float)
- class vector._methods.Vector3D(*, pM: float, phi: float, z: float, M: float)
- class vector._methods.Vector3D(*, pM: float, phi: float, pz: float, M: float)
- class vector._methods.Vector3D(*, x: float, y: float, theta: float, M: float)
- class vector._methods.Vector3D(*, x: float, py: float, theta: float, M: float)
- class vector._methods.Vector3D(*, px: float, y: float, theta: float, M: float)
- class vector._methods.Vector3D(*, px: float, py: float, theta: float, M: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, theta: float, M: float)
- class vector._methods.Vector3D(*, pM: float, phi: float, theta: float, M: float)
- class vector._methods.Vector3D(*, x: float, y: float, eta: float, M: float)
- class vector._methods.Vector3D(*, x: float, py: float, eta: float, M: float)
- class vector._methods.Vector3D(*, px: float, y: float, eta: float, M: float)
- class vector._methods.Vector3D(*, px: float, py: float, eta: float, M: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, eta: float, M: float)
- class vector._methods.Vector3D(*, pM: float, phi: float, eta: float, M: float)
- class vector._methods.Vector3D(*, x: float, y: float, z: float, m: float)
- class vector._methods.Vector3D(*, x: float, y: float, pz: float, m: float)
- class vector._methods.Vector3D(*, x: float, py: float, z: float, m: float)
- class vector._methods.Vector3D(*, x: float, py: float, pz: float, m: float)
- class vector._methods.Vector3D(*, px: float, y: float, z: float, m: float)
- class vector._methods.Vector3D(*, px: float, y: float, pz: float, m: float)
- class vector._methods.Vector3D(*, px: float, py: float, z: float, m: float)
- class vector._methods.Vector3D(*, px: float, py: float, pz: float, m: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, z: float, m: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, pz: float, m: float)
- class vector._methods.Vector3D(*, pm: float, phi: float, z: float, m: float)
- class vector._methods.Vector3D(*, pm: float, phi: float, pz: float, m: float)
- class vector._methods.Vector3D(*, x: float, y: float, theta: float, m: float)
- class vector._methods.Vector3D(*, x: float, py: float, theta: float, m: float)
- class vector._methods.Vector3D(*, px: float, y: float, theta: float, m: float)
- class vector._methods.Vector3D(*, px: float, py: float, theta: float, m: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, theta: float, m: float)
- class vector._methods.Vector3D(*, pm: float, phi: float, theta: float, m: float)
- class vector._methods.Vector3D(*, x: float, y: float, eta: float, m: float)
- class vector._methods.Vector3D(*, x: float, py: float, eta: float, m: float)
- class vector._methods.Vector3D(*, px: float, y: float, eta: float, m: float)
- class vector._methods.Vector3D(*, px: float, py: float, eta: float, m: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, eta: float, m: float)
- class vector._methods.Vector3D(*, pm: float, phi: float, eta: float, m: float)
- class vector._methods.Vector3D(*, x: float, y: float, z: float, mass: float)
- class vector._methods.Vector3D(*, x: float, y: float, pz: float, mass: float)
- class vector._methods.Vector3D(*, x: float, py: float, z: float, mass: float)
- class vector._methods.Vector3D(*, x: float, py: float, pz: float, mass: float)
- class vector._methods.Vector3D(*, px: float, y: float, z: float, mass: float)
- class vector._methods.Vector3D(*, px: float, y: float, pz: float, mass: float)
- class vector._methods.Vector3D(*, px: float, py: float, z: float, mass: float)
- class vector._methods.Vector3D(*, px: float, py: float, pz: float, mass: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, z: float, mass: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, pz: float, mass: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, z: float, mass: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, pz: float, mass: float)
- class vector._methods.Vector3D(*, x: float, y: float, theta: float, mass: float)
- class vector._methods.Vector3D(*, x: float, py: float, theta: float, mass: float)
- class vector._methods.Vector3D(*, px: float, y: float, theta: float, mass: float)
- class vector._methods.Vector3D(*, px: float, py: float, theta: float, mass: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, theta: float, mass: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, theta: float, mass: float)
- class vector._methods.Vector3D(*, x: float, y: float, eta: float, mass: float)
- class vector._methods.Vector3D(*, x: float, py: float, eta: float, mass: float)
- class vector._methods.Vector3D(*, px: float, y: float, eta: float, mass: float)
- class vector._methods.Vector3D(*, px: float, py: float, eta: float, mass: float)
- class vector._methods.Vector3D(*, rho: float, phi: float, eta: float, mass: float)
- class vector._methods.Vector3D(*, pt: float, phi: float, eta: float, mass: float)
- class vector._methods.Vector3D(__azumthal: Azimuthal)
- class vector._methods.Vector3D(__azumthal: Azimuthal, __longitudinal: Longitudinal)
- class vector._methods.Vector3D(__azumthal: Azimuthal, __longitudinal: Longitudinal, __temporal: Temporal)
Bases:
Vector
,VectorProtocolSpatial
- to_2D() VectorProtocolPlanar #
Alias for
vector._methods.Vector3D.to_Vector2D()
.
- to_3D() VectorProtocolSpatial #
Alias for
vector._methods.Vector3D.to_Vector3D()
.
- to_4D(**kwargs: float | None) VectorProtocolLorentz #
Alias for
vector._methods.Vector3D.to_Vector4D()
.
- to_Vector2D() VectorProtocolPlanar #
Projects this vector/these vectors onto azimuthal coordinates only.
- to_Vector3D() VectorProtocolSpatial #
Projects this vector/these vectors onto azimuthal and longitudinal coordinates only.
If 2D, a default \(z\) component of \(0\) is imputed.
The longitudinal coordinate can be passed as a named argument.
- to_Vector4D(*, t: float | ndarray | None = None, e: float | ndarray | None = None, E: float | ndarray | None = None, energy: float | ndarray | None = None, tau: float | ndarray | None = None, m: float | ndarray | None = None, M: float | ndarray | None = None, mass: float | ndarray | None = None) VectorProtocolLorentz #
Converts a 3D vector to 4D vector.
The scalar temporal coordinate are broadcasted for NumPy and Awkward vectors. Only a single temporal coordinate should be provided.
Examples
>>> import vector >>> vec = vector.VectorObject3D(x=1, y=2, z=3) >>> vec.to_Vector4D(t=4) VectorObject4D(x=1, y=2, z=3, t=4) >>> vec = vector.MomentumObject3D(px=1, py=2, pz=3) >>> vec.to_Vector4D(M=4) MomentumObject4D(px=1, py=2, pz=3, mass=4)
- class vector._methods.Vector4D(*, x: float, y: float)#
- class vector._methods.Vector4D(*, rho: float, phi: float)
- class vector._methods.Vector4D(*, x: float, y: float, z: float)
- class vector._methods.Vector4D(*, x: float, y: float, eta: float)
- class vector._methods.Vector4D(*, x: float, y: float, theta: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, z: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, eta: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, theta: float)
- class vector._methods.Vector4D(*, px: float, py: float)
- class vector._methods.Vector4D(*, x: float, py: float)
- class vector._methods.Vector4D(*, px: float, y: float)
- class vector._methods.Vector4D(*, pt: float, phi: float)
- class vector._methods.Vector4D(*, x: float, y: float, pz: float)
- class vector._methods.Vector4D(*, x: float, py: float, z: float)
- class vector._methods.Vector4D(*, x: float, py: float, pz: float)
- class vector._methods.Vector4D(*, px: float, y: float, z: float)
- class vector._methods.Vector4D(*, px: float, y: float, pz: float)
- class vector._methods.Vector4D(*, px: float, py: float, z: float)
- class vector._methods.Vector4D(*, px: float, py: float, pz: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, pz: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, z: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, pz: float)
- class vector._methods.Vector4D(*, x: float, py: float, theta: float)
- class vector._methods.Vector4D(*, px: float, y: float, theta: float)
- class vector._methods.Vector4D(*, px: float, py: float, theta: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, theta: float)
- class vector._methods.Vector4D(*, x: float, py: float, eta: float)
- class vector._methods.Vector4D(*, px: float, y: float, eta: float)
- class vector._methods.Vector4D(*, px: float, py: float, eta: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, eta: float)
- class vector._methods.Vector4D(*, x: float, y: float, z: float, t: float)
- class vector._methods.Vector4D(*, x: float, y: float, pz: float, t: float)
- class vector._methods.Vector4D(*, x: float, py: float, z: float, t: float)
- class vector._methods.Vector4D(*, x: float, py: float, pz: float, t: float)
- class vector._methods.Vector4D(*, px: float, y: float, z: float, t: float)
- class vector._methods.Vector4D(*, px: float, y: float, pz: float, t: float)
- class vector._methods.Vector4D(*, px: float, py: float, z: float, t: float)
- class vector._methods.Vector4D(*, px: float, py: float, pz: float, t: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, z: float, t: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, pz: float, t: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, z: float, t: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, pz: float, t: float)
- class vector._methods.Vector4D(*, x: float, y: float, theta: float, t: float)
- class vector._methods.Vector4D(*, x: float, py: float, theta: float, t: float)
- class vector._methods.Vector4D(*, px: float, y: float, theta: float, t: float)
- class vector._methods.Vector4D(*, px: float, py: float, theta: float, t: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, theta: float, t: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, theta: float, t: float)
- class vector._methods.Vector4D(*, x: float, y: float, eta: float, t: float)
- class vector._methods.Vector4D(*, x: float, py: float, eta: float, t: float)
- class vector._methods.Vector4D(*, px: float, y: float, eta: float, t: float)
- class vector._methods.Vector4D(*, px: float, py: float, eta: float, t: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, eta: float, t: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, eta: float, t: float)
- class vector._methods.Vector4D(*, x: float, y: float, z: float, tau: float)
- class vector._methods.Vector4D(*, x: float, y: float, pz: float, tau: float)
- class vector._methods.Vector4D(*, x: float, py: float, z: float, tau: float)
- class vector._methods.Vector4D(*, x: float, py: float, pz: float, tau: float)
- class vector._methods.Vector4D(*, px: float, y: float, z: float, tau: float)
- class vector._methods.Vector4D(*, px: float, y: float, pz: float, tau: float)
- class vector._methods.Vector4D(*, px: float, py: float, z: float, tau: float)
- class vector._methods.Vector4D(*, px: float, py: float, pz: float, tau: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, z: float, tau: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, pz: float, tau: float)
- class vector._methods.Vector4D(*, ptau: float, phi: float, z: float, tau: float)
- class vector._methods.Vector4D(*, ptau: float, phi: float, pz: float, tau: float)
- class vector._methods.Vector4D(*, x: float, y: float, theta: float, tau: float)
- class vector._methods.Vector4D(*, x: float, py: float, theta: float, tau: float)
- class vector._methods.Vector4D(*, px: float, y: float, theta: float, tau: float)
- class vector._methods.Vector4D(*, px: float, py: float, theta: float, tau: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, theta: float, tau: float)
- class vector._methods.Vector4D(*, ptau: float, phi: float, theta: float, tau: float)
- class vector._methods.Vector4D(*, x: float, y: float, eta: float, tau: float)
- class vector._methods.Vector4D(*, x: float, py: float, eta: float, tau: float)
- class vector._methods.Vector4D(*, px: float, y: float, eta: float, tau: float)
- class vector._methods.Vector4D(*, px: float, py: float, eta: float, tau: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, eta: float, tau: float)
- class vector._methods.Vector4D(*, ptau: float, phi: float, eta: float, tau: float)
- class vector._methods.Vector4D(*, x: float, y: float, z: float, E: float)
- class vector._methods.Vector4D(*, x: float, y: float, pz: float, E: float)
- class vector._methods.Vector4D(*, x: float, py: float, z: float, E: float)
- class vector._methods.Vector4D(*, x: float, py: float, pz: float, E: float)
- class vector._methods.Vector4D(*, px: float, y: float, z: float, E: float)
- class vector._methods.Vector4D(*, px: float, y: float, pz: float, E: float)
- class vector._methods.Vector4D(*, px: float, py: float, z: float, E: float)
- class vector._methods.Vector4D(*, px: float, py: float, pz: float, E: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, z: float, E: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, pz: float, E: float)
- class vector._methods.Vector4D(*, pE: float, phi: float, z: float, E: float)
- class vector._methods.Vector4D(*, pE: float, phi: float, pz: float, E: float)
- class vector._methods.Vector4D(*, x: float, y: float, theta: float, E: float)
- class vector._methods.Vector4D(*, x: float, py: float, theta: float, E: float)
- class vector._methods.Vector4D(*, px: float, y: float, theta: float, E: float)
- class vector._methods.Vector4D(*, px: float, py: float, theta: float, E: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, theta: float, E: float)
- class vector._methods.Vector4D(*, pE: float, phi: float, theta: float, E: float)
- class vector._methods.Vector4D(*, x: float, y: float, eta: float, E: float)
- class vector._methods.Vector4D(*, x: float, py: float, eta: float, E: float)
- class vector._methods.Vector4D(*, px: float, y: float, eta: float, E: float)
- class vector._methods.Vector4D(*, px: float, py: float, eta: float, E: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, eta: float, E: float)
- class vector._methods.Vector4D(*, pE: float, phi: float, eta: float, E: float)
- class vector._methods.Vector4D(*, x: float, y: float, z: float, e: float)
- class vector._methods.Vector4D(*, x: float, y: float, pz: float, e: float)
- class vector._methods.Vector4D(*, x: float, py: float, z: float, e: float)
- class vector._methods.Vector4D(*, x: float, py: float, pz: float, e: float)
- class vector._methods.Vector4D(*, px: float, y: float, z: float, e: float)
- class vector._methods.Vector4D(*, px: float, y: float, pz: float, e: float)
- class vector._methods.Vector4D(*, px: float, py: float, z: float, e: float)
- class vector._methods.Vector4D(*, px: float, py: float, pz: float, e: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, z: float, e: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, pz: float, e: float)
- class vector._methods.Vector4D(*, pe: float, phi: float, z: float, e: float)
- class vector._methods.Vector4D(*, pe: float, phi: float, pz: float, e: float)
- class vector._methods.Vector4D(*, x: float, y: float, theta: float, e: float)
- class vector._methods.Vector4D(*, x: float, py: float, theta: float, e: float)
- class vector._methods.Vector4D(*, px: float, y: float, theta: float, e: float)
- class vector._methods.Vector4D(*, px: float, py: float, theta: float, e: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, theta: float, e: float)
- class vector._methods.Vector4D(*, pe: float, phi: float, theta: float, e: float)
- class vector._methods.Vector4D(*, x: float, y: float, eta: float, e: float)
- class vector._methods.Vector4D(*, x: float, py: float, eta: float, e: float)
- class vector._methods.Vector4D(*, px: float, y: float, eta: float, e: float)
- class vector._methods.Vector4D(*, px: float, py: float, eta: float, e: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, eta: float, e: float)
- class vector._methods.Vector4D(*, pe: float, phi: float, eta: float, e: float)
- class vector._methods.Vector4D(*, x: float, y: float, z: float, energy: float)
- class vector._methods.Vector4D(*, x: float, y: float, pz: float, energy: float)
- class vector._methods.Vector4D(*, x: float, py: float, z: float, energy: float)
- class vector._methods.Vector4D(*, x: float, py: float, pz: float, energy: float)
- class vector._methods.Vector4D(*, px: float, y: float, z: float, energy: float)
- class vector._methods.Vector4D(*, px: float, y: float, pz: float, energy: float)
- class vector._methods.Vector4D(*, px: float, py: float, z: float, energy: float)
- class vector._methods.Vector4D(*, px: float, py: float, pz: float, energy: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, z: float, energy: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, pz: float, energy: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, z: float, energy: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, pz: float, energy: float)
- class vector._methods.Vector4D(*, x: float, y: float, theta: float, energy: float)
- class vector._methods.Vector4D(*, x: float, py: float, theta: float, energy: float)
- class vector._methods.Vector4D(*, px: float, y: float, theta: float, energy: float)
- class vector._methods.Vector4D(*, px: float, py: float, theta: float, energy: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, theta: float, energy: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, theta: float, energy: float)
- class vector._methods.Vector4D(*, x: float, y: float, eta: float, energy: float)
- class vector._methods.Vector4D(*, x: float, py: float, eta: float, energy: float)
- class vector._methods.Vector4D(*, px: float, y: float, eta: float, energy: float)
- class vector._methods.Vector4D(*, px: float, py: float, eta: float, energy: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, eta: float, energy: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, eta: float, energy: float)
- class vector._methods.Vector4D(*, x: float, y: float, z: float, M: float)
- class vector._methods.Vector4D(*, x: float, y: float, pz: float, M: float)
- class vector._methods.Vector4D(*, x: float, py: float, z: float, M: float)
- class vector._methods.Vector4D(*, x: float, py: float, pz: float, M: float)
- class vector._methods.Vector4D(*, px: float, y: float, z: float, M: float)
- class vector._methods.Vector4D(*, px: float, y: float, pz: float, M: float)
- class vector._methods.Vector4D(*, px: float, py: float, z: float, M: float)
- class vector._methods.Vector4D(*, px: float, py: float, pz: float, M: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, z: float, M: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, pz: float, M: float)
- class vector._methods.Vector4D(*, pM: float, phi: float, z: float, M: float)
- class vector._methods.Vector4D(*, pM: float, phi: float, pz: float, M: float)
- class vector._methods.Vector4D(*, x: float, y: float, theta: float, M: float)
- class vector._methods.Vector4D(*, x: float, py: float, theta: float, M: float)
- class vector._methods.Vector4D(*, px: float, y: float, theta: float, M: float)
- class vector._methods.Vector4D(*, px: float, py: float, theta: float, M: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, theta: float, M: float)
- class vector._methods.Vector4D(*, pM: float, phi: float, theta: float, M: float)
- class vector._methods.Vector4D(*, x: float, y: float, eta: float, M: float)
- class vector._methods.Vector4D(*, x: float, py: float, eta: float, M: float)
- class vector._methods.Vector4D(*, px: float, y: float, eta: float, M: float)
- class vector._methods.Vector4D(*, px: float, py: float, eta: float, M: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, eta: float, M: float)
- class vector._methods.Vector4D(*, pM: float, phi: float, eta: float, M: float)
- class vector._methods.Vector4D(*, x: float, y: float, z: float, m: float)
- class vector._methods.Vector4D(*, x: float, y: float, pz: float, m: float)
- class vector._methods.Vector4D(*, x: float, py: float, z: float, m: float)
- class vector._methods.Vector4D(*, x: float, py: float, pz: float, m: float)
- class vector._methods.Vector4D(*, px: float, y: float, z: float, m: float)
- class vector._methods.Vector4D(*, px: float, y: float, pz: float, m: float)
- class vector._methods.Vector4D(*, px: float, py: float, z: float, m: float)
- class vector._methods.Vector4D(*, px: float, py: float, pz: float, m: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, z: float, m: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, pz: float, m: float)
- class vector._methods.Vector4D(*, pm: float, phi: float, z: float, m: float)
- class vector._methods.Vector4D(*, pm: float, phi: float, pz: float, m: float)
- class vector._methods.Vector4D(*, x: float, y: float, theta: float, m: float)
- class vector._methods.Vector4D(*, x: float, py: float, theta: float, m: float)
- class vector._methods.Vector4D(*, px: float, y: float, theta: float, m: float)
- class vector._methods.Vector4D(*, px: float, py: float, theta: float, m: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, theta: float, m: float)
- class vector._methods.Vector4D(*, pm: float, phi: float, theta: float, m: float)
- class vector._methods.Vector4D(*, x: float, y: float, eta: float, m: float)
- class vector._methods.Vector4D(*, x: float, py: float, eta: float, m: float)
- class vector._methods.Vector4D(*, px: float, y: float, eta: float, m: float)
- class vector._methods.Vector4D(*, px: float, py: float, eta: float, m: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, eta: float, m: float)
- class vector._methods.Vector4D(*, pm: float, phi: float, eta: float, m: float)
- class vector._methods.Vector4D(*, x: float, y: float, z: float, mass: float)
- class vector._methods.Vector4D(*, x: float, y: float, pz: float, mass: float)
- class vector._methods.Vector4D(*, x: float, py: float, z: float, mass: float)
- class vector._methods.Vector4D(*, x: float, py: float, pz: float, mass: float)
- class vector._methods.Vector4D(*, px: float, y: float, z: float, mass: float)
- class vector._methods.Vector4D(*, px: float, y: float, pz: float, mass: float)
- class vector._methods.Vector4D(*, px: float, py: float, z: float, mass: float)
- class vector._methods.Vector4D(*, px: float, py: float, pz: float, mass: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, z: float, mass: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, pz: float, mass: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, z: float, mass: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, pz: float, mass: float)
- class vector._methods.Vector4D(*, x: float, y: float, theta: float, mass: float)
- class vector._methods.Vector4D(*, x: float, py: float, theta: float, mass: float)
- class vector._methods.Vector4D(*, px: float, y: float, theta: float, mass: float)
- class vector._methods.Vector4D(*, px: float, py: float, theta: float, mass: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, theta: float, mass: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, theta: float, mass: float)
- class vector._methods.Vector4D(*, x: float, y: float, eta: float, mass: float)
- class vector._methods.Vector4D(*, x: float, py: float, eta: float, mass: float)
- class vector._methods.Vector4D(*, px: float, y: float, eta: float, mass: float)
- class vector._methods.Vector4D(*, px: float, py: float, eta: float, mass: float)
- class vector._methods.Vector4D(*, rho: float, phi: float, eta: float, mass: float)
- class vector._methods.Vector4D(*, pt: float, phi: float, eta: float, mass: float)
- class vector._methods.Vector4D(__azumthal: Azimuthal)
- class vector._methods.Vector4D(__azumthal: Azimuthal, __longitudinal: Longitudinal)
- class vector._methods.Vector4D(__azumthal: Azimuthal, __longitudinal: Longitudinal, __temporal: Temporal)
Bases:
Vector
,VectorProtocolLorentz
- to_2D() VectorProtocolPlanar #
Alias for
vector._methods.Vector4D.to_Vector2D()
.
- to_3D() VectorProtocolSpatial #
Alias for
vector._methods.Vector4D.to_Vector3D()
.
- to_4D() VectorProtocolLorentz #
Alias for
vector._methods.Vector4D.to_Vector4D()
.
- to_Vector2D() VectorProtocolPlanar #
Projects this vector/these vectors onto azimuthal coordinates only.
- to_Vector3D() VectorProtocolSpatial #
Projects this vector/these vectors onto azimuthal and longitudinal coordinates only.
If 2D, a default \(z\) component of \(0\) is imputed.
The longitudinal coordinate can be passed as a named argument.
- to_Vector4D() VectorProtocolLorentz #
Projects this vector/these vectors onto azimuthal, longitudinal, and temporal coordinates.
If 3D, a default \(t\) component of \(0\) is imputed.
If 2D, a \(z\) component of \(0\) is imputed along with a default \(t\) component of \(0\).
The longitudinal and temporal coordinates can be passed as named arguments.
- class vector._methods.VectorProtocol#
Bases:
object
- lib#
The module used for functions used in compute functions (such as
sqrt
,sin
,cos
). Usuallynumpy
.- Type:
module
- ProjectionClass2D#
The class that would result from projecting this vector onto azimuthal coordinates only.
- Type:
type
- ProjectionClass3D#
The class that would result from projecting this vector onto azimuthal and longitudinal coordinates only.
- Type:
type
- ProjectionClass4D#
The class that would result from projecting this vector onto azimuthal, longitudinal, and temporal coordinates.
- Type:
type
- GenericClass#
The most generic concrete class for this type, for vectors without momentum-synonyms.
- Type:
type
- MomentumClass#
The momentum class for this type, for vectors with momentum-synonyms.
- Type:
type
- GenericClass: type[VectorProtocol]#
- MomentumClass: type[VectorProtocol]#
- ProjectionClass2D: type[VectorProtocolPlanar]#
- ProjectionClass3D: type[VectorProtocolSpatial]#
- ProjectionClass4D: type[VectorProtocolLorentz]#
- _wrap_result(cls: Any, result: Any, returns: Any, num_vecargs: Any) Any #
- Parameters:
result – Value or tuple of values from a compute function.
returns – Signature from a
dispatch_map
.num_vecargs (int) – Number of vector arguments in the function that would be treated on an equal footing (i.e.
add
has two, butrotate_axis
has only one: theaxis
is secondary).
Wraps the raw result of a compute function as a scalar, an array of scalars, a vector, or an array of vectors.
- add(other: VectorProtocol) VectorProtocol #
Sum of
self
andother
.This method is equivalent to the
+
operator.
- dot(other: VectorProtocol) Any #
Vector dot product of
self
withother
.This method is equivalent to the
@
operator.
- equal(other: VectorProtocol) Any #
Returns True if
self
is exactly equal toother
(possibly for arrays of vectors), False otherwise.This method is equivalent to the
==
operator.Typically, you’ll want to check
vector._methods.VectorProtocol.isclose()
to allow for numerical errors.
- isclose(other: VectorProtocol, rtol: Any = 1e-05, atol: Any = 1e-08, equal_nan: Any = False) Any #
Returns True if
self
is approximately equal toother
(possibly for arrays of vectors), False otherwise.The relative tolerance (
rtol
) and absolute tolerance (atol
) are interpreted as innp.isclose
:close_enough = abs(self - other) <= atol + rtol * abs(other)
- property lib: Any#
- like(other: VectorProtocol) VectorProtocol #
Projects the vector into the geometric coordinates of the other vector.
Value(s) of \(0\) is/are imputed while transforming vector from a lower geometric dimension to a higher geometric dimension.
vec_4d + vec_3d.like(vec_4d)
For more flexibility (passing new coordinate values), see
vector._methods.Vector2D.to_Vector3D()
,vector._methods.Vector2D.to_Vector4D()
, andvector._methods.Vector3D.to_Vector4D()
, which can be used as:vec_2d.to_Vector3D(z=3.0) vec_2d.to_Vector4D(z=3.0, t=4.0) vec_3d.to_Vector4D(t=4.0)
- not_equal(other: VectorProtocol) Any #
Returns False if
self
is exactly equal toother
(possibly for arrays of vectors), True otherwise.This method is equivalent to the
!=
operator.Typically, you’ll want to check
vector._methods.VectorProtocol.isclose()
to allow for numerical errors.
- scale(factor: Any) SameVectorType #
Returns vector(s) scaled by a
factor
, changing the length(s) but not the direction(s).This method is equivalent to the
*
operator.
- subtract(other: VectorProtocol) VectorProtocol #
Difference of
self
minusother
.This method is equivalent to the
-
operator.
- to_2D() VectorProtocolPlanar #
Projects this vector/these vectors onto azimuthal coordinates only.
Alias for
vector._methods.VectorProtocol.to_Vector2D()
.
- to_3D() VectorProtocolSpatial #
Projects this vector/these vectors onto azimuthal and longitudinal coordinates only.
If 2D, a default \(z\) component of \(0\) is imputed.
The longitudinal coordinate can be passed as a named argument.
Alias for
vector._methods.VectorProtocol.to_Vector3D()
.
- to_4D() VectorProtocolLorentz #
Projects this vector/these vectors onto azimuthal, longitudinal, and temporal coordinates.
If 3D, a default \(t\) component of \(0\) is imputed.
If 2D, a \(z\) component of \(0\) is imputed along with a default \(t\) component of \(0\).
The longitudinal and temporal coordinates can be passed as named arguments.
Alias for
vector._methods.VectorProtocol.to_Vector4D()
.
- to_Vector2D() VectorProtocolPlanar #
Projects this vector/these vectors onto azimuthal coordinates only.
- to_Vector3D() VectorProtocolSpatial #
Projects this vector/these vectors onto azimuthal and longitudinal coordinates only.
If 2D, a default \(z\) component of \(0\) is imputed.
The longitudinal coordinate can be passed as a named argument.
- to_Vector4D() VectorProtocolLorentz #
Projects this vector/these vectors onto azimuthal, longitudinal, and temporal coordinates.
If 3D, a default \(t\) component of \(0\) is imputed.
If 2D, a \(z\) component of \(0\) is imputed along with a default \(t\) component of \(0\).
The longitudinal and temporal coordinates can be passed as named arguments.
- to_ptphi() VectorProtocolPlanar #
Converts to \(pt\)-\(\phi\) coordinates, possibly eliminating dimensions with a projection.
- to_ptphieta() VectorProtocolSpatial #
Converts to \(pt\)-\(\phi\)-\(\eta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(eta\) coordinate can be passed as a named argument.
- to_ptphietaenergy() VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(\eta\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(energy\) coordinates can be passed as a named argument.
- to_ptphietamass() VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(\theta\)-\(mass\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(mass\) coordinates can be passed as a named argument.
- to_ptphipz() VectorProtocolSpatial #
Converts to \(pt\)-\(\phi\)-\(pz\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(pz\) coordinate can be passed as a named argument.
- to_ptphipzenergy() VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(pz\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(pz\) and \(energy\) coordinates can be passed as a named argument.
- to_ptphipzmass() VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(pz\)-\(mass\) coordinates, possibly imputing dimensions with a projection.
The \(pz\) and \(mass\) coordinates can be passed as a named argument.
- to_ptphitheta() VectorProtocolSpatial #
Converts to \(pt\)-\(\phi\)-\(\theta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(theta\) coordinate can be passed as a named argument.
- to_ptphithetaenergy() VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(\theta\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(energy\) coordinates can be passed as a named argument.
- to_ptphithetamass() VectorProtocolLorentz #
Converts to \(pt\)-\(\phi\)-\(\theta\)-\(mass\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(mass\) coordinates can be passed as a named argument.
- to_pxpy() VectorProtocolPlanar #
Converts to \(px\)-\(py\) coordinates, possibly eliminating dimensions with a projection.
- to_pxpyeta() VectorProtocolSpatial #
Converts to \(px\)-\(py\)-\(\eta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(eta\) coordinate can be passed as a named argument.
- to_pxpyetaenergy() VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(\eta\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(energy\) coordinates can be passed as a named argument.
- to_pxpyetamass() VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(\eta\)-\(mass\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(mass\) coordinates can be passed as a named argument.
- to_pxpypz() VectorProtocolSpatial #
Converts to \(px\)-\(py\)-\(pz\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(pz\) coordinate can be passed as a named argument.
- to_pxpypzenergy() VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(pz\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(pz\) and \(energy\) coordinates can be passed as a named argument.
- to_pxpypzmass() VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(pz\)-\(mass\) coordinates, possibly imputing dimensions with a projection.
The \(pz\) and \(mass\) coordinates can be passed as a named argument.
- to_pxpytheta() VectorProtocolSpatial #
Converts to \(px\)-\(py\)-\(\theta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(theta\) coordinate can be passed as a named argument.
- to_pxpythetaenergy() VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(\theta\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(energy\) coordinates can be passed as a named argument.
- to_pxpythetamass() VectorProtocolLorentz #
Converts to \(px\)-\(py\)-\(\theta\)-\(energy\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(mass\) coordinates can be passed as a named argument.
- to_rhophi() VectorProtocolPlanar #
Converts to \(\rho\)-\(\phi\) coordinates, possibly eliminating dimensions with a projection.
- to_rhophieta() VectorProtocolSpatial #
Converts to \(\rho\)-\(\phi\)-\(\eta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(eta\) coordinate can be passed as a named argument.
- to_rhophietat() VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(\eta\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(t\) coordinates can be passed as a named argument.
- to_rhophietatau() VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(\eta\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(tau\) coordinates can be passed as a named argument.
- to_rhophitheta() VectorProtocolSpatial #
Converts to \(\rho\)-\(\phi\)-\(\theta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(theta\) coordinate can be passed as a named argument.
- to_rhophithetat() VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(\theta\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(t\) coordinates can be passed as a named argument.
- to_rhophithetatau() VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(\theta\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(tau\) coordinates can be passed as a named argument.
- to_rhophiz() VectorProtocolSpatial #
Converts to \(\rho\)-\(\phi\)-\(z\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(z\) coordinate can be passed as a named argument.
- to_rhophizt() VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(z\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(z\) and \(t\) coordinates can be passed as a named argument.
- to_rhophiztau() VectorProtocolLorentz #
Converts to \(\rho\)-\(\phi\)-\(z\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(z\) and \(tau\) coordinates can be passed as a named argument.
- to_xy() VectorProtocolPlanar #
Converts to \(x\)-\(y\) coordinates, possibly eliminating dimensions with a projection.
- to_xyeta() VectorProtocolSpatial #
Converts to \(x\)-\(y\)-\(\eta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(eta\) coordinate can be passed as a named argument.
- to_xyetat() VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(\eta\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(t\) coordinates can be passed as a named argument.
- to_xyetatau() VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(\eta\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(eta\) and \(tau\) coordinates can be passed as a named argument.
- to_xytheta() VectorProtocolSpatial #
Converts to \(x\)-\(y\)-\(\theta\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(theta\) coordinate can be passed as a named argument.
- to_xythetat() VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(\theta\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(t\) coordinates can be passed as a named argument.
- to_xythetatau() VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(\theta\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(theta\) and \(tau\) coordinates can be passed as a named argument.
- to_xyz() VectorProtocolSpatial #
Converts to \(x\)-\(y\)-\(z\) coordinates, possibly eliminating or imputing dimensions with a projection.
The \(z\) coordinate can be passed as a named argument.
- to_xyzt() VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(z\)-\(t\) coordinates, possibly imputing dimensions with a projection.
The \(z\) and \(t\) coordinates can be passed as a named argument.
- to_xyztau() VectorProtocolLorentz #
Converts to \(x\)-\(y\)-\(z\)-\(\tau\) coordinates, possibly imputing dimensions with a projection.
The \(z\) and \(tau\) coordinates can be passed as a named argument.
- unit() SameVectorType #
Returns vector(s) normalized to unit length, which is rho == 1 for 2D vectors, mag == 1 for 3D vectors, and tau == 1 for 4D vectors.
- class vector._methods.VectorProtocolLorentz#
Bases:
VectorProtocolSpatial
- property beta: Any#
The speed(s) of the Lorentz vector or array of vectors, in which lightlike vectors have
beta == 1
.
- boost(booster: VectorProtocolSpatial | VectorProtocolLorentz) SameVectorType #
Boosts the vector or array of vectors using the 3D or 4D
booster
.If
booster
is 3D, it is interpreted as a velocity (in which lightlike velocities havemag == 1
) andvector._methods.VectorProtocolLorentz.boost_beta3()
is called.If
booster
is 4D, it is interpreted as a Lorentz vector andvector._methods.VectorProtocolLorentz.boost_p4()
is called.Note that
v.boost(v)
does not boost into the center-of-mass (CM) frame ofv
; it boosts away from its CM frame. Neither doesv.boost(-v)
, since that negates the time component ofv
as well.To boost to the center-of-mass frame of a vector
v
, usevector._methods.VectorProtocolLorentz.boostCM_of()
. For instance,v.boostCM_of(v)
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- boostCM_of(booster: VectorProtocolSpatial | VectorProtocolLorentz) SameVectorType #
Boosts the vector or array of vectors to the center-of-mass (CM) frame of the 3D or 4D
booster
.If
booster
is 3D, it is interpreted as a velocity (in which lightlike velocities havemag == 1
) andvector._methods.VectorProtocolLorentz.boostCM_of_beta3()
is called.If
booster
is 4D, it is interpreted as a Lorentz vector andvector._methods.VectorProtocolLorentz.boostCM_of_p4()
is called.Note that
v.boostCM_of(v)
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- boostCM_of_beta3(beta3: VectorProtocolSpatial) SameVectorType #
Boosts the vector or array of vectors to the center-of-mass (CM) frame of the 3D velocity or array of velocity vectors
beta3
.Note that
v.boostCM_of_beta3(v.to_beta3())
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- boostCM_of_p4(p4: VectorProtocolLorentz) SameVectorType #
Boosts the vector or array of vectors to the center-of-mass (CM) frame of the 4D vector or array of vectors
p4
.This function is equivalent to but more numerically stable than
boostCM_of_beta3(p4.to_beta3())
Note that
v.boostCM_of_p4(v)
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- boostX(beta: Any | None = None, gamma: Any | None = None) SameVectorType #
Boosts the vector or array of vectors in the \(x\) direction by a speed
beta
(in which lightlike boosts havebeta == 1
) or time dilation/length contraction factorgamma
.Either
beta
xorgamma
must be specified, not both or neither.If
beta
orgamma
is negative, it is taken as a boost in the \(-x\) direction.
- boostY(beta: Any | None = None, gamma: Any | None = None) SameVectorType #
Boosts the vector or array of vectors in the \(y\) direction by a speed
beta
(in which lightlike boosts havebeta == 1
) or time dilation/length contraction factorgamma
.Either
beta
xorgamma
must be specified, not both or neither.If
beta
orgamma
is negative, it is taken as a boost in the \(-y\) direction.
- boostZ(beta: Any | None = None, gamma: Any | None = None) SameVectorType #
Boosts the vector or array of vectors in the \(z\) direction by a speed
beta
(in which lightlike boosts havebeta == 1
) or time dilation/length contraction factorgamma
.Either
beta
xorgamma
must be specified, not both or neither.If
beta
orgamma
is negative, it is taken as a boost in the \(-z\) direction.
- boost_beta3(beta3: VectorProtocolSpatial) SameVectorType #
Boosts the vector or array of vectors in a direction and magnitude given by the 3D velocity or array of velocity vectors
beta3
.Note that
v.boost_beta3(v.to_beta3())
does not boost into the center-of-mass (CM) frame ofv
; it boosts away from its CM frame. Neither doesv.boost_beta3((-v).to_beta3())
, since that negates the time component ofv
as well. On the other hand,v.boost_beta3(-(v.to_beta3()))
would boost to the center-of-mass frame.However, there’s a function for that:
vector._methods.VectorProtocolLorentz.boostCM_of_beta3()
is explicit about boosting to a center-of-mass (CM) frame and it handles the negative sign for you:v.boostCM_of_beta3(v.to_beta3())
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- boost_p4(p4: VectorProtocolLorentz) SameVectorType #
Boosts the vector or array of vectors in a direction and magnitude given by the 4D vector or array of vectors
p4
.This function is equivalent to but more numerically stable than
boost_beta3(p4.to_beta3())
where
vector._methods.VectorProtocolLorentz.to_beta3()
converts a 4D Lorentz vector into a 3D velocity (in which lightlike velocities havemag == 1
).Note that
v.boost_p4(v)
does not boost into the center-of-mass (CM) frame ofv
; it boosts away from its CM frame. Neither doesv.boost_p4(-v)
, since that negates the time component ofv
as well.To boost to the center-of-mass frame of a vector
v
, usevector._methods.VectorProtocolLorentz.boostCM_of_p4()
. For instance,v.boostCM_of_p4(v)
is guaranteed to have spatial components close to zero and a temporal component close tov.tau
.
- deltaRapidityPhi(other: VectorProtocolLorentz) Any #
Sum in quadrature of
vector._methods.VectorProtocolPlanar.deltaphi()
and the difference invector._methods.VectorProtocolLorentz.rapidity
of the two vectors:\[\Delta R_{\mbox{rapidity}} = \sqrt{\Delta\phi^2 + \Delta \mbox{rapidity}^2}\]
- deltaRapidityPhi2(other: VectorProtocolLorentz) Any #
Square of the sum in quadrature of
vector._methods.VectorProtocolPlanar.deltaphi()
and the difference invector._methods.VectorProtocolLorentz.rapidity
of the two vectors:\[\Delta R_{\mbox{rapidity}} = \Delta\phi^2 + \Delta \mbox{rapidity}^2\]
- property gamma: Any#
The time dilation/length contraction factor(s) of the Lorentz vector or array of vectors: \(t/\tau\).
- is_lightlike(tolerance: Any = 1e-05) Any #
Returns True if the vector or a vector in the array is pointing in a lightlike direction,
t**2 == mag**2
, False otherwise.The
tolerance
is in units oft
andmag
. Note thatthe default
tolerance
forvector._methods.VectorProtocolLorentz.is_timelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_spacelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_lightlike()
is1e-5
If you want to use these methods to divide space-time into non-overlapping regions (the light-cone), use the same
tolerance
for each.
- is_spacelike(tolerance: Any = 0) Any #
Returns True if the vector or a vector in the array is pointing in a spacelike direction,
t**2 < mag**2
, False otherwise.The
tolerance
is in units oft
andmag
. Note thatthe default
tolerance
forvector._methods.VectorProtocolLorentz.is_timelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_spacelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_lightlike()
is1e-5
If you want to use these methods to divide space-time into non-overlapping regions (the light-cone), use the same
tolerance
for each.
- is_timelike(tolerance: Any = 0) Any #
Returns True if the vector or a vector in the array is pointing in a timelike direction,
t**2 > mag**2
, False otherwise.The
tolerance
is in units oft
andmag
. Note thatthe default
tolerance
forvector._methods.VectorProtocolLorentz.is_timelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_spacelike()
is0
the default
tolerance
forvector._methods.VectorProtocolLorentz.is_lightlike()
is1e-5
If you want to use these methods to divide space-time into non-overlapping regions (the light-cone), use the same
tolerance
for each.
- property neg4D: SameVectorType#
Same as multiplying by -1.
- property rapidity: Any#
The rapidity relative to the longitudinal axis of the Lorentz vector or array of vectors.
0.5 * log((t + z) / (t - z))
- scale4D(factor: Any) SameVectorType #
Same as
scale
.
- property t: Any#
The Cartesian \(t\) (time) coordinate of the vector or every vector in the array.
If \(t\) is derived from \(\tau\), it is not allowed to be
NaN
.t = sqrt(max(copysign(tau**2, tau) + mag**2, 0))
- property t2: Any#
The Cartesian \(t\) (time) coordinate squared of the vector or every vector in the array.
If \(t^2\) is derived from \(\tau\), it is not allowed to be negative.
t2 = max(copysign(tau**2, tau) + mag**2, 0)
- property tau: Any#
The Lorentz magnitude \(\tau\) (proper time) of the vector or every vector in the array.
If \(\tau\) is derived from \(t\), spacelike vectors are represented by negative proper times.
tau = copysign(sqrt(abs(t**2 - mag**2)), t**2 - mag**2)
- property tau2: Any#
The Lorentz magnitude \(\tau\) (proper time) squared of the vector or every vector in the array.
tau2 = t**2 - mag**2
- property temporal: Temporal#
Container of temporal coordinates, for use in dispatching to compute functions or to identify coordinate system with
isinstance
.
- to_beta3() VectorProtocolSpatial #
Converts the 4D Lorentz vector or array of vectors into a 3D velocity vector or array of vectors, in which lightlike velocities have
mag == 1
.
- transform4D(obj: TransformProtocol4D) SameVectorType #
Arbitrarily transforms the vector(s) by
obj["xx"] obj["xy"] obj["xz"] obj["xt"] obj["yx"] obj["yy"] obj["yz"] obj["yt"] obj["zx"] obj["zy"] obj["zz"] obj["zt"] obj["tx"] obj["ty"] obj["tz"] obj["tt"]
There is no restriction on the type of
obj
; it just has to provide those components (which can be arrays if the vectors are in an array).
- class vector._methods.VectorProtocolPlanar#
Bases:
VectorProtocol
- property azimuthal: Azimuthal#
Container of azimuthal coordinates, for use in dispatching to compute functions or to identify coordinate system with
isinstance
.
- deltaphi(other: VectorProtocol) Any #
Signed difference in \(\phi\) of
self
minusother
(in radians).
- is_antiparallel(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in opposite directions (i.e. dot product is nearly-abs(self) * abs(other)
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- is_parallel(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in the same direction (i.e. not “antiparallel”; dot product is nearlyabs(self) * abs(other)
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- is_perpendicular(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in perpendicular directions (i.e. dot product is nearly0
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- property neg2D: SameVectorType#
Returns vector(s) with the 2D part negated, not affecting any longitudinal or temporal parts.
- property phi: Any#
The polar \(\phi\) coordinate of the vector or every vector in the array (in radians, always between \(-\pi\) and \(\pi\)).
- property rho: Any#
The polar \(\rho\) coordinate of the vector or every vector in the array.
This is also the magnitude of the 2D azimuthal part of the vector (not including any longitudinal or temporal parts).
- property rho2: Any#
The polar \(\rho\) coordinate squared of the vector or every vector in the array.
- rotateZ(angle: Any) SameVectorType #
Rotates the vector(s) by a given
angle
(in radians) around the longitudinal axis.Note that the
angle
can be an array with the same length as the vectors, if the vectors are in an array.
- scale2D(factor: Any) SameVectorType #
Returns vector(s) with the 2D part scaled by a
factor
, not affecting any longitudinal or temporal parts.
- transform2D(obj: TransformProtocol2D) SameVectorType #
Arbitrarily transforms the vector(s) by
obj["xx"] obj["xy"] obj["yx"] obj["yy"]
leaving any longitudinal or temporal coordinates unchanged. There is no restriction on the type of
obj
; it just has to provide those components (which can be arrays if the vectors are in an array).
- property x: Any#
The Cartesian \(x\) coordinate of the vector or every vector in the array.
- property y: Any#
The Cartesian \(y\) coordinate of the vector or every vector in the array.
- class vector._methods.VectorProtocolSpatial#
Bases:
VectorProtocolPlanar
- property costheta: Any#
The \(\cos\theta\) coordinate of the vector or every vector in the array (has the same sign as \(z\)).
- property cottheta: Any#
The \(\cot\theta\) coordinate of the vector or every vector in the array (has the same sign as \(z\)).
- cross(other: VectorProtocolSpatial) VectorProtocolSpatial #
The 3D cross-product of
self
withother
.Even if
self
orother
is 4D, the resulting vector(s) is/are 3D.
- deltaR(other: VectorProtocolSpatial | VectorProtocolLorentz) Any #
Sum in quadrature of
vector._methods.VectorProtocolPlanar.deltaphi()
andvector._methods.VectorProtocolSpatial.deltaeta()
:\[\Delta R = \sqrt{\Delta\phi^2 + \Delta\eta^2}\]
- deltaR2(other: VectorProtocolSpatial | VectorProtocolLorentz) Any #
Square of the sum in quadrature of
vector._methods.VectorProtocolPlanar.deltaphi()
andvector._methods.VectorProtocolSpatial.deltaeta()
:\[\Delta R^2 = \Delta\phi^2 + \Delta\eta^2\]
- deltaangle(other: VectorProtocolSpatial | VectorProtocolLorentz) Any #
Angle in 3D space between
self
andother
, which is always positive, between \(0\) and \(\pi\).
- deltaeta(other: VectorProtocolSpatial | VectorProtocolLorentz) Any #
Signed difference in \(\eta\) of
self
minusother
.
- property eta: Any#
The pseudorapidity \(\eta\) coordinate of the vector or every vector in the array (in radians, always between \(0\) (\(+z\)) and \(\pi\) (\(-z\))).
- is_antiparallel(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in opposite directions (i.e. dot product is nearly-abs(self) * abs(other)
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- is_parallel(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in the same direction (i.e. not “antiparallel”; dot product is nearlyabs(self) * abs(other)
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- is_perpendicular(other: VectorProtocol, tolerance: Any = 1e-05) Any #
Returns True if
self
andother
are pointing in perpendicular directions (i.e. dot product is nearly0
).The
tolerance
is measured in units of \(\cos(\Delta\alpha)\) where \(\Delta\alpha\) isself.deltaangle(other)
.
- property longitudinal: Longitudinal#
Container of longitudinal coordinates, for use in dispatching to compute functions or to identify coordinate system with
isinstance
.
- property mag: Any#
The magnitude of the vector(s) in 3D (not including any temporal parts).
- property mag2: Any#
The magnitude-squared of the vector(s) in 3D (not including any temporal parts).
- property neg3D: SameVectorType#
Returns vector(s) with the 3D part negated, not affecting any longitudinal or temporal parts.
- rotateX(angle: Any) SameVectorType #
Rotates the vector(s) by a given
angle
(in radians) around the \(x\) axis.Note that the
angle
can be an array with the same length as the vectors, if the vectors are in an array.
- rotateY(angle: Any) SameVectorType #
Rotates the vector(s) by a given
angle
(in radians) around the \(y\) axis.Note that the
angle
can be an array with the same length as the vectors, if the vectors are in an array.
- rotate_axis(axis: VectorProtocolSpatial, angle: Any) SameVectorType #
Rotates the vector(s) by a given
angle
(in radians) around the axis indicated by another vector,axis
. The magnitude ofaxis
is ignored.Note that the
axis
andangle
can be arrays with the same length as the vectors, if the vectors are in an array.
- rotate_euler(phi: Any, theta: Any, psi: Any, order: str = 'zxz') SameVectorType #
Rotates the vector(s) by three given angles:
phi
,theta
, andpsi
(in radians). Theorder
string determines which axis each rotation is applied around:"zxz"
,"xyx"
,"yzy"
,"zyz"
,"xzx"
, and"yxy"
are proper Euler angles"zxz"
,"xyx"
,"yzy"
,"zyz"
,"xzx"
, and"yxy"
are Tait-Bryan angles (seevector._methods.VectorProtocolSpatial.rotate_nautical()
)
The names
phi
,theta
, andpsi
agree with Wikipedia’s terminology, and both the names and order agree with ROOT’s Math::EulerAngles. The defaultorder = "zxz"
is also ROOT’s convention.Note that the angles can be arrays with the same lengths as the vectors, if the vectors are in an array.
- rotate_nautical(yaw: Any, pitch: Any, roll: Any) SameVectorType #
Rotates the vector(s) by three given angles:
yaw
,pitch
, androll
(in radians). These are Tait-Bryan angles often used for boats and planes (see this lesson and this lesson).This function is entirely equivalent to
rotate_euler(roll, pitch, yaw, order="zyx")
Note that the angles can be arrays with the same lengths as the vectors, if the vectors are in an array.
- rotate_quaternion(u: Any, i: Any, j: Any, k: Any) SameVectorType #
Rotates the vector(s) by four angles as quaternion coefficients (in radians). Four angles are sometimes preferred over three because the latter has a pathology known as “gimbal lock.”
This function follows the same conventions as ROOT’s Math::Quaternion.
Note that the angles can be arrays with the same lengths as the vectors, if the vectors are in an array.
- scale3D(factor: Any) SameVectorType #
Returns vector(s) with the 3D part scaled by a
factor
, not affecting any longitudinal or temporal parts.
- property theta: Any#
The spherical \(\theta\) coordinate (polar angle) of the vector or every vector in the array (in radians, always between \(0\) (\(+z\)) and \(\pi\) (\(-z\))).
- transform3D(obj: TransformProtocol3D) SameVectorType #
Arbitrarily transforms the vector(s) by
obj["xx"] obj["xy"] obj["xz"] obj["yx"] obj["yy"] obj["yz"] obj["zx"] obj["zy"] obj["zz"]
leaving any temporal coordinate unchanged. There is no restriction on the type of
obj
; it just has to provide those components (which can be arrays if the vectors are in an array).
- property z: Any#
The Cartesian \(z\) coordinate of the vector or every vector in the array.
- vector._methods._aztype(obj: VectorProtocolPlanar) type[Coordinates] #
Determines the Azimuthal type of a vector for use in looking up a dispatched function.
- vector._methods._check_instance(any_or_all: Callable[[Iterable[bool]], bool], objects: tuple[VectorProtocol, ...], clas: type[VectorProtocol]) bool #
- vector._methods._compute_module_of(one: VectorProtocol, two: VectorProtocol, nontemporal: bool = False) Any #
Determines which compute module to use for functions of two vectors (the one with minimum dimension).
If
nontemporal
, use a spatial module even if both vectors are 4D.
- vector._methods._flavor_of(*objects: VectorProtocol) type[VectorProtocol] #
Determines the flavor of the output of a dispatched function, where “flavor” is generic vs momentum.
- vector._methods._from_signature(name: str, dispatch_map: dict[Any, Any], signature: tuple[Any, ...]) tuple[Any, ...] #
Gets a function and its return type from a
dispatch_map
and thesignature
to search for (complaining if none is found).
- vector._methods._get_handler_index(obj: VectorProtocol) int #
Returns the index of the first valid handler checking the list of parent classes
- vector._methods._handler_of(*objects: VectorProtocol) VectorProtocol #
Determines which vector should wrap the output of a dispatched function.
Awkward Arrays have higher priority than NumPy arrays, which have higher priority than Python objects, which has the effect of “promoting” Python objects to NumPy arrays to Awkward Arrays whenever two are used in the same formula.
- vector._methods._lib_of(*objects: VectorProtocol) Any #
Determines the
lib
of a vector or set of vectors, complaining if they’re incompatible.
- vector._methods._ltype(obj: VectorProtocolSpatial) type[Coordinates] #
Determines the Longitudinal type of a vector for use in looking up a dispatched function.
- vector._methods._maybe_same_dimension_error(v1: VectorProtocol, v2: VectorProtocol, operation: str) None #
Raises an error if the vectors are not of the same dimension.
- vector._methods._ttype(obj: VectorProtocolLorentz) type[Coordinates] #
Determines the Temporal type of a vector for use in looking up a dispatched function.
- vector._methods.dim(v: VectorProtocol) int #
Returns the number of dimensions in a vector: 2, 3, or 4.