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

A class for scoring the energy weighted spectrum (normalized to total radiant energy) of particles on the surface of a source geometry. More...

#include <spec_scoring.h>

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

Public Member Functions

 EnergyWeightedSurfaceSpectrum (EGS_Input *input, EGS_BaseSource *src, GeomInfo *ginfo, Publisher *publisher)
 
virtual void score (EB_Message message, void *data=0)
 
- Public Member Functions inherited from BaseSpectrumScorer
 BaseSpectrumScorer (EGS_Input *input, EGS_BaseSource *src, GeomInfo *ginfo, Publisher *publisher)
 
virtual ~BaseSpectrumScorer ()
 
EGS_Float getBinWidth () const
 
double getParticleEnergy (const EGS_Particle *p) const
 
virtual void update (EB_Message message, void *data=0)
 Receives messages from application. This method handles NEW_HISTORY messages but delegates all other messages to the score methods of the derived classes.
 
void setEffectiveHistories (EGS_Float effective_histories)
 
int outputResults (string root_name)
 , write the scored spectrum to file with filename. Returns 0 on success, all other values indicate a failure
 
virtual string getInfo () const
 
bool isValid () const
 
int outputData (ostream *ofile)
 
int readData (istream *ifile)
 
void resetCounter ()
 
int addState (istream &data)
 
- Public Member Functions inherited from Subscriber
virtual ~Subscriber ()
 

Private Member Functions

void getResult (int bin, EGS_Float &r, EGS_Float &dr)
 set r & dr to result/uncertainty for given bin. Normalization can be done in this routine
 
string getTitle () const
 
string getSubTitle () const
 
string getYAxisLabel () const
 
void outputTotal ()
 
string getFileExtension () const
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseSpectrumScorer
static BaseSpectrumScorergetSpectrumScorer (EGS_Input *inp, EGS_BaseSource *source, GeomInfo *ginfo, Publisher *publisher)
 factory method for creating one of the derived spectrum scoring classes
 
- Public Attributes inherited from BaseSpectrumScorer
int nbins
 number of bins to score spectrum in
 
EGS_ScoringArray * bins
 spectrum scoring array
 
EGS_Float e_min
 minimum spectrum energy to score
 
EGS_Float e_max
 maximum spectrum energy to score
 
- Static Public Attributes inherited from BaseSpectrumScorer
static const int DEFAULT_NBINS = 100
 
- Protected Member Functions inherited from BaseSpectrumScorer
string outputCSV (string filename)
 output results to csv file
 
string outputXMGR (string filename)
 output results to xmgrace file
 
string outputEGSnrc (string filename)
 output results to EGSnrc tabulated spectrum format
 
int getBin (EGS_Float E) const
 get index of bin that that E falls in
 
virtual string getXAxisLabel () const
 
string getFileName (string root) const
 
string getParticleName () const
 Return name of particle we are scoring.
 
- Protected Attributes inherited from BaseSpectrumScorer
string format
 
int egsnrc_mode
 
int particle_type
 
EGS_I64 cur_history
 
EGS_I64 eff_history
 
EGS_Float bin_width
 
EGS_Float total_scored
 
EGS_BaseSource * source
 
bool valid
 
string fextension
 

Detailed Description

A class for scoring the energy weighted spectrum (normalized to total radiant energy) of particles on the surface of a source geometry.

See Taylor & Rogers, Med. Phys., 35 , 4933 – 4944, 2008

Sample input:

:start spectrum scoring:
    type = fluence in region
    particle type = photon
    minimum energy = 0.001
    maximum energy = 1.00
    number of bins = 1000
    output format = csv
    geometry = your_phantom_geom_name
    scoring region =  1 # which region of `your_phantom_geom` to score in (defaults to 0)
:stop spectrum scoring:

Definition at line 473 of file spec_scoring.h.

Constructor & Destructor Documentation

◆ EnergyWeightedSurfaceSpectrum()

EnergyWeightedSurfaceSpectrum::EnergyWeightedSurfaceSpectrum ( EGS_Input *  input,
EGS_BaseSource *  src,
GeomInfo ginfo,
Publisher publisher 
)
inline

Definition at line 497 of file spec_scoring.h.

Member Function Documentation

◆ getFileExtension()

string EnergyWeightedSurfaceSpectrum::getFileExtension ( ) const
inlineprivatevirtual

Reimplemented from BaseSpectrumScorer.

Definition at line 491 of file spec_scoring.h.

◆ getResult()

void EnergyWeightedSurfaceSpectrum::getResult ( int  bin,
EGS_Float &  r,
EGS_Float &  dr 
)
privatevirtual

set r & dr to result/uncertainty for given bin. Normalization can be done in this routine

Reimplemented from BaseSpectrumScorer.

Definition at line 491 of file spec_scoring.cpp.

◆ getSubTitle()

string EnergyWeightedSurfaceSpectrum::getSubTitle ( ) const
inlineprivatevirtual

Reimplemented from BaseSpectrumScorer.

Definition at line 481 of file spec_scoring.h.

◆ getTitle()

string EnergyWeightedSurfaceSpectrum::getTitle ( ) const
inlineprivatevirtual

Reimplemented from BaseSpectrumScorer.

Definition at line 477 of file spec_scoring.h.

◆ getYAxisLabel()

string EnergyWeightedSurfaceSpectrum::getYAxisLabel ( ) const
inlineprivatevirtual

Reimplemented from BaseSpectrumScorer.

Definition at line 485 of file spec_scoring.h.

◆ outputTotal()

void EnergyWeightedSurfaceSpectrum::outputTotal ( )
privatevirtual

Reimplemented from BaseSpectrumScorer.

Definition at line 500 of file spec_scoring.cpp.

◆ score()

void EnergyWeightedSurfaceSpectrum::score ( EB_Message  message,
void *  data = 0 
)
virtual

override in derived classes to do scoring

Implements BaseSpectrumScorer.

Definition at line 476 of file spec_scoring.cpp.


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