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

Ausgab object for scoring fluence in arbitrary geometry regions. More...

#include <egs_fluence_scoring.h>

Inheritance diagram for EGS_VolumetricFluence:
EGS_FluenceScoring EGS_AusgabObject EGS_Object

Public Member Functions

 EGS_VolumetricFluence (const string &Name="", EGS_ObjectFactory *f=0)
 
 ~EGS_VolumetricFluence ()
 
bool needsCall (EGS_Application::AusgabCall iarg) const
 
void describeMe ()
 Sets fluence scoring object description.
 
void initScoring (EGS_Input *inp)
 
void setApplication (EGS_Application *App)
 
void ouputVolumetricFluence (EGS_ScoringArray *fT, const double &norma)
 
void ouputResults ()
 
void reportResults ()
 
int processEvent (EGS_Application::AusgabCall iarg)
 
EGS_Float getStepPerEnergyLoss (const int &imed, const EGS_Float &Eb, const EGS_Float &Ee)
 
void setCurrentCase (EGS_I64 ncase)
 
void resetCounter ()
 
bool storeState (ostream &data) const
 
bool setState (istream &data)
 
bool addState (istream &data)
 
- Public Member Functions inherited from EGS_FluenceScoring
 EGS_FluenceScoring (const string &Name="", EGS_ObjectFactory *f=0)
 
 ~EGS_FluenceScoring ()
 
void initScoring (EGS_Input *inp)
 
void getSensitiveRegions (EGS_Input *inp)
 
void getNumberRegions (const string &str, vector< int > &regs)
 
void getLabelRegions (const string &str, vector< int > &regs)
 
void setUpRegionFlags ()
 
void describeMe ()
 
int getDigits (int i)
 
void flagSecondaries (const int &iarg, const int &q)
 
- Public Member Functions inherited from EGS_AusgabObject
 EGS_AusgabObject (const string &Name="", EGS_ObjectFactory *f=0)
 Construct an ausgab object named Name.
 
 EGS_AusgabObject (EGS_Input *input, EGS_ObjectFactory *f=0)
 Construct an ausgab object from the input pointed to by inp. More...
 
virtual int processEvent (EGS_Application::AusgabCall iarg, int ir)
 
const char * getObjectDescription () const
 Get a short description of this ausgab object. More...
 
- 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from EGS_AusgabObject
static void createAusgabObjects (EGS_Input *)
 Create ausgab objects from the information pointed to by input. More...
 
static EGS_AusgabObjectgetAusgabObject (const string &Name)
 Get a pointer to the ausgab object named Name. More...
 
static void addKnownAusgabObject (EGS_AusgabObject *o)
 Add a known ausgab object to the ausgab object factory. More...
 
static void addKnownTypeId (const char *name)
 Add a known ausgab object typeid to the ausgab object factory. More...
 
static int nObjects ()
 Returns the number of ausgab objects in the internal list.
 
static EGS_AusgabObjectgetObject (int j)
 Returns the j'th ausgab object in the internal list.
 
- 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...
 
- Protected Attributes inherited from EGS_FluenceScoring
EGS_I64 current_ncase
 
ParticleType scoring_charge
 
ParticleType source_charge
 
EGS_ScoringArray ** flu
 
EGS_ScoringArray ** flu_p
 
EGS_ScoringArrayfluT
 
EGS_ScoringArrayfluT_p
 
vector< bool > is_sensitive
 
vector< bool > is_source
 
vector< int > f_start
 
vector< int > f_stop
 
vector< int > f_region
 
vector< int > s_region
 
string f_regionsString
 
string s_regionsString
 
int n_scoring_regions
 
int n_source_regions
 
int nreg
 
int max_reg
 
int active_region
 
bool score_in_all_regions
 
bool source_in_all_regions
 
EGS_Float norm_u
 
EGS_Float flu_a
 
EGS_Float flu_a_i
 
EGS_Float flu_b
 
EGS_Float flu_xmin
 
EGS_Float flu_xmax
 
int flu_s
 
int flu_nbin
 
EGS_Float m_primary
 
EGS_Float m_tot
 
string particle_name
 
bool verbose
 
bool score_spe
 
bool score_primaries
 
- Protected Attributes inherited from EGS_AusgabObject
string description
 A short ausgab object description. More...
 
EGS_Applicationapp
 The application this object belongs to.
 
- 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.
 

Detailed Description

Ausgab object for scoring fluence in arbitrary geometry regions.

A linear track-length estimator is used to compute fluence in specific geometrical regions. User can request to score primary fluence as well as differential fluence. If fluence for more than one particle type is desired, multiple AOs are required.

