7.7. Amplitude model with LS-couplings#

Hide code cell content
from __future__ import annotations

import logging
import os

import jax
import jax.numpy as jnp
import matplotlib.pyplot as plt
import sympy as sp
from IPython.display import Latex
from sympy.core.symbol import Str
from tensorwaves.interface import Function
from tqdm.auto import tqdm

from polarimetry.amplitude import (
    AmplitudeModel,
    get_indexed_base,
    simplify_latex_rendering,
)
from polarimetry.data import (
    create_data_transformer,
    generate_meshgrid_sample,
    generate_phasespace_sample,
)
from polarimetry.decay import Particle
from polarimetry.function import integrate_intensity, sub_intensity
from polarimetry.io import (
    as_latex,
    display_latex,
    mute_jax_warnings,
    perform_cached_doit,
    perform_cached_lambdify,
)
from polarimetry.lhcb import (
    get_conversion_factor_ls,
    load_model_builder,
    load_model_parameters,
)
from polarimetry.lhcb.particle import load_particles
from polarimetry.plot import use_mpl_latex_fonts

mute_jax_warnings()
simplify_latex_rendering()
MODEL_FILE = "../../data/model-definitions.yaml"
PARTICLES = load_particles("../../data/particle-definitions.yaml")

NO_TQDM = "EXECUTE_NB" in os.environ
if NO_TQDM:
    logging.getLogger().setLevel(logging.ERROR)
    logging.getLogger("polarimetry.io").setLevel(logging.ERROR)
    logging.getLogger("tensorwaves.data").setLevel(logging.ERROR)

7.7.1. Model inspection#

Hide code cell source
def formulate_model(title: str) -> AmplitudeModel:
    builder = load_model_builder(MODEL_FILE, PARTICLES, title)
    imported_parameters = load_model_parameters(
        MODEL_FILE, builder.decay, title, PARTICLES
    )
    model = builder.formulate()
    model.parameter_defaults.update(imported_parameters)
    return model


def simplify_notation(expr: sp.Expr) -> sp.Expr:
    def substitute_node(node):
        if isinstance(node, sp.Indexed) and node.indices[2:] == (0, 0):
            return sp.Indexed(node.base, *node.indices[:2])
        return node

    for node in sp.preorder_traversal(expr):
        new_node = substitute_node(node)
        expr = expr.xreplace({node: new_node})
    return expr


