diff --git a/docs/julia/lc2ppik-lhcb-2683025.qmd b/docs/julia/lc2ppik-lhcb-2683025.qmd index 60912f7..cb82d26 100644 --- a/docs/julia/lc2ppik-lhcb-2683025.qmd +++ b/docs/julia/lc2ppik-lhcb-2683025.qmd @@ -36,30 +36,6 @@ theme(:wong2, frame=:box, grid=false, minorticks=true, lab="") ``` -## Function definitions - -The model contains non-standard lineshapes that do not conform to a simple `BreitWigner` or `MultichannelBreitWigner` distribution, so they have to be defined explicitly. -The code below defines a new lineshape and implements its deserialization method (specializing `dict2instance()` using [multiple dispatch](https://docs.julialang.org/en/v1/manual/methods/#man-method-specializations)). - -```{julia} -struct BreitWignerWidthExpLikeBugg <: HadronicLineshapes.AbstractFlexFunc - m::Float64 - Γ::Float64 - γ::Float64 -end -function (BW::BreitWignerWidthExpLikeBugg)(σ::Number) - mK = 0.493677 - mπ = 0.13957018 - σA = mK^2 - mπ^2 / 2 - @unpack m, Γ, γ = BW - Γt = (σ - σA) / (m^2 - σA) * Γ * exp(-γ * σ) - 1 / (m^2 - σ - 1im * m * Γt) -end -function ThreeBodyDecaysIO.dict2instance(::Type{BreitWignerWidthExpLikeBugg}, dict) - @unpack mass, width, slope, x = dict - return NamedArgFunc(BreitWignerWidthExpLikeBugg(mass, width, slope), [x]) -end -``` ## Deserialization of Objects to a Workspace diff --git a/models/lc2ppik-lhcb-2683025.json b/models/lc2ppik-lhcb-2683025.json index 0828a43..c95fefc 100644 --- a/models/lc2ppik-lhcb-2683025.json +++ b/models/lc2ppik-lhcb-2683025.json @@ -865,19 +865,13 @@ }, { "name": "K700_BuggBW", - "slope": 0.94106, - "type": "BreitWignerWidthExpLikeBugg", - "x": "m_23_sq", - "mass": 0.824, - "width": 0.478 + "type": "generic_function", + "expression": "1/(0.824^2 - σ - i * 0.824 * (σ - 0.23397706275638377) / (0.824^2 - 0.23397706275638377) * 0.478 * exp(-0.941060 * σ))" }, { "name": "K1430_BuggBW", - "slope": 0.020981, - "type": "BreitWignerWidthExpLikeBugg", - "x": "m_23_sq", - "mass": 1.375, - "width": 0.19 + "type": "generic_function", + "expression": "1/(1.375^2 - σ - i * 1.375 * (σ - 0.23397706275638377) / (1.375^2 - 0.23397706275638377) * 0.190 * exp(-0.020981 * σ))" }, { "name": "L1670_BW",