VMC Version 2.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Private Attributes | List of all members
TVirtualMCApplication Class Referenceabstract

Interface to a user Monte Carlo application. More...

#include <TVirtualMCApplication.h>

Inheritance diagram for TVirtualMCApplication:
Inheritance graph
[legend]

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.
 
TVirtualMCGetMC () 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 TVirtualMCApplicationCloneForWorker () 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 TVirtualMCApplicationInstance ()
 Static access method.
 

Protected Attributes

TVirtualMCfMC
 The current transport engine in use.
 
TMCManagerfMCManager
 Pointer to requested TMCManager which will only be instantiated by a call to RequestMCManager()
 

Static Private Attributes

static TMCThreadLocal TVirtualMCApplicationfgInstance = nullptr
 Singleton instance.
 
static Bool_t fLockMultiThreading = kFALSE
 Forbid multithreading mode if multi run via global static flag.
 

Detailed Description

Interface to a user Monte Carlo application.

Definition at line 36 of file TVirtualMCApplication.h.

Constructor & Destructor Documentation

◆ TVirtualMCApplication() [1/2]

TVirtualMCApplication::TVirtualMCApplication ( const char *  name,
const char *  title 
)

Standard constructor.

Definition at line 40 of file TVirtualMCApplication.cxx.

◆ TVirtualMCApplication() [2/2]

TVirtualMCApplication::TVirtualMCApplication ( )

Default constructor.

Definition at line 63 of file TVirtualMCApplication.cxx.

◆ ~TVirtualMCApplication()

TVirtualMCApplication::~TVirtualMCApplication ( )
virtual

Destructor.

Definition at line 75 of file TVirtualMCApplication.cxx.

Member Function Documentation

◆ Instance()

TVirtualMCApplication * TVirtualMCApplication::Instance ( )
static

Static access method.

Definition at line 88 of file TVirtualMCApplication.cxx.

Referenced by TVirtualMC::TVirtualMC().

◆ RequestMCManager()

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.

◆ Register()

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().

◆ GetMC()

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.

◆ ConstructGeometry()

virtual void TVirtualMCApplication::ConstructGeometry ( )
pure virtual

Construct user geometry.

Referenced by TMCManager::Register().

◆ MisalignGeometry()

virtual Bool_t TVirtualMCApplication::MisalignGeometry ( )
inlinevirtual

Misalign user geometry (optional)

Definition at line 68 of file TVirtualMCApplication.h.

Referenced by TMCManager::Register().

◆ ConstructOpGeometry()

virtual void TVirtualMCApplication::ConstructOpGeometry ( )
inlinevirtual

Define parameters for optical processes (optional)

Definition at line 71 of file TVirtualMCApplication.h.

Referenced by TMCManager::Register().

◆ ConstructSensitiveDetectors()

virtual void TVirtualMCApplication::ConstructSensitiveDetectors ( )
inlinevirtual

Define sensitive detectors (optional)

Definition at line 74 of file TVirtualMCApplication.h.

◆ InitGeometry()

virtual void TVirtualMCApplication::InitGeometry ( )
pure virtual

Initialize geometry (Usually used to define sensitive volumes IDs)

◆ AddParticles()

virtual void TVirtualMCApplication::AddParticles ( )
inlinevirtual

Add user defined particles (optional)

Definition at line 81 of file TVirtualMCApplication.h.

◆ AddIons()

virtual void TVirtualMCApplication::AddIons ( )
inlinevirtual

Add user defined ions (optional)

Definition at line 84 of file TVirtualMCApplication.h.

◆ GeneratePrimaries()

virtual void TVirtualMCApplication::GeneratePrimaries ( )
pure virtual

Generate primary particles.

Referenced by TMCManager::PrepareNewEvent().

◆ BeginEvent()

virtual void TVirtualMCApplication::BeginEvent ( )
pure virtual

Define actions at the beginning of the event.

Referenced by TMCManager::Run().

◆ BeginPrimary()

virtual void TVirtualMCApplication::BeginPrimary ( )
pure virtual

Define actions at the beginning of the primary track.

◆ PreTrack()

virtual void TVirtualMCApplication::PreTrack ( )
pure virtual

Define actions at the beginning of each track.

◆ Stepping()

virtual void TVirtualMCApplication::Stepping ( )
pure virtual

Define action at each step.

◆ PostTrack()

virtual void TVirtualMCApplication::PostTrack ( )
pure virtual

Define actions at the end of each track.

◆ FinishPrimary()

virtual void TVirtualMCApplication::FinishPrimary ( )
pure virtual

Define actions at the end of the primary track.

◆ EndOfEvent()

virtual void TVirtualMCApplication::EndOfEvent ( )
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.

◆ FinishEvent()

virtual void TVirtualMCApplication::FinishEvent ( )
pure virtual

Define actions at the end of the event.

Referenced by TMCManager::Run().

◆ TrackingRmax()

virtual Double_t TVirtualMCApplication::TrackingRmax ( ) const
inlinevirtual

Define maximum radius for tracking (optional)

Definition at line 114 of file TVirtualMCApplication.h.

◆ TrackingZmax()

virtual Double_t TVirtualMCApplication::TrackingZmax ( ) const
inlinevirtual

Define maximum z for tracking (optional)

Definition at line 117 of file TVirtualMCApplication.h.

◆ Field()

void TVirtualMCApplication::Field ( const Double_t *  x,
Double_t *  b 
) const
inlinevirtual

Calculate user field b at point x.

Definition at line 161 of file TVirtualMCApplication.h.

◆ GeaneStepping()

virtual void TVirtualMCApplication::GeaneStepping ( )
inlinevirtual

Define action at each step for Geane.

Definition at line 123 of file TVirtualMCApplication.h.

◆ CloneForWorker()

virtual TVirtualMCApplication * TVirtualMCApplication::CloneForWorker ( ) const
inlinevirtual

Clone MC application on worker.

Definition at line 127 of file TVirtualMCApplication.h.

◆ InitOnWorker()

virtual void TVirtualMCApplication::InitOnWorker ( )
inlinevirtual

Initialize MC application on worker.

Definition at line 130 of file TVirtualMCApplication.h.

◆ BeginRunOnWorker()

virtual void TVirtualMCApplication::BeginRunOnWorker ( )
inlinevirtual

Define actions at the beginning of the worker run if needed.

Definition at line 132 of file TVirtualMCApplication.h.

◆ FinishRunOnWorker()

virtual void TVirtualMCApplication::FinishRunOnWorker ( )
inlinevirtual

Define actions at the end of the worker run if needed.

Definition at line 134 of file TVirtualMCApplication.h.

◆ Merge()

virtual void TVirtualMCApplication::Merge ( TVirtualMCApplication )
inlinevirtual

Merge the data accumulated on workers to the master if needed.

Definition at line 136 of file TVirtualMCApplication.h.

Member Data Documentation

◆ fMC

TVirtualMC* TVirtualMCApplication::fMC
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().

◆ fMCManager

TMCManager* TVirtualMCApplication::fMCManager
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().

◆ fgInstance

TMCThreadLocal TVirtualMCApplication * TVirtualMCApplication::fgInstance = nullptr
staticprivate

Singleton instance.

Definition at line 151 of file TVirtualMCApplication.h.

Referenced by Instance(), TVirtualMCApplication(), and ~TVirtualMCApplication().

◆ fLockMultiThreading

Bool_t TVirtualMCApplication::fLockMultiThreading = kFALSE
staticprivate

Forbid multithreading mode if multi run via global static flag.

Definition at line 156 of file TVirtualMCApplication.h.

Referenced by RequestMCManager(), and TVirtualMCApplication().


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