Rotation

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

Rotation

class Rotation

A spatial rotation acting on three- and four-momenta.

Rotations may be built from Euler angles, an identity transformation, or a quarter turn around a Cartesian axis.

Examples

from symbolica.community import hepkit as hep
rotation = hep.Rotation.quarter_turn(hep.Axis.Z)
rotated = rotation.apply_three(hep.ThreeMomentum(1.0, 0.0, 0.0))

Methods

Name Description
apply_four Apply this spatial rotation to a four-momentum.
apply_inverse_four Apply the inverse spatial rotation to a four-momentum.
apply_inverse_three Apply the inverse rotation to a three-momentum.
apply_three Apply this rotation to a three-momentum.
euler Construct a rotation from three Euler angles in radians.
identity Construct the identity rotation.
quarter_turn Construct a positive quarter turn around a Cartesian axis.

apply_four

Rotation.apply_four(momentum: FourMomentum) -> FourMomentum

Apply this spatial rotation to a four-momentum.

Examples

Using the setup in the Rotation class example:

momentum = hep.FourMomentum(2.0, 1.0, 0.0, 0.0)
rotated = rotation.apply_four(momentum)

Parameters

  • momentum (FourMomentum) Four-momentum whose spatial components are rotated.

apply_inverse_four

Rotation.apply_inverse_four(momentum: FourMomentum) -> FourMomentum

Apply the inverse spatial rotation to a four-momentum.

Examples

Using the setup in the Rotation class example:

momentum = hep.FourMomentum(2.0, 1.0, 0.0, 0.0)
original = rotation.apply_inverse_four(rotation.apply_four(momentum))

Parameters

  • momentum (FourMomentum) Four-momentum whose spatial components are inverse-rotated.

apply_inverse_three

Rotation.apply_inverse_three(momentum: ThreeMomentum) -> ThreeMomentum

Apply the inverse rotation to a three-momentum.

Examples

Using the setup in the Rotation class example:

momentum = hep.ThreeMomentum(1.0, 0.0, 0.0)
original = rotation.apply_inverse_three(rotation.apply_three(momentum))

Parameters

  • momentum (ThreeMomentum) Spatial momentum to inverse-rotate.

apply_three

Rotation.apply_three(momentum: ThreeMomentum) -> ThreeMomentum

Apply this rotation to a three-momentum.

Examples

Using the setup in the Rotation class example:

momentum = hep.ThreeMomentum(1.0, 0.0, 0.0)
rotated = rotation.apply_three(momentum)

Parameters

  • momentum (ThreeMomentum) Spatial momentum to rotate.

euler

Rotation.euler(alpha: builtins.float, beta: builtins.float, gamma: builtins.float) -> Rotation

Construct a rotation from three Euler angles in radians.

Examples

Using the setup in the Rotation class example:

rotation = hep.Rotation.euler(0.1, 0.2, 0.3)

Parameters

  • alpha (float) First Euler angle.
  • beta (float) Second Euler angle.
  • gamma (float) Third Euler angle.

identity

Rotation.identity() -> Rotation

Construct the identity rotation.

Examples

Using the setup in the Rotation class example:

rotation = hep.Rotation.identity()

quarter_turn

Rotation.quarter_turn(axis: Axis) -> Rotation

Construct a positive quarter turn around a Cartesian axis.

Examples

Using the setup in the Rotation class example:

rotation = hep.Rotation.quarter_turn(hep.Axis.Z)

Parameters

  • axis (Axis) Axis about which to rotate by pi/2.