Standard lineshapes¶
Warning
The PWA Expert System has been split up into QRules and AmpForm. Please use these packages instead!
Note
The formulas and figures on this page have been generated with the lineshapes in the lineshape
module, so as to glue them back in to the API of that module.
import myst_nb
import sympy as sp
from expertsystem.amplitude.dynamics.lineshape import (
BlattWeisskopf,
relativistic_breit_wigner,
relativistic_breit_wigner_with_ff,
)
import matplotlib.pyplot as plt
from matplotlib.figure import Figure
from expertsystem.reaction.combinatorics import arange
def plot_real_imag(
expression: sp.Expr,
variable: sp.Symbol,
x_min: float,
x_max: float,
resolution: int = 100,
) -> Figure:
delta = (x_max - x_min) / resolution
x = list(arange(x_min, x_max, delta))
y_real = list(map(lambda x: sp.Abs(expression).subs(variable, x), x))
y_imag = list(map(lambda x: sp.arg(expression).subs(variable, x), x))
fig, ax = plt.subplots(nrows=2, sharex=True, figsize=(8, 8))
for a in ax:
a.xaxis.set_ticks([])
a.yaxis.set_ticks([])
ax_real, ax_imag = ax
ax_imag.set(xlabel=f"${variable.name}$")
ax_imag.set(ylabel=f"imag $f({variable.name})$")
ax_real.set(ylabel=f"real $f({variable.name})$")
ax_real.yaxis.set_ticks([])
ax_imag.yaxis.set_ticks([0, float(sp.pi)])
ax_imag.yaxis.set_ticklabels([0, R"$\pi$"])
ax_imag.set_ylim([0, float(sp.pi)])
ax_real.plot(x, y_real)
ax_imag.plot(x, y_imag)
return fig
Form factor¶
The expertsystem
uses BlattWeisskopf
functions \(B_L\) as barrier factors (also called form factors):
q, d, L = sp.symbols("q, d, L", real=True)
ff = BlattWeisskopf(q, d, L)
display(ff)
myst_nb.glue("BlattWeisskopf", ff.doit())
\[\displaystyle B_L\left(q\right)\]
\[\begin{split}\displaystyle \begin{cases} 1 & \text{for}\: L = 0 \\\frac{\sqrt{2} \left|{d}\right| \left|{q}\right|}{\sqrt{d^{2} q^{2} + 1}} & \text{for}\: L = 1 \\\frac{\sqrt{13} d^{2} q^{2}}{\sqrt{9 d^{2} q^{2} + \left(d^{2} q^{2} - 3\right)^{2}}} & \text{for}\: L = 2 \\\sqrt{277} d^{2} q^{2} \sqrt{\frac{1}{d^{2} q^{2} \left(d^{2} q^{2} - 15\right)^{2} + \left(2 d^{2} q^{2} - 5\right) \left(18 d^{2} q^{2} - 45\right)}} \left|{d}\right| \left|{q}\right| & \text{for}\: L = 3 \\\frac{\sqrt{12746} d^{4} q^{4}}{\sqrt{25 d^{2} q^{2} \left(2 d^{2} q^{2} - 21\right)^{2} + \left(d^{4} q^{4} - 45 d^{2} q^{2} + 105\right)^{2}}} & \text{for}\: L = 4 \end{cases}\end{split}\]
Relativistic Breit-Wigner¶
Without form factor¶
See relativistic_breit_wigner()
:
m, m0, w0 = sp.symbols("m m0 Gamma", real=True)
myst_nb.glue(
"relativistic_breit_wigner",
relativistic_breit_wigner(m, m0, w0),
)
\[\displaystyle \frac{\Gamma m_{0}}{- i \Gamma m_{0} - m^{2} + m_{0}^{2}}\]
plot_real_imag(relativistic_breit_wigner(m, 1.0, 0.3), m, x_min=0, x_max=2);
With form factor¶
See relativistic_breit_wigner_with_ff()
:
L = 0
m, m0, w0, ma, mb, meson_radius = sp.symbols(
"m m0 Gamma m_a m_b q_r", real=True
)
myst_nb.glue(
"relativistic_breit_wigner_with_ff",
relativistic_breit_wigner_with_ff(
mass=m,
mass0=m0,
gamma0=w0,
m_a=ma,
m_b=mb,
angular_momentum=L,
meson_radius=meson_radius,
).doit(),
)
\[\displaystyle \frac{\Gamma m_{0}}{- \frac{i \Gamma m_{0}^{2} \sqrt{\frac{\left(m^{2} - \left(m_{a} - m_{b}\right)^{2}\right) \left(m^{2} - \left(m_{a} + m_{b}\right)^{2}\right)}{m^{2}}}}{m \sqrt{\frac{\left(m_{0}^{2} - \left(m_{a} - m_{b}\right)^{2}\right) \left(m_{0}^{2} - \left(m_{a} + m_{b}\right)^{2}\right)}{m_{0}^{2}}}} - m^{2} + m_{0}^{2}}\]
ma = 0.2
mb = 0.3
complex_bw_ff = relativistic_breit_wigner_with_ff(
mass=m,
mass0=1.0,
gamma0=0.3,
m_a=ma,
m_b=mb,
angular_momentum=0,
meson_radius=1,
)
plot_real_imag(complex_bw_ff.doit(), m, x_min=ma + mb, x_max=2);