Skip to content

Commit

Permalink
pgamma virtual state generation!
Browse files Browse the repository at this point in the history
  • Loading branch information
shenvitor committed May 16, 2024
1 parent 5580c93 commit e774af9
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 11 deletions.
150 changes: 139 additions & 11 deletions docs/pgamma-state.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@
},
"outputs": [],
"source": [
"from qrules.particle import load_pdg"
"from qrules.particle import load_pdg\n",
"\n",
"particle_db = load_pdg()\n",
"print(\"Number of loaded particles:\", len(particle_db))"
]
},
{
Expand All @@ -100,24 +103,17 @@
},
"outputs": [],
"source": [
"particle_db = load_pdg()\n",
"print(\"Number of loaded particles:\", len(particle_db))"
"particle_db.find(2212)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"metadata": {},
"outputs": [],
"source": [
"particle_db.find(2212)"
"particle_db.find(\"p\")"
]
},
{
Expand All @@ -140,6 +136,16 @@
"cell_type": "code",
"execution_count": null,
"id": "9",
"metadata": {},
"outputs": [],
"source": [
"particle_db.find(\"gamma\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "10",
"metadata": {
"editable": true,
"slideshow": {
Expand All @@ -148,6 +154,128 @@
"tags": []
},
"outputs": [],
"source": [
"from IPython.display import Math\n",
"\n",
"sigmas = particle_db.filter(\n",
" lambda p: p.name.startswith(\"p\") and p.mass == 0.93827208816 and p.charge == 1\n",
")\n",
"Math(\", \".join(p.latex for p in sigmas))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "11",
"metadata": {},
"outputs": [],
"source": [
"from IPython.display import Math\n",
"\n",
"sigmas = particle_db.filter(lambda p: p.name.startswith(\"gamma\"))\n",
"Math(\", \".join(p.latex for p in sigmas))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "12",
"metadata": {},
"outputs": [],
"source": [
"proton = particle_db[\"p\"]\n",
"proton"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "13",
"metadata": {},
"outputs": [],
"source": [
"gamma = particle_db[\"gamma\"]\n",
"gamma"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "14",
"metadata": {},
"outputs": [],
"source": [
"from qrules.particle import Particle, Spin\n",
"\n",
"pgamma = Particle(\n",
" name=\"p\",\n",
" latex=r\"p \\gamma\",\n",
" spin=0.5,\n",
" mass=4.101931071854584,\n",
" charge=1,\n",
" isospin=Spin(1 / 2, +1 / 2),\n",
" baryon_number=1,\n",
" parity=-1,\n",
" pid=99999999,\n",
")\n",
"pgamma"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "15",
"metadata": {},
"outputs": [],
"source": [
"pgamma_s3over2 = Particle(\n",
" name=\"pgamma\",\n",
" latex=R\"p \\gamma (s3/2)\",\n",
" spin=1.5,\n",
" mass=4.101931071854584,\n",
" charge=1,\n",
" isospin=Spin(1 / 2, +1 / 2),\n",
" baryon_number=1,\n",
" parity=-1,\n",
" pid=99999999,\n",
")\n",
"pgamma_s3over2"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "16",
"metadata": {},
"outputs": [],
"source": [
"pgamma_s3over2.latex"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "17",
"metadata": {},
"outputs": [],
"source": [
"pgamma.latex"
]
},
{
"cell_type": "markdown",
"id": "18",
"metadata": {},
"source": [
"The `pgamma` virtual state generated via `QRules` will be used in later stages!"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "19",
"metadata": {},
"outputs": [],
"source": []
}
],
Expand Down
17 changes: 17 additions & 0 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jupyterlab = ">=4.2.0,<4.3"
jupyterlab-git = ">=0.50.0,<0.51"
jupyterlab-lsp = ">=5.1.0,<5.2"
jupyterlab-myst = ">=2.4.2,<2.5"
jupyterlab_code_formatter = ">=2.2.1,<2.3"
myst-nb = ">=1.1.0,<1.2"
numpy = ">=1.26.4,<1.27"
pre-commit = ">=3.7.1,<3.8"
Expand Down

0 comments on commit e774af9

Please sign in to comment.