Skip to content

Commit

Permalink
replaced Bugg in json, cleaned qmd (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikhasenko authored Jun 5, 2024
1 parent 50fabc0 commit ecf094f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 34 deletions.
24 changes: 0 additions & 24 deletions docs/julia/lc2ppik-lhcb-2683025.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 4 additions & 10 deletions models/lc2ppik-lhcb-2683025.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ecf094f

Please sign in to comment.