Skip to content

Commit

Permalink
Add summary section and more words explaining and describing before p…
Browse files Browse the repository at this point in the history
…lots
  • Loading branch information
shenvitor committed Jun 13, 2024
1 parent e0e0ecd commit 89ae5ab
Showing 1 changed file with 178 additions and 14 deletions.
192 changes: 178 additions & 14 deletions docs/report/999.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
":::{card} PWA101: Amplitude Analysis with Python basics\n",
"TR-999\n",
"^^^\n",
"This document serves as an introduction to Amplitude Analysis / Partial Wave Analysis (PWA) by demonstrating its application to a specific reaction channel and amplitude model. Basic Python programming and libraries (e.g. `numpy`, `scipy`, etc.) are used to illustrate the general process and full workflow of PWA in the context of hadron physics.\n",
"This document introduces Amplitude Analysis / Partial Wave Analysis (PWA) by demonstrating its application to a specific reaction channel and amplitude model. Basic Python programming and libraries (e.g. `numpy`, `scipy`, etc.) are used to illustrate the general process and full workflow of PWA in hadron physics.\n",
"+++\n",
"✅ [ComPWA/RUB-EP1-AG#93](https://github.com/ComPWA/RUB-EP1-AG/issues/93), [compwa.github.io#217](https://github.com/ComPWA/compwa.github.io/pull/217)\n",
":::\n",
Expand Down Expand Up @@ -60,10 +60,10 @@
"tags": []
},
"source": [
"- This document serves as an introduction to Amplitude Analysis / Partial Wave Analysis (PWA) by demonstrating its application to a specific reaction channel and amplitude model.\n",
"- Basic Python programming and libraries (e.g. `numpy`, `scipy`, etc.) are used to illustrate the general process in PWA.\n",
"- Before advancing to the complexities of symbolic expressions (computations) with e.g. `sympy` later, and as a comparison .\n",
"- This tutorial aims to equip readers with a basic understanding of PWA methodologies and full workflow in the context of hadron physics through a practical, hands-on example."
"- This document introduces Amplitude Analysis / Partial Wave Analysis (PWA) by demonstrating its application to a specific reaction channel and amplitude model.\n",
"- Only basic Python programming and libraries (e.g. `numpy`, `scipy`, etc.) are used to illustrate the general process in PWA.\n",
"- Before advancing to the complexities of symbolic expressions (computations) with e.g. `sympy` later, see [here](https://github.com/ComPWA/gluex-nstar/issues/1), and as a comparison .\n",
"- This tutorial aims to equip readers with a basic understanding of PWA methodologies and full workflow in hadron physics through a practical, hands-on example."
]
},
{
Expand Down Expand Up @@ -1520,9 +1520,9 @@
"\n",
"where the notation we used here is more common in physics:\n",
"\n",
"- $\\phi$ is the azimuthal from -$\\pi$ to $\\pi$ ( where in `scipy` it is represented as $\\theta$ and ranged from 0 to $2\\pi$)\n",
"- $\\phi$ is the azimuthal from -$\\pi$ to $\\pi$ in this document (where in `scipy` it is represented as $\\theta$ and ranged from 0 to $2\\pi$)\n",
"\n",
"- $\\theta$ is the polar angle from 0 to $\\pi$ (where in `scipy` it is represented as $\\phi$ with the same range)\n",
"- $\\theta$ is the polar angle from 0 to $\\pi$ in this document (where in `scipy` it is represented as $\\phi$ with the same range)\n",
"\n",
"$Y_l^m(\\phi, \\theta) = \\sqrt{\\frac{2n+1}{4\\pi}\\frac{(n-m)!}{(n+m)!}}e^{im\\phi}P_l^m(\\cos(\\theta))$"
]
Expand Down Expand Up @@ -1557,6 +1557,15 @@
")"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"Assign the initial default values for $a_m$"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -1628,13 +1637,17 @@
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We now have a look at the real part and imaginary part of $\\sum a_m Y_2^m (\\Omega_1)$ in equation {eq}`BW_SH_label`."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input",
"full-width"
Expand Down Expand Up @@ -1696,6 +1709,15 @@
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"Assign the initial default values for $b_m$"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -1738,6 +1760,15 @@
"Z23 = compute_spherical_harmonics23(PHI, THETA, **initial_SH_parameters)"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"We then have a look at the real part and imaginary part of $\\sum b_m Y_1^m (\\Omega_2)$ in equation {eq}`BW_SH_label`."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -1776,6 +1807,15 @@
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"Assign the initial default value for $c_0$"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -2259,6 +2299,9 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"full-width",
"hide-input"
Expand Down Expand Up @@ -2364,6 +2407,15 @@
"fig.show()"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"Set a cut at max=0.15 on the Dalitz plot of BW $\\times$ SH model to visualize the \"strides\" clearer. "
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -2768,6 +2820,15 @@
" - Trims the dataset to the desired size if it exceeds the specified number due to batch generation."
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"Now we can use the function `generate_data` to generate our data sample:"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -2825,6 +2886,15 @@
"phi3_data = phi_helicity(p3_data, p31_data)"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"Have a look at the expected Dalitz plot from the generated data sample"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -2837,8 +2907,10 @@
"outputs": [],
"source": [
"fig, ax = plt.subplots(figsize=(6, 5))\n",
"fig.suptitle(\"Dalitz Plot of Generated Data\")\n",
"hist = ax.hist2d(s12_data, s23_data, bins=100, cmin=1e-6, density=True, cmap=\"jet\")\n",
"fig.suptitle(\"Dalitz Plot of Generated Data (with cut at max=0.15)\")\n",
"hist = ax.hist2d(\n",
" s12_data, s23_data, bins=100, cmin=1e-6, density=True, cmap=\"jet\", vmax=0.15\n",
")\n",
"ax.set_xlabel(r\"$m^2_{\\eta \\pi^0}$\")\n",
"ax.set_ylabel(r\"$m^2_{\\pi^0 p}$\")\n",
"cbar = fig.colorbar(hist[3], ax=ax)\n",
Expand Down Expand Up @@ -4235,7 +4307,8 @@
"source_hidden": true
},
"tags": [
"scroll-input"
"scroll-input",
"hide-input"
]
},
"outputs": [],
Expand All @@ -4256,11 +4329,25 @@
"parameters_df"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"Now we see the fit results of CM angles, Helicity angles and invariant mass as a comparison of data in 2D projection plots"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -4588,6 +4675,28 @@
"#### Dalitz plots of phsp, data, and fit result"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"To conclude our analysis in this document, we examine the Dalitz plots for the following cases: phase space, generated data, default parameters of the model, and fitted parameters of the model.\n",
"\n",
"- Phase Space Dalitz Plot:\n",
" - The plot displays a flat distribution, representing the kinematically allowed region for the reaction. This flat distribution serves as a baseline, showing no dynamical effects or resonant structures.\n",
"- Generated Data Dalitz Plot:\n",
" - This plot is derived from synthetic data that simulates the actual experimental conditions. It includes potential resonances (and background processes). The generated data reflects the physical phenomena expected in the real experimental scenario.\n",
"- Model with Default Parameters Dalitz Plot:\n",
" - Here, the Dalitz plot illustrates the model's predictions using the initial set of parameters. This provides a theoretical reference for comparison with actual data and the fitted model.\n",
"- Fitted Parameters Dalitz Plot:\n",
" - After performing the fitting procedure, this plot shows the model's predictions with optimized parameters. The resonances and their characteristics are clearly visible, indicating the physical information extracted from the data.\n",
" \n",
"By comparing these Dalitz plots, we can observe how the model evolves from theoretical predictions to a fitted solution that aligns with the experimental or generated data. The physical information about possible resonances becomes more apparent, allowing us to extract meaningful insights into the underlying processes of the reaction.\n",
"\n",
"This comprehensive analysis showcases the interplay between kinematics and dynamics in understanding particle interactions, highlighting the power of Partial Wave Analysis in uncovering the nuances of hadronic reactions."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -4696,6 +4805,61 @@
"fig.tight_layout()\n",
"fig.show()"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"# Summary"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"In this document, we have covered the general workflow of PWA, which consists of three major parts:\n",
"\n",
"As a summary, what have we done in this document consists of three major parts:\n",
"- Amplitude Model formulation\n",
" - Developed the theoretical model for the amplitude of the reaction.\n",
" - Defined the mathematical expressions representing the partial waves and their respective contributions.\n",
" - Incorporated the relevant physical parameters, such as coupling constants and resonance properties. \n",
"- Phase space and data sample generation (or data analysis)\n",
" - Generated phase space distributions for the three-body decay processes.\n",
" - Created synthetic data samples or analyzed experimental data.\n",
" - Ensured that the data accurately reflects the kinematic constraints and dynamics of the reaction. \n",
"- Perform fitting, analyze and evaluate the results\n",
" - Performed a fit of the amplitude model to the generated or experimental data.\n",
" - Used statistical techniques to optimize the model parameters.\n",
" - Analyzed the fit results to extract physical parameters and their uncertainties.\n",
" - Evaluated the quality of the fit and the consistency of the model with the data.\n",
" - Interpreted the physical significance of the extracted parameters and identified potential resonances and their properties."
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
":::{tip} \n",
"Extra:\n",
"have a look for another example of PWA for $J/\\psi \\to \\gamma \\pi^0 \\pi^0$ by using `ComPWA` at [here](https://tensorwaves.readthedocs.io/stable/amplitude-analysis/) .\n",
":::"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"This structured approach provides a comprehensive understanding of both the reaction dynamics and kinematics, and helps in extracting meaningful physical insights from the data."
]
}
],
"metadata": {
Expand Down

0 comments on commit 89ae5ab

Please sign in to comment.