7.3. Phase space sample#

7.3.1. Definition#

See also

AmpForm’s Kinematics page.

Hide code cell source
m0, mi, mj, mk = sp.symbols("m0 m_(i:k)", nonnegative=True)
σi, σj, σk = sp.symbols("sigma_(i:k)", nonnegative=True)
is_within_phasespace(σi, σj, m0, mi, mj, mk)
\[\begin{split}\displaystyle \begin{cases} 1 & \text{for}\: \phi\left(\sigma_{i}, \sigma_{j}\right) \leq 0 \\\text{NaN} & \text{otherwise} \end{cases}\end{split}\]
Hide code cell source
display_doit(Kibble(σi, σj, σk, m0, mi, mj, mk))
\[\begin{split}\displaystyle \begin{array}{rcl} \phi\left(\sigma_{i}, \sigma_{j}\right) &=& \lambda\left(\lambda\left(\sigma_{j}, m_{j}^{2}, m_{0}^{2}\right), \lambda\left(\sigma_{k}, m_{k}^{2}, m_{0}^{2}\right), \lambda\left(\sigma_{i}, m_{i}^{2}, m_{0}^{2}\right)\right) \\ \end{array}\end{split}\]
Hide code cell source
\[\begin{split}\displaystyle \begin{array}{rcl} \lambda\left(x, y, z\right) &=& x^{2} - 2 x y - 2 x z + y^{2} - 2 y z + z^{2} \\ \end{array}\end{split}\]
m1, m2, m3 = sp.symbols("m1:4")
display_latex({σk: compute_third_mandelstam(σi, σj, m0, m1, m2, m3)})
\[\begin{split}\displaystyle \begin{array}{rcl} \sigma_{k} &=& m_{0}^{2} + m_{1}^{2} + m_{2}^{2} + m_{3}^{2} - \sigma_{i} - \sigma_{j} \\ \end{array}\end{split}\]

7.3.2. Visualization#

Hide code cell source
model_choice = 0
model_file = "../../data/model-definitions.yaml"
particles = load_particles("../../data/particle-definitions.yaml")
amplitude_builder = load_model_builder(model_file, particles, model_choice)
decay = amplitude_builder.decay
display_latex(create_mass_symbol_mapping(decay))
\[\begin{split}\displaystyle \begin{array}{rcl} m_{0} &=& 2.28646 \\ m_{1} &=& 0.938272046 \\ m_{2} &=& 0.13957018 \\ m_{3} &=& 0.49367700000000003 \\ \end{array}\end{split}\]
Hide code cell source
def plot_phsp_boundary(ax, x_mandelstam: int, y_mandelstam: int):
    ax.set_xticks([])
    ax.set_xlabel(Rf"$\sigma_{x_mandelstam}$ [GeV$^2$]")
    ax.set_ylabel(Rf"$\sigma_{y_mandelstam}$ [GeV$^2$]")
    phsp = generate_meshgrid_sample(decay, resolution, x_mandelstam, y_mandelstam)
    phsp_filter = create_phase_space_filter(
        decay, x_mandelstam, y_mandelstam, outside_value=0
    )
    mesh = ax.contour(
        phsp[f"sigma{x_mandelstam}"],
        phsp[f"sigma{y_mandelstam}"],
        phsp_filter(phsp),
        colors="black",
    )
    contour = mesh.collections[0]
    contour.set_facecolor("lightgray")


%config InlineBackend.figure_formats = ['svg']
resolution = 500
use_mpl_latex_fonts()
plt.rc("font", size=18)
fig, ax = plt.subplots(figsize=(5, 5), tight_layout=True)
plot_phsp_boundary(ax, 1, 2)
fig.savefig("../_images/phase-space-boundary.svg")
plt.show()
No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
../_images/a08f1d5180e2eeb8252690e79950c92ba5336d9727c69d342ed080793b500f1b.svg
Hide code cell source
def plot_phsp_distribution(ax, x_mandelstam: int, y_mandelstam: int):
    ax.set_xticks([])
    ax.set_xlabel(Rf"$\sigma_{x_mandelstam}$")
    ax.set_ylabel(Rf"$\sigma_{y_mandelstam}$")
    ax.hist2d(
        phsp[f"sigma{x_mandelstam}"],
        phsp[f"sigma{y_mandelstam}"],
        bins=500,
        norm=LogNorm(),
    )


%config InlineBackend.figure_formats = ['png']
phsp = generate_phasespace_sample(decay, n_events=10_000_000, seed=0)
fig, axes = plt.subplots(ncols=3, dpi=200, figsize=(15, 4.9), tight_layout=True)
plot_phsp_distribution(axes[0], 1, 2)
plot_phsp_distribution(axes[1], 2, 3)
plot_phsp_distribution(axes[2], 3, 1)
fig.tight_layout()
plt.show()
../_images/9dc7d3f3c77e5a4c24fa88a181aa4359d288fdc84adc8f4c526c37739b142933.png