FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairMCApplication Class Reference

#include <FairMCApplication.h>

Inheritance diagram for FairMCApplication:

Public Member Functions

 FairMCApplication (const char *name, const char *title, TObjArray *ModList, const char *MatName)
 
 FairMCApplication ()
 
virtual ~FairMCApplication ()
 
virtual void AddDecayModes ()
 
virtual void AddParticles ()
 
virtual void AddIons ()
 
void AddTask (TTask *fTask)
 
virtual void BeginEvent ()
 
virtual void BeginPrimary ()
 
virtual void ConstructGeometry ()
 
virtual Bool_t MisalignGeometry ()
 
virtual void ConstructOpGeometry ()
 
virtual void FinishEvent ()
 
virtual void FinishPrimary ()
 
void FinishRun ()
 
virtual void GeneratePrimaries ()
 
FairDetectorGetDetector (const char *DetName)
 
FairFieldGetField ()
 
FairPrimaryGeneratorGetGenerator ()
 
TTask * GetListOfTasks ()
 
FairGenericStackGetStack ()
 
TChain * GetChain ()
 
virtual void InitGeometry ()
 
void InitMC (const char *setup, const char *cuts)
 
void InitTasks ()
 
virtual void PostTrack ()
 
virtual void PreTrack ()
 
virtual TVirtualMCApplication * CloneForWorker () const
 
virtual void InitOnWorker ()
 
virtual void FinishRunOnWorker ()
 
void RunMC (Int_t nofEvents)
 
void SetField (FairField *field)
 
void SetGenerator (FairPrimaryGenerator *fxGenerator)
 
void SetParTask ()
 
void SetPythiaDecayer (Bool_t decayer)
 
void SetPythiaDecayerConfig (const TString decayerConf)
 
void SetRadiationLengthReg (Bool_t RadLen)
 
void SetRadiationMapReg (Bool_t RadMap)
 
void SetTrackingDebugMode (Bool_t set)
 
void SetUserDecay (Bool_t decay)
 
void SetUserDecayConfig (const TString decayerConf)
 
virtual void Stepping ()
 
virtual void StopRun ()
 
virtual void StopMCRun ()
 
virtual Double_t TrackingRmax () const
 
virtual Double_t TrackingZmax () const
 
void AddMeshList (TObjArray *meshList)
 
void SetSaveCurrentEvent (Bool_t set)
 
FairMCApplicationState GetState () const
 

Static Public Member Functions

static FairMCApplicationInstance ()
 

Protected Member Functions

 ClassDef (FairMCApplication, 4)
 

Protected Attributes

TRefArray * fActiveDetectors
 
FairTaskfFairTaskList
 
TRefArray * fDetectors
 
TRefArray * fDetMap
 
TIterator * fModIter
 
TObjArray * fModules
 
Int_t fNoSenVolumes
 
Bool_t fPythiaDecayer
 
TString fPythiaDecayerConfig
 
FairGenericStackfStack
 
FairRootManagerfRootManager
 
TRefArray * fSenVolumes
 
FairFieldfxField
 
FairPrimaryGeneratorfEvGen
 
Int_t fMcVersion
 
FairTrajFilterfTrajFilter
 
Bool_t fTrajAccepted
 
Bool_t fUserDecay
 
TString fUserDecayConfig
 
Bool_t fDebug
 
FairVolumefDisVol
 
FairDetectorfDisDet
 
std::multimap< Int_t,
FairVolume * > 
fVolMap
 
std::multimap< Int_t,
FairVolume * >::iterator 
fVolIter
 
std::map< Int_t, Int_t > fModVolMap
 
std::map< Int_t, Int_t >::iterator fModVolIter
 
TLorentzVector fTrkPos
 
Bool_t fRadLength
 
FairRadLenManagerfRadLenMan
 
Bool_t fRadMap
 
FairRadMapManagerfRadMapMan
 
FairRadGridManagerfRadGridMan
 
FairEventHeaderfEventHeader
 
FairMCEventHeaderfMCEventHeader
 
std::list< FairDetector * > listActiveDetectors
 
std::list< FairDetector * > listDetectors
 
TVirtualMC * fMC
 
FairRunSimfRun
 
Bool_t fSaveCurrentEvent
 
FairMCApplicationState fState
 

Detailed Description

The Main Application ( Interface to MonteCarlo application )

Author
M. Al-Turany, D. Bertini
Version
0.1
Since
12.01.04

Definition at line 60 of file FairMCApplication.h.

Constructor & Destructor Documentation

FairMCApplication::FairMCApplication ( const char *  name,
const char *  title,
TObjArray *  ModList,
const char *  MatName 
)

Standard constructor

Parameters
namename
titletitle
ModLista TObjArray containing all detectors and modules used in this simulation
MatNamematerial file name

