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

A dose scoring object: header. More...

#include <egs_dose_scoring.h>

Inheritance diagram for EGS_DoseScoring:
EGS_AusgabObject EGS_Object

Public Member Functions

 EGS_DoseScoring (const string &Name="", EGS_ObjectFactory *f=0)
 
int processEvent (EGS_Application::AusgabCall iarg)
 
int processEvent (EGS_Application::AusgabCall iarg, int ir)
 
bool needsCall (EGS_Application::AusgabCall iarg) const
 
void setApplication (EGS_Application *App)
 
void getNumberRegions (const string &str, vector< int > &regs)
 
void getLabelRegions (const string &str, vector< int > &regs)
 
void reportResults ()
 
void setCurrentCase (EGS_I64 ncase)
 
int getDigits (int i)
 
EGS_Float getRealRho (int ireg)
 
void setVol (const vector< EGS_Float > volin)
 
void setVol (const EGS_Float volin)
 
void setDoseRegions (const vector< int > d_reg)
 
void setDoseRegions (const string d_reg)
 
void setMediumScoring (bool flag)
 
void setRegionScoring (bool flag)
 
void setOutputFile (bool flag, EGS_BaseGeometry *dgeom, int ftype)
 
bool getOutputFile (EGS_BaseGeometry *&dgeom, int &ftype)
 
void setUserNorm (const EGS_Float &normi)
 
void outputDoseFile (const EGS_Float &normD)
 
bool storeState (ostream &data) const
 
bool setState (istream &data)
 
void resetCounter ()
 
bool addState (istream &data)
 
int addTheStates (istream &data)
 
- 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...
 
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...
 

Protected Attributes

EGS_ScoringArraydose
 Scoring in each dose scoring region.
 
EGS_ScoringArraydoseM
 Scoring dose in each medium.
 
vector< EGS_Float > vol_list
 
vector< int > d_region
 
string d_regionString
 
vector< int > d_reg_index
 
vector< EGS_Float > vol
 
EGS_Float norm_u
 
int nreg
 
int nmedia
 
int max_dreg
 
int max_medl
 
EGS_I64 m_lastCase
 The event set via setCurrentCase()
 
bool score_medium_dose
 
bool score_region_dose
 
EGS_BaseGeometrydose_geom
 
EGS_ScoringArraydoseF
 Scoring dose in each voxel in EGS_XYZGeometry.
 
vector< int > df_reg
 
bool output_dose_file
 
int file_type
 
string df_name
 
- 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.
 

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...
 

Detailed Description

A dose scoring object: header.

This ausgab object can be used to calculate dose in identical voxels during run time and to output this information at the end of the calculation. This ausgab object is specified via:

:start ausgab object:
  library      = egs_dose_scoring
  name         = some_name
  medium dose  = yes # no  (default)
  region dose  = no  # yes (default)
  volume       =  v1 ... vn  # in cm**3
  dose regions = ir1 ... irn # individual regions
:stop ausgab object:

Users can enter either a unique volume, indicating identical volumes for all dose scoring regions, or individual volumes for each dose region, in which case the number of entries must be the same. Another available option is the medium dose entry which requests the dose deposited in each medium to be scored. This is of great use for instance for organ dose calculations.

Another possibility is to provide groups of consecutive regions to score dose as shown in the example below:

:start ausgab object:
  library           = egs_dose_scoring
  name              = some_name
  medium dose  = yes # no  (default)
  region dose  = no  # yes (default)
  volume            =  v_1 ... v_n        # in cm**3
  dose start region = iri_1 ... iri_N
  dose stop region  =  ire_1 ... ire_N
:stop ausgab object:

In this case the user can enter either the same number of volumes as groups of dose scoring regions or individual volumes for each region, in which case the number of volume entries n should be $n = \sum_i \left(ire_{i} - iri_{i}\right)$.

A volume value is necessary to compute the mass for each dose scoring zone. For this reason, if there are more dose scoring regions than volume entries, either the first volume entry or a default of 1 g/cm3 is used.

If one of the geometries in the simulation is an EGS_XYZGeometry, then the user has the option to output the dose in the voxels of this geometry to a file. Currently, the only available output format is the .3ddose format, which is familiar to users of DOSXYZnrc (see DOSXYZnrc users manual for more details). In this case, masses of each voxel are available through the member function getVolume of EGS_XYZGeometry. An example input to obtain a .3ddose file for an EGS_XYZGeometry is given below:

:start ausgab object:
  library           = egs_dose_scoring
  name              = some_name
  medium dose = no
  region dose = no
  :start output dose file:
     geometry name = must name an EGS_XYZGeometry
     file type = 3ddose (currently the only format available)
  :stop output dose file:
:stop ausgab object:

Output is to the file some_name.3ddose. Note that in this example, region doses for the simulation geometry have been turned off to avoid outputting the dose for every voxel in the EGS_XYZGeometry to the screen/.egslog file.

TODO:

Definition at line 193 of file egs_dose_scoring.h.


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