Skip to content

Commit

Permalink
feat: implement compute_wigner_angles()
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Jan 30, 2022
1 parent 7137657 commit d46f11c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
18 changes: 17 additions & 1 deletion docs/usage/helicity/spin-alignment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,23 @@
"\n",
"for state_id in topology.outgoing_edge_ids:\n",
" expr = compute_wigner_rotation_matrix(topology, momenta, state_id)\n",
" display(expr)\n"
" display(expr)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from ampform.kinematics import compute_wigner_angles\n",
"\n",
"for state_id in topology.outgoing_edge_ids:\n",
" angle_definitions = compute_wigner_angles(topology, momenta, state_id)\n",
" for name, expr in angle_definitions.items():\n",
" angle_symbol = sp.Symbol(name)\n",
" latex = sp.multiline_latex(angle_symbol, expr, environment=\"eqnarray\")\n",
" display(Math(latex))"
]
}
],
Expand Down
33 changes: 32 additions & 1 deletion src/ampform/kinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
is_opposite_helicity_state,
list_decay_chain_ids,
)
from ampform.helicity.naming import get_helicity_angle_label
from ampform.helicity.naming import (
get_helicity_angle_label,
get_helicity_suffix,
)
from ampform.sympy import (
UnevaluatedExpression,
_implement_latex_subscript,
Expand Down Expand Up @@ -749,6 +752,34 @@ def compute_invariant_masses(
return invariant_masses


def compute_wigner_angles(
topology: Topology, momenta: "FourMomenta", state_id: int
) -> Dict[str, sp.Expr]:
"""Create an `~sympy.core.expr.Expr` for each angle in a Wigner rotation.
Implementation of (B.2-4) in
:cite:`marangottoHelicityAmplitudesGeneric2020`, with :math:`x'_z` etc.
taken from the result of :func:`compute_wigner_rotation_matrix`.
"""
wigner_rotation_matrix = compute_wigner_rotation_matrix(
topology, momenta, state_id
)
x_z = ArraySlice(wigner_rotation_matrix, (slice(None), 1, 3))
y_z = ArraySlice(wigner_rotation_matrix, (slice(None), 2, 3))
z_x = ArraySlice(wigner_rotation_matrix, (slice(None), 3, 1))
z_y = ArraySlice(wigner_rotation_matrix, (slice(None), 3, 2))
z_z = ArraySlice(wigner_rotation_matrix, (slice(None), 3, 3))
alpha = sp.atan2(z_y, z_x)
beta = sp.acos(z_z)
gamma = sp.atan2(y_z, -x_z)
suffix = get_helicity_suffix(topology, state_id)
return {
f"alpha{suffix}": alpha,
f"beta{suffix}": beta,
f"gamma{suffix}": gamma,
}


def compute_wigner_rotation_matrix(
topology: Topology, momenta: "FourMomenta", state_id: int
) -> MatrixMultiplication:
Expand Down

0 comments on commit d46f11c

Please sign in to comment.