Definition at line 75 of file FairMCApplication.cxx.

FairMCApplication::FairMCApplication ( )

default constructor

Definition at line 258 of file FairMCApplication.cxx.

FairMCApplication::~FairMCApplication ( )
virtual

default destructor

Definition at line 306 of file FairMCApplication.cxx.

Member Function Documentation

void FairMCApplication::AddDecayModes ( )
virtual

Definition at line 1278 of file FairMCApplication.cxx.

void FairMCApplication::AddIons ( )
virtual

Add user defined ions (optional)

Initialize the event generator

Definition at line 1173 of file FairMCApplication.cxx.

void FairMCApplication::AddMeshList ( TObjArray *  meshList)

Definition at line 1433 of file FairMCApplication.cxx.

void FairMCApplication::AddParticles ( )
virtual

Add user defined particles (optional)

Definition at line 1213 of file FairMCApplication.cxx.

void FairMCApplication::AddTask ( TTask *  fTask)

Add user defined Tasks to be executed after each event (optional)

Parameters
fTask,:Task that has to be excuted during simulation

Definition at line 1361 of file FairMCApplication.cxx.

void FairMCApplication::BeginEvent ( )
virtual

Define actions at the beginning of the event

Definition at line 541 of file FairMCApplication.cxx.

void FairMCApplication::BeginPrimary ( )
virtual

Define actions at the beginning of primary track

Definition at line 552 of file FairMCApplication.cxx.

FairMCApplication::ClassDef ( FairMCApplication  ,
 
)
protected
TVirtualMCApplication * FairMCApplication::CloneForWorker ( ) const
virtual

Clone for worker (used in MT mode only)

Definition at line 590 of file FairMCApplication.cxx.

void FairMCApplication::ConstructGeometry ( )
virtual

Construct user geometry

Definition at line 914 of file FairMCApplication.cxx.

void FairMCApplication::ConstructOpGeometry ( )
virtual

Define parameters for optical processes (optional)

Definition at line 872 of file FairMCApplication.cxx.

void FairMCApplication::FinishEvent ( )
virtual

Define actions at the end of event

Definition at line 797 of file FairMCApplication.cxx.

void FairMCApplication::FinishPrimary ( )
virtual

Define actions at the end of primary track

Definition at line 765 of file FairMCApplication.cxx.

void FairMCApplication::FinishRun ( )

Define actions at the end of run

Definition at line 467 of file FairMCApplication.cxx.

void FairMCApplication::FinishRunOnWorker ( )
virtual

Finish run on worker (used in MT mode only)

Definition at line 644 of file FairMCApplication.cxx.

void FairMCApplication::GeneratePrimaries ( )
virtual

Generate primary particles

Definition at line 1154 of file FairMCApplication.cxx.

TChain * FairMCApplication::GetChain ( )

Definition at line 1404 of file FairMCApplication.cxx.

FairDetector * FairMCApplication::GetDetector ( const char *  DetName)

Return detector by name

Definition at line 1168 of file FairMCApplication.cxx.

FairField* FairMCApplication::GetField ( )
inline

Return Field used in simulation

Definition at line 110 of file FairMCApplication.h.

FairPrimaryGenerator * FairMCApplication::GetGenerator ( )

Return primary generator

Definition at line 1355 of file FairMCApplication.cxx.

TTask * FairMCApplication::GetListOfTasks ( )

Return list of tasks

Definition at line 1375 of file FairMCApplication.cxx.

FairGenericStack * FairMCApplication::GetStack ( )

Definition at line 1372 of file FairMCApplication.cxx.

FairMCApplicationState FairMCApplication::GetState ( ) const
inline

Get the current application state.

Definition at line 210 of file FairMCApplication.h.

void FairMCApplication::InitGeometry ( )
virtual

Initialize geometry

Initialize geometry

Register stack and detector collections

SetSpecialPhysicsCuts for FairDetector objects and all passive modules inheriting from FairModule

Tasks has to be initialized here, they have access to the detector branches and still can create objects in the tree

There is always a Main Task ! so .. always a InitTasks() is called <D.B>

save Geo Params in Output file

Definition at line 1007 of file FairMCApplication.cxx.

void FairMCApplication::InitMC ( const char *  setup,
const char *  cuts 
)

Initialize MC engine

Definition at line 411 of file FairMCApplication.cxx.

void FairMCApplication::InitOnWorker ( )
virtual

Init application on worker (used in MT mode only)

Definition at line 617 of file FairMCApplication.cxx.

void FairMCApplication::InitTasks ( )

Initialize Tasks if any

Definition at line 1393 of file FairMCApplication.cxx.

FairMCApplication * FairMCApplication::Instance ( )
inlinestatic

Singelton instance

Definition at line 321 of file FairMCApplication.h.

