EGS Brachy
An egs++ user code for rapid brachytherapy calculations
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
PHSPControl Class Reference

#include <phsp.h>

Inheritance diagram for PHSPControl:
Inheritance graph
[legend]
Collaboration diagram for PHSPControl:
Collaboration graph
[legend]

Public Member Functions

 PHSPControl (EGS_Input *inp, EGS_AffineTransform *trans, EGS_AdvancedApplication *app, Publisher *pub)
 PHSP Control constructor.
 
void finish (EGS_I64 n_orig_particles)
 set final number of particles written and destroy source
 
void destroySource ()
 destroy the source
 
void outputResults ()
 output file name and number of particles written
 
void update (EB_Message message, void *particle)
 receive PARTICLE_ESCAPED_SOURCE message
 
- Public Member Functions inherited from Subscriber
virtual ~Subscriber ()
 

Private Types

enum  ACCESS { READ = 1 , WRITE = 2 , APPEND = 3 }
 
enum  PARTICLE_TYPE {
  ALL_TYPES = -1 , PHOTON = 1 , ELECTRON = 2 , POSITRON = 3 ,
  NEUTRON = 4 , PROTON = 5
}
 

Private Member Functions

void initSource ()
 create/open new source and set extra numbers

 
void writeParticle (EGS_Particle *p)
 write a single particle to the phsp
 
short getIAEAParticleType (const EGS_Particle *p)
 convert a particle to its IAEA Particle type
 

Private Attributes

IAEA_I32 mode
 Access mode.
 
string fname
 root name of phsp header
 
IAEA_I32 id
 IAEA Source ID (just set to 1 currently)
 
IAEA_I64 num_written
 Number of particles written to phsp file.
 
EGS_AffineTransform * transform
 
EGS_Float boundary_step
 
bool kill_after_scoring
 Set wt = 0 for particle after scoring if true.
 
bool print_header
 User has requested the phsp header gets printed after run.
 

Detailed Description

Definition at line 51 of file phsp.h.

Member Enumeration Documentation

◆ ACCESS

enum PHSPControl::ACCESS
private
Enumerator
READ 

IAEA Read mode.

WRITE 

IAEA Write mode.

APPEND 

IAEA Append mode.

Definition at line 53 of file phsp.h.

◆ PARTICLE_TYPE

Enumerator
ALL_TYPES 
PHOTON 
ELECTRON 
POSITRON 
NEUTRON 
PROTON 

Definition at line 59 of file phsp.h.

Constructor & Destructor Documentation

◆ PHSPControl()

PHSPControl::PHSPControl ( EGS_Input *  inp,
EGS_AffineTransform *  trans,
EGS_AdvancedApplication *  app,
Publisher pub 
)

PHSP Control constructor.

Definition at line 59 of file phsp.cpp.

Member Function Documentation

◆ destroySource()

void PHSPControl::destroySource ( )

destroy the source

Definition at line 221 of file phsp.cpp.

◆ finish()

void PHSPControl::finish ( EGS_I64  n_orig_particles)

set final number of particles written and destroy source

Definition at line 193 of file phsp.cpp.

◆ getIAEAParticleType()

short PHSPControl::getIAEAParticleType ( const EGS_Particle *  p)
private

convert a particle to its IAEA Particle type

Definition at line 103 of file phsp.cpp.

◆ initSource()

void PHSPControl::initSource ( )
private

create/open new source and set extra numbers

Definition at line 163 of file phsp.cpp.

◆ outputResults()

void PHSPControl::outputResults ( )

output file name and number of particles written

Definition at line 199 of file phsp.cpp.

◆ update()

void PHSPControl::update ( EB_Message  message,
void *  particle 
)
virtual

receive PARTICLE_ESCAPED_SOURCE message

Implements Subscriber.

Definition at line 185 of file phsp.cpp.

◆ writeParticle()

void PHSPControl::writeParticle ( EGS_Particle *  p)
private

write a single particle to the phsp

Definition at line 117 of file phsp.cpp.

Member Data Documentation

◆ boundary_step

EGS_Float PHSPControl::boundary_step
private

transform used to return particle to origin before writing to phsp

Definition at line 78 of file phsp.h.

◆ fname

string PHSPControl::fname
private

root name of phsp header

Definition at line 69 of file phsp.h.

◆ id

IAEA_I32 PHSPControl::id
private

IAEA Source ID (just set to 1 currently)

Definition at line 70 of file phsp.h.

◆ kill_after_scoring

bool PHSPControl::kill_after_scoring
private

Set wt = 0 for particle after scoring if true.

Distance to push particle past source boundary before writing to phase space. Defaults to 1E-4 cm

Definition at line 82 of file phsp.h.

◆ mode

IAEA_I32 PHSPControl::mode
private

Access mode.

Definition at line 68 of file phsp.h.

◆ num_written

IAEA_I64 PHSPControl::num_written
private

Number of particles written to phsp file.

Definition at line 72 of file phsp.h.

◆ print_header

bool PHSPControl::print_header
private

User has requested the phsp header gets printed after run.

Definition at line 84 of file phsp.h.

◆ transform

EGS_AffineTransform* PHSPControl::transform
private

Definition at line 75 of file phsp.h.


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