37 #ifndef EGS_RADIONUCLIDE_SOURCE_
38 #define EGS_RADIONUCLIDE_SOURCE_
54 #ifdef BUILD_RADIONUCLIDE_SOURCE_DLL
55 #define EGS_RADIONUCLIDE_SOURCE_EXPORT __declspec(dllexport)
57 #define EGS_RADIONUCLIDE_SOURCE_EXPORT __declspec(dllimport)
59 #define EGS_RADIONUCLIDE_SOURCE_LOCAL
63 #ifdef HAVE_VISIBILITY
64 #define EGS_RADIONUCLIDE_SOURCE_EXPORT __attribute__ ((visibility ("default")))
65 #define EGS_RADIONUCLIDE_SOURCE_LOCAL __attribute__ ((visibility ("hidden")))
67 #define EGS_RADIONUCLIDE_SOURCE_EXPORT
68 #define EGS_RADIONUCLIDE_SOURCE_LOCAL
280 if (!baseSource->deref()) {
284 for (vector<EGS_RadionuclideSpectrum * >::iterator it =
286 it!=decays.end(); it++) {
295 int &q,
int &latch, EGS_Float &E, EGS_Float &wt,
305 return (ishower+1)*(baseSource->getFluence()/sCount);
320 return experimentTime;
328 unsigned int getEmissionType()
const {
334 egsInformation(
"\n======================================================\n");
336 for (
unsigned int i=0; i<decays.size(); ++i) {
337 decays[i]->printSampledEmissions();
340 egsInformation(
"======================================================\n\n");
391 vector<int> q_allowed;
392 vector<EGS_RadionuclideSpectrum *> decays;
396 bool disintegrationOccurred;
403 unsigned int emissionType;
EGS_BaseSpectrum implementation and several concrete spectra.
EGS_BaseSource class header file.
EGS_Vector methods for the manipulation of 3D vectors in cartesian co-ordinates.
double getTime() const
Returns the emission time of the most recent particle.
A class representing 3D vectors.
virtual bool addState(istream &data_in)
Add data from the stream data_in to the source state.
void printSampledEmissions()
Outputs the emission stats of the spectra.
virtual void resetCounter()
Reset the source state.
virtual bool storeState(ostream &data_out) const
Store the source state into the stream data_out.
Base random number generator class. All random number generators should be derived from this class...
double getExperimentTime() const
Get the total possible length of the experiment that is being modelled.
EGS_RandomGenerator class header file.
virtual bool setState(istream &data_in)
Set the source state based on data from the stream data_in.
EGS_Float getFluence() const
Returns the current fluence (number of disintegrations)
EGS_InfoFunction EGS_EXPORT egsInformation
Always use this function for reporting the progress of a simulation and any other type of information...
EGS_BaseShape and shape classes header file.
~EGS_RadionuclideSource()
Destructor.
Attempts to fix broken math header files.
EGS_I64 getShowerIndex() const
Returns the shower index of the most recent particle.
bool isValid() const
Checks the validity of the source.
virtual EGS_I64 getNextParticle(EGS_RandomGenerator *rndm, int &q, int &latch, EGS_Float &E, EGS_Float &wt, EGS_Vector &x, EGS_Vector &u)=0
Sample the next source particle from the source probability distribution.
EGS_Float getEmax() const
Returns the maximum energy out of all the spectra.
EGS_BaseGeometry class header file.
EGS_Application class header file.
Base class for advanced EGSnrc C++ applications.
Base source class. All particle sources must be derived from this class.