LS_MODEL = formulate_model("Alternative amplitude model obtained using LS couplings")
simplify_notation(LS_MODEL.intensity.args[0].args[0].args[0].cleanup())
λ0=1/21/2λ1=1/21/2Aλ0,λ11dλ1,λ112(ζ1(1)1)dλ0,λ012(ζ1(1)0)+Aλ0,λ12dλ1,λ112(ζ2(1)1)dλ0,λ012(ζ2(1)0)+Aλ0,λ13dλ1,λ112(ζ3(1)1)dλ0,λ012(ζ3(1)0)
Hide code cell source
display_latex({simplify_notation(k): v for k, v in LS_MODEL.amplitudes.items()})
A12,121=λR=1110δ12,λR+12R(σ1)C1,λR,12,1232,λR+12C2,0,32,λR+1212,λR+12HK(892),2,32LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=112δ12,λR+12R(σ1)C0,0,12,λR+1212,λR+12C1,λR,12,1212,λR+12HK(892),0,12LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=02δ12,λR+12RBugg(σ1)C0,0,12,λR+1212,λR+12C0,λR,12,1212,λR+12HK(1430),0,12LS,productionHK(1430),0,0decaydλR,00(θ23)2+λR=02δ12,λR+12RBugg(σ1)C0,0,12,λR+1212,λR+12C0,λR,12,1212,λR+12HK(700),0,12LS,productionHK(700),0,0decaydλR,00(θ23)2+λR=116δ12,λR+12R(σ1)C1,0,12,λR+1212,λR+12C1,λR,12,1212,λR+12HK(892),1,12LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=116δ12,λR+12R(σ1)C1,0,32,λR+1212,λR+12C1,λR,12,1232,λR+12HK(892),1,32LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=06δ12,λR+12RBugg(σ1)C0,λR,12,1212,λR+12C1,0,12,λR+1212,λR+12HK(1430),1,12LS,productionHK(1430),0,0decaydλR,00(θ23)2+λR=06δ12,λR+12RBugg(σ1)C0,λR,12,1212,λR+12C1,0,12,λR+1212,λR+12HK(700),1,12LS,productionHK(700),0,0decaydλR,00(θ23)2A12,122=λR=3/23/210δ12λRR(σ2)C32,λR,0,032,λRC2,0,32,λR12,λRHL(1520),2,32LS,productionHL(1520),0,12decaydλR,1232(θ31)2+λR=3/23/210δ12λRR(σ2)C32,λR,0,032,λRC2,0,32,λR12,λRHL(1690),2,32LS,productionHL(1690),0,12decaydλR,1232(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(1600),0,12LS,productionHL(1600),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(1670),0,12LS,productionHL(1670),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(2000),0,12LS,productionHL(2000),0,12decaydλR,1212(θ31)2+λR=3/23/26δ12λRR(σ2)C1,0,32,λR12,λRC32,λR,0,032,λRHL(1520),1,32LS,productionHL(1520),0,12decaydλR,1232(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(1600),1,12LS,productionHL(1600),0,12decaydλR,1212(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(1670),1,12LS,productionHL(1670),0,12decaydλR,1212(θ31)2+λR=3/23/26δ12λRR(σ2)C1,0,32,λR12,λRC32,λR,0,032,λRHL(1690),1,32LS,productionHL(1690),0,12decaydλR,1232(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(2000),1,12LS,productionHL(2000),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRF0(RΛcqm0,m2(σ2))C0,0,12,λR12,λRC12,λR,0,012,λRRFlatté(σ2)HL(1405),0,12LS,productionHL(1405),0,12decaydλR,1212(θ31)2F0(RΛcqm0,m2(mL(1405)2))+λR=1/21/26δ12λRF1(RΛcqm0,m2(σ2))C12,λR,0,012,λRC1,0,12,λR12,λRRFlatté(σ2)HL(1405),1,12LS,productionHL(1405),0,12decayqm0,m2(σ2)dλR,1212(θ31)2F1(RΛcqm0,m2(mL(1405)2))qm0,m2(mL(1405)2)A12,123=λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1232),2,32LS,productionHD(1232),12,0decaydλR,1232(θ12)2+λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1600),2,32LS,productionHD(1600),12,0decaydλR,1232(θ12)2+λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1700),2,32LS,productionHD(1700),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1232),1,32LS,productionHD(1232),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1600),1,32LS,productionHD(1600),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1700),1,32LS,productionHD(1700),12,0decaydλR,1232(θ12)2A12,121=λR=1110δ12,λR12R(σ1)C1,λR,12,1232,λR12C2,0,32,λR1212,λR12HK(892),2,32LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=112δ12,λR12R(σ1)C0,0,12,λR1212,λR12C1,λR,12,1212,λR12HK(892),0,12LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=02δ12,λR12RBugg(σ1)C0,0,12,λR1212,λR12C0,λR,12,1212,λR12HK(1430),0,12LS,productionHK(1430),0,0decaydλR,00(θ23)2+λR=02δ12,λR12RBugg(σ1)C0,0,12,λR1212,λR12C0,λR,12,1212,λR12HK(700),0,12LS,productionHK(700),0,0decaydλR,00(θ23)2+λR=116δ12,λR12R(σ1)C1,0,12,λR1212,λR12C1,λR,12,1212,λR12HK(892),1,12LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=116δ12,λR12R(σ1)C1,0,32,λR1212,λR12C1,λR,12,1232,λR12HK(892),1,32LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=06δ12,λR12RBugg(σ1)C0,λR,12,1212,λR12C1,0,12,λR1212,λR12HK(1430),1,12LS,productionHK(1430),0,0decaydλR,00(θ23)2+λR=06δ12,λR12RBugg(σ1)C0,λR,12,1212,λR12C1,0,12,λR1212,λR12HK(700),1,12LS,productionHK(700),0,0decaydλR,00(θ23)2A12,122=λR=3/23/210δ12λRR(σ2)C32,λR,0,032,λRC2,0,32,λR12,λRHL(1520),2,32LS,productionHL(1520),0,12decaydλR,1232(θ31)2+λR=3/23/210δ12λRR(σ2)C32,λR,0,032,λRC2,0,32,λR12,λRHL(1690),2,32LS,productionHL(1690),0,12decaydλR,1232(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(1600),0,12LS,productionHL(1600),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(1670),0,12LS,productionHL(1670),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(2000),0,12LS,productionHL(2000),0,12decaydλR,1212(θ31)2+λR=3/23/26δ12λRR(σ2)C1,0,32,λR12,λRC32,λR,0,032,λRHL(1520),1,32LS,productionHL(1520),0,12decaydλR,1232(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(1600),1,12LS,productionHL(1600),0,12decaydλR,1212(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(1670),1,12LS,productionHL(1670),0,12decaydλR,1212(θ31)2+λR=3/23/26δ12λRR(σ2)C1,0,32,λR12,λRC32,λR,0,032,λRHL(1690),1,32LS,productionHL(1690),0,12decaydλR,1232(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(2000),1,12LS,productionHL(2000),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRF0(RΛcqm0,m2(σ2))C0,0,12,λR12,λRC12,λR,0,012,λRRFlatté(σ2)HL(1405),0,12LS,productionHL(1405),0,12decaydλR,1212(θ31)2F0(RΛcqm0,m2(mL(1405)2))+λR=1/21/26δ12λRF1(RΛcqm0,m2(σ2))C12,λR,0,012,λRC1,0,12,λR12,λRRFlatté(σ2)HL(1405),1,12LS,productionHL(1405),0,12decayqm0,m2(σ2)dλR,1212(θ31)2F1(RΛcqm0,m2(mL(1405)2))qm0,m2(mL(1405)2)A12,123=λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1232),2,32LS,productionHD(1232),12,0decaydλR,1232(θ12)2+λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1600),2,32LS,productionHD(1600),12,0decaydλR,1232(θ12)2+λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1700),2,32LS,productionHD(1700),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1232),1,32LS,productionHD(1232),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1600),1,32LS,productionHD(1600),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1700),1,32LS,productionHD(1700),12,0decaydλR,1232(θ12)2A12,121=λR=1110δ12,λR+12R(σ1)C1,λR,12,1232,λR+12C2,0,32,λR+1212,λR+12HK(892),2,32LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=112δ12,λR+12R(σ1)C0,0,12,λR+1212,λR+12C1,λR,12,1212,λR+12HK(892),0,12LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=02δ12,λR+12RBugg(σ1)C0,0,12,λR+1212,λR+12C0,λR,12,1212,λR+12HK(1430),0,12LS,productionHK(1430),0,0decaydλR,00(θ23)2+λR=02δ12,λR+12RBugg(σ1)C0,0,12,λR+1212,λR+12C0,λR,12,1212,λR+12HK(700),0,12LS,productionHK(700),0,0decaydλR,00(θ23)2+λR=116δ12,λR+12R(σ1)C1,0,12,λR+1212,λR+12C1,λR,12,1212,λR+12HK(892),1,12LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=116δ12,λR+12R(σ1)C1,0,32,λR+1212,λR+12C1,λR,12,1232,λR+12HK(892),1,32LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=06δ12,λR+12RBugg(σ1)C0,λR,12,1212,λR+12C1,0,12,λR+1212,λR+12HK(1430),1,12LS,productionHK(1430),0,0decaydλR,00(θ23)2+λR=06δ12,λR+12RBugg(σ1)C0,λR,12,1212,λR+12C1,0,12,λR+1212,λR+12HK(700),1,12LS,productionHK(700),0,0decaydλR,00(θ23)2A12,122=λR=3/23/210δ12λRR(σ2)C32,λR,0,032,λRC2,0,32,λR12,λRHL(1520),2,32LS,productionHL(1520),0,12decaydλR,1232(θ31)2+λR=3/23/210δ12λRR(σ2)C32,λR,0,032,λRC2,0,32,λR12,λRHL(1690),2,32LS,productionHL(1690),0,12decaydλR,1232(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(1600),0,12LS,productionHL(1600),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(1670),0,12LS,productionHL(1670),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(2000),0,12LS,productionHL(2000),0,12decaydλR,1212(θ31)2+λR=3/23/26δ12λRR(σ2)C1,0,32,λR12,λRC32,λR,0,032,λRHL(1520),1,32LS,productionHL(1520),0,12decaydλR,1232(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(1600),1,12LS,productionHL(1600),0,12decaydλR,1212(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(1670),1,12LS,productionHL(1670),0,12decaydλR,1212(θ31)2+λR=3/23/26δ12λRR(σ2)C1,0,32,λR12,λRC32,λR,0,032,λRHL(1690),1,32LS,productionHL(1690),0,12decaydλR,1232(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(2000),1,12LS,productionHL(2000),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRF0(RΛcqm0,m2(σ2))C0,0,12,λR12,λRC12,λR,0,012,λRRFlatté(σ2)HL(1405),0,12LS,productionHL(1405),0,12decaydλR,1212(θ31)2F0(RΛcqm0,m2(mL(1405)2))+λR=1/21/26δ12λRF1(RΛcqm0,m2(σ2))C12,λR,0,012,λRC1,0,12,λR12,λRRFlatté(σ2)HL(1405),1,12LS,productionHL(1405),0,12decayqm0,m2(σ2)dλR,1212(θ31)2F1(RΛcqm0,m2(mL(1405)2))qm0,m2(mL(1405)2)A12,123=λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1232),2,32LS,productionHD(1232),12,0decaydλR,1232(θ12)2+λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1600),2,32LS,productionHD(1600),12,0decaydλR,1232(θ12)2+λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1700),2,32LS,productionHD(1700),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1232),1,32LS,productionHD(1232),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1600),1,32LS,productionHD(1600),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1700),1,32LS,productionHD(1700),12,0decaydλR,1232(θ12)2A12,121=λR=1110δ12,λR12R(σ1)C1,λR,12,1232,λR12C2,0,32,λR1212,λR12HK(892),2,32LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=112δ12,λR12R(σ1)C0,0,12,λR1212,λR12C1,λR,12,1212,λR12HK(892),0,12LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=02δ12,λR12RBugg(σ1)C0,0,12,λR1212,λR12C0,λR,12,1212,λR12HK(1430),0,12LS,productionHK(1430),0,0decaydλR,00(θ23)2+λR=02δ12,λR12RBugg(σ1)C0,0,12,λR1212,λR12C0,λR,12,1212,λR12HK(700),0,12LS,productionHK(700),0,0decaydλR,00(θ23)2+λR=116δ12,λR12R(σ1)C1,0,12,λR1212,λR12C1,λR,12,1212,λR12HK(892),1,12LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=116δ12,λR12R(σ1)C1,0,32,λR1212,λR12C1,λR,12,1232,λR12HK(892),1,32LS,productionHK(892),0,0decaydλR,01(θ23)2+λR=06δ12,λR12RBugg(σ1)C0,λR,12,1212,λR12C1,0,12,λR1212,λR12HK(1430),1,12LS,productionHK(1430),0,0decaydλR,00(θ23)2+λR=06δ12,λR12RBugg(σ1)C0,λR,12,1212,λR12C1,0,12,λR1212,λR12HK(700),1,12LS,productionHK(700),0,0decaydλR,00(θ23)2A12,122=λR=3/23/210δ12λRR(σ2)C32,λR,0,032,λRC2,0,32,λR12,λRHL(1520),2,32LS,productionHL(1520),0,12decaydλR,1232(θ31)2+λR=3/23/210δ12λRR(σ2)C32,λR,0,032,λRC2,0,32,λR12,λRHL(1690),2,32LS,productionHL(1690),0,12decaydλR,1232(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(1600),0,12LS,productionHL(1600),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(1670),0,12LS,productionHL(1670),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRR(σ2)C0,0,12,λR12,λRC12,λR,0,012,λRHL(2000),0,12LS,productionHL(2000),0,12decaydλR,1212(θ31)2+λR=3/23/26δ12λRR(σ2)C1,0,32,λR12,λRC32,λR,0,032,λRHL(1520),1,32LS,productionHL(1520),0,12decaydλR,1232(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(1600),1,12LS,productionHL(1600),0,12decaydλR,1212(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(1670),1,12LS,productionHL(1670),0,12decaydλR,1212(θ31)2+λR=3/23/26δ12λRR(σ2)C1,0,32,λR12,λRC32,λR,0,032,λRHL(1690),1,32LS,productionHL(1690),0,12decaydλR,1232(θ31)2+λR=1/21/26δ12λRR(σ2)C12,λR,0,012,λRC1,0,12,λR12,λRHL(2000),1,12LS,productionHL(2000),0,12decaydλR,1212(θ31)2+λR=1/21/22δ12λRF0(RΛcqm0,m2(σ2))C0,0,12,λR12,λRC12,λR,0,012,λRRFlatté(σ2)HL(1405),0,12LS,productionHL(1405),0,12decaydλR,1212(θ31)2F0(RΛcqm0,m2(mL(1405)2))+λR=1/21/26δ12λRF1(RΛcqm0,m2(σ2))C12,λR,0,012,λRC1,0,12,λR12,λRRFlatté(σ2)HL(1405),1,12LS,productionHL(1405),0,12decayqm0,m2(σ2)dλR,1212(θ31)2F1(RΛcqm0,m2(mL(1405)2))qm0,m2(mL(1405)2)A12,123=λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1232),2,32LS,productionHD(1232),12,0decaydλR,1232(θ12)2+λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1600),2,32LS,productionHD(1600),12,0decaydλR,1232(θ12)2+λR=3/23/210δ12λRR(σ3)C32,λR,0,032,λRC2,0,32,λR12,λRHD(1700),2,32LS,productionHD(1700),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1232),1,32LS,productionHD(1232),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1600),1,32LS,productionHD(1600),12,0decaydλR,1232(θ12)2+λR=3/23/26δ12λRR(σ3)C1,0,32,λR12,λRC32,λR,0,032,λRHD(1700),1,32LS,productionHD(1700),12,0decaydλR,1232(θ12)2
Hide code cell source
H_prod = get_indexed_base("production", min_ls=False)

