VMC Version 2.0
|
Interface to a user Monte Carlo application. More...
#include <TVirtualMCApplication.h>
Public Member Functions | |
TVirtualMCApplication (const char *name, const char *title) | |
Standard constructor. | |
TVirtualMCApplication () | |
Default constructor. | |
virtual | ~TVirtualMCApplication () |
Destructor. | |
void | RequestMCManager () |
Request a TMCManager which is required if multiple engines should be run. | |
void | Register (TVirtualMC *mc) |
Register the an engine. | |
TVirtualMC * | GetMC () const |
Return the transport engine registered to this application. | |
virtual void | ConstructGeometry ()=0 |
Construct user geometry. | |
virtual Bool_t | MisalignGeometry () |
Misalign user geometry (optional) | |
virtual void | ConstructOpGeometry () |
Define parameters for optical processes (optional) | |
virtual void | ConstructSensitiveDetectors () |
Define sensitive detectors (optional) | |
virtual void | InitGeometry ()=0 |
Initialize geometry (Usually used to define sensitive volumes IDs) | |
virtual void | AddParticles () |
Add user defined particles (optional) | |
virtual void | AddIons () |
Add user defined ions (optional) | |
virtual void | GeneratePrimaries ()=0 |
Generate primary particles. | |
virtual void | BeginEvent ()=0 |
Define actions at the beginning of the event. | |
virtual void | BeginPrimary ()=0 |
Define actions at the beginning of the primary track. | |
virtual void | PreTrack ()=0 |
Define actions at the beginning of each track. | |
virtual void | Stepping ()=0 |
Define action at each step. | |
virtual void | PostTrack ()=0 |
Define actions at the end of each track. | |
virtual void | FinishPrimary ()=0 |
Define actions at the end of the primary track. | |
virtual void | EndOfEvent () |
Define actions at the end of the event before calling SD's end of the event. | |
virtual void | FinishEvent ()=0 |
Define actions at the end of the event. | |
virtual Double_t | TrackingRmax () const |
Define maximum radius for tracking (optional) | |
virtual Double_t | TrackingZmax () const |
Define maximum z for tracking (optional) | |
virtual void | Field (const Double_t *x, Double_t *b) const |
Calculate user field b at point x. | |
virtual void | GeaneStepping () |
Define action at each step for Geane. | |
virtual TVirtualMCApplication * | CloneForWorker () const |
Clone MC application on worker. | |
virtual void | InitOnWorker () |
Initialize MC application on worker. | |
virtual void | BeginRunOnWorker () |
Define actions at the beginning of the worker run if needed. | |
virtual void | FinishRunOnWorker () |
Define actions at the end of the worker run if needed. | |
virtual void | Merge (TVirtualMCApplication *) |
Merge the data accumulated on workers to the master if needed. | |
Static Public Member Functions | |
static TVirtualMCApplication * | Instance () |
Static access method. | |
Protected Attributes | |
TVirtualMC * | fMC |
The current transport engine in use. | |
TMCManager * | fMCManager |
Pointer to requested TMCManager which will only be instantiated by a call to RequestMCManager() | |
Static Private Attributes | |
static TMCThreadLocal TVirtualMCApplication * | fgInstance = nullptr |
Singleton instance. | |
static Bool_t | fLockMultiThreading = kFALSE |
Forbid multithreading mode if multi run via global static flag. | |
Interface to a user Monte Carlo application.
Definition at line 36 of file TVirtualMCApplication.h.
TVirtualMCApplication::TVirtualMCApplication | ( | const char * | name, |
const char * | title | ||
) |
Standard constructor.
Definition at line 40 of file TVirtualMCApplication.cxx.
TVirtualMCApplication::TVirtualMCApplication | ( | ) |
Default constructor.
Definition at line 63 of file TVirtualMCApplication.cxx.
|
virtual |
Destructor.
Definition at line 75 of file TVirtualMCApplication.cxx.
|
static |
Static access method.
Definition at line 88 of file TVirtualMCApplication.cxx.
Referenced by TVirtualMC::TVirtualMC().
void TVirtualMCApplication::RequestMCManager | ( | ) |
Request a TMCManager which is required if multiple engines should be run.
For backwards compatibility provide a static GetMC method.
Definition at line 98 of file TVirtualMCApplication.cxx.
void TVirtualMCApplication::Register | ( | TVirtualMC * | mc | ) |
Register the an engine.
/// Register the an engine.
Definition at line 111 of file TVirtualMCApplication.cxx.
Referenced by TVirtualMC::TVirtualMC().
TVirtualMC * TVirtualMCApplication::GetMC | ( | ) | const |
Return the transport engine registered to this application.
Return the current transport engine in use.
Definition at line 129 of file TVirtualMCApplication.cxx.
|
pure virtual |
Construct user geometry.
Referenced by TMCManager::Register().
|
inlinevirtual |
Misalign user geometry (optional)
Definition at line 68 of file TVirtualMCApplication.h.
Referenced by TMCManager::Register().
|
inlinevirtual |
Define parameters for optical processes (optional)
Definition at line 71 of file TVirtualMCApplication.h.
Referenced by TMCManager::Register().
|
inlinevirtual |
Define sensitive detectors (optional)
Definition at line 74 of file TVirtualMCApplication.h.
|
pure virtual |
Initialize geometry (Usually used to define sensitive volumes IDs)
|
inlinevirtual |
Add user defined particles (optional)
Definition at line 81 of file TVirtualMCApplication.h.
|
inlinevirtual |
Add user defined ions (optional)
Definition at line 84 of file TVirtualMCApplication.h.
|
pure virtual |
Generate primary particles.
Referenced by TMCManager::PrepareNewEvent().
|
pure virtual |
Define actions at the beginning of the event.
Referenced by TMCManager::Run().
|
pure virtual |
Define actions at the beginning of the primary track.
|
pure virtual |
Define actions at the beginning of each track.
|
pure virtual |
Define action at each step.
|
pure virtual |
Define actions at the end of each track.
|
pure virtual |
Define actions at the end of the primary track.
|
inlinevirtual |
Define actions at the end of the event before calling SD's end of the event.
Definition at line 108 of file TVirtualMCApplication.h.
|
pure virtual |
Define actions at the end of the event.
Referenced by TMCManager::Run().
|
inlinevirtual |
Define maximum radius for tracking (optional)
Definition at line 114 of file TVirtualMCApplication.h.
|
inlinevirtual |
Define maximum z for tracking (optional)
Definition at line 117 of file TVirtualMCApplication.h.
|
inlinevirtual |
Calculate user field b at point x.
Definition at line 161 of file TVirtualMCApplication.h.
|
inlinevirtual |
Define action at each step for Geane.
Definition at line 123 of file TVirtualMCApplication.h.
|
inlinevirtual |
Clone MC application on worker.
Definition at line 127 of file TVirtualMCApplication.h.
|
inlinevirtual |
Initialize MC application on worker.
Definition at line 130 of file TVirtualMCApplication.h.
|
inlinevirtual |
Define actions at the beginning of the worker run if needed.
Definition at line 132 of file TVirtualMCApplication.h.
|
inlinevirtual |
Define actions at the end of the worker run if needed.
Definition at line 134 of file TVirtualMCApplication.h.
|
inlinevirtual |
Merge the data accumulated on workers to the master if needed.
Definition at line 136 of file TVirtualMCApplication.h.
|
protected |
The current transport engine in use.
In case of a multi-run the TMCManager will update this whenever the engine changes.
Definition at line 141 of file TVirtualMCApplication.h.
Referenced by GetMC(), Register(), RequestMCManager(), and TVirtualMCApplication().
|
protected |
Pointer to requested TMCManager which will only be instantiated by a call to RequestMCManager()
Definition at line 145 of file TVirtualMCApplication.h.
Referenced by Register(), RequestMCManager(), TVirtualMCApplication(), and ~TVirtualMCApplication().
|
staticprivate |
Singleton instance.
Definition at line 151 of file TVirtualMCApplication.h.
Referenced by Instance(), TVirtualMCApplication(), and ~TVirtualMCApplication().
|
staticprivate |
Forbid multithreading mode if multi run via global static flag.
Definition at line 156 of file TVirtualMCApplication.h.
Referenced by RequestMCManager(), and TVirtualMCApplication().