37 Decay Processes
This section describes how OPALX models the spontaneous decay of unstable charged particles along the trajectory. Two channels are currently implemented: charged pion decay \(\pi^\pm \to \mu^\pm + \nu_\mu\) (two-body, Section 37.3) and muon decay \(\mu^\pm \to e^\pm + \nu + \bar\nu\) (three-body, polarized, Section 37.4). Both samplers share a common timing kernel (Section 37.2) and a common Lorentz boost to the lab frame (Section 37.5).
Decay is a global process, applied once per tracker step to every beam that sets GLOBALPROCESSES={DECAY}. The input rules are listed in Beam Definitions.
37.1 Place in the time step
One time step runs in this order:
- first half drift, field evaluation, first spin half-step;
- Boris kick, second spin half-step, second half drift;
- decay of every beam with
DECAY, in the order ofTRACK.BEAMS, using the tracker time step \(\Delta t\); - deletion of the decayed parents.
A daughter starts at its parent’s position at the end of the step and takes the parent’s time step. It is created on the same MPI rank, in the beam named by the parent’s DAUGHTERBEAM. That beam uses the reference particle and frame of the first beam of its decay chain, so the daughter needs no change of frame. Daughters are first moved in the next step. Because beams are handled in TRACK.BEAMS order, a muon created by a pion decay can itself decay in the same step if the muon beam is listed after the pion beam.
Without DAUGHTERBEAM, decayed parents are only removed.
Decays add no column to the .stat file and are not written to a loss file. The beam’s particle count drops, and at --info 2 the log reports the number of particles deleted by global processes in each step.
37.2 Decay timing: relativistic Markov law
For each particle, the per-step decay probability follows the relativistic Markov law: time dilation extends the rest-frame lifetime \(\tau_0\) to a lab-frame lifetime \(\gamma\tau_0\), and the exponential survival function gives \[ p_{\text{decay}}(\Delta t) = 1 - \exp\!\big({-\Delta t}\big/{\gamma\,\tau_0}\big), \tag{37.1}\] where \(\gamma = \sqrt{1 + |\vec P|^2}\) is computed per-particle from the stored momentum \(\vec P\) in \(\beta\gamma\) units. Each step OPALX draws \(u \sim U(0,1)\) and marks the particle for decay if \(u < p_{\text{decay}}\); the parent is then collected into a compact view (alongside its position, momentum, and, when spin tracking is active, polarization) before daughters are sampled.
Rest-frame lifetimes used in OPALX (Physics.h):
| Species | \(\tau_0\) [s] | Source |
|---|---|---|
| \(\mu^\pm\) | \(2.1969811\times 10^{-6}\) | [1] |
| \(\pi^\pm\) | \(2.6033\times 10^{-8}\) | [2] |
Note that \(\Delta t\) in Equation 37.1 is the tracker step in lab time, not a proper-time interval; the time-dilation factor \(\gamma\) performs the conversion. For the small per-step decay probabilities typical in storage-ring or beamline applications, \(1 - e^{-x} \approx x\), so this reduces to the familiar \(p \approx \Delta t / (\gamma\tau_0)\). The exponential form is also correct for large \(\Delta t\), but only if \(\gamma\) is constant during the step. OPALX takes \(\gamma\) from the momentum at the end of the step and does not pick a decay time inside the step, so a daughter always starts at the end-of-step position. For signigiant change in the momentum during a timestep, or when the decay position matters, reduce DT. A step with \(\Delta t \le 0\) gives no decays.
37.3 Pion decay: \(\pi^\pm \to \mu^\pm + \nu_\mu\)
37.3.1 Two-body kinematics
The pion is a pseudoscalar (spin \(0\), parity \(-\)). In the pion rest frame, energy-momentum conservation in a two-body decay against a massless neutrino fixes the daughter muon momentum uniquely [3]: \[
p^* = \frac{M_\pi^{\,2} - m_\mu^{\,2}}{2\,M_\pi},
\qquad
E^* = \frac{M_\pi^{\,2} + m_\mu^{\,2}}{2\,M_\pi}.
\tag{37.2}\] Numerically, with the PDG masses in Physics.h, \(p^* \approx 29.79\;\mathrm{MeV}/c\) and \(E^* \approx 109.78\;\mathrm{MeV}\).
37.3.2 Isotropic direction
Since the parent pion is spin-\(0\), the rest-frame decay direction is isotropic. OPALX samples \(\cos\theta^* \sim U(-1, 1)\) and \(\phi^* \sim U(0, 2\pi)\), then constructs the rest-frame momentum \(\vec p^{\,*}_\mu = p^*\,(\sin\theta^*\cos\phi^*, \sin\theta^*\sin\phi^*, \cos\theta^*)\) before boosting.
37.3.3 V-A polarization of the daughter muon
The decay \(\pi \to \mu\,\nu_\mu\) proceeds through the V-A charged current. In the pion rest frame the neutrino is massless and emerges with definite helicity (\(-\) for \(\nu_\mu\), \(+\) for \(\bar\nu_\mu\)). The pion has spin \(0\), so the muon spin points opposite to the neutrino spin. The muon also moves opposite to the neutrino, so it has the same helicity as the neutrino. The resulting muon polarization vector in the muon rest frame is therefore \[ \vec P_\mu = h\,\hat p^{\,*}_\mu, \qquad h = \begin{cases} +1 & \text{for}\ \pi^- \to \mu^- \\ -1 & \text{for}\ \pi^+ \to \mu^+ \end{cases} \tag{37.3}\] The convention follows the standard accelerator notation in which positive helicity means \(\vec P\) parallel to the daughter momentum.
Equation 37.3 holds in the muon rest frame reached from the pion rest frame. Pol holds the spin in the muon rest frame reached from the lab frame by one pure boost. For a moving pion the two differ by a rotation, so OPALX transforms the spin as a four-vector. In the pion rest frame the muon spin four-vector is \[
S^{*} = h\,\Big(\frac{p^*}{m_\mu},\;
\frac{E^*}{m_\mu}\,\hat p^{\,*}_\mu\Big),
\tag{37.4}\] with \(p^*, E^*\) in units where \(c = 1\). \(S^{*}\) is boosted to the lab frame with the pion velocity \(\vec\beta\) (Equation 37.14 applied to \((S^{*0}, \vec S^{\,*})\)), which gives \(S = (S^0, \vec S)\). The stored polarization is then \[
\vec P_\mu = \vec S - \frac{S^0}{\gamma_\mu + 1}\,\vec u_\mu ,
\tag{37.5}\] where \(\vec u_\mu\) is the muon lab momentum in \(\beta\gamma\) units and \(\gamma_\mu = \sqrt{1 + |\vec u_\mu|^2}\). For a pion at rest this reduces to \(\vec P_\mu = h\,\hat p^{\,*}_\mu\).
37.4 Muon decay: \(\mu^\pm \to e^\pm + \nu + \bar\nu\)
Muon decay is a three-body weak process. With two unobserved neutrinos, the daughter electron is described by a non-trivial joint energy-angle distribution. OPALX uses the V-A Michel distribution [4] with the electron mass set to zero in the spectrum shape and no radiative corrections. The electron mass enters only through the lower limit \(x_{\min}\) below and through the momentum \(|\vec p| = \sqrt{E_e^2 - m_e^2}\). The electron polarization is not tracked, and the neutrinos are not created.
37.4.1 Energy marginal: Michel spectrum
Define the reduced electron energy \(x = 2\,E_e / m_\mu \in [0, 1]\). The energy marginal of the differential decay rate is the Michel spectrum, \[ f(x) = 2\,x^2\,(3 - 2x), \qquad x \in [x_{\min}, 1], \tag{37.6}\] with the kinematic threshold \(x_{\min} = m_e / (m_\mu / 2) \approx 9.7\times 10^{-3}\). The spectrum peaks at \(x = 1\) with \(f_{\max} = 2\). OPALX samples \(x\) by rejection against this upper bound. Because \(x\) starts at \(x_{\min}\) and not at \(0\), the integral of \(f\) over this range is \[ Z = \int_{x_{\min}}^{1} f(x)\,dx = 1 - 2x_{\min}^3 + x_{\min}^4 , \tag{37.7}\] slightly below \(1\), and the normalized spectrum is \(f/Z\).
37.4.2 Joint distribution and the V-A asymmetry
For a muon with rest-frame polarization vector \(\vec P\), the joint differential rate factorizes in the standard V-A form [4] \[
\frac{d\Gamma}{dx\,d\!\cos\theta}
\;\propto\; f(x)\,\big[\,1 + \alpha(x)\,\cos\theta\,\big],
\tag{37.8}\] where \(\theta\) is the angle between the electron momentum and \(\hat{\vec P}\) in the muon rest frame, and the asymmetry coefficient is \[
\alpha(x) = s\,|\vec P|\;\frac{2x - 1}{3 - 2x},
\qquad
s = \begin{cases} +1 & \text{for}\ \mu^+ \\ -1 & \text{for}\ \mu^- \end{cases}
\tag{37.9}\] The sign \(s\) follows from the V-A coupling: for \(\mu^+\) the high-energy positron is preferentially emitted along \(\hat{\vec P}\), while for \(\mu^-\) the high-energy electron prefers the opposite direction. OPALX takes the sign from the parent beam’s CHARGE.
37.4.3 Inverse-CDF sampling of \(\cos\theta\)
The conditional Equation 37.8 is linear in \(\cos\theta\), so the conditional CDF is quadratic and explicitly invertible. Writing \(c \equiv \cos\theta\), the normalized conditional density on \([-1, 1]\) is \[ p(c \mid x, \vec P) = \tfrac{1}{2}\,(1 + \alpha\,c), \tag{37.10}\] with CDF \[ F(c) = \tfrac{1}{2}(c + 1) + \tfrac{\alpha}{4}(c^2 - 1) . \tag{37.11}\] For \(u \sim U(0, 1)\), setting \(F(c) = u\) gives the quadratic \[ \frac{\alpha}{4}\,c^{2} + \frac{1}{2}\,c + \Big(\frac{1}{2} - \frac{\alpha}{4} - u\Big) = 0, \tag{37.12}\] solved analytically and the root in \([-1, 1]\) selected. The degenerate limit \(\alpha \to 0\) (unpolarized muon or zero V-A asymmetry at \(x = \tfrac{1}{2}\)) recovers the uniform sampling \(c = 2u - 1\), as expected.
The azimuth \(\phi\) around \(\hat{\vec P}\) is uniform on \([0, 2\pi)\), and the rest-frame electron momentum direction in the \(\hat{\vec P}\)-aligned local frame is \((\sin\theta\cos\phi, \sin\theta\sin\phi, \cos\theta)\). A single rotation taking \(\hat z \to \hat{\vec P}\) then realigns this vector with the Cartesian axes the polarization vector itself is referenced to (the bunch-frame axes, the same as the momentum’s, see the spin-tracking section); the rotated rest-frame momentum is fed to the Lorentz boost of the next section.
37.5 Lorentz boost to the lab frame
Both decay samplers share the same lab-frame boost. With the parent momentum stored as \(\vec P_{parent}\) in \(\beta\gamma\) (dimensionless) units, \[ \gamma = \sqrt{1 + |\vec P_{parent}|^{2}}, \qquad \vec\beta = \frac{\vec P_{parent}}{\gamma}, \tag{37.13}\] the spatial part of the daughter four-momentum boosts as \[ \vec p_{\,\text{lab}} = \vec p_{\,\text{RF}} + \Bigg[ \frac{(\gamma - 1)\,\vec\beta \cdot \vec p_{\,\text{RF}}}{\beta^{\,2}} + \gamma\,E_{\text{RF}} \Bigg]\,\vec\beta . \tag{37.14}\] The energy \(E_{\text{RF}}\) is the daughter rest-frame energy (\(E_e = x\,m_\mu/2\) for muon decay, \(E^*\) from Equation 37.2 for pion decay). At storage, OPALX writes the daughter momentum back in \(\beta\gamma\) units of the daughter species mass: \(\vec P_{\,\text{daughter}} = \vec p_{\,\text{lab}} / m_d\), so that the downstream Boris pusher and T-BMT pusher consume it without unit conversion.
The polarization of the daughter muon from pion decay is boosted with the same formula, as described in Section 37.3. For muon decay the daughter electron polarization is not stored, but the muon decay sampler needs the parent polarization, which is read from the muon container’s polarization view at decay time.
37.6 Numerical implementation
The runtime cost of the decay process is dominated by the rejection sampling of the Michel spectrum; everything else is closed-form.
- Decay flagging. OPALX performs a per-particle Bernoulli draw against Equation 37.1. Survivors retain their state, and marked particles are compacted into a dense view of \((\vec R, \vec P, \Delta t, \vec P_{\text{pol}})\) tuples by a Kokkos parallel scan.
- Michel \(x\). \(x\) is drawn uniformly on \([x_{\min}, 1]\) and accepted with probability \(f(x)/f_{\max}\), with \(f_{\max} = 2\). The fraction of draws accepted is \(Z/[2(1 - x_{\min})]\), about one half.
- Muon \(\cos\theta\). Closed-form root of Equation 37.12 — no rejection, no iteration.
- Pion \(\cos\theta\). A single uniform draw.
- Daughter momentum. Stored as \(\vec P_{\text{daughter}} = \vec p_{\,\text{lab}} / m_d\), consistent with the rest of OPALX’s \(\beta\gamma\) convention.
Random numbers come from one Kokkos XorShift64_Pool per decaying beam, used both to select the decaying particles and to sample the daughters. Its seed is \[
\text{seed} = s_0 + 104729\,(i_{\text{beam}} + 1) + 8191\,(i_{\text{rank}} + 1),
\] where \(s_0\) is OPTION, SEED, or \(1234567\) when SEED = -1, \(i_{\text{beam}}\) is the position of the beam in TRACK.BEAMS and \(i_{\text{rank}}\) is the MPI rank. Unlike other random draws, SEED = -1 therefore gives a fixed seed for decay. The result depends on the number of MPI ranks and on how the particles are divided among them.
37.7 Validation
The samplers are verified by unit tests that compare \(10^{4}\)–\(10^{6}\) generated daughters against the analytic forms above.
Pion decay. TestPionDecaySpectrum.cpp checks that every daughter muon has \(|\vec p| = p^*\) from Equation 37.2 within machine precision, that the rest-frame \(\cos\theta\) histogram is statistically uniform on \([-1, 1]\) (verifying the spin-\(0\) assumption), and that the lab-frame energy spectrum after a boost along \(\hat z\) is a flat box on \([E_-, E_+]\) with endpoints \(E_\pm = \gamma E^* \pm \beta\gamma\,p^*\).
Muon decay. TestMuonDecaySpectrum.cpp decays \(10^5\) fully polarized muons at rest, with \(x\) sampled from the full Michel spectrum. It compares the daughter \(\cos\theta\) histogram with \(\tfrac12(1 + A\,c)\), where \(A\) is \(\alpha(x)\) of Equation 37.9 averaged over \(x \in [x_{\min}, 1]\), \[ A = s\,|\vec P|\, \frac{\tfrac13 + \tfrac23 x_{\min}^3 - x_{\min}^4}{Z} , \] with \(Z\) from Equation 37.7. Since \(x_{\min}\) is small, \(A\) is close to \(s\,|\vec P|/3\). The test also checks that the mean \(\cos\theta\) has the sign of the muon charge. It runs for \(\mu^-\) and \(\mu^+\). TestMuonDecay.cpp checks the Michel spectrum and its limits.
Decay process. TestDecay.cpp checks the decay law and its momentum dependence, reproducibility with the same seed, removal without a daughter beam, daughter position and count, that daughter muons from moving pions satisfy \(E^2 = p^2 + m_\mu^2\), the daughter species check, and the pion-daughter spin of Equation 37.5. TestDecayChain.cpp checks how decay chains are resolved from
DAUGHTERBEAMand that invalid settings are rejected.
These tests run as part of the ctest suite.