latex = R"""
\begin{array}{c|ccc|c}
  \textbf{Decay} & \textbf{coupling} & & & \textbf{factor} \\
  \hline
"""
for chain in LS_MODEL.decay.chains:
    R = Str(chain.resonance.name)
    L = chain.incoming_ls.L
    S = chain.incoming_ls.S
    symbol = H_prod[R, L, S]
    value = sp.sympify(LS_MODEL.parameter_defaults[symbol])
    factor = get_conversion_factor_ls(chain.resonance, L, S)
    coupling_value = f"{as_latex(symbol)} &=& {as_latex(value.n(3))}"
    latex += Rf"  {as_latex(chain)} & {coupling_value} & {factor:+d} \\" "\n"
latex += R"\end{array}"
Latex(f"{latex}")
Hide code cell output
DecaycouplingfactorΛc+S=1/2L=0Λ(1405)S=1/2L=0Kpπ+HL(1405),0,12LS,production=1.220.0395i+1Λc+S=1/2L=1Λ(1405)S=1/2L=0Kpπ+HL(1405),1,12LS,production=1.811.63i1Λc+S=3/2L=1Λ(1520)S=1/2L=2Kpπ+HL(1520),1,32LS,production=0.192+0.167i+1Λc+S=3/2L=2Λ(1520)S=1/2L=2Kpπ+HL(1520),2,32LS,production=0.1160.243i1Λc+S=1/2L=0Λ(1600)S=1/2L=1Kpπ+HL(1600),0,12LS,production=0.134+0.628i1Λc+S=1/2L=1Λ(1600)S=1/2L=1Kpπ+HL(1600),1,12LS,production=1.711.13i+1Λc+S=1/2L=0Λ(1670)S=1/2L=0Kpπ+HL(1670),0,12LS,production=0.00920.201i+1Λc+S=1/2L=1Λ(1670)S=1/2L=0Kpπ+HL(1670),1,12LS,production=0.115+0.168i1Λc+S=3/2L=1Λ(1690)S=1/2L=2Kpπ+HL(1690),1,32LS,production=0.379+0.331i+1Λc+S=3/2L=2Λ(1690)S=1/2L=2Kpπ+HL(1690),2,32LS,production=0.2860.248i1Λc+S=1/2L=0Λ(2000)S=1/2L=0Kpπ+HL(2000),0,12LS,production=2.81+0.0715i+1Λc+S=1/2L=1Λ(2000)S=1/2L=0Kpπ+HL(2000),1,12LS,production=0.891+0.0874i1Λc+S=3/2L=1Δ(1232)S=1/2L=1pπ+KHD(1232),1,32LS,production=1.5+3.16i+1Λc+S=3/2L=2Δ(1232)S=1/2L=1pπ+KHD(1232),2,32LS,production=0.5870.839i1Λc+S=3/2L=1Δ(1600)S=1/2L=1pπ+KHD(1600),1,32LS,production=1.62.46i+1Λc+S=3/2L=2Δ(1600)S=1/2L=1pπ+KHD(1600),2,32LS,production=0.4320.689i1Λc+S=3/2L=1Δ(1700)S=1/2L=2pπ+KHD(1700),1,32LS,production=3.16+2.29i1Λc+S=3/2L=2Δ(1700)S=1/2L=2pπ+KHD(1700),2,32LS,production=0.1790.299i+1Λc+S=1/2L=0K(700)S=0L=0π+KpHK(700),0,12LS,production=0.0001670.685i+1Λc+S=1/2L=1K(700)S=0L=0π+KpHK(700),1,12LS,production=0.631+0.0404i+1Λc+S=1/2L=0K(892)S=0L=1π+KpHK(892),0,12LS,production=1.0+1Λc+S=1/2L=1K(892)S=0L=1π+KpHK(892),1,12LS,production=0.342+0.064i1Λc+S=3/2L=1K(892)S=0L=1π+KpHK(892),1,32LS,production=0.7550.592i+1Λc+S=3/2L=2K(892)S=0L=1π+KpHK(892),2,32LS,production=0.09380.38i1Λc+S=1/2L=0K(1430)S=0L=0π+KpHK(1430),0,12LS,production=1.353.15i+1Λc+S=1/2L=1K(1430)S=0L=0π+KpHK(1430),1,12LS,production=0.5980.956i+1

