EGSnrc C++ class library  Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
Public Member Functions | Protected Attributes | List of all members
EGS_TrackScoring Class Reference

A track scoring object: header. More...

#include <egs_track_scoring.h>

Inheritance diagram for EGS_TrackScoring:
EGS_AusgabObject EGS_Object

Public Member Functions

 EGS_TrackScoring (const string &Name="", EGS_ObjectFactory *f=0)
 
int processEvent (EGS_Application::AusgabCall iarg)
 
bool needsCall (EGS_Application::AusgabCall iarg) const
 
void setApplication (EGS_Application *App)
 
void reportResults ()
 
void setCurrentCase (EGS_I64 ncase)
 
void setScorePhotons (bool score)
 
void setScoreElectrons (bool score)
 
void setScorePositrons (bool score)
 
void setFirstEvent (EGS_I64 first)
 
void setLastEvent (EGS_I64 last)
 
void setBufferSize (int size)
 
void setFileNameExtra (const string &extra)
 
- Public Member Functions inherited from EGS_AusgabObject
 EGS_AusgabObject (const string &Name="", EGS_ObjectFactory *f=0)
 Construct an ausgab object named Name.
 
 EGS_AusgabObject (EGS_Input *input, EGS_ObjectFactory *f=0)
 Construct an ausgab object from the input pointed to by inp. More...
 
virtual int processEvent (EGS_Application::AusgabCall iarg, int ir)
 
const char * getObjectDescription () const
 Get a short description of this ausgab object. More...
 
virtual bool storeState (ostream &data_out) const
 Store the source state into the stream data_out. More...
 
virtual bool setState (istream &data_in)
 Set the ausgab object state based on data from the stream data_in. More...
 
virtual bool addState (istream &data_in)
 Add data from the stream data_in to the ausgab object state. More...
 
virtual void resetCounter ()
 Reset the ausgab object state. More...
 
- Public Member Functions inherited from EGS_Object
 EGS_Object (const string &Name="", EGS_ObjectFactory *f=0)
 Create an EGS_Object named Name belonging to the object factory f. More...
 
 EGS_Object (EGS_Input *inp, EGS_ObjectFactory *f=0)
 Create an EGS_Object from the information pointed to by inp that belongs to object factory f. More...
 
const string & getObjectName () const
 Get the object name.
 
void setObjectName (const string &Name)
 Set the object name to Name.
 
const string & getObjectType () const
 Get the object type.
 
virtual EGS_ObjectcreateObject (EGS_Input *inp)
 Create an object from the infromation pointed to by inp. More...
 
void setName (EGS_Input *inp)
 Set the name of the object from the information provided by inp. More...
 
int ref ()
 Increase the reference count to this object.
 
int deref ()
 Decrease the reference count to this object.
 
void setFactory (EGS_ObjectFactory *f)
 Set the factory to which the object belongs. More...
 

Protected Attributes

EGS_ParticleTrackContainerm_pts
 The particle track container.
 
EGS_I64 m_start
 Minimum event index for which to score tracks.
 
EGS_I64 m_stop
 Maximum event index for which to score tracks.
 
EGS_I64 m_lastCase
 The event set via setCurrentCase()
 
EGS_I64 m_nScore
 Number of events for which tracks were scored.
 
int m_bufSize
 The track container size.
 
bool m_score
 Should tracks be scored?
 
bool m_didScore
 Did the last event score tracks?
 
bool m_score_photons
 Score photon tracks?
 
bool m_score_electrons
 Score electron tracks?
 
bool m_score_positrons
 Score positron tracks?
 
string m_fnExtra
 String to append to output file name.
 
- Protected Attributes inherited from EGS_AusgabObject
string description
 A short ausgab object description. More...
 
EGS_Applicationapp
 The application this object belongs to.
 
- Protected Attributes inherited from EGS_Object
string name
 The object name.
 
string otype
 The object type.
 
int nref
 Number of references to the object.
 
EGS_ObjectFactoryfactory
 The factory this object belongs to.
 

Additional Inherited Members

- Static Public Member Functions inherited from EGS_AusgabObject
static void createAusgabObjects (EGS_Input *)
 Create ausgab objects from the information pointed to by input. More...
 
static EGS_AusgabObjectgetAusgabObject (const string &Name)
 Get a pointer to the ausgab object named Name. More...
 
static void addKnownAusgabObject (EGS_AusgabObject *o)
 Add a known ausgab object to the ausgab object factory. More...
 
static void addKnownTypeId (const char *name)
 Add a known ausgab object typeid to the ausgab object factory. More...
 
static int nObjects ()
 Returns the number of ausgab objects in the internal list.
 
static EGS_AusgabObjectgetObject (int j)
 Returns the j'th ausgab object in the internal list.
 
- Static Public Member Functions inherited from EGS_Object
static string getUniqueName (const EGS_Object *o=0)
 Create and return a unique object name. More...
 
static void deleteObject (EGS_Object *o)
 Delete an object. More...
 

Detailed Description

A track scoring object: header.

This ausgab object can be used to store pareticle track information during run time and to output this information into a file. The data collected by this ausgab object can then be used to visualize the geometry and particle tracks with egs_view. This ausgab object is specified via

:start ausgab object:
    library = egs_track_scoring
    name    = some_name
    score photons   = yes or no # optional, yes assumed if missing
    score electrons = yes or no # optional, yes assumed if missing
    score positrons = yes or no # optional, yes assumed if missing
    start scoring   = event_number # optional, 0 assumed if missing
    stop  scoring   = event_number # optional, 1024 assumed if missing
    buffer size     = size         # optional, 1024 assumed if missing
    file name addition = some_string # optional, empty string assumed if missing
:stop ausgab object:

The output file name is normally constructed from the output file name, the string specified by file name addition (if present and not empty), and _wJob in case of parallel runs. The extension given is ptracks. Using start scoring and stop scoring one can select a range of histories for which to score the particle track info. One can also select specific particle type(s).

Definition at line 94 of file egs_track_scoring.h.


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