Bool_t FairMCApplication::MisalignGeometry ( )
virtual

Align or misalign geometry before actual run

Definition at line 999 of file FairMCApplication.cxx.

void FairMCApplication::PostTrack ( )
virtual

Define actions at the end of each track

Definition at line 755 of file FairMCApplication.cxx.

void FairMCApplication::PreTrack ( )
virtual

Define actions at the beginning of each track

Definition at line 562 of file FairMCApplication.cxx.

void FairMCApplication::RunMC ( Int_t  nofEvents)

Run the MC engine

Parameters
nofEvents: number of events to simulate

Set the list of active detectors to the stack

Definition at line 451 of file FairMCApplication.cxx.

void FairMCApplication::SetField ( FairField field)

Set the magnetic field for simulation

Parameters
field,:magnetic field

Definition at line 870 of file FairMCApplication.cxx.

void FairMCApplication::SetGenerator ( FairPrimaryGenerator fxGenerator)

Set the event generator for simulation

Parameters
fxGenerator,:Event generator(s)

Definition at line 1358 of file FairMCApplication.cxx.

void FairMCApplication::SetParTask ( )

Set the parameter containers needed by Tasks(if any)

Definition at line 1378 of file FairMCApplication.cxx.

void FairMCApplication::SetPythiaDecayer ( Bool_t  decayer)
inline

Switch for using Pythia as external decayer

Parameters
decayer,:if TRUE pythia will decay particles specifid in the Decay Config macro (see SetPythiaDecayerConfig)

Definition at line 160 of file FairMCApplication.h.

void FairMCApplication::SetPythiaDecayerConfig ( const TString  decayerConf)
inline

set the decay configuration macro to be used by Pythia

Definition at line 164 of file FairMCApplication.h.

void FairMCApplication::SetRadiationLengthReg ( Bool_t  RadLen)

Switch for using the radiation length manager

Definition at line 1415 of file FairMCApplication.cxx.

void FairMCApplication::SetRadiationMapReg ( Bool_t  RadMap)

Switch for using the radiation map manager

Definition at line 1424 of file FairMCApplication.cxx.

void FairMCApplication::SetSaveCurrentEvent ( Bool_t  set)
inline

Set if the current event should be written to the output file. The default value which is set back after each event is to store the event.

Definition at line 205 of file FairMCApplication.h.

void FairMCApplication::SetTrackingDebugMode ( Bool_t  set)
inline

Switch for debuging the tracking

Definition at line 176 of file FairMCApplication.h.

void FairMCApplication::SetUserDecay ( Bool_t  decay)
inline

Switch for using 2 or 3 body phase-space decay

Parameters
decay,:if TRUE 2/3 body phase space decay will be used for particle specified in the User Decay Config macro (see SetUserDecayConfig)

Definition at line 182 of file FairMCApplication.h.

void FairMCApplication::SetUserDecayConfig ( const TString  decayerConf)
inline

set the decay configuration macro to be used by user decay

Definition at line 186 of file FairMCApplication.h.

void FairMCApplication::Stepping ( )
virtual

Define action at each step, dispatch the action to the corresponding detectors

Definition at line 652 of file FairMCApplication.cxx.

void FairMCApplication::StopMCRun ( )
virtual

Stop the run

Definition at line 790 of file FairMCApplication.cxx.

void FairMCApplication::StopRun ( )
virtual

Stop the run

Definition at line 777 of file FairMCApplication.cxx.

Double_t FairMCApplication::TrackingRmax ( ) const
virtual

Define maximum radius for tracking (optional)

Definition at line 856 of file FairMCApplication.cxx.

Double_t FairMCApplication::TrackingZmax ( ) const
virtual

Define maximum z for tracking (optional)

Definition at line 863 of file FairMCApplication.cxx.

Member Data Documentation

TRefArray* FairMCApplication::fActiveDetectors
protected

List of active detector

Definition at line 221 of file FairMCApplication.h.

Bool_t FairMCApplication::fDebug
protected

Debug flag

Definition at line 259 of file FairMCApplication.h.

TRefArray* FairMCApplication::fDetectors
protected

detector list (Passive and Active)

Definition at line 225 of file FairMCApplication.h.

TRefArray* FairMCApplication::fDetMap
protected

Map used for dispatcher

Definition at line 227 of file FairMCApplication.h.

FairDetector* FairMCApplication::fDisDet
protected

dispatcher internal use

Definition at line 263 of file FairMCApplication.h.

FairVolume* FairMCApplication::fDisVol
protected

dispatcher internal use

Definition at line 261 of file FairMCApplication.h.

FairEventHeader* FairMCApplication::fEventHeader
protected

Definition at line 286 of file FairMCApplication.h.

FairPrimaryGenerator* FairMCApplication::fEvGen
protected

