Skip to content

Commit

Permalink
got rid of constant (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikhasenko committed Jun 5, 2024
1 parent ecf094f commit b72fc2e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 24 deletions.
10 changes: 5 additions & 5 deletions docs/julia/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,11 @@ version = "1.10.8"

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

[[deps.HarfBuzz_jll]]
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"]
Expand Down Expand Up @@ -898,12 +898,12 @@ uuid = "e6563dab-9ca1-5843-bde3-2ccf38d63843"
version = "0.11.3"

[[deps.ThreeBodyDecaysIO]]
deps = ["DataFrames", "HadronicLineshapes", "JSON", "MacroTools", "OrderedCollections", "Parameters", "ThreeBodyDecays"]
git-tree-sha1 = "84fbac13959f426213ae1bc5f49c46b17fab7e30"
deps = ["DataFrames", "HadronicLineshapes", "JSON", "MacroTools", "OrderedCollections", "Parameters", "Polynomials", "ThreeBodyDecays"]
git-tree-sha1 = "7a8326221b833ad250c8e50d497b5de190510f3d"
repo-rev = "main"
repo-url = "https://github.com/mmikhasenko/ThreeBodyDecaysIO.jl"
uuid = "418e7ecf-680e-4cb5-ad61-5e2f006aefac"
version = "0.4.1"
version = "0.4.2"

[[deps.TranscodingStreams]]
git-tree-sha1 = "a947ea21087caba0a798c5e494d0bb78e3a1a3a0"
Expand Down
11 changes: 0 additions & 11 deletions docs/julia/lb2pkg-lhcb-2765817.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,6 @@ theme(:wong2, frame=:box, grid=false, minorticks=true,
Non-standard lineshapes are used to model resonances that do not conform to a simple `BreitWigner` distributions, or a `MultichannelBreitWigner` has to be defined explicitly.
The code below defines a new `NonResonant` lineshape, and its deserialization method. In this case this is just a constant.

```{julia}
struct Constant <: HadronicLineshapes.AbstractFlexFunc
end
(X::Constant)(σ::Number) = 1
import ThreeBodyDecaysIO: dict2instance
function dict2instance(::Type{Constant}, dict)
return NamedArgFunc(Constant(), [""])
end
```

## Deserialization of Objects to a Workspace

Model components are deserialized from a JSON file into computational objects within a workspace for further manipulation. First, functions representing lineshapes and form-factors are built. Following this, distributions are processed and added to the workspace.
Expand Down
6 changes: 0 additions & 6 deletions docs/julia/lc2ppik-lhcb-2683025.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ let
_parameters = array2dict(parameter_point["parameters"];
key="name", apply=v -> v["value"])
#
function label_diff(diff; levels=[1e-2, 1e-10])
_diff = abs(diff)
_diff < levels[2] && return '🟢'
_diff < levels[1] && return '🟡'
return '🔴'
end
computed_value = dist(_parameters)
#
tonumber(X::Number) = X
Expand Down
10 changes: 8 additions & 2 deletions models/lb2pkg-lhcb-2765817.json
Original file line number Diff line number Diff line change
Expand Up @@ -2227,8 +2227,9 @@
"name": "MomentumPower3"
},
{
"type": "Constant",
"mass": 3.5,
"type": "Polynomial",
"coefficients": [1.0],
"x": "m_12_sq",
"name": "LNR30_NR"
},
{
Expand Down Expand Up @@ -2486,6 +2487,11 @@
"point": "validation_point_m12sq",
"distribution": "L1690_BW",
"value": "-1.8597288296334098 + 1.396126484908448i"
},
{
"point": "validation_point_m12sq",
"distribution": "LNR30_NR",
"value": "1.0 + 0.0i"
}
]
},
Expand Down

0 comments on commit b72fc2e

Please sign in to comment.