It is asserted that these amplitude expressions to not evaluate to 0 once the Clebsch-Gordan coefficients are evaluated.

Hide code cell content
def assert_non_zero_amplitudes(model: AmplitudeModel) -> None:
    for amplitude in tqdm(model.amplitudes.values(), disable=NO_TQDM):
        assert amplitude.doit() != 0


assert_non_zero_amplitudes(LS_MODEL)

See also

See Resonances and LS-scheme for the allowed LS-values.

7.7.2. Distribution#

Hide code cell content
def lambdify(model: AmplitudeModel) -> sp.Expr:
    intensity_expr = unfold_intensity(model)
    pars = model.parameter_defaults
    free_parameters = {s: v for s, v in pars.items() if "production" in str(s)}
    fixed_parameters = {s: v for s, v in pars.items() if s not in free_parameters}
    subs_intensity_expr = intensity_expr.xreplace(fixed_parameters)
    return perform_cached_lambdify(subs_intensity_expr, free_parameters)


def unfold_intensity(model: AmplitudeModel) -> sp.Expr:
    unfolded_intensity = perform_cached_doit(model.intensity)
    return perform_cached_doit(unfolded_intensity.xreplace(model.amplitudes))


NOMINAL_MODEL = formulate_model("Default amplitude model")
NOMINAL_INTENSITY_FUNC = lambdify(NOMINAL_MODEL)
LS_INTENSITY_FUNC = lambdify(LS_MODEL)
Hide code cell content
GRID = generate_meshgrid_sample(NOMINAL_MODEL.decay, resolution=300)
TRANSFORMER = create_data_transformer(NOMINAL_MODEL)
GRID.update(TRANSFORMER(GRID))
Hide code cell source
def compare_2d_distributions() -> None:
    NOMINAL_INTENSITIES = compute_normalized_intensity(NOMINAL_INTENSITY_FUNC)
    LS_INTENSITIES = compute_normalized_intensity(LS_INTENSITY_FUNC)
    max_intensity = max(
        jnp.nanmax(NOMINAL_INTENSITIES),
        jnp.nanmax(LS_INTENSITIES),
    )
    use_mpl_latex_fonts()
    fig, axes = plt.subplots(
        dpi=200,
        figsize=(12, 5),
        ncols=2,
    )
    for ax in axes:
        ax.set_box_aspect(1)
    ax1, ax2 = axes
    ax1.set_title("Nominal model")
    ax2.set_title("LS-model")
    ax1.pcolormesh(
        GRID["sigma1"],
        GRID["sigma2"],
        NOMINAL_INTENSITIES,
        vmax=max_intensity,
    )
    ax2.pcolormesh(
        GRID["sigma1"],
        GRID["sigma2"],
        LS_INTENSITIES,
        vmax=max_intensity,
    )
    plt.show()


