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

Volume correction initialization helper class. More...

#include <volcor.h>

Public Member Functions

 VCOptions (EGS_Input *inp)
 
 ~VCOptions ()
 
EGS_Vector getRandomPoint ()
 

Public Attributes

bool valid
 
double bounds_volume
 
EGS_Float density
 
EGS_Float npoints
 
VolCorMode mode
 
EGS_RandomGeneratorrng
 
string vc_file
 

Static Public Attributes

static const unsigned long DEFAULT_RAND_POINT_DENSITY = 100000000
 

Protected Member Functions

void setMode ()
 
void setVCFile ()
 
int setBoundsShape ()
 
void setDensity ()
 
void setRNG ()
 

Protected Attributes

EGS_Inputinput
 
EGS_BaseShapebounds
 
bool sobolAllowed
 

Detailed Description

Volume correction initialization helper class.

VCOptions is a small helper class for parsing a volume correction input item A sample input would look like this:

 :start region discovery:

    action = discovery # discover, discover and correct volume, discover and zero volume
    density of random points (cm^-3) = 1E6 # Defaults to 1E8

    :start shape:
        type = cylinder
        radius = 0.04
        height = 0.45
        # volume = 123456 # use volume key for shapes other than cylinder, sphere, or box
    :stop shape:

 :stop region discovery:

You may also include a standard egs++ random number generator input if you want to use an RNG different from the EGS Default

Definition at line 241 of file volcor.h.

Constructor & Destructor Documentation

volcor::VCOptions::VCOptions ( EGS_Input inp)

VCOptions constructor. Initializes volume correction options from given input

Definition at line 248 of file volcor.h.

References setBoundsShape(), setDensity(), setMode(), setRNG(), setVCFile(), and valid.

volcor::VCOptions::~VCOptions ( )

VCOptions destructor.

Definition at line 279 of file volcor.h.

Member Function Documentation

EGS_Vector volcor::VCOptions::getRandomPoint ( )

Return a random point within the boundary shape.

Definition at line 289 of file volcor.h.

References EGS_BaseShape::getRandomPoint().

Referenced by volcor::findRegionsWithInscribed().

void volcor::VCOptions::setMode ( )
protected

get requested mode from input. Default to DISCOVERY_ONLY

Definition at line 314 of file volcor.h.

References volcor::DISCOVERY_ONLY, and EGS_Input::getInput().

Referenced by VCOptions().

void volcor::VCOptions::setVCFile ( )
protected

get external volume correction file

Definition at line 325 of file volcor.h.

References EGS_Input::getInput().

Referenced by VCOptions().

int volcor::VCOptions::setBoundsShape ( )
protected

create bounding shape from the shape input and calculate its volume

Definition at line 333 of file volcor.h.

References bounds_volume, EGS_BaseShape::createShape(), egsWarning, EGS_Object::getObjectType(), volcor::getShapeVolume(), and EGS_Input::takeInputItem().

Referenced by VCOptions().

void volcor::VCOptions::setDensity ( )
protected

set user requested density or default to DEFAULT_RAND_POINT_DENSITY

Definition at line 363 of file volcor.h.

References bounds_volume, density, egsWarning, EGS_Input::getInput(), and npoints.

Referenced by VCOptions().

void volcor::VCOptions::setRNG ( )
protected

Member Data Documentation

bool volcor::VCOptions::valid

was the object initialized completely?

Definition at line 293 of file volcor.h.

Referenced by VCOptions().

double volcor::VCOptions::bounds_volume

Volume of bounding shape in cm^3

Definition at line 295 of file volcor.h.

Referenced by volcor::applyVolumeCorrections(), volcor::findRegionsWithInscribed(), setBoundsShape(), and setDensity().

EGS_Float volcor::VCOptions::density

Density of points (cm^-3) used for MC volume calculation

Definition at line 297 of file volcor.h.

Referenced by setDensity().

EGS_Float volcor::VCOptions::npoints

total number of points used for VC (density*bounds_volume)

Definition at line 298 of file volcor.h.

Referenced by volcor::applyVolumeCorrections(), volcor::findRegionsWithInscribed(), and setDensity().


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