|
EGSnrc C++ class library
Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
|
A focal spot source. More...
#include <egs_focal_spot_source.h>
Public Member Functions | |
| EGS_FocalSpot (EGS_Input *, EGS_ObjectFactory *f=0) | |
| Constructor All Inputs are read in from the input file non is Construct a focal spot (corresponding to ISOURCE19 in BEAMnrc) with charge Q, spectrum Spec at z-position z_pos that was offset to x x_translation and y x_translation. The gaussian spatial distribution is described by the standard deviation in x sigma_x_space and sigma_y_space. The deviation of directions of motion from the z-axis is given by the angular spread in x by sigma_x_angle and y sigma_y_angle. The angle corresponds to azimuth theta in spherical coordinates. Finally the point of rotation z_point_of_rotation governs the point of rotation (needs to be at behind z position !). .The source object takes ownership of the spectrum. | |
| void | getPositionDirection (EGS_RandomGenerator *rndm, EGS_Vector &x, EGS_Vector &u, EGS_Float &wt) |
| EGS_Float | getFluence () const |
| bool | storeFluenceState (ostream &) const |
| bool | setFluenceState (istream &) |
| bool | isValid () const |
Public Member Functions inherited from EGS_BaseSimpleSource | |
| EGS_BaseSimpleSource (int Q, EGS_BaseSpectrum *Spec, const string &Name="", EGS_ObjectFactory *f=0) | |
| Constructor. More... | |
| EGS_BaseSimpleSource (EGS_Input *input, EGS_ObjectFactory *f=0) | |
| Construct a 'simple' particle source from the information pointed to by input. More... | |
| ~EGS_BaseSimpleSource () | |
| Destructor. More... | |
| virtual EGS_I64 | getNextParticle (EGS_RandomGenerator *rndm, int &Q, int &latch, EGS_Float &E, EGS_Float &wt, EGS_Vector &x, EGS_Vector &u) |
| Sample the next source particle from the source probability distribution. More... | |
| virtual EGS_Float | getEmax () const |
| Get the maximum energy of the source. More... | |
| int | getCharge () const |
| Get the charge of the source. More... | |
| virtual bool | storeState (ostream &data_out) const |
| Store the source state to the data stream data_out. More... | |
| virtual bool | addState (istream &data) |
| Add the source state from the stream data to the current state. More... | |
| virtual void | resetCounter () |
| Reset the source to a state with zero sampled particles. More... | |
| virtual bool | addFluenceData (istream &data) |
| Add fluence data from the stream data to the current state. More... | |
| virtual void | resetFluenceCounter () |
| Reset the data related to the sampling of positions and directions to a state with zero sampled particles. More... | |
| virtual bool | setState (istream &data) |
| Set the source state according to the data in the stream data. More... | |
Public Member Functions inherited from EGS_BaseSource | |
| EGS_BaseSource (const string &Name="", EGS_ObjectFactory *f=0) | |
| Construct a source named Name. | |
| EGS_BaseSource (EGS_Input *input, EGS_ObjectFactory *f=0) | |
| Construct a source from the input pointed to by inp. More... | |
| const char * | getSourceDescription () const |
| Get a short description of this source. More... | |
| virtual void | setSimulationChunk (EGS_I64 nstart, EGS_I64 nrun, int npar, int nchunk) |
| Set the next simulation chunk to start at nstart and to consist of nrun particles. More... | |
| virtual void | printSampledEmissions () |
| Print statistics on what was sampled from the source. | |
| virtual vector< EGS_Ensdf * > | getRadionuclideEnsdf () |
| Get the radionuclide ENSDF object from the source. More... | |
| EGS_Float | getTimeIndex () |
| void | setTimeIndex (EGS_Float temp_time) |
| virtual void | containsDynamic (bool &hasdynamic) |
Public Member Functions inherited from EGS_Object | |
| EGS_Object (const string &Name="", EGS_ObjectFactory *f=0) | |
| Create an EGS_Object named Name belonging to the object factory f. More... | |
| EGS_Object (EGS_Input *inp, EGS_ObjectFactory *f=0) | |
| Create an EGS_Object from the information pointed to by inp that belongs to object factory f. More... | |
| const string & | getObjectName () const |
| Get the object name. | |
| void | setObjectName (const string &Name) |
| Set the object name to Name. | |
| const string & | getObjectType () const |
| Get the object type. | |
| virtual EGS_Object * | createObject (EGS_Input *inp) |
| Create an object from the infromation pointed to by inp. More... | |
| void | setName (EGS_Input *inp) |
| Set the name of the object from the information provided by inp. More... | |
| int | ref () |
| Increase the reference count to this object. | |
| int | deref () |
| Decrease the reference count to this object. | |
| void | setFactory (EGS_ObjectFactory *f) |
| Set the factory to which the object belongs. More... | |
Protected Member Functions | |
| void | setUp () |
| Sets up the source type and description. | |
Protected Member Functions inherited from EGS_BaseSimpleSource | |
| virtual void | setLatch (int &latch) |
Protected Attributes | |
| int | angle_mode |
| rotation about z_point_of_rotation | |
| EGS_AffineTransform | rotation |
Protected Attributes inherited from EGS_BaseSimpleSource | |
| int | q |
| The charge of this simple source. | |
| EGS_BaseSpectrum * | s |
| The energy spectrum of this source. | |
| string | type |
| A short description of the source type. | |
| EGS_I64 | count |
| Number of statistically independent particles delivered so far. | |
Protected Attributes inherited from EGS_BaseSource | |
| string | description |
| A short source description. More... | |
| EGS_Float | time_index |
| time index corresponding to a particle. This stores the current time index for all objects in the simulation (with the potential exception of beam and iaea_phsp source) | |
Protected Attributes inherited from EGS_Object | |
| string | name |
| The object name. | |
| string | otype |
| The object type. | |
| int | nref |
| Number of references to the object. | |
| EGS_ObjectFactory * | factory |
| The factory this object belongs to. | |
Static Protected Attributes | |
| static constexpr double | PI = 3.141592653589793 |
| static constexpr double | PI2 = 6.283185307179586 |
| static constexpr double | DEGREE_TO_RAD = 0.017453292519943295 |
| governs angular sampling | |
Additional Inherited Members | |
Static Public Member Functions inherited from EGS_BaseSource | |
| static EGS_BaseSource * | createSource (EGS_Input *) |
| Create sources from the information pointed to by input. More... | |
| static EGS_BaseSource * | getSource (const string &Name) |
| Get a pointer to the source named Name. More... | |
| static void | addKnownSource (EGS_BaseSource *o) |
| Add a known source object to the source factory. More... | |
| static void | addKnownTypeId (const char *name) |
| Add a known source object typeid to the source factory. More... | |
Static Public Member Functions inherited from EGS_Object | |
| static string | getUniqueName (const EGS_Object *o=0) |
| Create and return a unique object name. More... | |
| static void | deleteObject (EGS_Object *o) |
| Delete an object. More... | |
A focal spot source.
A focal spot source is a special case of BEAMnrc's ISOURCE19 which is primarily used for LINAC focal spots.
A simple example:
:start source:
library = egs_focal_spot_source
name = focal_spot_test
z position = 1 # cm
spatial spread x = 0.2 # cm standard deviation always never FWHM
spatial spread y = 0.2 # cm standard deviation always never FWHM
spatial cutoff x = 0.3 # cm particles will not be generated outside [x0-cutoff, x0+cutoff] (optional)
spatial cutoff y = 0.3 # cm particles will not be generated outside [y0-cutoff, y0+cutoff] (optional)
angular spread x = 1.5 # degrees (optional) (standard deviation from z-axis)
angular spread y = 0.9 # degrees (optional) (standard deviation from z-axis)
x translation = 0 # cm (optional)
y translation = 0 # cm (optional)
z of rotation = 0 # cm (optional)
x rotation = 1 # degrees, clockwise when viewed from +x axis
y rotation = 0 # degrees, clockwise when viewed from +y axis
:start spectrum:
definition of the spectrum
:stop spectrum:
charge = -1 or 0 or 1 for electrons or photons or positrons
:stop source:
Definition at line 99 of file egs_focal_spot_source.h.
1.9.1