EGS Brachy
An egs++ user code for rapid brachytherapy calculations
|
A phase space file source for egs_brachy. More...
#include <eb_iaeaphsp_source.h>
Public Member Functions | |
EB_IAEASource (EGS_Input *, EGS_ObjectFactory *f=0) | |
Constructor. | |
~EB_IAEASource () | |
EGS_I64 | getNextParticle (EGS_RandomGenerator *rndm, int &q, int &latch, EGS_Float &E, EGS_Float &wt, EGS_Vector &x, EGS_Vector &u) |
EGS_Float | getEmax () const |
EGS_Float | getFluence () const |
void | setSimulationChunk (EGS_I64 nstart, EGS_I64 nrun) |
bool | storeState (ostream &data) const |
bool | setState (istream &data) |
bool | addState (istream &data) |
void | resetCounter () |
bool | isValid () const |
Protected Member Functions | |
void | openPHSPFile () |
void | initSourceParams () |
Protected Attributes | |
bool | is_valid |
string | phsp_file_name |
The phase space file name. | |
ifstream | phsp_file |
Phase space data stream. | |
IAEA_I32 | source_id |
IAEA_I32 * | p_source_id |
EGS_Float | Emax |
Maximum energy (obtained from the phsp file) | |
EGS_Float | Emin |
Minimum energy (obtained from the phsp file) | |
EGS_Float | Nincident |
Number of incident particles that created the file. | |
IAEA_I64 | Nparticle |
Number of particles in the file. | |
IAEA_I64 | Nphoton |
Number of photons in the file. | |
IAEA_I64 | Nused |
Number of particles used so far. | |
IAEA_I64 | Npos |
Next record to be read. | |
IAEA_I64 | Nfirst |
first record this source can use | |
IAEA_I64 | Nlast |
Last record this source can use. | |
IAEA_I64 | Nread |
Number of particles read from file so far. | |
IAEA_I64 | count |
Particles delivered so far. | |
IAEA_I32 | n_parallel |
IAEA_I32 | i_parallel |
Static Protected Attributes | |
static IAEA_I32 | next_source_id = 0 |
static const string | iaea_header_ext = ".IAEAheader" |
A phase space file source for egs_brachy.
A phase space file source reads and delivers particles from a an IAEA phase space file. Note this source is an incomplete implementation and may only be suitable for use with egs_brachy.
A phase space file source is defined as follows:
:start source: library = eb_iaeaphsp_source name = some_name header file = path to the phase space header file particle type = one of photons, electrons, positrons, all, or charged :stop source:
Definition at line 101 of file eb_iaeaphsp_source.h.
EB_IAEASource::EB_IAEASource | ( | EGS_Input * | input, |
EGS_ObjectFactory * | f = 0 |
||
) |
Constructor.
Construct a phase space file source from the information pointed to by inp.
Definition at line 53 of file eb_iaeaphsp_source.cpp.
EB_IAEASource::~EB_IAEASource | ( | ) |
Definition at line 107 of file eb_iaeaphsp_source.cpp.
bool EB_IAEASource::addState | ( | istream & | data | ) |
Definition at line 319 of file eb_iaeaphsp_source.cpp.
EGS_Float EB_IAEASource::getEmax | ( | ) | const |
Definition at line 232 of file eb_iaeaphsp_source.cpp.
EGS_Float EB_IAEASource::getFluence | ( | ) | const |
Definition at line 240 of file eb_iaeaphsp_source.cpp.
IAEA_I64 EB_IAEASource::getNextParticle | ( | EGS_RandomGenerator * | rndm, |
int & | q, | ||
int & | latch, | ||
EGS_Float & | E, | ||
EGS_Float & | wt, | ||
EGS_Vector & | x, | ||
EGS_Vector & | u | ||
) |
Definition at line 157 of file eb_iaeaphsp_source.cpp.
|
protected |
Definition at line 131 of file eb_iaeaphsp_source.cpp.
bool EB_IAEASource::isValid | ( | ) | const |
Definition at line 236 of file eb_iaeaphsp_source.cpp.
|
protected |
Definition at line 116 of file eb_iaeaphsp_source.cpp.
void EB_IAEASource::resetCounter | ( | ) |
Definition at line 330 of file eb_iaeaphsp_source.cpp.
void EB_IAEASource::setSimulationChunk | ( | EGS_I64 | nstart, |
EGS_I64 | nrun | ||
) |
Definition at line 208 of file eb_iaeaphsp_source.cpp.
bool EB_IAEASource::setState | ( | istream & | data | ) |
Definition at line 282 of file eb_iaeaphsp_source.cpp.
bool EB_IAEASource::storeState | ( | ostream & | data | ) | const |
Definition at line 245 of file eb_iaeaphsp_source.cpp.
|
protected |
Particles delivered so far.
Definition at line 149 of file eb_iaeaphsp_source.h.
|
protected |
Maximum energy (obtained from the phsp file)
Definition at line 138 of file eb_iaeaphsp_source.h.
|
protected |
Minimum energy (obtained from the phsp file)
Definition at line 139 of file eb_iaeaphsp_source.h.
|
protected |
Definition at line 152 of file eb_iaeaphsp_source.h.
|
staticprotected |
Definition at line 159 of file eb_iaeaphsp_source.h.
|
protected |
Definition at line 131 of file eb_iaeaphsp_source.h.
|
protected |
Definition at line 151 of file eb_iaeaphsp_source.h.
|
staticprotected |
Definition at line 157 of file eb_iaeaphsp_source.h.
|
protected |
first record this source can use
Definition at line 146 of file eb_iaeaphsp_source.h.
|
protected |
Number of incident particles that created the file.
Definition at line 140 of file eb_iaeaphsp_source.h.
|
protected |
Last record this source can use.
Definition at line 147 of file eb_iaeaphsp_source.h.
|
protected |
Number of particles in the file.
Definition at line 142 of file eb_iaeaphsp_source.h.
|
protected |
Number of photons in the file.
Definition at line 143 of file eb_iaeaphsp_source.h.
|
protected |
Next record to be read.
Definition at line 145 of file eb_iaeaphsp_source.h.
|
protected |
Number of particles read from file so far.
Definition at line 148 of file eb_iaeaphsp_source.h.
|
protected |
Number of particles used so far.
Definition at line 144 of file eb_iaeaphsp_source.h.
|
protected |
Definition at line 136 of file eb_iaeaphsp_source.h.
|
protected |
Phase space data stream.
Definition at line 133 of file eb_iaeaphsp_source.h.
|
protected |
The phase space file name.
Definition at line 132 of file eb_iaeaphsp_source.h.
|
protected |
Definition at line 135 of file eb_iaeaphsp_source.h.