Skip to content

Commit

Permalink
Fix Lb2pKg model (#39)
Browse files Browse the repository at this point in the history
* Corrected the model

* introduce `Constant` lineshape

* mass indicated the normalization point

* update a key for phase space point (#40)

* update dependences

* added axes labels

* minor adjustments, :speed

* flipped the couplings (-1)^l
  • Loading branch information
mmikhasenko committed May 22, 2024
1 parent 0c8f4b9 commit 1fa74b6
Show file tree
Hide file tree
Showing 5 changed files with 478 additions and 287 deletions.
10 changes: 5 additions & 5 deletions docs/julia/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.3"
manifest_format = "2.0"
project_hash = "e40973e8a6fbb9a08333ee74ae05bd4d2aa9d2f4"
project_hash = "3f243dcd69360dee01195d9e17b4a5d3b99713b4"

[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
Expand Down Expand Up @@ -276,11 +276,11 @@ version = "1.10.8"

[[deps.HadronicLineshapes]]
deps = ["Parameters", "QuadGK", "StaticArrays"]
git-tree-sha1 = "a8ad741e2299f02a9f52378060d66befd4bdd8f7"
git-tree-sha1 = "37b311e2c93c093f16f64aeef9115e810f6eada4"
repo-rev = "main"
repo-url = "https://github.com/mmikhasenko/HadronicLineshapes.jl"
uuid = "49c9d978-1f9d-4e96-a984-0a9783c0b9bf"
version = "0.3.0"
version = "0.3.2"

[[deps.HarfBuzz_jll]]
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"]
Expand Down Expand Up @@ -899,11 +899,11 @@ version = "0.11.2"

[[deps.ThreeBodyDecaysIO]]
deps = ["DataFrames", "HadronicLineshapes", "JSON", "OrderedCollections", "Parameters", "ThreeBodyDecays"]
git-tree-sha1 = "553720fbc7779bc22d7d20207b9a7f140df803ac"
git-tree-sha1 = "2abb4602d66c5e17b7a242132b3464b4cc272506"
repo-rev = "main"
repo-url = "https://github.com/mmikhasenko/ThreeBodyDecaysIO.jl"
uuid = "418e7ecf-680e-4cb5-ad61-5e2f006aefac"
version = "0.2.1"
version = "0.2.2"

[[deps.TranscodingStreams]]
git-tree-sha1 = "5d54d076465da49d6746c647022f3b3674e64156"
Expand Down
1 change: 1 addition & 0 deletions docs/julia/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
HadronicLineshapes = "49c9d978-1f9d-4e96-a984-0a9783c0b9bf"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Expand Down
46 changes: 27 additions & 19 deletions docs/julia/lb2pkg.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ using Measurements
using Statistics
using QuadGK
using Plots
using LaTeXStrings
theme(:wong2, frame=:box, grid=false, minorticks=true,
guidefontvalign=:top, guidefonthalign=:right,
Expand All @@ -38,16 +39,14 @@ Non-standard lineshapes are used to model resonances that do not conform to a si
The code below defines a new `NonResonant` lineshape, and its deserialization method. In this case this is just a constant.

```{julia}
struct NonResonant <: HadronicLineshapes.AbstractFlexFunc
struct Constant <: HadronicLineshapes.AbstractFlexFunc
m::Float64
end
function (BW::NonResonant)(σ)
@unpack m = BW
1.0
end
function ThreeBodyDecaysIO.dict2instance(::Type{NonResonant}, dict)
(X::Constant)(σ) = 1
function ThreeBodyDecaysIO.dict2instance(::Type{Constant}, dict)
@unpack mass = dict
return NonResonant(mass)
return Constant(mass)
end
```

Expand Down Expand Up @@ -80,7 +79,8 @@ end
## Validation

The integrity of the model is checked by validating the value of distributions at a few phase space points.
The table lists the validation checkes and their status ("🟢" ($<10^{-12}$), "🟡" ($<10^{-2}$) or "🔴" $\ge10^{-2}$) for the difference between the reference and computed values.
The table lists the validation checkes and their status. The marks "🟢", "🟡", and "🔴" indicate
an accuracy of $<10^{-2}$, $<10^{-12}$, or $\ge10^{-2}$, respectively, for the difference between the reference and computed values.

```{julia}
#| code-fold: true
Expand Down Expand Up @@ -136,18 +136,24 @@ The Dalitz plot shows the probability distribution across two dimensional phase
let
ms = masses(model)
#
σ3v = range(lims3(ms)[1], 2.5^2, 100)[2:end-1]
σ2v = range(5, 27, 30)[2:end-1]
σ3v = range(1.9, 2.5^2, 100)
σ2v = range(5, 27, 80)
#
_model = model
f(σs) = Kibble(σs, ms^2) > 0 ? NaN : unpolarized_intensity(model, σs)
calv = [
f(Invariants(ms; σ3, σ2)) for σ2 in σ2v, σ3 in σ3v]
heatmap(σ3v, σ2v, calv)
calv = [f(Invariants(ms; σ3, σ2)) for σ2 in σ2v, σ3 in σ3v]
heatmap(σ3v, σ2v, calv, colorbar=false, c=:speed)
plot!(border32(masses(model)),
l=(3, :black),
xlim=(σ3v[1], σ3v[end]), ylim=(σ2v[1], σ2v[end]),
xlab=L"m_{pK^-}^2\,\, [\textrm{GeV}^2]",
ylab=L"m_{p\gamma}^2\,\, [\textrm{GeV}^2]")
end
```



The projection of the model onto a mass variable is shown by black line.
Contributions from individual resonances are shown by the colored lines.

Expand All @@ -156,25 +162,27 @@ Contributions from individual resonances are shown by the colored lines.
#| code-summary: Computation of projections
let k = 3
i, j = ij_from_k(k)
xlab = "m($i$j) [GeV]"
model = model_dist.model
#
mlims = (sqrt(lims(3, masses(model))[1]), 2.5)
mv = range(mlims..., 200) |> shift_by_half
#
plot()
plot!(mv, lab="Total") do m
plot!(mv, lab=L"\textrm{Total}") do m
I = Base.Fix1(unpolarized_intensity, model)
m * quadgk(projection_integrand(I, masses(model), m^2; k), 0, 1)[1]
m * quadgk(projection_integrand(I, masses(model), m^2; k), 0, 1)[1] / 1e3
end
chain_names = Set(model.names) |> collect |> sort
for name in chain_names
_model = model[model.names.==name]
plot!(mv, lab=name) do m
lab = replace(name, "L" => "\\varLambda(\\textrm{") * "})"
plot!(mv, lab=latexstring(lab)) do m
I = Base.Fix1(unpolarized_intensity, _model)
m * quadgk(projection_integrand(I, masses(_model), m^2; k), 0, 1)[1]
m * quadgk(projection_integrand(I, masses(_model), m^2; k), 0, 1)[1] / 1e3
end
end
plot!(; xlab)
plot!(;
xlab=L"m_{pK^-}\,\, [\textrm{GeV}]",
ylab=L"\textrm{d} N /\textrm{d} m_{pK^-}\,\, [\textrm{GeV}^{-1}]")
end
```
Loading

0 comments on commit 1fa74b6

Please sign in to comment.