-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement Kibble and Källén functions (#292)
* chore: move tests to sub-folders * docs: add LaTeX expressions to phasespace API * feat: implement Kibble and Källén functions * test: add test function for is_within_phasespace()
- Loading branch information
Showing
10 changed files
with
422 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,248 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"hideCode": true, | ||
"hideOutput": true, | ||
"hidePrompt": true, | ||
"jupyter": { | ||
"source_hidden": true | ||
}, | ||
"slideshow": { | ||
"slide_type": "skip" | ||
}, | ||
"tags": [ | ||
"remove-cell", | ||
"skip-execution" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# WARNING: advised to install a specific version, e.g. ampform==0.1.2\n", | ||
"%pip install -q ampform[doc,viz] IPython" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"hideCode": true, | ||
"hideOutput": true, | ||
"hidePrompt": true, | ||
"jupyter": { | ||
"source_hidden": true | ||
}, | ||
"slideshow": { | ||
"slide_type": "skip" | ||
}, | ||
"tags": [ | ||
"remove-cell" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"%config InlineBackend.figure_formats = ['svg']\n", | ||
"import os\n", | ||
"\n", | ||
"from IPython.display import display # noqa: F401\n", | ||
"\n", | ||
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"```{autolink-concat}\n", | ||
"```" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"# Kinematics" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"jupyter": { | ||
"source_hidden": true | ||
}, | ||
"tags": [ | ||
"hide-cell" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import sympy as sp\n", | ||
"from IPython.display import Math\n", | ||
"\n", | ||
"from ampform.io import aslatex" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"tags": [] | ||
}, | ||
"source": [ | ||
":::{margin}\n", | ||
"This notebook originates from {doc}`compwa-org:report/017`.\n", | ||
":::\n", | ||
"\n", | ||
"Kinematics for a three-body decay $0 \\to 123$ can be fully described by two **Mandelstam variables** $\\sigma_1, \\sigma_2$, because the third variable $\\sigma_3$ can be expressed in terms $\\sigma_1, \\sigma_2$, the mass $m_0$ of the initial state, and the masses $m_1, m_2, m_3$ of the final state. As can be seen, the roles of $\\sigma_1, \\sigma_2, \\sigma_3$ are interchangeable.\n", | ||
"\n", | ||
"```{margin}\n", | ||
"See Eq. (1.2) in {cite}`bycklingParticleKinematics1973`\n", | ||
"```" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"jupyter": { | ||
"source_hidden": true | ||
}, | ||
"tags": [ | ||
"hide-input" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from ampform.kinematics.phasespace import compute_third_mandelstam\n", | ||
"\n", | ||
"m0, m1, m2, m3 = sp.symbols(\"m:4\")\n", | ||
"s1, s2, s3 = sp.symbols(\"sigma1:4\")\n", | ||
"s3_expr = compute_third_mandelstam(s1, s2, m0, m1, m2, m3)\n", | ||
"\n", | ||
"latex = aslatex({s3: s3_expr})\n", | ||
"Math(latex)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The phase space is defined by the closed area that satisfies the condition $\\phi(\\sigma_1,\\sigma_2) \\leq 0$, where $\\phi$ is a **Kibble function**:\n", | ||
"\n", | ||
"\n", | ||
"```{margin}\n", | ||
"See §V.2 in {cite}`bycklingParticleKinematics1973`\n", | ||
"```" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"jupyter": { | ||
"source_hidden": true | ||
}, | ||
"tags": [ | ||
"hide-input" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from ampform.kinematics.phasespace import Kibble\n", | ||
"\n", | ||
"kibble = Kibble(s1, s2, s3, m0, m1, m2, m3)\n", | ||
"\n", | ||
"latex = aslatex({kibble: kibble.evaluate()})\n", | ||
"Math(latex)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"and $\\lambda$ is the **Källén function**:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"jupyter": { | ||
"source_hidden": true | ||
}, | ||
"tags": [ | ||
"hide-input" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from ampform.kinematics.phasespace import Kallen\n", | ||
"\n", | ||
"x, y, z = sp.symbols(\"x:z\")\n", | ||
"kallen = Kallen(x, y, z)\n", | ||
"\n", | ||
"latex = aslatex({kallen: kallen.evaluate()})\n", | ||
"Math(latex)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Any distribution over the phase space can now be defined using a two-dimensional grid over a Mandelstam pair $\\sigma_1,\\sigma_2$ of choice, with the condition $\\phi(\\sigma_1,\\sigma_2)<0$ selecting the values that are physically allowed." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"jupyter": { | ||
"source_hidden": true | ||
}, | ||
"tags": [ | ||
"hide-input" | ||
] | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from ampform.kinematics.phasespace import is_within_phasespace\n", | ||
"\n", | ||
"is_within_phasespace(s1, s2, m0, m1, m2, m3)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"See {doc}`compwa-org:report/017` for an interactive visualization of the phase space region and an analytic expression for the phase space boundary." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.8.13" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
Oops, something went wrong.