Skip to content

Commit

Permalink
add theta3 and phi3 and 1d projection
Browse files Browse the repository at this point in the history
  • Loading branch information
shenvitor committed Aug 21, 2024
1 parent c0ff4ea commit fd6fd88
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 10 deletions.
132 changes: 122 additions & 10 deletions docs/eta-pi-p/manual.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"hide-cell"
]
},
"outputs": [],
"source": [
"sp.Ynm(2, 1, 1, 1).expand(func=False)"
Expand All @@ -122,7 +126,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"hide-cell"
]
},
"outputs": [],
"source": [
"sp.Ynm(2, 1, 1, 1).expand(func=True)"
Expand Down Expand Up @@ -166,7 +174,6 @@
"s23, m_delta, gamma_delta = sp.symbols(\"s_{23} m_Delta Gamma_Delta\")\n",
"b = sp.IndexedBase(\"b\")\n",
"m = sp.symbols(\"m\", cls=sp.Idx)\n",
"\n",
"theta2, phi2 = sp.symbols(\"theta_2 phi_2\")\n",
"A23 = sp.Sum(b[m] * sp.Ynm(1, m, theta2, phi2), (m, -1, 1)) / (\n",
" s23 - m_delta**2 + sp.I * m_delta * gamma_delta\n",
Expand Down Expand Up @@ -199,18 +206,40 @@
"metadata": {},
"outputs": [],
"source": [
"s31, c0, m_nstar, gamma_nstar = sp.symbols(r\"s_{31} c_0 m_{N^*} \\Gamma_{N^*}\")\n",
"A31 = c0 / (s31 - m_nstar**2 + sp.I * m_nstar * gamma_nstar)\n",
"s31, m_nstar, gamma_nstar = sp.symbols(r\"s_{31} m_{N^*} \\Gamma_{N^*}\")\n",
"c = sp.IndexedBase(\"c\")\n",
"A31 = c[0] / (s31 - m_nstar**2 + sp.I * m_nstar * gamma_nstar)\n",
"A31"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
":::{tip}\n",
"The expression above is originally deduced from $Y_l^m (\\Omega_3)$ when $l=0$ as shown below, so that the numerator is absorbed and becomes $c_0$.\n",
":::"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"A31_func = sp.lambdify([s31, c0, m_nstar, gamma_nstar], A31)"
"theta3, phi3 = sp.symbols(\"theta_3 phi_3\")\n",
"sp.Sum(c[m] * sp.Ynm(0, m, theta3, phi3), (m, 0, 0)) / (\n",
" s31 - m_nstar**2 + sp.I * m_nstar * gamma_nstar\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"A31_func = sp.lambdify([s31, c[0], m_nstar, gamma_nstar], A31)"
]
},
{
Expand Down Expand Up @@ -261,7 +290,7 @@
" theta2,\n",
" phi2,\n",
" s31,\n",
" c0,\n",
" c[0],\n",
" m_nstar,\n",
" gamma_nstar,\n",
" ],\n",
Expand Down Expand Up @@ -370,6 +399,8 @@
"\n",
"theta1_expr, phi1_expr = formulate_helicity_angles(p1, p2)\n",
"theta2_expr, phi2_expr = formulate_helicity_angles(p2, p3)\n",
"theta3_expr, phi3_expr = formulate_helicity_angles(p3, p1)\n",
"\n",
"m12_square = SquaredInvariantMass(p12)\n",
"m23_square = SquaredInvariantMass(p23)\n",
"m31_square = SquaredInvariantMass(p31)"
Expand All @@ -391,8 +422,10 @@
"kinematic_variables = {\n",
" theta1: theta1_expr,\n",
" theta2: theta2_expr,\n",
" theta3: theta3_expr,\n",
" phi1: phi1_expr,\n",
" phi2: phi2_expr,\n",
" phi3: phi3_expr,\n",
" s12: m12_square,\n",
" s23: m23_square,\n",
" s31: m31_square,\n",
Expand Down Expand Up @@ -461,7 +494,7 @@
" b[-1]: b_vals[0],\n",
" b[0]: b_vals[1],\n",
" b[1]: b_vals[2],\n",
" c0: c0_val,\n",
" c[0]: c0_val,\n",
" m_a2: m_a2_val,\n",
" m_delta: m_delta_val,\n",
" m_nstar: m_nstar_val,\n",
Expand Down Expand Up @@ -600,7 +633,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Phase space"
"### Dalitz Plot"
]
},
{
Expand All @@ -617,10 +650,22 @@
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"intensities = intensity_func(phsp)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
Expand All @@ -638,7 +683,7 @@
" density=True,\n",
" cmap=\"jet\",\n",
" vmax=0.15,\n",
" weights=intensity_func(phsp),\n",
" weights=intensities,\n",
")\n",
"ax.set_title(\"Model-weighted Phase space Dalitz Plot\")\n",
"ax.set_xlabel(R\"$m^2(\\eta \\pi^0)\\;\\left[\\mathrm{GeV}^2\\right]$\")\n",
Expand All @@ -647,6 +692,73 @@
"fig.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Projection"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']\n",
"\n",
"theta_subtitles = [\n",
" R\"$\\cos (\\theta_{1}^{{12}}) \\equiv \\cos (\\theta_{\\eta}^{{\\eta \\pi^0}})$\",\n",
" R\"$\\cos (\\theta_{2}^{{23}}) \\equiv \\cos (\\theta_{\\pi^0}^{{\\pi^0 p}})$\",\n",
" R\"$\\cos (\\theta_{3}^{{31}}) \\equiv \\cos (\\theta_{p}^{{p \\eta}})$\",\n",
"]\n",
"phi_subtitles = [\n",
" R\"$\\phi_1^{12} \\equiv \\phi_{\\eta}^{{\\eta \\pi^0}}$\",\n",
" R\"$\\phi_2^{23} \\equiv \\phi_{\\pi^0}^{{\\pi^0 p}}$\",\n",
" R\"$\\phi_3^{31} \\equiv \\phi_{p}^{{p \\eta}}$\",\n",
"]\n",
"mass_subtitles = [\n",
" R\"$m_{12} \\equiv m_{\\eta \\pi^0}$\",\n",
" R\"$m_{23} \\equiv m_{\\pi^0 p}$\",\n",
" R\"$m_{31} \\equiv m_{p \\eta}$\",\n",
"]\n",
"\n",
"fig, (theta_ax, phi_ax, mass_ax) = plt.subplots(figsize=(12, 8), ncols=3, nrows=3)\n",
"for i, ax1 in enumerate(theta_ax, 1):\n",
" ax1.set_title(theta_subtitles[i - 1])\n",
" ax1.set_xticks([-1, 0, 1])\n",
"\n",
"for i, ax2 in enumerate(phi_ax, 1):\n",
" ax2.set_title(phi_subtitles[i - 1])\n",
" ax2.set_xticks([-np.pi, 0, np.pi])\n",
" ax2.set_xticklabels([R\"-$\\pi$\", 0, R\"$\\pi$\"])\n",
"\n",
"for i, ax3 in enumerate(mass_ax, 1):\n",
" ax3.set_title(mass_subtitles[i - 1])\n",
"\n",
"plot_style = dict(bins=100, weights=intensity_func(phsp), density=True)\n",
"\n",
"theta_ax[0].hist(np.cos(phsp[\"theta_1\"]), **plot_style)\n",
"theta_ax[1].hist(np.cos(phsp[\"theta_2\"]), **plot_style)\n",
"theta_ax[2].hist(np.cos(phsp[\"theta_3\"]), **plot_style)\n",
"phi_ax[0].hist(phsp[\"phi_1\"], **plot_style)\n",
"phi_ax[1].hist(phsp[\"phi_2\"], **plot_style)\n",
"phi_ax[2].hist(phsp[\"phi_3\"], **plot_style)\n",
"mass_ax[0].hist(np.sqrt(phsp[\"s_{12}\"]), **plot_style)\n",
"mass_ax[1].hist(np.sqrt(phsp[\"s_{23}\"]), **plot_style)\n",
"mass_ax[2].hist(np.sqrt(phsp[\"s_{31}\"]), **plot_style)\n",
"\n",
"fig.tight_layout()\n",
"plt.show()"
]
}
],
"metadata": {
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ split-on-trailing-comma = false
"*.ipynb" = [
"ANN",
"B018",
"C408",
"D1",
"E303",
"E501",
Expand Down

0 comments on commit fd6fd88

Please sign in to comment.