Dynamics¶
By default, the dynamic terms in an amplitude model are set to \(1\) by the HelicityAmplitudeBuilder
. The method set_dynamics()
can then be used to set dynamics lineshapes for specific resonances. The dynamics.builder
module provides some tools to set standard lineshapes (see below), but it is also possible to set custom dynamics.
The standard lineshapes provided by AmpForm are illustrated below. For more info, have a look at the following pages:
%matplotlib widget
import matplotlib.pyplot as plt
import mpl_interactions.ipyplot as iplt
import numpy as np
import sympy as sp
from IPython.display import Math
import symplot
Form factor¶
AmpForm uses Blatt-Weisskopf functions \(B_L\) as barrier factors (also called form factors, see BlattWeisskopfSquared
):
from ampform.dynamics import BlattWeisskopfSquared
L = sp.Symbol("L", integer=True)
z = sp.Symbol("z", real=True)
ff2 = BlattWeisskopfSquared(L, z)
Math(f"{sp.latex(ff2)} = {sp.latex(ff2.doit())}")
The Blatt-Weisskopf factor is used to ‘dampen’ the breakup-momentum. A usual choice for \(z\) is therefore \(z=q^2d^2\) with \(q^2\) the breakup_momentum_squared()
and \(d\) the impact parameter (also called meson radius):
from ampform.dynamics import breakup_momentum_squared
m, m_a, m_b, d = sp.symbols("m, m_a, m_b, d")
q_squared = breakup_momentum_squared(m ** 2, m_a, m_b)
ff2 = BlattWeisskopfSquared(L, z=q_squared * d ** 2)
Relativistic Breit-Wigner¶
Without form factor¶
from ampform.dynamics import relativistic_breit_wigner
m, m0, w0 = sp.symbols("m, m0, Gamma0")
rel_bw = relativistic_breit_wigner(s=m ** 2, mass0=m0, gamma0=w0)
rel_bw
With form factor¶
from ampform.dynamics import breakup_momentum_squared
m_a, m_b = sp.symbols("m_a, m_b")
s = m ** 2
q_squared = breakup_momentum_squared(s, m_a, m_b)
Math(f"q^2(m) = {sp.latex(q_squared)}")
from ampform.dynamics import phase_space_factor
rho = phase_space_factor(s, m_a, m_b)
rho.subs({4 * q_squared: 4 * sp.Symbol("q^{2}(m)")})
from ampform.dynamics import coupled_width
L = sp.Symbol("L", integer=True)
m0, w0, d = sp.symbols("m0, Gamma0, d")
s = m ** 2
running_width = coupled_width(
s=s,
mass0=m0,
gamma0=w0,
m_a=m_a,
m_b=m_b,
angular_momentum=L,
meson_radius=d,
)
q0_squared = breakup_momentum_squared(m0 ** 2, m_a, m_b)
ff = BlattWeisskopfSquared(L, z=q_squared * d ** 2)
ff0_sq = BlattWeisskopfSquared(L, z=q0_squared * d ** 2)
rho0 = phase_space_factor(m0 ** 2, m_a, m_b)
running_width = running_width.subs(
{
rho / rho0: sp.Symbol(R"\rho(m)") / sp.Symbol(R"\rho(m_{0})"),
ff: sp.Symbol("B_{L}(q)"),
ff0_sq: sp.Symbol("B_{L}(q_{0})"),
},
)
Math(fR"\Gamma(m) = {sp.latex(running_width)}")
relativistic_breit_wigner_with_ff()
with standard phase_space_factor()
:
from ampform.dynamics import relativistic_breit_wigner_with_ff
def breakup_momentum(s: sp.Symbol, m_a: sp.Symbol, m_b: sp.Symbol) -> sp.Expr:
return sp.sqrt(breakup_momentum_squared(s, m_a, m_b))
rel_bw_with_ff = relativistic_breit_wigner_with_ff(
s=s,
mass0=m0,
gamma0=w0,
m_a=m_a,
m_b=m_b,
angular_momentum=L,
meson_radius=d,
# phsp_factor=breakup_momentum,
)
q_squared = breakup_momentum_squared(s, m_a, m_b)
ff_sq = BlattWeisskopfSquared(L, z=q_squared * d ** 2)
mass_dependent_width = coupled_width(s, m0, w0, m_a, m_b, L, d)
rel_bw_with_ff.subs(
{
2 * q_squared: 2 * sp.Symbol("q^{2}(m)"),
ff_sq: sp.Symbol(R"B_{L}^{2}\left(q\right)"),
mass_dependent_width: sp.Symbol(R"\Gamma(m)"),
}
)
Comparison¶
fig, axes = plt.subplots(2, 1, figsize=(8, 6), sharex=True)
ax_real, ax_imag = axes
ax_imag.set_xlabel("$m$")
ax_real.set_ylabel(R"$\left|A\right|^2$")
ax_imag.set_ylabel(R"Im$\left(A\right)$")
# Real
controls = iplt.plot(
plot_domain,
lambda *args, **kwargs: np.abs(np_rel_bw_with_ff(*args, **kwargs)) ** 2,
label="$with$ form factor",
**sliders,
ylim="auto",
ax=ax_real,
)
iplt.plot(
plot_domain,
lambda *args, **kwargs: np.abs(np_rel_bw(*args, **kwargs)) ** 2,
label="no form factor",
controls=controls,
ylim="auto",
ax=ax_real,
)
iplt.axvline(controls["m0"], c="gray", linestyle="dotted")
# Imaginary
iplt.plot(
plot_domain,
lambda *args, **kwargs: np_rel_bw_with_ff(*args, **kwargs).imag,
label="$with$ form factor",
controls=controls,
ylim="auto",
ax=ax_imag,
)
iplt.plot(
plot_domain,
lambda *args, **kwargs: np_rel_bw(*args, **kwargs).imag,
label="no form factor",
controls=controls,
ylim="auto",
ax=ax_imag,
)
iplt.axvline(controls["m0"], c="gray", linestyle="dotted")
ax_real.legend(loc="upper right")
iplt.title(
R"$m_0={m0:.1f} \qquad \Gamma_0={Gamma0:.1f} \qquad L={L} \qquad m_a={m_a:.1f} \qquad m_b={m_b:.1f}$",
controls=controls,
ax=ax_real,
)
fig.tight_layout()
plt.show()