Skip to content

Commit

Permalink
ORDER CHANGE
Browse files Browse the repository at this point in the history
  • Loading branch information
shenvitor committed Aug 21, 2024
1 parent 0bc3bb2 commit c0ff4ea
Showing 1 changed file with 52 additions and 52 deletions.
104 changes: 52 additions & 52 deletions docs/eta-pi-p/manual.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,48 @@
"intensity_func"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Phase Space Generation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Mass for $p\\gamma$ system"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"E_lab_gamma = 8.5\n",
"m_proton = 0.938\n",
"m_0 = np.sqrt(2 * E_lab_gamma * m_proton + m_proton**2)\n",
"m_eta = 0.548\n",
"m_pi = 0.135\n",
"m_0"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"rng = TFUniformRealNumberGenerator(seed=0)\n",
"phsp_generator = TFPhaseSpaceGenerator(\n",
" initial_state_mass=m_0,\n",
" final_state_masses={1: m_eta, 2: m_pi, 3: m_proton},\n",
")\n",
"phsp_momenta = phsp_generator.generate(500_000, rng)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -370,6 +412,16 @@
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"phsp = helicity_transformer(phsp_momenta)\n",
"list(phsp)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -421,48 +473,6 @@
"Latex(aslatex(parameters_default))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Phase Space Generation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Mass for $p\\gamma$ system"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"E_lab_gamma = 8.5\n",
"m_proton = 0.938\n",
"m_0 = np.sqrt(2 * E_lab_gamma * m_proton + m_proton**2)\n",
"m_eta = 0.548\n",
"m_pi = 0.135\n",
"m_0"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"rng = TFUniformRealNumberGenerator(seed=0)\n",
"phsp_generator = TFPhaseSpaceGenerator(\n",
" initial_state_mass=m_0,\n",
" final_state_masses={1: m_eta, 2: m_pi, 3: m_proton},\n",
")\n",
"phsp_momenta = phsp_generator.generate(500_000, rng)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -593,16 +603,6 @@
"### Phase space"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"phsp = helicity_transformer(phsp_momenta)\n",
"list(phsp)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit c0ff4ea

Please sign in to comment.