def compute_normalized_intensity(func: Function) -> jax.Array:
    intensities = func(GRID)
    integral = jnp.nansum(intensities)
    return intensities / integral


compare_2d_distributions()
../_images/33e8f63395c190bd9ddec753bc7bdac5a255c52b798d81bf039f2cca8697b6bb.png

7.7.3. Decay rates#

Hide code cell source
def to_regex(text: str) -> str:
    text = text.replace("(", r"\(")
    return text.replace(")", r"\)")


def compute_decay_rates() -> dict[Particle, tuple[float, float]]:
    decay_rates = {}
    nominal_I_tot = integrate_intensity(NOMINAL_INTENSITY_FUNC(PHSP))
    LS_I_tot = integrate_intensity(LS_INTENSITY_FUNC(PHSP))
    for chain in tqdm(NOMINAL_MODEL.decay.chains, disable=NO_TQDM):
        filter_ = [to_regex(chain.resonance.name)]
        LS_I_sub = sub_intensity(LS_INTENSITY_FUNC, PHSP, filter_)
        nominal_I_sub = sub_intensity(NOMINAL_INTENSITY_FUNC, PHSP, filter_)
        decay_rates[chain.resonance] = (
            float(nominal_I_sub / nominal_I_tot),
            float(LS_I_sub / LS_I_tot),
        )
    return decay_rates


