|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
Abstract base class for particle decay processes. More...
#include <Decay.h>


Classes | |
| struct | DecayedParentViews |
Public Member Functions | |
| Decay (double restLifetimeSeconds, std::size_t containerIndex, double parentMassGeV, int parentChargeSign) | |
| ~Decay () override=default | |
| void | setDaughterContainer (std::shared_ptr< ParticleContainer< double, 3 > > daughterPC, double daughterMassGeV) |
| Set the daughter particle container and its rest mass. | |
| size_t | apply (ParticleContainer< double, 3 > &pc, double dt, long long globalTrackStep, size_t containerIdx) override |
| virtual void | createDaughterParticles (std::size_t localDestroyNum, std::size_t oldDaughterLocal, const Kokkos::View< ippl::Vector< double, 3 > * > &parentR, const Kokkos::View< ippl::Vector< double, 3 > * > &parentP, const Kokkos::View< double * > &parentDt, const Kokkos::View< ippl::Vector< float, 3 > * > &parentPol)=0 |
| Create daughter particles from collected parent data. | |
| ippl::detail::size_type | markDecayedParticles (ippl::detail::size_type nLocal, double dt, Kokkos::View< ippl::Vector< double, 3 > * > Pview, Kokkos::View< bool * > decayed) |
| Mark particles for decay using the relativistic exponential law. | |
| DecayedParentViews | collectDecayedParents (ippl::detail::size_type nLocal, ippl::detail::size_type localDestroyNum, Kokkos::View< bool * > decayed, Kokkos::View< ippl::Vector< double, 3 > * > Rview, Kokkos::View< ippl::Vector< double, 3 > * > Pview, Kokkos::View< double * > dtView, Kokkos::View< ippl::Vector< float, 3 > * > PolView) |
| Gather R/P/dt of parents marked for decay into compact views. | |
Protected Attributes | |
| double | tau0_m |
| Mean lifetime at rest [s]. | |
| Kokkos::Random_XorShift64_Pool | randPool_m |
| Random pool for decay sampling. | |
| std::shared_ptr< ParticleContainer< double, 3 > > | daughterPC_m |
| Daughter container for decay products (nullptr = destroy-only mode). | |
| short | allowedDaughterSpecies_m = -1 |
| double | daughterMassGeV_m = 0.0 |
| Rest mass of the daughter particle [GeV]. | |
| double | parentMassGeV_m |
| Rest mass of the parent particle [GeV]. | |
| int | parentChargeSign_m |
Abstract base class for particle decay processes.
Subclasses implement the physics-specific daughter momentum sampling (e.g. Michel spectrum for muon decay, fixed two-body kinematics for pion decay). If no daughter container is set, decayed particles are simply marked for deletion.
| struct Decay::DecayedParentViews |
Compact views of the kinematics of parents marked for decay. Pol is length-0 when the parent container does not track spin.

| Class Members | ||
|---|---|---|
| View< double * > | dt | |
| View< Vector< double, 3 > * > | P | |
| View< Vector< float, 3 > * > | Pol | |
| View< Vector< double, 3 > * > | R | |
| Decay::Decay | ( | double | restLifetimeSeconds, |
| std::size_t | containerIndex, | ||
| double | parentMassGeV, | ||
| int | parentChargeSign | ||
| ) |
|
overridedefault |
|
overridevirtual |
Implements GlobalProcess.
Definition at line 33 of file Decay.cpp.
References collectDecayedParents(), createDaughterParticles(), daughterPC_m, ParticleContainer< T, Dim >::dt, Decay::DecayedParentViews::dt, ParticleContainer< T, Dim >::hasSpin(), ParticleContainer< T, Dim >::InvalidMask, markDecayedParticles(), ParticleContainer< T, Dim >::P, Decay::DecayedParentViews::P, ParticleContainer< T, Dim >::Pol, Decay::DecayedParentViews::Pol, Decay::DecayedParentViews::R, and tau0_m.

| Decay::DecayedParentViews Decay::collectDecayedParents | ( | ippl::detail::size_type | nLocal, |
| ippl::detail::size_type | localDestroyNum, | ||
| Kokkos::View< bool * > | decayed, | ||
| Kokkos::View< ippl::Vector< double, 3 > * > | Rview, | ||
| Kokkos::View< ippl::Vector< double, 3 > * > | Pview, | ||
| Kokkos::View< double * > | dtView, | ||
| Kokkos::View< ippl::Vector< float, 3 > * > | PolView | ||
| ) |
Gather R/P/dt of parents marked for decay into compact views.
Definition at line 115 of file Decay.cpp.
Referenced by apply().
|
pure virtual |
Create daughter particles from collected parent data.
Implemented in MuonDecay, and PionDecay.
Referenced by apply().
| ippl::detail::size_type Decay::markDecayedParticles | ( | ippl::detail::size_type | nLocal, |
| double | dt, | ||
| Kokkos::View< ippl::Vector< double, 3 > * > | Pview, | ||
| Kokkos::View< bool * > | decayed | ||
| ) |
Mark particles for decay using the relativistic exponential law.
tau0_m and randPool_m are copied into locals before the device kernel so the KOKKOS_LAMBDA captures values — never this. Definition at line 86 of file Decay.cpp.
References randPool_m, and tau0_m.
Referenced by apply().
| void Decay::setDaughterContainer | ( | std::shared_ptr< ParticleContainer< double, 3 > > | daughterPC, |
| double | daughterMassGeV | ||
| ) |
Set the daughter particle container and its rest mass.
| daughterPC | Container that receives decay products. |
| daughterMassGeV | Rest mass of the daughter particle [GeV]. |
daughterPC. When not set (default), decayed particles are marked for deletion. Definition at line 161 of file Decay.cpp.
References allowedDaughterSpecies_m, daughterMassGeV_m, daughterPC_m, and ParticleProperties::getParticleTypeString().

|
protected |
Physically allowed daughter species (short value of ParticleType enum). Subclasses should set this in their constructor; default = ParticleType::UNNAMED (-1).
Definition at line 108 of file Decay.h.
Referenced by MuonDecay::MuonDecay(), PionDecay::PionDecay(), and setDaughterContainer().
|
protected |
Rest mass of the daughter particle [GeV].
Definition at line 111 of file Decay.h.
Referenced by MuonDecay::createDaughterParticles(), PionDecay::createDaughterParticles(), and setDaughterContainer().
|
protected |
Daughter container for decay products (nullptr = destroy-only mode).
Definition at line 104 of file Decay.h.
Referenced by apply(), MuonDecay::createDaughterParticles(), PionDecay::createDaughterParticles(), and setDaughterContainer().
|
protected |
Sign of parent particle. Either +1, 0, -1. Necessary because the Muon decay is charge dependent.
Definition at line 118 of file Decay.h.
Referenced by MuonDecay::createDaughterParticles(), and PionDecay::createDaughterParticles().
|
protected |
Rest mass of the parent particle [GeV].
Definition at line 114 of file Decay.h.
Referenced by MuonDecay::createDaughterParticles(), and PionDecay::createDaughterParticles().
|
protected |
Random pool for decay sampling.
Definition at line 101 of file Decay.h.
Referenced by MuonDecay::createDaughterParticles(), PionDecay::createDaughterParticles(), and markDecayedParticles().
|
protected |
Mean lifetime at rest [s].
Definition at line 98 of file Decay.h.
Referenced by apply(), and markDecayedParticles().