FeynKit · latest
On this page

Helicity

symbolica.community.hepkit Class

Helicity(value: int)

A spin projection along a particle's direction of motion.

HEP represents the physical minus, longitudinal, and plus helicity states by the integers -1, 0, and 1.

Examples

from symbolica.community import hepkit as hep
incoming_fermion_helicity = hep.Helicity(-1)
incoming_fermion_helicity == hep.Helicity.MINUS

Parameters

value int

Helicity value; must be -1, 0, or 1.

Constructor

#

Construct a physical helicity from -1, 0, or 1.

Examples

Using the setup in the Helicity class example:

helicity = hep.Helicity(-1)

Parameters

NameTypeDefaultDescription
valueint—

Integer helicity value.

Member details

MINUS

Field#
MINUS: Helicity

Return the negative-helicity singleton.

Examples

int(Helicity.MINUS)

ZERO

Field#
ZERO: Helicity

Return the zero-helicity singleton.

Examples

int(Helicity.ZERO)

PLUS

Field#
PLUS: Helicity

Return the positive-helicity singleton.

Examples

int(Helicity.PLUS)

value

Property · read-only#
value: int

Return the helicity as -1, 0, or 1.

Examples

Using the setup in the Helicity class example:

hep.Helicity.PLUS.value

parse

Static method#
parse(value: str) -> Helicity

Parse a named, signed, or integer helicity value.

Examples

Using the setup in the Helicity class example:

hep.Helicity.parse("+") == hep.Helicity.PLUS

Parameters

NameTypeDefaultDescription
valuestr—

Helicity spelling such as "-", "0", or "+".

__int__

Method#
__int__() -> int

Convert this helicity to its integer value.

Examples

Using the setup in the Helicity class example:

int(hep.Helicity.MINUS)

__eq__

Method#
__eq__(other: Any) -> bool

Compare with another helicity value.

Examples

Using the setup in the Helicity class example:

hep.Helicity(0) == hep.Helicity.ZERO

Parameters

NameTypeDefaultDescription
otherAny—

Object to compare with this helicity value.

__repr__

Method#
__repr__() -> str

Return an evaluable-style representation of this helicity.

Examples

Using the setup in the Helicity class example:

print(f"selected external helicity: {hep.Helicity.PLUS!r}")