PHSP = generate_phasespace_sample(NOMINAL_MODEL.decay, n_events=100_000, seed=0)
PHSP = TRANSFORMER(PHSP)
DECAY_RATES = compute_decay_rates()
src = R"""
\begin{array}{l|rr|r}
  \textbf{Resonance} & \textbf{Nominal} & \textbf{LS-model} & \textbf{Difference}\\
  \hline
"""
for res, (nominal_rate, ls_rate) in DECAY_RATES.items():
    nominal_rate *= 100
    ls_rate *= 100
    src += (
        Rf"  {res.latex} & {nominal_rate:.2f} & {ls_rate:.2f} &"
        rf" {ls_rate - nominal_rate:+.2f} \\"
        "\n"
    )
    del res, nominal_rate, ls_rate
src += R"\end{array}"
Latex(src)
ResonanceNominalLS-modelDifferenceΛ(1405)7.787.020.75Λ(1520)1.911.95+0.03Λ(1600)5.165.21+0.05Λ(1670)1.151.18+0.02Λ(1690)1.161.090.08Λ(2000)9.559.84+0.30Δ(1232)28.7328.97+0.24Δ(1600)4.504.240.26Δ(1700)3.893.99+0.10K(700)2.993.25+0.26K(892)21.9521.250.70K(1430)14.7015.41+0.71

Tip

Compare with the values with uncertainties as reported in Decay rates.