Differential fluence for charged particles is calculated accounting for continuous energy losses along the path. As these particles slow down in medium, their contribution to fluence will spread over several energy bins. Two methods to account for this are provided. One method follows the FLURZnrc implementation, whereby stopping power is assumed constant along the step and estimated as the ratio of the deposited energy EDEP to the total step length TVSTEP. The second method follows the approach used in the EGSnrc application cavity, which accounts for stopping power changes within a scoring energy bin. It uses a series expansion of the integral of the inverse of the stopping power with respect to energy. Implementation details are provided in an upcoming publication.

To define an EGS_VolumetricFluence AO use the syntax below:

:start ausgab object:
    name    = id-string            # Arbitrary identifying string
    library = egs_fluence_scoring  # Library name
    type    = volumetric           # Score in a volume
    scoring particle = photon, or electron, or positron
    source particle  = photon, or electron, or positron
                                   # Optional. Only required to score primary fluence.
                                   # Defaults to source particles if all the same.
                                   # In the case of multiple particles,
                                   # defaults to scoring particle. Useful for
                                   # bremsstrahlung targets and radioactive sources.
    score primaries = yes or no    # Defaults to `no`.
    score spectrum  = yes or no    # Defaults to `no`.
    verbose         = yes or no    # Defaults to `no`.
    normalization   = norm         # User-requested normalization. Defaults to 1.
    # If scoring spectrum, define energy grid
    # Default: 128 linear energy bins between 1 keV and 1 MeV
    :start energy grid:
      number of bins = nbins
      minimum kinetic energy = Emin
      maximum kinetic energy = Emax
      scale = linear or logarithmic # Defaults to `linear`.
    :stop energy grid:
    :start volumetric scoring:
        scoring regions = ir1 ir2 ... irn
        ### Alternatively:
        #start region = iri_1, iri_2, ..., iri_n
        #stop region  = irf_1, irf_2, ..., irf_n
        ###
        volumes = V1, V2, ..., VN # Enter as many as scoring regions. If same number
                                  # of entries as group of regions, assumes groups of
                                  # equal volume regions. If only one entry, assumes
                                  # equal volumes in all regions. Defaults to 1.
        method  = flurz or stpwr or stpwrO5 # For charged particle scoring.
                  #
                  # flurz   => FLURZnrc algorithm
                  #
                  # Path length at each energy interval from energy
                  # deposited EDEP and total particle step TVSTEP.
                  # Assumes stopping power constancy along the particle's
                  # step. It might introduce artifacts if ESTEPE or the
                  # scoring bin width are too large.
                  #
                  # stpwr   => Accounts for stopping power variation
                  #          along the particle's step. More accurate
                  #          than method used in FLURZnrc albeit about
                  #          about 10% slower in electron beam cases.
                  #
                  # Uses an O(3) series expansion of the integral of the
                  # inverse of the stopping power with respect to energy.
                  # Stopping power is represented as a linear interpolation
                  # over a log energy grid.
                  #
                  # stpwrO5 => Uses an O(5) series expansion. Slightly slower.
                  #
                  # Defaults to `stpwr`.
    :stop volumetric scoring:
:stop ausgab object:

Definition at line 552 of file egs_fluence_scoring.h.

Constructor & Destructor Documentation

EGS_VolumetricFluence::EGS_VolumetricFluence ( const string &  Name = "",
EGS_ObjectFactory f = 0 
)

Constructors

Definition at line 1088 of file egs_fluence_scoring.cpp.

References EGS_Object::otype.

EGS_VolumetricFluence::~EGS_VolumetricFluence ( )

Destructor.

Definition at line 1098 of file egs_fluence_scoring.cpp.

Member Function Documentation

EGS_Float EGS_VolumetricFluence::getStepPerEnergyLoss ( const int &  imed,
const EGS_Float &  Eb,
const EGS_Float &  Ee 
)

Computes path per energy loss traveled by a charged particle when slowing down from Eb to Ee.

Computes the path-length traveled while slowing down from energy Eb to energy Ee, both energies falling in the same energy bin assuming full coverage. The returned value should be multiplied by the fraction of the energy bin covered by Eb-Ee to compute fluence per bin width. If using a logarithmic energy interpolation, Eb and Ee are actually the logarithms of the initial and final energies. The expression is based on linear interpolation in a logarithmic energy grid as used in EGSnrc (i.e. dedx = a + b*log(E) ) and a power series expansion of the ExpIntegralEi function that is the result of the integration of the inverse of the stopping power with respect to energy.

Definition at line 968 of file egs_fluence_scoring.h.

References egsInformation.


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