ComPWA / ampform

Automatically generate symbolic amplitude models for Partial Wave Analysis
https://ampform.rtfd.io
Apache License 2.0
11 stars 6 forks source link

Reconsider amplitude builder design to improve implementation of spin alignment #318

Open redeboer opened 2 years ago

redeboer commented 2 years ago
### Requirements
- [ ] https://github.com/ComPWA/ampform/issues/281

To-do [WIP]

Problem description

The latest (unreleased) implementation of Dalitz-plot decomposition (https://github.com/ComPWA/ampform/pull/307) makes use of the existing HelicityAmplitudeBuilder. This is problematic, because the choice of spin alignment method influences the way the 'unaligned' amplitudes are formulated. In particular, in the case of DPD, there should be no 'isobar Wigner-D'.

Here's an attempt to summarize the processes that go on when calling HelicityAmplitudeBuilder.formulate():

Example

All in all, as of 148c8c9, this results in the following amplitudes, using NoAlignment and DalitzPlotDecomposition[^3]:

import ampform
import qrules
from ampform.helicity.align import NoAlignment

reaction = qrules.generate_transitions(
    initial_state=("J/psi(1S)", [-1, +1]),
    final_state=["K0", "Sigma+", "p~"],
    allowed_intermediate_particles=["Sigma(1660)", "N(1650)"],
    allowed_interaction_types=["strong"],
    formalism="helicity",
)

builder = ampform.get_builder(reaction)
builder.config.spin_alignment = NoAlignment()
builder.config.use_helicity_couplings = True
non_aligned_model = builder.formulate()
non_aligned_model.intensity

no-alignment-intensity

non_aligned_model.amplitudes

no-alignment-amplitudes

For DPD, the reaction needs to be relabeled:[^4]

from ampform.helicity.align.dpd import DalitzPlotDecomposition, relabel_edge_ids

reaction_123 = relabel_edge_ids(reaction)
builder_123 = ampform.get_builder(reaction_123)
builder_123.config.spin_alignment = DalitzPlotDecomposition(reference_subsystem=1)
builder_123.config.use_helicity_couplings = True
dpd_model = builder_123.formulate()
dpd_model.intensity

dpd-intensity

dpd_model.amplitudes

dpd-amplitudes

Note that the choice for DPD does not affect the individual amplitudes. This is incorrect, if I understand @mmikhasenko correctly. In combination with #309, this points in the direction of a fundamental design problem, namely the assumption that the choice of 'spin alignment method' does not affect the form of the 'unaligned' amplitudes.

Related issues

[^1]: This causes the need for 'spin alignment'. [^2]: The CanonicalAmplitudeBuilder forms an extension of the HelicityAmplitudeBuilder class that (only) inserts Clebsch-Gordan coefficients (formulate_clebsch_gordan_coefficients()). Amplitude $\mathcal{A}^R$ then becomes a sum over all allowed $LS$-couplings for $0 \to R (\to 12) 3$ with two CG coefficients for each node (four in the case of a three-body decay). [^3]: Yes, there is a minor bug in the second set of summations, see https://github.com/ComPWA/ampform/issues/309. [^4]: The relabeled reactions look as follows:

| Standard labeling | DPD labeling |
|---|---|
| ![reaction](https://user-images.githubusercontent.com/29308176/182376650-00d3c713-b2d2-4491-9d92-a605e5ecfa4f.svg) | ![reaction123](https://user-images.githubusercontent.com/29308176/182376653-9e681178-4f78-4a7e-99ee-78f22955856e.svg) |
redeboer commented 2 years ago

Tagging @spflueger here as well, who knows more about the implementation for symmetrization [code] and "parity prefactor" [code] (see also #284).

redeboer commented 2 years ago

Conclusion after discussion with @spflueger: write a new builder for DPD and don't let this work through dependency injection (spin_alignment member). A core method seems to be _formulate_partial_decay(), which is overwritten by CanonicalAmplitudeBuilder. If this could somehow be made into a function or separate interface, we can also get of this risky inheritance-in-order-to-share-functionality.