lloca.utils.polar_decomposition

Lorentz transformations from boosts and rotations.

Functions

polar_decomposition(fourmomenta, references)

Construct a Lorentz transformation as a polar decomposition of a boost and a rotation.

restframe_boost(fourmomenta[, checks])

Construct a Lorentz transformation that boosts four-momenta into their rest frame.

lloca.utils.polar_decomposition.polar_decomposition(fourmomenta, references, use_float64=True, return_reg=False, eps_reg_lightlike=None, checks=False, **kwargs)[source]

Construct a Lorentz transformation as a polar decomposition of a boost and a rotation.

Parameters:
  • fourmomenta (torch.Tensor) – Tensor of shape (…, 4) representing the four-momenta that define the rest frames.

  • references (torch.Tensor) – Two tensors of shape (…, 2, 4) representing the reference four-momenta to construct the rotation.

  • use_float64 (bool) – If True, use float64 for calculations to avoid numerical issues.

  • return_reg (bool) – If True, return a tuple with the Lorentz transformation and regularization information.

  • eps_reg_lightlike (float or None) – Epsilon value for regularization of lightlike four-momenta. The same value is used in the orthogonalization step.

  • checks (bool) – If True, perform additional assertion checks on predicted vectors

  • kwargs (dict)

Returns:

  • trafo (torch.Tensor) – Tensor of shape (…, 4, 4) representing the Lorentz transformation.

  • reg_collinear (torch.Tensor, optional) – Tensor indicating if the references were collinear (only returned if return_reg is True).

lloca.utils.polar_decomposition.restframe_boost(fourmomenta, checks=False)[source]

Construct a Lorentz transformation that boosts four-momenta into their rest frame.

Parameters:
  • fourmomenta (torch.Tensor) – Tensor of shape (…, 4) representing the four-momenta.

  • checks (bool) – If True, perform additional assertion checks on predicted vectors. It may cause slowdowns due to GPU/CPU synchronization, use only for debugging.

Returns:

trafo – Tensor of shape (…, 4, 4) representing the Lorentz transformation that boosts the four-momenta into their rest frame.

Return type:

torch.Tensor