EGSnrc C++ class library
Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
|
A monoenergetic particle spectrum. More...
Public Member Functions | |
EGS_MonoEnergy (EGS_Float energy) | |
Construct a monoenergetic spectrum with energy energy. | |
EGS_Float | expectedAverage () const |
EGS_Float | maxEnergy () const |
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 | storeState (ostream &data_out) const |
Store the state of the spectrum object into the stream data_out. More... | |
virtual bool | setState (istream &data_in) |
Set the state of the spectrum object from the data in the stream data_in. More... | |
virtual bool | addState (istream &data_in) |
Add to the state of this object the data from the stream data_in. More... | |
virtual void | resetCounter () |
Reset the state of this spectrum object. 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 *) |
Protected Attributes | |
EGS_Float | E |
The spectrum energy. | |
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. | |
Additional Inherited Members | |
Static Public Member Functions inherited from EGS_BaseSpectrum | |
static EGS_BaseSpectrum * | createSpectrum (EGS_Input *inp) |
Create and return a pointer to a spectrum object from the information pointed to by inp. More... | |
A monoenergetic particle spectrum.
A monoenergetic spectrum is defined in the input file via
:start spectrum: type = monoenergetic energy = the kinetic energy of the particles :stop spectrum:
Definition at line 83 of file egs_spectra.cpp.