OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
TestPionDecaySpectrum.cpp File Reference

Distribution-level tests of PionDecay (deterministic two-body kinematics). More...

#include <gtest/gtest.h>
#include <mpi.h>
#include <array>
#include <cmath>
#include <cstddef>
#include <iostream>
#include <memory>
#include <vector>
#include "Ippl.h"
#include "PartBunch/ParticleContainer.hpp"
#include "Physics/ParticleProperties.h"
#include "Physics/Physics.h"
#include "Processes/GlobalProcesses/PionDecay.h"
#include "SpectrumTestSupport.h"
#include "Utilities/Options.h"
Include dependency graph for TestPionDecaySpectrum.cpp:

Go to the source code of this file.

Detailed Description

Distribution-level tests of PionDecay (deterministic two-body kinematics).

Drives PionDecay::createDaughterParticles through the full ParticleContainer + Kokkos pool pipeline and validates the two-body kinematics of \(\pi^+ \to \mu^+ + \nu_\mu\). The pion is spin-0, so the rest-frame decay direction is isotropic and the daughter momentum magnitude in the pion rest frame is fixed:

\[ p^* = \frac{M_\pi^2 - m_\mu^2}{2\,M_\pi}, \qquad E^* = \frac{M_\pi^2 + m_\mu^2}{2\,M_\pi}. \]

For a pion boosted along \(\hat z\) with \(\gamma, \beta\), the lab-frame daughter energy spectrum is uniform on \([E_-, E_+]\):

\[ E_\pm = \gamma E^* \pm \beta\gamma\,p^*. \]

References:

Tests in this file:

  • PionDecaySpectrumTest::PionDecayRestFrameMomentumIsFixed — with pions at rest, every daughter muon must have \(|\vec p| = p^*\) and the \(\cos\theta\) distribution of the decay direction must be uniform on \([-1, 1]\) (isotropy from the pion's spin-0 nature).
  • PionDecaySpectrumTest::PionDecayBoostedLabEnergyIsFlatBox — with boosted pions ( \(p_z = 5\) in \(\beta\gamma\) units), the lab-frame muon energy spectrum is uniform on \([E_-, E_+]\) from the rest-frame isotropy plus the longitudinal Lorentz boost.

CSVs (consumed by tools/spectrum_plots/plot_spectrum.py):

  • pion_rest_costheta.csv
  • pion_boosted_energy_box.csv

Definition in file TestPionDecaySpectrum.cpp.