91 #ifndef EGS_DOSE_SCORING_
92 #define EGS_DOSE_SCORING_
101 #ifdef BUILD_DOSE_SCORING_DLL
102 #define EGS_DOSE_SCORING_EXPORT __declspec(dllexport)
104 #define EGS_DOSE_SCORING_EXPORT __declspec(dllimport)
106 #define EGS_DOSE_SCORING_LOCAL
110 #ifdef HAVE_VISIBILITY
111 #define EGS_DOSE_SCORING_EXPORT __attribute__ ((visibility ("default")))
112 #define EGS_DOSE_SCORING_LOCAL __attribute__ ((visibility ("hidden")))
114 #define EGS_DOSE_SCORING_EXPORT
115 #define EGS_DOSE_SCORING_LOCAL
205 int ir = app->top_p.ir, imed = ir>=0 ? app->getMedium(ir):-1;
206 EGS_Float edep = app->getEdep();
209 if (iarg <= 4 && imed >= 0 && edep > 0 && doseM) {
210 doseM->score(imed, edep*app->top_p.wt);
214 if (ir >=0 && doseF && iarg <=4 && df_reg[ir] >= 0 && edep) {
215 doseF->score(df_reg[ir], edep*app->top_p.wt);
219 if (ir >= 0 && dose) {
220 if (d_reg_index[ir]<0) {
226 if (iarg <= 4 && ir >= 0 && edep > 0 && dose) {
227 dose->score(d_reg_index[ir], edep*app->top_p.wt);
238 int imed = ir>=0 ? app->getMedium(ir):-1;
239 EGS_Float edep = app->getEdep();
242 if (iarg <= 4 && imed >= 0 && edep > 0 && doseM) {
243 doseM->score(imed, edep*app->top_p.wt);
247 if (ir >= 0 && doseF && iarg <=4 && df_reg[ir] >= 0 && edep) {
248 doseF->score(df_reg[ir], edep*app->top_p.wt);
252 if (ir >= 0 && dose) {
253 if (d_reg_index[ir]<0) {
259 if (iarg <= 4 && ir >= 0 && edep > 0 && dose) {
260 dose->score(d_reg_index[ir], edep*app->top_p.wt);
276 void getNumberRegions(
const string &str, vector<int> ®s);
278 void getLabelRegions(
const string &str, vector<int> ®s);
283 if (ncase != m_lastCase) {
286 dose->setHistory(ncase);
289 doseM->setHistory(ncase);
292 doseF->setHistory(ncase);
296 int getDigits(
int i) {
301 return (
int)log10((
float)imax);
304 EGS_Float getRealRho(
int ireg) {
305 int med = dose_geom->medium(ireg);
306 return dose_geom->getRelativeRho(ireg)*app->getMediumRho(med);
309 void setVol(
const vector<EGS_Float> volin) {
312 void setVol(
const EGS_Float volin) {
313 vol_list.push_back(volin);
315 void setDoseRegions(
const vector <int> d_reg) {
318 void setDoseRegions(
const string d_reg) {
319 d_regionString=d_reg;
321 void setMediumScoring(
bool flag) {
322 score_medium_dose=flag;
324 void setRegionScoring(
bool flag) {
325 score_region_dose=flag;
328 output_dose_file=flag;
335 return output_dose_file;
337 void setUserNorm(
const EGS_Float &normi) {
340 void outputDoseFile(
const EGS_Float &normD);
346 int addTheStates(istream &data);
352 vector <EGS_Float> vol_list;
353 vector <int> d_region;
354 string d_regionString;
355 vector <int> d_reg_index;
356 vector <EGS_Float> vol;
363 bool score_medium_dose,
369 bool output_dose_file;
Base class for advanced EGSnrc C++ applications.
AusgabCall
Possible calls to the user scoring function ausgab().
virtual void resetCounter()
Reset the ausgab object state.
virtual void setApplication(EGS_Application *App)
Set the application this object belongs to.
virtual int processEvent(EGS_Application::AusgabCall iarg)=0
Process an ausgab call for event iarg.
virtual bool setState(istream &data_in)
Set the ausgab object state based on data from the stream data_in.
virtual void reportResults()
Report results.
virtual bool storeState(ostream &data_out) const
Store the source state into the stream data_out.
virtual void setCurrentCase(EGS_I64 ncase)
Set the current event.
virtual bool addState(istream &data_in)
Add data from the stream data_in to the ausgab object state.
virtual bool needsCall(EGS_Application::AusgabCall iarg) const
Is the ausgab call iarg relevant for this object?
Base geometry class. Every geometry class must be derived from EGS_BaseGeometry.
A dose scoring object: header.
EGS_ScoringArray * doseF
Scoring dose in each voxel in EGS_XYZGeometry.
EGS_ScoringArray * doseM
Scoring dose in each medium.
EGS_I64 m_lastCase
The event set via setCurrentCase()
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_Application class header file.
EGS_AusgabObject interface class header file.
EGS_BaseGeometry class header file.
EGS_ScoringSingle and EGS_ScoringArray class header file.