Class NuclearDecay

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class NuclearDecay : public Module

Nuclear decay of unstable nuclei.

This module simulates the nuclear decay of unstable nuclei using data from NuDat2. All decay modes are considered: alpha, beta+- and gamma decay, as well as proton- and neutron dripping. The resulting non-hadronic secondary particles (e+, e-, neutrinos, gamma) can optionally be created.

For details on the preprocessing of the NuDat2 data refer to “CRPropa3-data/calc_decay.py”.

Public Functions

NuclearDecay(bool electrons = false, bool photons = false, bool neutrinos = false, double limit = 0.1)

Constructor.

Parameters:
  • electrons – if true, add secondary photons as candidates

  • photons – if true, add secondary photons as candidates

  • neutrinos – if true, add secondary neutrinos as candidates

  • limit – step size limit as fraction of mean free path

void setLimit(double limit)

Limit the propagation step to a fraction of the mean free path

Parameters:

limit – fraction of the mean free path

void setHaveElectrons(bool b)
void setHavePhotons(bool b)
void setHaveNeutrinos(bool b)
void setInteractionTag(std::string tag)

set a custom interaction tag to trace back this interaction

Parameters:

tag – string that will be added to the candidate and output

std::string getInteractionTag() const
virtual void process(Candidate *candidate) const

Process function This is the main function to work with, it is called during every ModuleList::run step. Derived functions need to override this overload of process!

Parameters:

candidateCandidate raw pointer

void performInteraction(Candidate *candidate, int channel) const
void gammaEmission(Candidate *candidate, int channel) const
void betaDecay(Candidate *candidate, bool isBetaPlus) const
void nucleonEmission(Candidate *candidate, int dA, int dZ) const
double meanFreePath(int id, double gamma)

Return the mean free path. This is not used in the simulation.

Parameters:
  • id – PDG particle id

  • gamma – Lorentz factor of particle

Returns:

The mean free path [in meters]

virtual std::string getDescription() const

Returns description, can be overriden by derived class.

void setDescription(const std::string &description)

Sets description, can be used instead of getDescription in derived class

Parameters:

description – Description string

inline void process(ref_ptr<Candidate> candidate) const

Process function Overload for process function to explicitly make a conversion from ref_ptr to a raw pointer

inline size_t addReference() const
inline size_t removeReference() const
inline int removeReferenceNoDelete() const
inline size_t getReferenceCount() const

Protected Attributes

mutable size_t _referenceCount