kinematics

Kinematic based calculations for the helicity formalism.

It’s responsibilities are defined by the interface interfaces.Kinematics.

Here, the main responsibility is the conversion of general kinematic information of a reaction to helicity formalism specific quantities

\((s, \theta, \phi)\)

The basic building blocks are the HelicityKinematics and SubSystem.

class HelicityKinematics(reaction_info)[source]

Bases: tensorwaves.interfaces.Kinematics

Kinematics of the helicity formalism.

General usage is

  1. Register kinematic variables via the three methods (register_invariant_mass(), register_helicity_angles(), register_subsystem()) first.

  2. Then convert events to these kinematic variables.

For additional functionality check phase_space_volume() and is_within_phase_space().

Parameters

reaction_info (ParticleReactionKinematicsInfo) –

convert(events)[source]

Convert events to the registered kinematics variables.

Parameters

events (ndarray) –

A three dimensional numpy array of the shape \((n_{\mathrm{part}}, n_{\mathrm{events}}, 4)\).

  • \(n_{\mathrm{part}}\) is the number of particles

  • \(n_{\mathrm{events}}\) is the number of events

The third dimension correspond to the four momentum info \((p_x, p_y, p_z, E)\).

Return type

dict

Returns

A dict containing the registered kinematic variables as keys and their corresponding values. This is also known as a dataset.

classmethod from_recipe(recipe)[source]
Parameters

recipe (dict) –

Return type

HelicityKinematics

is_within_phase_space(events)[source]

Check whether events lie within the phase space definition.

Parameters

events (ndarray) –

Return type

Tuple[bool]

property phase_space_volume

Compute volume of the phase space.

Return type

float

property reaction_kinematics_info
Return type

ParticleReactionKinematicsInfo

register_helicity_angles(subsystem)[source]

Register helicity angles \((\theta, \phi)\) of a SubSystem.

Parameters

subsystem (SubSystem) – SubSystem to which the registered angles correspond.

Return type

Tuple[str, str]

Returns

A pair of str keys representing the angles. They can be used to retrieve the angles from the dataset returned by convert().

register_invariant_mass(final_state)[source]

Register an invariant mass \(s\).

Parameters

final_state (Sequence) – collection of particle unique id’s

Return type

str

Returns

A str key representing the invariant mass. It can be used to retrieve this invariant mass from the dataset returned by convert().

register_subsystem(subsystem)[source]

Register all kinematic variables of the SubSystem.

Parameters

subsystem (SubSystem) – SubSystem to which the registered kinematic variables correspond.

Return type

Tuple[str, …]

Returns

A tuple of str keys representing the \((s, \theta, \phi)\). They can be used to retrieve the kinematic data from the dataset returned by convert().

class ParticleReactionKinematicsInfo(initial_state_names, final_state_names, particle_dict, total_invariant_mass=None, fs_id_event_pos_mapping=None)[source]

Bases: object

Contains boundary condition information of a particle reaction.

Parameters
  • initial_state_names (list) – Defines the initial state

  • final_state_names (list) – Defines the final state

  • particle_dict (dict) – Contains particle information

  • total_invariant_mass (Optional[float]) – Invariant mass \(\sqrt(s)\) of the initial or final state. Has to be specified for a multi particle initial state.

  • fs_id_event_pos_mapping (Optional[dict]) – Mapping between particle IDs and their positions in an event collection.

property final_state_masses
Return type

List[float]

classmethod from_recipe(recipe)[source]

Initialize from a recipe dictionary.

Parameters

recipe (dict) –

Return type

ParticleReactionKinematicsInfo

property fs_id_event_pos_mapping
Return type

Optional[dict]

property initial_state_masses
Return type

List[float]

property total_invariant_mass
Return type

float

class SubSystem(final_states, recoil_state, parent_recoil_state)[source]

Bases: collections.abc.Hashable

Represents a part of a decay chain.

A SubSystem resembles a decaying state and its ingoing and outgoing state. It is uniquely defined by

Parameters
__eq__(other)[source]

Equal testing operator.

Parameters

other (object) –

Return type

bool

property final_states

Get final state content of the decay products.

Return type

Tuple[tuple, …]

property parent_recoil_state

Get final state content of the recoil partner of the parent.

Return type

tuple

property recoil_state

Get final state content of the recoil partner.

Return type

tuple