37 #ifndef IAEA_PHSP_SOURCE_
38 #define IAEA_PHSP_SOURCE_
52 #ifdef BUILD_IAEA_PHSP_SOURCE_DLL
53 #define IAEA_PHSP_SOURCE_EXPORT __declspec(dllexport)
55 #define IAEA_PHSP_SOURCE_EXPORT __declspec(dllimport)
57 #define IAEA_PHSP_SOURCE_LOCAL
61 #ifdef HAVE_VISIBILITY
62 #define IAEA_PHSP_SOURCE_EXPORT __attribute__ ((visibility ("default")))
63 #define IAEA_PHSP_SOURCE_LOCAL __attribute__ ((visibility ("hidden")))
65 #define IAEA_PHSP_SOURCE_EXPORT
66 #define IAEA_PHSP_SOURCE_LOCAL
153 int &q,
int &latch, EGS_Float &E, EGS_Float &wt,
155 void setSimulationChunk(EGS_I64 nstart, EGS_I64 nrun,
int npar,
int nchunk);
156 EGS_Float getEmax()
const {
159 EGS_Float getFluence()
const {
160 double aux = ((double) Nread)/((double) Nparticle);
163 bool storeState(ostream &data)
const {
192 bool setState(istream &data) {
211 iaea_set_record(&iaea_fileid,&Npos,&iaea_iostat);
215 bool addState(istream &data) {
216 EGS_I64 tmp_Nread = Nread, tmp_count = count;
217 bool res = setState(data);
222 void resetCounter() {
227 bool isValid()
const {
231 void setCutout(EGS_Float xmin, EGS_Float xmax, EGS_Float ymin,
238 void setFilter(
int,
int,
int,
const int *);
240 void containsDynamic(
bool &hasdynamic);
279 unsigned long filter1, filter2;
280 EGS_Float Xmin, Xmax, Ymin, Ymax;
281 EGS_Float wmin, wmax;
283 void openFile(
const string &);
287 struct EGS_LOCAL BeamParticle {
289 float E, u, v, w, x, y, z, wt, zlast, time;
294 inline bool rejectParticle()
const;
Base source class. All particle sources must be derived from this class.
Base random number generator class. All random number generators should be derived from this class.
A class representing 3D vectors.
An IAEA phase-space file source.
EGS_I64 Npos
Next record to be read.
int Nrecycle_g
Number of times to recycle a photon.
string the_file_name
The phase-space file name.
EGS_I64 Nlast
Last record this source can use.
EGS_I64 Nphoton
Number of photons in the file.
int Nrestart
Number of times the file was restarted.
int i_latch
index of latch in extra_floats array
int Nuse
Number of times current particle was used so far.
EGS_I64 Nread
Number of particles read so far.
EGS_I64 Nfirst
first record this source can use
int Nrecycle
Number of times to recycle current particle.
bool time_stored
true if time index stored
int iaea_fileid
phsp file unit no.
int n_extra_floats
no. of extra floats stored in phsp file
int i_zlast
index of zlast in extra_floats array
int i_time
index of time index in extra_floats array
EGS_Float Pinc
Number of incident particles that created the file.
EGS_I64 Nparticle
Number of particles in the file.
bool mode2
true, if a MODE2 file (i.e. storing Zlast)
int n_extra_longs
no. of extra longs stored in phsp file
int Nrecycle_e
Number of times to recycle a charged particle.
bool latch_stored
true if LATCH is stored in data
EGS_Float Emax
Maximum k.e. (obtained from the phsp file)
int iaea_iostat
iostat on read/write of iaea phsp file
EGS_AliasTable class header file.
EGS_BaseSource class header file.
EGS_RandomGenerator class header file.
EGS_Vector methods for the manipulation of 3D vectors in cartesian co-ordinates.
bool EGS_EXPORT egsStoreI64(ostream &data, EGS_I64 n)
Writes the 64 bit integer n to the output stream data and returns true on success,...
bool EGS_EXPORT egsGetI64(istream &data, EGS_I64 &n)
Reads a 64 bit integer from the stream data and assigns it to n. Returns true on success,...