44 #ifndef BEAM_DOSE_SCORING_
45 #define BEAM_DOSE_SCORING_
49 #include "beampp_class.h"
55 #ifdef BUILD_DOSE_SCORING_DLL
56 #define BEAM_DOSE_SCORING_EXPORT __declspec(dllexport)
58 #define BEAM_DOSE_SCORING_EXPORT __declspec(dllimport)
60 #define BEAM_DOSE_SCORING_LOCAL
64 #ifdef HAVE_VISIBILITY
65 #define BEAM_DOSE_SCORING_EXPORT __attribute__ ((visibility ("default")))
66 #define BEAM_DOSE_SCORING_LOCAL __attribute__ ((visibility ("hidden")))
68 #define BEAM_DOSE_SCORING_EXPORT
69 #define BEAM_DOSE_SCORING_LOCAL
95 int ir = app->top_p.ir, imed = ir>=0 ? app->getMedium(ir):-1;
96 EGS_Float edep = app->getEdep();
98 if (d_reg_index[ir]<0) {
103 if (iarg <= 4 && ir >= 0 && edep > 0 && dose) {
104 dose->score(d_reg_index[ir], edep*app->top_p.wt);
109 if (iarg <= 4 && imed >= 0 && edep > 0 && doseM) {
110 doseM->score(imed+nmedia*d_reg_cm_ind[ir], edep*app->top_p.wt);
124 if (ncase != m_lastCase) {
127 dose->setHistory(ncase);
130 doseM->setHistory(ncase);
134 int getDigits(
int i) {
139 return (
int)log10((
float)imax);
142 void setVol(
const vector<EGS_Float> volin) {
145 void setVol(
const EGS_Float volin) {
146 vol_list.push_back(volin);
148 void setDoseCMs(
const vector <int> dcm) {
151 void setMediumScoring(
bool flag) {
152 score_medium_dose=flag;
154 void setRegionScoring(
bool flag) {
155 score_region_dose=flag;
162 int addTheStates(istream &data);
165 BEAMpp_Application *bapp;
168 vector <EGS_Float> vol_list;
170 vector <int> d_region;
171 vector <int> d_reg_index;
172 vector <int> d_reg_cm_ind;
173 vector < vector <int> > cm_med;
174 vector <EGS_Float> vol;
180 bool score_medium_dose,
EGS_ScoringArray * dose
Scoring in each dose scoring region.
A class for scoring an array of quantities (e.g. a dose distribution) in a Monte Carlo simulation...
EGS_AusgabObject interface class header file.
virtual int processEvent(EGS_Application::AusgabCall iarg)=0
Process an ausgab call for event iarg.
virtual bool storeState(ostream &data_out) const
Store the source state into the stream data_out.
This file defines the C/C++ interface to the EGSnrc mortran back-end.
AusgabCall
Possible calls to the user scoring function ausgab().
virtual void resetCounter()
Reset the ausgab object state.
EGS_ScoringArray * doseM
Scoring dose in each medium.
virtual bool needsCall(EGS_Application::AusgabCall iarg) const
Is the ausgab call iarg relevant for this object?
A dose scoring object: header.
virtual bool setState(istream &data_in)
Set the ausgab object state based on data from the stream data_in.
virtual void reportResults()
Report results.
EGS_I64 m_lastCase
The event set via setCurrentCase()
virtual bool addState(istream &data_in)
Add data from the stream data_in to the ausgab object state.
EGS_ScoringSingle and EGS_ScoringArray class header file.
virtual void setCurrentCase(EGS_I64 ncase)
Set the current event.
virtual void setApplication(EGS_Application *App)
Set the application this object belongs to.
EGS_Application class header file.
Base class for advanced EGSnrc C++ applications.