API reference

FourVectors.BzMethod
Bz(p::FourVector{T}, γ::T) where {T}

Applies an active boost along the z-axis with Lorentz factor γ. A negative γ reverses the boost direction (same |γ|, opposite sign of longitudinal velocity).

source
FourVectors.RxMethod
Rx(p::FourVector{T}, α::T) where {T}

Applies an active rotation by angle α about the x-axis to p.

source
FourVectors.RyMethod
Ry(p::FourVector{T}, θ::T) where {T}

Applies an active rotation by angle θ about the y-axis to p.

source
FourVectors.RzMethod
Rz(p::FourVector{T}, ϕ::T) where {T}

Applies an active rotation by angle ϕ about the z-axis to p.

source
FourVectors.rotate_to_planeMethod
rotate_to_plane(p, which_z, which_xplus)

Rotates a four-momentum p into a reference frame where the z-axis follows which_z and where the spatial direction which_xplus fixes azimuth (φ > 0 half-plane).

Sequence:

  1. Rotate so which_z aligns with the lab +z (Ry, Rz).
  2. Rotate about z so which_xplus sits in the x–z plane at non-negative x.

Example

julia> p = FourVector(0.5, 0.5, 0.5; M = 1.0);

julia> which_z = FourVector(0.0, 0.0, 1.0; M = 2.0);

julia> which_xplus = FourVector(1.0, 1.0, 0.0; M = 0.0);

julia> rotate_to_plane(p, which_z, which_xplus)
4-element FourVector{Float64} with indices SOneTo(4):
 0.7071067811865475
 5.551115123125783e-17
 0.5
 1.3228756555322954
source
FourVectors.transform_to_cmfMethod
transform_to_cmf(p, which_cmf)

Transforms p into the center-of-momentum frame of which_cmf: rotate so its spatial direction aligns with +z, then boost along z using the Lorentz factor of which_cmf.

Example

julia> p = FourVector(0.5, 0.5, 0.5; M = 1.0);

julia> transform_to_cmf(p, FourVector(1.0, 0.0, 0.0; E = 2.0))
4-element FourVector{Float64} with indices SOneTo(4):
 -0.49999999999999994
  0.5
 -0.18641234663634787
  1.238850097057134
source