EGSnrc C++ class library  Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
Public Member Functions | Protected Member Functions | List of all members
EGS_RadionuclideSpectrum Class Reference

A radionuclide spectrum. More...

Inheritance diagram for EGS_RadionuclideSpectrum:
EGS_BaseSpectrum

Public Member Functions

 EGS_RadionuclideSpectrum (const string nuclide, const string ensdf_file, const EGS_Float relativeActivity, const string relaxType, const string outputBetaSpectra, const bool scoreAlphasLocally, const bool allowMultiTransition)
 Construct a radionuclide spectrum.
 
 ~EGS_RadionuclideSpectrum ()
 Destructor.
 
EGS_Float maxEnergy () const
 Returns the maximum energy that may be emitted. More...
 
int getCharge () const
 Get the charge of the most recent emission.
 
double getTime () const
 Get the emission time of the most recent emission.
 
EGS_I64 getShowerIndex () const
 Get the shower index of the most recent emission.
 
EGS_Float getEdep () const
 Get energy that should be deposited locally from relaxations/alphas.
 
EGS_Float getSpectrumWeight () const
 Get the relative weight assigned to this spectrum.
 
void setSpectrumWeight (EGS_Float newWeight)
 Set the relative weight assigned to this spectrum.
 
unsigned int getEmissionType () const
 Get the emission type of the most recent source particle. More...
 
void printSampledEmissions ()
 Print the sampled emission intensities.
 
bool storeState (ostream &data) const
 
bool setState (istream &data)
 
void resetCounter ()
 
- Public Member Functions inherited from EGS_BaseSpectrum
 EGS_BaseSpectrum ()
 Constructor. More...
 
virtual ~EGS_BaseSpectrum ()
 Destructor. Does nothing.
 
const string & getType () const
 Get the spectrum type. More...
 
EGS_Float sampleEnergy (EGS_RandomGenerator *rndm)
 Sample a particle energy. More...
 
virtual bool addState (istream &data_in)
 Add to the state of this object the data from the stream data_in. More...
 
void getSampledAverage (EGS_Float &e, EGS_Float &de) const
 Get the average sampled energy and its statistical uncertainty. More...
 
void reportAverageEnergy () const
 Report the average energy (expected and actually sampled). More...
 

Protected Member Functions

EGS_Float sample (EGS_RandomGenerator *rndm)
 Sample an event from the spectrum, returns the energy of the emitted particle.
 
EGS_Float expectedAverage () const
 Not implemented - returns 0.
 

Additional Inherited Members

- Static Public Member Functions inherited from EGS_BaseSpectrum
static EGS_BaseSpectrumcreateSpectrum (EGS_Input *inp)
 Create and return a pointer to a spectrum object from the information pointed to by inp. More...
 
- Protected Attributes inherited from EGS_BaseSpectrum
EGS_I64 count
 Number of times the sampleEnergy() method was called.
 
double sum_E
 Sum of energies sampled so far.
 
double sum_E2
 Sum of energies squared sampled so far.
 
string type
 A short string describing the spectrum that must be set by derived classes.
 

Detailed Description

A radionuclide spectrum.

Generates spectra for radionuclide emissions. This spectrum type is used by EGS_RadionuclideSource. Currently spectrum data is obtained from ENSDF format data files using EGS_Ensdf. These files can be found in $HEN_HOUSE/spectra/lnhb/ensdf/. For more information about the ENSDF format and how it is processed, see EGS_Ensdf.

It is defined using the following input

:start spectrum:
    type            = radionuclide
    nuclide         = name of the nuclide (e.g. Sr-90), used to look up the
                        ensdf file as $HEN_HOUSE/spectra/lnhb/ensdf/{nuclide}.ensdf
                        if ensdf file not provided below
    ensdf file      = [optional] path to a spectrum file in ensdf format,
                        including extension
    relative activity = [optional] the relative activity (sampling
                        probability) for this nuclide in a mixture
    atomic relaxations = [optional, default=eadl] eadl, ensdf or off
                                 By default, 'eadl' relaxations use the EGSnrc
                                 algorithm for emission correlated with
                                 disintegration events. Alternatively, 'ensdf'
                                 relaxations statistically sample fluorescent
                                 photons and Auger emission using comments
                                 in the ensdf file. Turning this option off
                                 disables all relaxations resulting from
                                 radionuclide disintegration events.
    output beta spectra = [optional, default=no] yes or no
                            whether or not to output beta spectra to files.
                            Files will be named based on the nuclide and
                            maximum energy of the beta decay:
                            {nuclide}_{energy}.spec
    alpha scoring       = [optional, default=none] none or local
                            Whether or not to deposit alpha particles locally.
                            Since alpha particles are not transported in EGSnrc,
                            there are only two options. Either discard the alpha
                            particles and their energy completely, or deposit
                            the energy immediately after creation in the
                            local region.
    extra transition approximation = [optional, default=off] off or on
                            If the intensity away from a level in a radionuclide
                            daughter is larger than the intensity feeding the
                            level (e.g. decays to that level), then additional
                            transitions away from that level will be sampled if
                            this approximation is on.
                            They will not be correlated with decays, but the
                            spectrum will produce emission rates to match both
                            the decay intensities and the internal transition
                            intensities from the ensdf file.
:stop spectrum:
:start spectrum:
    type                = radionuclide
    nuclide             = name of next nuclide in mixture (e.g. Y-90)
    relative activity   = ...
:stop spectrum:

The source spectrum determines which emission type occurs, and proceeds to sample the emission parameters. In some cases, no particle is emitted - this state is signaled by returning zero. The spectrum either models a disintegration, an internal transition or the emission of Auger/fluorescence from relaxations.

The printSampledEmissions() function is provided for evaluating how the decay emissions actually end up sampled by the source. The function prints the signature energy and emission intensity of each emission type for the radionuclide. The intensity is the ratio of the number of emissions of that type sampled and the total fluence, multiplied by 100. This provides units comparable to intensities in ensdf files (intensity per 100 disintegrations). To add this output following the simulation, it will be necessary to edit runSimulation() in the application (e.g. in egs_chamber.cpp). At the end of runSimulation(), add a line such as source->printSampledEmissions();.

Definition at line 1018 of file egs_spectra.cpp.

Member Function Documentation

EGS_Float EGS_RadionuclideSpectrum::maxEnergy ( ) const
virtual

Returns the maximum energy that may be emitted.

Returns the maximum energy expected from the radionuclide. If correlated relaxations are turned on (e.g. eadl relaxations), note that they are not considered in this. Relaxation emissions from the ENSDF file are considered.

Implements EGS_BaseSpectrum.

Definition at line 1140 of file egs_spectra.cpp.

unsigned int EGS_RadionuclideSpectrum::getEmissionType ( ) const

Get the emission type of the most recent source particle.

0: No event occurred 1: Atomic relaxation particle (correlated with decay) 2: Internal transition gamma 3: Conversion electron 4: Electron capture 5: Beta+ decay 6: Beta- decay 7: Alpha decay 8: Metastable decay 9: X-Ray (uncorrelated, from ENSDF) 10: Auger electron (uncorrelated, from ENSDF) 11: Uncorrelated internal transition gamma 12: Uncorrelated conversion electron 13: Internal pair production 14: Uncorrelated internal pair production

Definition at line 1192 of file egs_spectra.cpp.


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