From 6350c9e14cb87cae02945339a7ab25fd9b3d622f Mon Sep 17 00:00:00 2001 From: Mikhail Mikhasenko Date: Wed, 5 Jun 2024 21:42:37 +0200 Subject: [PATCH] got rid of constant --- docs/julia/Manifest.toml | 10 +++++----- docs/julia/lb2pkg-lhcb-2765817.qmd | 11 ----------- docs/julia/lc2ppik-lhcb-2683025.qmd | 6 ------ models/lb2pkg-lhcb-2765817.json | 10 ++++++++-- 4 files changed, 13 insertions(+), 24 deletions(-) diff --git a/docs/julia/Manifest.toml b/docs/julia/Manifest.toml index 43cef3f..fcf1b18 100644 --- a/docs/julia/Manifest.toml +++ b/docs/julia/Manifest.toml @@ -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"] @@ -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" diff --git a/docs/julia/lb2pkg-lhcb-2765817.qmd b/docs/julia/lb2pkg-lhcb-2765817.qmd index d3a8821..7ba5ace 100644 --- a/docs/julia/lb2pkg-lhcb-2765817.qmd +++ b/docs/julia/lb2pkg-lhcb-2765817.qmd @@ -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. diff --git a/docs/julia/lc2ppik-lhcb-2683025.qmd b/docs/julia/lc2ppik-lhcb-2683025.qmd index 60912f7..9f5d18e 100644 --- a/docs/julia/lc2ppik-lhcb-2683025.qmd +++ b/docs/julia/lc2ppik-lhcb-2683025.qmd @@ -114,12 +114,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 diff --git a/models/lb2pkg-lhcb-2765817.json b/models/lb2pkg-lhcb-2765817.json index dbb0272..eaa5c16 100644 --- a/models/lb2pkg-lhcb-2765817.json +++ b/models/lb2pkg-lhcb-2765817.json @@ -2227,8 +2227,9 @@ "name": "MomentumPower3" }, { - "type": "Constant", - "mass": 3.5, + "type": "Polynomial", + "coefficients": [1.0], + "x": "m_12_sq", "name": "LNR30_NR" }, { @@ -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" } ] },