FeynKit · latest
On this page

Rotation

symbolica.community.hepkit 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))

Member details

identity

Static method#
identity() -> Rotation

Construct the identity rotation.

Examples

Using the setup in the Rotation class example:

rotation = hep.Rotation.identity()

euler

Static method#
euler(alpha: float, beta: float, gamma: 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

NameTypeDefaultDescription
alphafloat—

First Euler angle.

betafloat—

Second Euler angle.

gammafloat—

Third Euler angle.

quarter_turn

Static method#
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

NameTypeDefaultDescription
axisAxis—

Axis about which to rotate by pi/2.

apply_three

Method#
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

NameTypeDefaultDescription
momentumThreeMomentum—

Spatial momentum to rotate.

apply_four

Method#
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

NameTypeDefaultDescription
momentumFourMomentum—

Four-momentum whose spatial components are rotated.

apply_inverse_three

Method#
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

NameTypeDefaultDescription
momentumThreeMomentum—

Spatial momentum to inverse-rotate.

apply_inverse_four

Method#
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

NameTypeDefaultDescription
momentumFourMomentum—

Four-momentum whose spatial components are inverse-rotated.