Skip to content

Commit

Permalink
draft now for the transition
Browse files Browse the repository at this point in the history
  • Loading branch information
shenvitor committed May 24, 2024
1 parent 16a328b commit 165b294
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 11 deletions.
133 changes: 122 additions & 11 deletions docs/pgamma-state.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
},
"outputs": [],
"source": [
"from IPython.display import Math\n",
"from qrules.particle import load_pdg\n",
"\n",
"particle_db = load_pdg()\n",
Expand Down Expand Up @@ -305,13 +306,19 @@
"cell_type": "code",
"execution_count": null,
"id": "27",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": [
"from qrules.particle import Particle, Spin\n",
"\n",
"pgamma = Particle(\n",
" name=\"p\",\n",
" name=\"pgamma\",\n",
" latex=r\"p\\gamma (s1/2)\",\n",
" spin=0.5,\n",
" mass=4.101931071854584,\n",
Expand All @@ -336,11 +343,17 @@
"cell_type": "code",
"execution_count": null,
"id": "29",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": [
"pgamma_j3over2 = Particle(\n",
" name=\"pgamma\",\n",
" name=\"pgammas3/2\",\n",
" latex=R\"p\\gamma (s3/2)\",\n",
" spin=1.5,\n",
" mass=4.101931071854584,\n",
Expand All @@ -357,7 +370,13 @@
"cell_type": "code",
"execution_count": null,
"id": "30",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": [
"Math(pgamma.latex)"
Expand All @@ -367,23 +386,51 @@
"cell_type": "code",
"execution_count": null,
"id": "31",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": [
"Math(pgamma_j3over2.latex)"
]
},
{
"cell_type": "markdown",
"cell_type": "code",
"execution_count": null,
"id": "32",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": [
"The $`p\\gamma`$ virtual states generated via `QRules` will be used in later stages, both possible spin states $(J= \\frac{1}{2}$ and $\\frac{3}{2})$ should be taken into account if possible, otherwise simplified if necessary."
"particle_db.add(pgamma)"
]
},
{
"cell_type": "markdown",
"id": "33",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"The $`p\\gamma`$ virtual states generated via `QRules` will be used in later stages, both possible spin states $(J= \\frac{1}{2}$ and $\\frac{3}{2})$ should be taken into account if possible, otherwise simplified if necessary."
]
},
{
"cell_type": "markdown",
"id": "34",
"metadata": {},
"source": [
":::{important}\n",
Expand All @@ -393,8 +440,14 @@
},
{
"cell_type": "markdown",
"id": "34",
"metadata": {},
"id": "35",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
":::{note}\n",
"[Gell-Mann-Nishijima formula](https://en.wikipedia.org/wiki/Gell-Mann–Nishijima_formula):\n",
Expand All @@ -410,6 +463,64 @@
" T is topness.\n",
":::\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "36",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": [
"import qrules\n",
"\n",
"reaction1 = qrules.generate_transitions(\n",
" initial_state=(\"pgamma\"),\n",
" final_state=[\"eta\", \"pi0\", \"p\"],\n",
" # allowed_intermediate_particles=[\"f(0)(980)\", \"f(0)(1500)\"],\n",
" allowed_interaction_types=[\"strong\", \"EM\", \"weak\"],\n",
" formalism=\"canonical-helicity\",\n",
" particle_db=particle_db,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "37",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": [
"import graphviz\n",
"\n",
"dot = qrules.io.asdot(reaction1, collapse_graphs=True)\n",
"graphviz.Source(dot)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "38",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
1 change: 1 addition & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ sphinx-autobuild \
[dependencies]
black = ">=24.4.2,<24.5"
graphviz = ">=9.0.0,<9.1"
ipython = ">=8.24.0,<8.25"
ipywidgets = ">=8.1.2,<8.2"
isort = ">=5.13.2,<5.14"
jax = ">=0.4.26,<0.5"
Expand Down

0 comments on commit 165b294

Please sign in to comment.