-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: manual formulation of helicity amplitudes for pgamma->LambdaKPi #104
base: main
Are you sure you want to change the base?
Conversation
shenvitor
commented
Sep 2, 2024
•
edited
Loading
edited
- Closes Manually formulate symbolic helicity amplitude for pγ → ΛKπ #103
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like going in the right direction 💪
See comments and be careful to rename the PR to a conventional commit message
"three_half = sp.Rational(3, 2)\n", | ||
"five_half = sp.Rational(5, 2)\n", | ||
"seven_half = sp.Rational(7, 2)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would only define half
and then write e.g. 3 * half
"wigner_d_11_R1 = Wigner.d(half, λ1prime, λ1, zeta_1_1)\n", | ||
"wigner_d_00_R1 = Wigner.d(half, λ0prime, λ0, zeta_1_0)\n", | ||
"wigner_d_11_R2 = Wigner.d(half, λ1prime, λ1, zeta_2_1)\n", | ||
"wigner_d_00_R2 = Wigner.d(half, λ0prime, λ0, zeta_2_0)\n", | ||
"wigner_d_11_R3 = Wigner.d(half, λ1prime, λ1, zeta_3_1)\n", | ||
"wigner_d_00_R3 = Wigner.d(half, λ0prime, λ0, zeta_3_0)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not define these intermediate variables. It's easier to read (and debug) if the Wigner.d
functions are called inline, especially because the A1_aligned
definition fits on one line (you may need to write λ1p
). The problem is that it is easy to make typos in these kind of repetitive variable name definitions.
"zeta_1_0, zeta_1_1, zeta_2_0, zeta_2_1, zeta_3_0, zeta_3_1 = sp.symbols(\n", | ||
" r\"\\zeta_{1(1)}^0 \\zeta_{1(1)}^1 \\zeta_{2(1)}^0 \\zeta_{2(1)}^1 \\zeta_{3(1)}^0 \\zeta_{3(1)}^1\"\n", | ||
")\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case I would use sp.Symbol
and define each zeta
separately. It's more scalable and helps finding bugs if each symbol definition is below the other.
"A1 = (\n", | ||
" formualte_A1(\"K^{*}(1410)^+\", 1)\n", | ||
" + formualte_A1(\"K^{*}(1680)^+\", 1)\n", | ||
" + formualte_A1(\"K^{*}(892)^+\", 1)\n", | ||
" + formualte_A1(\"K^{*}_0(1430)^+\", 0)\n", | ||
" + formualte_A1(\"K^{*}_0(700)\", 0)\n", | ||
" + formualte_A1(\"K^{*}_2(1430)\", 2)\n", | ||
" + formualte_A1(\"K^{*}_3(1780)\", 3)\n", | ||
" + formualte_A1(\"K^{*}_4(2045)\", 4)\n", | ||
")\n", | ||
"A1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to be automated, i.e., some loop over the formulate_A1()
is more something like formulate_chain_amplitude_a1()
and formulate_a1()
creates the coherent sum of those chain amplitudes.
" r\"s_{31} m_{\\Sigma^*} \\Gamma_{\\Sigma^*} C_{\\Sigma^*}\"\n", | ||
")\n", | ||
"theta31, phi31, delta = sp.symbols(r\"theta_31 phi_31 \\delta_{\\lambda_\\Sigma^*1/2}\")\n", | ||
"d_s = sp.Function(r\"d_{\\lambda_\\Sigma^*1/2}^{1/2}\")\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with Wigner.d
and use directly inline in the expression definition
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"A1 = (\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful not to overwrite the previous A1
definition. This should be the A1_expr
, or even something like a mapping of sp.Symbol
to sp.Expr
as dictionary. Something like:
amplitudes = {}
amplitudes[A1[-half, +half]] = formulate_A1(...) + ...