20#ifndef ROOT_TVirtualMCApplication
21#define ROOT_TVirtualMCApplication
120 virtual void Field(
const Double_t *x, Double_t *b)
const;
149#if !defined(__CINT__)
Singleton manager class for handling and steering a run with multiple TVirtualMC engines sharing even...
Interface to a user Monte Carlo application.
TVirtualMCApplication()
Default constructor.
virtual ~TVirtualMCApplication()
Destructor.
TMCManager * fMCManager
Pointer to requested TMCManager which will only be instantiated by a call to RequestMCManager()
virtual void ConstructSensitiveDetectors()
Define sensitive detectors (optional)
virtual void InitGeometry()=0
Initialize geometry (Usually used to define sensitive volumes IDs)
virtual void Merge(TVirtualMCApplication *)
Merge the data accumulated on workers to the master if needed.
virtual void GeneratePrimaries()=0
Generate primary particles.
virtual void ConstructGeometry()=0
Construct user geometry.
void Register(TVirtualMC *mc)
Register the an engine.
TVirtualMC * GetMC() const
Return the transport engine registered to this application.
virtual void FinishPrimary()=0
Define actions at the end of the primary track.
virtual Double_t TrackingZmax() const
Define maximum z for tracking (optional)
virtual void FinishRunOnWorker()
Define actions at the end of the worker run if needed.
virtual TVirtualMCApplication * CloneForWorker() const
Clone MC application on worker.
virtual Bool_t MisalignGeometry()
Misalign user geometry (optional)
virtual void PostTrack()=0
Define actions at the end of each track.
virtual void GeaneStepping()
Define action at each step for Geane.
virtual void ConstructOpGeometry()
Define parameters for optical processes (optional)
virtual void AddParticles()
Add user defined particles (optional)
static TMCThreadLocal TVirtualMCApplication * fgInstance
Singleton instance.
void RequestMCManager()
Request a TMCManager which is required if multiple engines should be run.
virtual void Field(const Double_t *x, Double_t *b) const
Calculate user field b at point x.
static Bool_t fLockMultiThreading
Forbid multithreading mode if multi run via global static flag.
virtual void AddIons()
Add user defined ions (optional)
virtual void BeginRunOnWorker()
Define actions at the beginning of the worker run if needed.
virtual void Stepping()=0
Define action at each step.
virtual void BeginPrimary()=0
Define actions at the beginning of the primary track.
static TVirtualMCApplication * Instance()
Static access method.
virtual void BeginEvent()=0
Define actions at the beginning of the event.
TVirtualMC * fMC
The current transport engine in use.
virtual Double_t TrackingRmax() const
Define maximum radius for tracking (optional)
virtual void EndOfEvent()
Define actions at the end of the event before calling SD's end of the event.
virtual void PreTrack()=0
Define actions at the beginning of each track.
virtual void InitOnWorker()
Initialize MC application on worker.
virtual void FinishEvent()=0
Define actions at the end of the event.
Abstract Monte Carlo interface.