builder

import ampform.dynamics.builder

Build lineshape with correct variable names and values.

class ResonanceDynamicsBuilder(*args, **kwargs)[source]

Bases: Protocol

Protocol that is used by set_dynamics.

Follow this Protocol when defining a builder function that is to be used by set_dynamics. For an example, see the source code create_relativistic_breit_wigner, which creates a relativistic_breit_wigner.

See also

Custom dynamics

__call__(resonance: qrules.particle.Particle, variable_pool: ampform.dynamics.builder.TwoBodyKinematicVariableSet)Tuple[sympy.core.expr.Expr, Dict[sympy.core.symbol.Symbol, float]][source]

Call self as a function.

class TwoBodyKinematicVariableSet(in_edge_inv_mass: sympy.core.symbol.Symbol, out_edge_inv_mass1: sympy.core.symbol.Symbol, out_edge_inv_mass2: sympy.core.symbol.Symbol, helicity_theta: sympy.core.symbol.Symbol, helicity_phi: sympy.core.symbol.Symbol, angular_momentum: Optional[int] = None)[source]

Bases: object

__eq__(other)

Method generated by attrs for class TwoBodyKinematicVariableSet.

angular_momentum: Optional[int]
helicity_phi: sympy.core.symbol.Symbol
helicity_theta: sympy.core.symbol.Symbol
in_edge_inv_mass: sympy.core.symbol.Symbol
out_edge_inv_mass1: sympy.core.symbol.Symbol
out_edge_inv_mass2: sympy.core.symbol.Symbol
create_non_dynamic(resonance: qrules.particle.Particle, variable_pool: ampform.dynamics.builder.TwoBodyKinematicVariableSet)Tuple[sympy.core.expr.Expr, Dict[sympy.core.symbol.Symbol, float]][source]
create_non_dynamic_with_ff(resonance: qrules.particle.Particle, variable_pool: ampform.dynamics.builder.TwoBodyKinematicVariableSet)Tuple[sympy.core.expr.Expr, Dict[sympy.core.symbol.Symbol, float]][source]
create_relativistic_breit_wigner(resonance: qrules.particle.Particle, variable_pool: ampform.dynamics.builder.TwoBodyKinematicVariableSet)Tuple[sympy.core.expr.Expr, Dict[sympy.core.symbol.Symbol, float]][source]
create_relativistic_breit_wigner_with_ff(resonance: qrules.particle.Particle, variable_pool: ampform.dynamics.builder.TwoBodyKinematicVariableSet)Tuple[sympy.core.expr.Expr, Dict[sympy.core.symbol.Symbol, float]][source]
verify_signature(builder: Callable)None[source]

Check signature of a builder function dynamically.

Dynamically check whether a builder has the same signature as ResonanceDynamicsBuilder. This function is needed because typing.runtime_checkable does only checks members and methods, not the signature of those methods.