kinematics

import ampform.kinematics

Kinematics of an amplitude model in the helicity formalism.

class HelicityAdapter(reaction_info: ReactionInfo)[source]

Bases: object

Converter for four-momenta to kinematic variable data.

The transform 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 and the \(\theta\) and \(\phi\) helicity angles.

__eq__(other)

Method generated by attrs for class HelicityAdapter.

reaction_info: ReactionInfo
register_topology(topology: Topology)None[source]
register_transition(transition: StateTransitionGraph[Tuple[Particle, float]])None[source]
registered_topologies: Set[Topology]
transform(events: EventCollection)DataSet[source]
class ReactionInfo(initial_state, final_state)[source]

Bases: object

__eq__(other)

Method generated by attrs for class ReactionInfo.

final_state: FrozenDict[int, Particle]
static from_graph(graph: StateTransitionGraph[Tuple[Particle, float]])ReactionInfo[source]
initial_state: FrozenDict[int, Particle]
get_helicity_angle_label(topology: Topology, edge_id: int)Tuple[str, str][source]

Generate labels that can be used to identify helicity angles.

>>> from ampform.kinematics import get_helicity_angle_label
>>> 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'

digraph { rankdir=LR; node [shape=point, width=0]; edge [arrowhead=none]; "edge0" [shape=none, label="0"]; "edge1" [shape=none, label="1"]; "edge2" [shape=none, label="2"]; "edge3" [shape=none, label="3"]; "edge4" [shape=none, label="4"]; "edge-1" [shape=none, label=""]; { rank=same "edge-1" }; { rank=same "edge0", "edge1", "edge2", "edge3", "edge4" }; "edge-1" -> "node0"; "node1" -> "edge0"; "node2" -> "edge1"; "node2" -> "edge2"; "node3" -> "edge3"; "node3" -> "edge4"; "node0" -> "node1" [label=""]; "node0" -> "node2" [label=""]; "node1" -> "node3" [label=""]; "node0" [shape=none, label=""]; "node1" [shape=none, label=""]; "node2" [shape=none, label=""]; "node3" [shape=none, label=""]; }

topologies[0]

digraph { rankdir=LR; node [shape=point, width=0]; edge [arrowhead=none]; "edge0" [shape=none, label="0"]; "edge1" [shape=none, label="1"]; "edge2" [shape=none, label="2"]; "edge3" [shape=none, label="3"]; "edge4" [shape=none, label="4"]; "edge-1" [shape=none, label=""]; { rank=same "edge-1" }; { rank=same "edge0", "edge1", "edge2", "edge3", "edge4" }; "edge-1" -> "node0"; "node1" -> "edge0"; "node1" -> "edge1"; "node2" -> "edge2"; "node3" -> "edge3"; "node3" -> "edge4"; "node0" -> "node1" [label=""]; "node0" -> "node2" [label=""]; "node2" -> "node3" [label=""]; "node0" [shape=none, label=""]; "node1" [shape=none, label=""]; "node2" [shape=none, label=""]; "node3" [shape=none, label=""]; }

topologies[1]

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