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 | Protected Attributes | List of all members
EGS_FanoSource Class Reference

A Fano source. More...

#include <egs_fano_source.h>

Inheritance diagram for EGS_FanoSource:
EGS_BaseSimpleSource EGS_BaseSource EGS_Object

Public Member Functions

 EGS_FanoSource (int Q, EGS_BaseSpectrum *Spec, EGS_BaseShape *Shape, EGS_BaseGeometry *geometry, const string &Name="", EGS_ObjectFactory *f=0)
 Constructor. More...
 
 EGS_FanoSource (EGS_Input *, EGS_ObjectFactory *f=0)
 Constructor. More...
 
void getPositionDirection (EGS_RandomGenerator *rndm, EGS_Vector &x, EGS_Vector &u, EGS_Float &wt)
 
EGS_Float getFluence () const
 
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 storeFluenceState (ostream &data_out) const
 Store the fluence state of this source to the data stream data_out. 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 setFluenceState (istream &data)
 Set the data related to the sampling of positions and directions to a state contained in the stream data. 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. More...
 
 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)
 Set the next simulation chunk to start at nstart and to consist of nrun particles. More...
 
virtual EGS_Float getMu ()
 
- 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_ObjectcreateObject (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 ()
 
- Protected Member Functions inherited from EGS_BaseSimpleSource
virtual void setLatch (int &latch)
 

Protected Attributes

EGS_BaseShapeshape
 The shape from which particles are emitted.
 
EGS_BaseGeometrygeom
 
int * regions
 
EGS_Float min_theta
 
EGS_Float max_theta
 
EGS_Float buf_1
 
EGS_Float buf_2
 
EGS_Float min_phi
 avoid multi-calculating cos(min_theta) and cos(max_theta)
 
EGS_Float max_phi
 
EGS_Float max_mass_density
 
int nrs
 
- Protected Attributes inherited from EGS_BaseSimpleSource
int q
 The charge of this simple source.
 
EGS_BaseSpectrums
 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...
 
- 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_ObjectFactoryfactory
 The factory this object belongs to.
 

Additional Inherited Members

- Static Public Member Functions inherited from EGS_BaseSource
static EGS_BaseSourcecreateSource (EGS_Input *)
 Create sources from the information pointed to by input. More...
 
static EGS_BaseSourcegetSource (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...
 

Detailed Description

A Fano source.

An Fano source is a source that delivers particles proportional to the mass in the current source region with directions uniformly distributed in $4 \pi$ emitted from any shape. It is defined using the following input

:start source:
    library = egs_fano_source
    name = some_name
    :start shape:
        definition of the shape
    :stop shape:
    :start spectrum:
        definition of the spectrum
    :stop spectrum:
    charge = -1 or 0 or 1 for electrons or photons or positrons
    max mass density = 1.2
    geometry = some_name
:stop source:

Definition at line 95 of file egs_fano_source.h.

Constructor & Destructor Documentation

EGS_FanoSource::EGS_FanoSource ( int  Q,
EGS_BaseSpectrum Spec,
EGS_BaseShape Shape,
EGS_BaseGeometry geometry,
const string &  Name = "",
EGS_ObjectFactory f = 0 
)

Constructor.

Construct a Fano source with charge Q, spectrum Spec and emitting particles from the shape Shape

Definition at line 105 of file egs_fano_source.h.

EGS_FanoSource::EGS_FanoSource ( EGS_Input input,
EGS_ObjectFactory f = 0 
)

Constructor.

Construct a Fano source from the information pointed to by inp.

Definition at line 44 of file egs_fano_source.cpp.

References EGS_BaseShape::createShape(), egsFatal, egsWarning, EGS_BaseGeometry::getGeometry(), EGS_Input::getInput(), EGS_BaseShape::getShape(), min_phi, shape, and EGS_Input::takeInputItem().


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