Primary generator

Definition at line 247 of file FairMCApplication.h.

FairTask* FairMCApplication::fFairTaskList
protected

List of FairTask

Definition at line 223 of file FairMCApplication.h.

TVirtualMC* FairMCApplication::fMC
protected

Pointer to the current MC engine //!

Definition at line 295 of file FairMCApplication.h.

FairMCEventHeader* FairMCApplication::fMCEventHeader
protected

Definition at line 288 of file FairMCApplication.h.

Int_t FairMCApplication::fMcVersion
protected

MC Engine 1= Geant3, 2 = Geant4

Definition at line 249 of file FairMCApplication.h.

TIterator* FairMCApplication::fModIter
protected

Iterator for Module list

Definition at line 229 of file FairMCApplication.h.

TObjArray* FairMCApplication::fModules
protected

Module list in simulation

Definition at line 231 of file FairMCApplication.h.

std::map<Int_t, Int_t>::iterator FairMCApplication::fModVolIter
protected

dispatcher internal use RadLen

Definition at line 272 of file FairMCApplication.h.

std::map<Int_t, Int_t> FairMCApplication::fModVolMap
protected

Track position dispatcher internal use RadLeng

Definition at line 270 of file FairMCApplication.h.

Int_t FairMCApplication::fNoSenVolumes
protected

Number of sensetive volumes in simulation session

Definition at line 233 of file FairMCApplication.h.

Bool_t FairMCApplication::fPythiaDecayer
protected

flag for using Pythia as external decayer

Definition at line 235 of file FairMCApplication.h.

TString FairMCApplication::fPythiaDecayerConfig
protected

Pythia decay config macro

Definition at line 237 of file FairMCApplication.h.

FairRadGridManager* FairMCApplication::fRadGridMan
protected

Radiation map Grid Manager

Definition at line 284 of file FairMCApplication.h.

Bool_t FairMCApplication::fRadLength
protected

Flag for Radiation length register mode

Definition at line 275 of file FairMCApplication.h.

FairRadLenManager* FairMCApplication::fRadLenMan
protected

Radiation length Manager

Definition at line 278 of file FairMCApplication.h.

Bool_t FairMCApplication::fRadMap
protected

Flag for Radiation map register mode

Definition at line 280 of file FairMCApplication.h.

FairRadMapManager* FairMCApplication::fRadMapMan
protected

Radiation Map Manager

Definition at line 282 of file FairMCApplication.h.

FairRootManager* FairMCApplication::fRootManager
protected

Pointer to thr I/O Manager

Definition at line 241 of file FairMCApplication.h.

FairRunSim* FairMCApplication::fRun
protected

Pointer to FairRunSim //!

Definition at line 297 of file FairMCApplication.h.

Bool_t FairMCApplication::fSaveCurrentEvent
protected

Flag if the current event should be saved

Definition at line 300 of file FairMCApplication.h.

TRefArray* FairMCApplication::fSenVolumes
protected

List of sensetive volumes in all detectors

Definition at line 243 of file FairMCApplication.h.

FairGenericStack* FairMCApplication::fStack
protected

Simulation Stack

Definition at line 239 of file FairMCApplication.h.

FairMCApplicationState FairMCApplication::fState
protected

Current state

Definition at line 303 of file FairMCApplication.h.

Bool_t FairMCApplication::fTrajAccepted
protected

Flag for accepted tracks for visualization

Definition at line 253 of file FairMCApplication.h.

FairTrajFilter* FairMCApplication::fTrajFilter
protected

Track visualization manager

Definition at line 251 of file FairMCApplication.h.

TLorentzVector FairMCApplication::fTrkPos
protected

Definition at line 273 of file FairMCApplication.h.

Bool_t FairMCApplication::fUserDecay
protected

Flag for using user decay

Definition at line 255 of file FairMCApplication.h.

TString FairMCApplication::fUserDecayConfig
protected

User decay config macro

Definition at line 257 of file FairMCApplication.h.

std::multimap<Int_t, FairVolume*>::iterator FairMCApplication::fVolIter
protected

dispatcher internal use

Definition at line 267 of file FairMCApplication.h.

std::multimap<Int_t, FairVolume*> FairMCApplication::fVolMap
protected

dispatcher internal use

Definition at line 265 of file FairMCApplication.h.

FairField* FairMCApplication::fxField
protected

Magnetic Field Pointer

Definition at line 245 of file FairMCApplication.h.

std::list<FairDetector*> FairMCApplication::listActiveDetectors
protected

list of senstive detectors used in the simuation session

Definition at line 290 of file FairMCApplication.h.

std::list<FairDetector*> FairMCApplication::listDetectors
protected

list of all detectors used in the simuation session

Definition at line 292 of file FairMCApplication.h.


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