38 #ifndef EGS_TRACK_SCORING_
39 #define EGS_TRACK_SCORING_
47 #ifdef BUILD_TRACK_SCORING_DLL
48 #define EGS_TRACK_SCORING_EXPORT __declspec(dllexport)
50 #define EGS_TRACK_SCORING_EXPORT __declspec(dllimport)
52 #define EGS_TRACK_SCORING_LOCAL
56 #ifdef HAVE_VISIBILITY
57 #define EGS_TRACK_SCORING_EXPORT __attribute__ ((visibility ("default")))
58 #define EGS_TRACK_SCORING_LOCAL __attribute__ ((visibility ("hidden")))
60 #define EGS_TRACK_SCORING_EXPORT
61 #define EGS_TRACK_SCORING_LOCAL
111 if (m_pts->isScoringParticle(np)) {
116 m_pts->stopScoringParticle(np);
120 int q = app->top_p.q;
121 EGS_Float timeindex = app->getTimeIndex();
122 if ((q == 0 && m_score_photons) ||
123 (q == -1 && m_score_electrons) ||
124 (q == 1 && m_score_positrons)) {
125 m_pts->startNewTrack(np);
127 m_pts->setCurrentTimeIndex(timeindex);
144 if (ncase != m_lastCase) {
148 if (ncase < m_start || ncase > m_stop) {
156 void setScorePhotons(
bool score) {
157 m_score_photons = score;
159 void setScoreElectrons(
bool score) {
160 m_score_electrons = score;
162 void setScorePositrons(
bool score) {
163 m_score_positrons = score;
165 void setIncludeTime(
bool incltime) {
166 m_include_time = incltime;
168 void setAutoDetectDynamic(
bool autoDetectDynamic) {
169 m_autoDetectDynamic = autoDetectDynamic;
171 void setFirstEvent(EGS_I64 first) {
174 void setLastEvent(EGS_I64 last) {
177 void setBufferSize(
int size) {
180 void setFileNameExtra(
const string &extra) {
Base class for advanced EGSnrc C++ applications.
AusgabCall
Possible calls to the user scoring function ausgab().
@ BeforeTransport
before the step
@ AfterTransport
after the step
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 void reportResults()
Report results.
virtual void setCurrentCase(EGS_I64 ncase)
Set the current event.
virtual bool needsCall(EGS_Application::AusgabCall iarg) const
Is the ausgab call iarg relevant for this object?
A class that stores all the tracks in a simulation.
A track scoring object: header.
EGS_I64 m_lastCase
The event set via setCurrentCase()
EGS_I64 m_start
Minimum event index for which to score tracks.
bool m_score
Should tracks be scored?
bool m_score_electrons
Score electron tracks?
bool m_include_time
include time index in tracks file?
string m_fnExtra
String to append to output file name.
bool m_autoDetectDynamic
Option for autodetecting whether to include time indices.
EGS_I64 m_stop
Maximum event index for which to score tracks.
int m_bufSize
The track container size.
EGS_ParticleTrackContainer * m_pts
The particle track container.
bool m_score_photons
Score photon tracks?
EGS_I64 m_nScore
Number of events for which tracks were scored.
bool m_score_positrons
Score positron tracks?
bool m_didScore
Did the last event score tracks?
EGS_Application class header file.
EGS_AusgabObject interface class header file.
EGS_ParticleTrack class header file.
Structure describing the particle being tracked.
Structure to store the data for each interaction along the track.