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);
156 EGS_Float getEmax()
const {
159 EGS_Float getFluence()
const {
160 double aux = ((double) Nread)/((double) Nparticle);
171 bool storeState(ostream &data)
const {
200 bool setState(istream &data) {
219 iaea_set_record(&iaea_fileid,&Npos,&iaea_iostat);
223 bool addState(istream &data) {
224 EGS_I64 tmp_Nread = Nread, tmp_count = count;
225 bool res = setState(data);
230 void resetCounter() {
235 bool isValid()
const {
239 void setCutout(EGS_Float xmin, EGS_Float xmax, EGS_Float ymin,
246 void setFilter(
int,
int,
int,
const int *);
285 unsigned long filter1, filter2;
286 EGS_Float Xmin, Xmax, Ymin, Ymax;
287 EGS_Float wmin, wmax;
289 void openFile(
const string &);
293 struct EGS_LOCAL BeamParticle {
295 float E, u, v, w, x, y, z, wt, zlast, mu;
300 inline bool rejectParticle()
const;
EGS_I64 Nread
Number of particles read so far.
int n_extra_floats
no. of extra floats stored in phsp file
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, false on failure.
int i_zlast
index of zlast in extra_floats array
int i_mu
index of mu index in extra_floats array
bool mode2
true, if a MODE2 file (i.e. storing Zlast)
EGS_AliasTable class header file.
EGS_BaseSource class header file.
int Nrecycle_e
Number of times to recycle a charged particle.
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, false on failure.
A class representing 3D vectors.
int Nrestart
Number of times the file was restarted.
int iaea_iostat
iostat on read/write of iaea phsp file
int Nuse
Number of times current particle was used so far.
Base random number generator class. All random number generators should be derived from this class...
EGS_RandomGenerator class header file.
EGS_Float Pinc
Number of incident particles that created the file.
An IAEA phase-space file source.
int iaea_fileid
phsp file unit no.
int i_latch
index of latch in extra_floats array
bool mu_stored
true if mu index stored
string the_file_name
The phase-space file name.
int Nrecycle_g
Number of times to recycle a photon.
bool latch_stored
true if LATCH is stored in data
int Nrecycle
Number of times to recycle current particle.
Base source class. All particle sources must be derived from this class.
int n_extra_longs
no. of extra longs stored in phsp file