OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
PionDecay Class Reference

Charged pion decay: pi -> mu + nu_mu (two-body). More...

#include <PionDecay.h>

Inheritance diagram for PionDecay:
Inheritance graph
Collaboration diagram for PionDecay:
Collaboration graph

Public Member Functions

 PionDecay (double restLifetimeSeconds, std::size_t containerIndex, double parentMassGeV, int parentChargeSign)
 
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) override
 Create daughter particles from collected parent data.
 
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
 
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
 

Detailed Description

Charged pion decay: pi -> mu + nu_mu (two-body).

Note
In the parent rest frame the daughter momentum is fixed: p = (M_pi^2 - m_mu^2) / (2 M_pi), with isotropic direction. Daughters are Lorentz-boosted to the lab frame.

Definition at line 14 of file PionDecay.h.

Constructor & Destructor Documentation

◆ PionDecay()

PionDecay::PionDecay ( double  restLifetimeSeconds,
std::size_t  containerIndex,
double  parentMassGeV,
int  parentChargeSign 
)
inline

Definition at line 16 of file PionDecay.h.

References Decay::allowedDaughterSpecies_m, and ParticleProperties::getParticleType().

Here is the call graph for this function:

Member Function Documentation

◆ apply()

◆ collectDecayedParents()

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 
)
inherited

Gather R/P/dt of parents marked for decay into compact views.

Note
Uses no class state, so no capture shields are needed; still a member for organizational grouping with markDecayedParticles.

Definition at line 115 of file Decay.cpp.

Referenced by Decay::apply().

◆ createDaughterParticles()

void PionDecay::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 
)
overridevirtual

Create daughter particles from collected parent data.

Note
Called only when daughterPC_m is set and localDestroyNum > 0. Subclasses implement the physics-specific momentum sampling here. Must be public because device compilers require that a Kokkos lambda's enclosing member function has public access.

Implements Decay.

Definition at line 6 of file PionDecay.cpp.

References Decay::daughterMassGeV_m, Decay::daughterPC_m, Decay::parentChargeSign_m, Decay::parentMassGeV_m, Physics::pi, and Decay::randPool_m.

◆ markDecayedParticles()

ippl::detail::size_type Decay::markDecayedParticles ( ippl::detail::size_type  nLocal,
double  dt,
Kokkos::View< ippl::Vector< double, 3 > * >  Pview,
Kokkos::View< bool * >  decayed 
)
inherited

Mark particles for decay using the relativistic exponential law.

Note
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 Decay::randPool_m, and Decay::tau0_m.

Referenced by Decay::apply().

◆ setDaughterContainer()

void Decay::setDaughterContainer ( std::shared_ptr< ParticleContainer< double, 3 > >  daughterPC,
double  daughterMassGeV 
)
inherited

Set the daughter particle container and its rest mass.

Parameters
daughterPCContainer that receives decay products.
daughterMassGeVRest mass of the daughter particle [GeV].
Note
When set, decayed particles spawn a daughter in daughterPC. When not set (default), decayed particles are marked for deletion.

Definition at line 161 of file Decay.cpp.

References Decay::allowedDaughterSpecies_m, Decay::daughterMassGeV_m, Decay::daughterPC_m, and ParticleProperties::getParticleTypeString().

Here is the call graph for this function:

Member Data Documentation

◆ allowedDaughterSpecies_m

short Decay::allowedDaughterSpecies_m = -1
protectedinherited

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(), and Decay::setDaughterContainer().

◆ daughterMassGeV_m

double Decay::daughterMassGeV_m = 0.0
protectedinherited

Rest mass of the daughter particle [GeV].

Definition at line 111 of file Decay.h.

Referenced by MuonDecay::createDaughterParticles(), createDaughterParticles(), and Decay::setDaughterContainer().

◆ daughterPC_m

std::shared_ptr<ParticleContainer<double, 3> > Decay::daughterPC_m
protectedinherited

Daughter container for decay products (nullptr = destroy-only mode).

Definition at line 104 of file Decay.h.

Referenced by Decay::apply(), MuonDecay::createDaughterParticles(), createDaughterParticles(), and Decay::setDaughterContainer().

◆ parentChargeSign_m

int Decay::parentChargeSign_m
protectedinherited

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 createDaughterParticles().

◆ parentMassGeV_m

double Decay::parentMassGeV_m
protectedinherited

Rest mass of the parent particle [GeV].

Definition at line 114 of file Decay.h.

Referenced by MuonDecay::createDaughterParticles(), and createDaughterParticles().

◆ randPool_m

Kokkos::Random_XorShift64_Pool Decay::randPool_m
protectedinherited

Random pool for decay sampling.

Definition at line 101 of file Decay.h.

Referenced by MuonDecay::createDaughterParticles(), createDaughterParticles(), and Decay::markDecayedParticles().

◆ tau0_m

double Decay::tau0_m
protectedinherited

Mean lifetime at rest [s].

Definition at line 98 of file Decay.h.

Referenced by Decay::apply(), and Decay::markDecayedParticles().


The documentation for this class was generated from the following files: