|
EGSnrc C++ class library
Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
|
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_RandomGenerator * | rng |
| 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_Input * | input |
| EGS_BaseShape * | bounds |
| bool | sobolAllowed |
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
| volcor::VCOptions::VCOptions | ( | EGS_Input * | inp | ) |
VCOptions constructor. Initializes volume correction options from given input
Definition at line 249 of file volcor.h.
References setBoundsShape(), setDensity(), setMode(), setRNG(), setVCFile(), and valid.
| EGS_Vector volcor::VCOptions::getRandomPoint | ( | ) |
Return a random point within the boundary shape.
Definition at line 290 of file volcor.h.
References EGS_BaseShape::getRandomPoint().
Referenced by volcor::findRegionsWithInscribed().
|
protected |
get requested mode from input. Default to DISCOVERY_ONLY
Definition at line 315 of file volcor.h.
References volcor::DISCOVERY_ONLY, and EGS_Input::getInput().
Referenced by VCOptions().
|
protected |
get external volume correction file
Definition at line 326 of file volcor.h.
References EGS_Input::getInput().
Referenced by VCOptions().
|
protected |
create bounding shape from the shape input and calculate its volume
Definition at line 334 of file volcor.h.
References bounds_volume, EGS_BaseShape::createShape(), egsWarning, EGS_Object::getObjectType(), volcor::getShapeVolume(), and EGS_Input::takeInputItem().
Referenced by VCOptions().
|
protected |
set user requested density or default to DEFAULT_RAND_POINT_DENSITY
Definition at line 364 of file volcor.h.
References bounds_volume, density, egsWarning, EGS_Input::getInput(), and npoints.
Referenced by VCOptions().
|
protected |
set user requested RNG or default to EGS_RandomGenerator::defaultRNG
Definition at line 376 of file volcor.h.
References EGS_Input::compare(), EGS_RandomGenerator::createRNG(), EGS_RandomGenerator::defaultRNG(), egsFatal, egsWarning, EGS_Input::getInput(), and EGS_Input::getInputItem().
Referenced by VCOptions().
| bool volcor::VCOptions::valid |
was the object initialized completely?
Definition at line 294 of file volcor.h.
Referenced by VCOptions().
| double volcor::VCOptions::bounds_volume |
Volume of bounding shape in cm^3
Definition at line 296 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 298 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 299 of file volcor.h.
Referenced by volcor::applyVolumeCorrections(), volcor::findRegionsWithInscribed(), and setDensity().
1.9.1