kinematics

import ampform.kinematics

Kinematics of an amplitude model in the helicity formalism.

class ArrayAxisSum(array: ArraySymbol, axis: Optional[int] = None, **hints: Any)[source]

Bases: sympy.core.expr.Expr

property array
property axis
is_extended_real = True
class ArrayMultiplication(*tensors: Expr, **hints: Any)[source]

Bases: sympy.core.expr.Expr

property tensors
class ArraySum(*terms: Basic, **hints: Any)[source]

Bases: sympy.core.expr.Expr

precedence = 40
property terms
class BoostZ(beta: Expr, **kwargs: Any)[source]

Bases: sympy.core.expr.Expr

as_explicit() Expr[source]
property beta
class Energy(momentum: ArraySymbol, **hints: Any)[source]

Bases: ampform.kinematics.HasMomentum, ampform.sympy.UnevaluatedExpression

is_extended_real = True
class FourMomentumX(momentum: ArraySymbol, **hints: Any)[source]

Bases: ampform.kinematics.HasMomentum, ampform.sympy.UnevaluatedExpression

is_extended_real = True
class FourMomentumY(momentum: ArraySymbol, **hints: Any)[source]

Bases: ampform.kinematics.HasMomentum, ampform.sympy.UnevaluatedExpression

is_extended_real = True
class FourMomentumZ(momentum: ArraySymbol, **hints: Any)[source]

Bases: ampform.kinematics.HasMomentum, ampform.sympy.UnevaluatedExpression

is_extended_real = True
class HasMomentum[source]

Bases: object

property momentum
class HelicityAdapter(reaction_info: ReactionInfo)[source]

Bases: object

Converter for four-momenta to kinematic variable data.

The create_expressions method forms the bridge between four-momentum data for the decay you are studying and the kinematic variables that are in the HelicityModel. These are invariant mass (see get_invariant_mass_label()) and the \(\theta\) and \(\phi\) helicity angles (see get_helicity_angle_label()).

create_expressions() Dict[str, Expr][source]
permutate_registered_topologies() None[source]

Register permutations of all registered_topologies.

See Extend kinematic variables.

reaction_info: ReactionInfo
register_topology(topology: Topology) None[source]
register_transition(transition: StateTransition) None[source]
registered_topologies: Set[Topology]
class InvariantMass(momentum: ArraySymbol, **hints: Any)[source]

Bases: ampform.kinematics.HasMomentum, ampform.sympy.UnevaluatedExpression

is_extended_real = True
class Phi(momentum: ArraySymbol, **hints: Any)[source]

Bases: ampform.kinematics.HasMomentum, ampform.sympy.UnevaluatedExpression

is_extended_real = True
class RotationY(angle: Expr, **hints: Any)[source]

Bases: sympy.core.expr.Expr

property angle
as_explicit() Expr[source]
class RotationZ(angle: Symbol, **hints: Any)[source]

Bases: sympy.core.expr.Expr

property angle
as_explicit() Expr[source]
class Theta(momentum: ArraySymbol, **hints: Any)[source]

Bases: ampform.kinematics.HasMomentum, ampform.sympy.UnevaluatedExpression

is_extended_real = True
class ThreeMomentumNorm(momentum: ArraySymbol, **hints: Any)[source]

Bases: ampform.kinematics.HasMomentum, ampform.sympy.UnevaluatedExpression

is_extended_real = True
compute_helicity_angles(four_momenta: Dict[int, ArraySymbol], topology: Topology) Dict[str, Expr][source]
compute_invariant_masses(four_momenta: Dict[int, ArraySymbol], topology: Topology) Dict[str, Expr][source]

Compute the invariant masses for all final state combinations.

create_four_momentum_symbols(topology: Topology) Dict[int, ArraySymbol][source]
determine_attached_final_state(topology: Topology, state_id: int) List[int][source]

Determine all final state particles of a transition.

These are attached downward (forward in time) for a given edge (resembling the root).

Example

For edge 5 in Figure topologies[0], we get:

>>> from qrules.topology import create_isobar_topologies
>>> topologies = create_isobar_topologies(5)
>>> determine_attached_final_state(topologies[0], state_id=5)
[0, 3, 4]
get_helicity_angle_label(topology: Topology, state_id: int) Tuple[str, str][source]

Generate labels that can be used to identify helicity angles.

The generated subscripts describe the decay sequence from the right to the left, separated by commas. Resonance edge IDs are expressed as a sum of the final state IDs that lie below them (see determine_attached_final_state()). The generated label does not state the top-most edge (the initial state).

Example

The following two allowed isobar topologies for a 1-to-5-body decay illustrates how the naming scheme results in a unique label for each of the eight edges in the decay topology. Note that label only uses final state IDs, but still reflects the internal decay topology.

>>> from qrules.topology import create_isobar_topologies
>>> topologies = create_isobar_topologies(5)
>>> topology = topologies[0]
>>> for i in topology.intermediate_edge_ids | topology.outgoing_edge_ids:
...     phi_label, theta_label = get_helicity_angle_label(topology, i)
...     print(f"{i}: '{phi_label}'")
0: 'phi_0,0+3+4'
1: 'phi_1,1+2'
2: 'phi_2,1+2'
3: 'phi_3,3+4,0+3+4'
4: 'phi_4,3+4,0+3+4'
5: 'phi_0+3+4'
6: 'phi_1+2'
7: 'phi_3+4,0+3+4'
>>> topology = topologies[1]
>>> for i in topology.intermediate_edge_ids | topology.outgoing_edge_ids:
...     phi_label, theta_label = get_helicity_angle_label(topology, i)
...     print(f"{i}: '{phi_label}'")
0: 'phi_0,0+1'
1: 'phi_1,0+1'
2: 'phi_2,2+3+4'
3: 'phi_3,3+4,2+3+4'
4: 'phi_4,3+4,2+3+4'
5: 'phi_0+1'
6: 'phi_2+3+4'
7: 'phi_3+4,2+3+4'

Some labels explained:

  • phi_1+2: edge 6 on the left topology, because for this topology, we have \(p_6=p_1+p_2\).

  • phi_2+3+4: edge 6 right, because for this topology, \(p_6=p_2+p_3+p_4\).

  • phi_1,1+2: edge 1 left, because 1 decays from \(p_6=p_1+p_2\).

  • phi_1,0+1: edge 1 right, because it decays from \(p_5=p_0+p_1\).

  • phi_4,3+4,2+3+4: edge 4 right, because it decays from edge 7 (\(p_7=p_3+p_4\)), which comes from edge 6 (\(p_7=p_2+p_3+p_4\)).

As noted, the top-most parent (initial state) is not listed in the label.

../_images/graphviz_2.svg

topologies[0]

../_images/graphviz_3.svg

topologies[1]

get_invariant_mass_label(topology: Topology, state_id: int) str[source]

Generate an invariant mass label for a state (edge on a topology).

Example

In the case shown in Figure topologies[0], the invariant mass of state \(5\) is \(m_{034}\), because \(p_5=p_0+p_3+p_4\):

>>> from qrules.topology import create_isobar_topologies
>>> topologies = create_isobar_topologies(5)
>>> get_invariant_mass_label(topologies[0], state_id=5)
'm_034'

Naturally, the ‘invariant’ mass label for a final state is just the mass of the state itself:

>>> get_invariant_mass_label(topologies[0], state_id=1)
'm_1'
implement_latex_subscript(subscript: str) Callable[[Type[UnevaluatedExpression]], Type[UnevaluatedExpression]][source]