89 #ifndef EGS_DOSE_SCORING_
90 #define EGS_DOSE_SCORING_
99 #ifdef BUILD_DOSE_SCORING_DLL
100 #define EGS_DOSE_SCORING_EXPORT __declspec(dllexport)
102 #define EGS_DOSE_SCORING_EXPORT __declspec(dllimport)
104 #define EGS_DOSE_SCORING_LOCAL
108 #ifdef HAVE_VISIBILITY
109 #define EGS_DOSE_SCORING_EXPORT __attribute__ ((visibility ("default")))
110 #define EGS_DOSE_SCORING_LOCAL __attribute__ ((visibility ("hidden")))
112 #define EGS_DOSE_SCORING_EXPORT
113 #define EGS_DOSE_SCORING_LOCAL
203 int ir = app->top_p.ir, imed = ir>=0 ? app->getMedium(ir):-1;
204 EGS_Float edep = app->getEdep();
207 if (iarg <= 4 && imed >= 0 && edep > 0 && doseM) {
208 doseM->score(imed, edep*app->top_p.wt);
212 if (ir >=0 && doseF && iarg <=4 && df_reg[ir] >= 0 && edep) {
213 doseF->score(df_reg[ir], edep*app->top_p.wt);
217 if (ir >= 0 && dose) {
218 if (d_reg_index[ir]<0) {
224 if (iarg <= 4 && ir >= 0 && edep > 0 && dose) {
225 dose->score(d_reg_index[ir], edep*app->top_p.wt);
236 int imed = ir>=0 ? app->getMedium(ir):-1;
237 EGS_Float edep = app->getEdep();
240 if (iarg <= 4 && imed >= 0 && edep > 0 && doseM) {
241 doseM->score(imed, edep*app->top_p.wt);
245 if (ir >= 0 && doseF && iarg <=4 && df_reg[ir] >= 0 && edep) {
246 doseF->score(df_reg[ir], edep*app->top_p.wt);
250 if (ir >= 0 && dose) {
251 if (d_reg_index[ir]<0) {
257 if (iarg <= 4 && ir >= 0 && edep > 0 && dose) {
258 dose->score(d_reg_index[ir], edep*app->top_p.wt);
274 void getNumberRegions(
const string &str, vector<int> ®s);
276 void getLabelRegions(
const string &str, vector<int> ®s);
281 if (ncase != m_lastCase) {
284 dose->setHistory(ncase);
287 doseM->setHistory(ncase);
290 doseF->setHistory(ncase);
294 int getDigits(
int i) {
299 return (
int)log10((
float)imax);
302 EGS_Float getRealRho(
int ireg) {
303 int med = dose_geom->medium(ireg);
304 return dose_geom->getRelativeRho(ireg)*app->getMediumRho(med);
307 void setVol(
const vector<EGS_Float> volin) {
310 void setVol(
const EGS_Float volin) {
311 vol_list.push_back(volin);
313 void setDoseRegions(
const vector <int> d_reg) {
316 void setDoseRegions(
const string d_reg) {
317 d_regionString=d_reg;
319 void setMediumScoring(
bool flag) {
320 score_medium_dose=flag;
322 void setRegionScoring(
bool flag) {
323 score_region_dose=flag;
326 output_dose_file=flag;
333 return output_dose_file;
335 void setUserNorm(
const EGS_Float &normi) {
338 void outputDoseFile(
const EGS_Float &normD);
344 int addTheStates(istream &data);
350 vector <EGS_Float> vol_list;
351 vector <int> d_region;
352 string d_regionString;
353 vector <int> d_reg_index;
354 vector <EGS_Float> vol;
361 bool score_medium_dose,
367 bool output_dose_file;
A class for scoring an array of quantities (e.g. a dose distribution) in a Monte Carlo simulation...
EGS_ScoringArray * doseM
Scoring dose in each medium.
EGS_AusgabObject interface class header file.
virtual int processEvent(EGS_Application::AusgabCall iarg)=0
Process an ausgab call for event iarg.
A dose scoring object: header.
virtual bool storeState(ostream &data_out) const
Store the source state into the stream data_out.
EGS_I64 m_lastCase
The event set via setCurrentCase()
AusgabCall
Possible calls to the user scoring function ausgab().
virtual void resetCounter()
Reset the ausgab object state.
Base geometry class. Every geometry class must be derived from EGS_BaseGeometry.
virtual bool needsCall(EGS_Application::AusgabCall iarg) const
Is the ausgab call iarg relevant for this object?
EGS_ScoringArray * dose
Scoring in each dose scoring region.
virtual bool setState(istream &data_in)
Set the ausgab object state based on data from the stream data_in.
EGS_ScoringArray * doseF
Scoring dose in each voxel in EGS_XYZGeometry.
virtual void reportResults()
Report results.
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.
EGS_BaseGeometry 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.