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

#include <FairRunSim.h>

Inheritance diagram for FairRunSim:
FairRun

Public Member Functions

 FairRunSim (Bool_t isMaster=kTRUE)
 
virtual ~FairRunSim ()
 
void AddModule (FairModule *Mod)
 
void AddNewIon (FairIon *ion)
 
void AddNewParticle (FairParticle *Particle)
 
TObjArray * GetUserDefIons ()
 
TObjArray * GetUserDefParticles ()
 
virtual void Init ()
 
virtual void Run (Int_t NEvents=0, Int_t NotUsed=0)
 
void SetField (FairField *field)
 
void SetGenerator (FairPrimaryGenerator *Gen)
 
void SetMCEventHeader (FairMCEventHeader *McHeader)
 
void SetMaterials (const char *MatFileName)
 
void SetStoreTraj (Bool_t storeTraj=kTRUE)
 
Bool_t GetStoreTraj () const
 
void SetTrackingDebugMode (Bool_t set)
 
void SetGeoModel (char *name)
 
TString * GetGeoModel ()
 
FairFieldGetField ()
 
FairMCEventHeaderGetMCEventHeader ()
 
TObjArray * GetListOfModules ()
 
FairPrimaryGeneratorGetPrimaryGenerator ()
 
void SetPythiaDecayer (Bool_t decayer)
 
void SetPythiaDecayer (const TString &Config)
 
void SetUserDecay (const TString &Config)
 
void SetUserDecay (Bool_t decay)
 
Bool_t IsExtDecayer ()
 
Bool_t IsUserDecay ()
 
void SetRadLenRegister (Bool_t value)
 
void SetRadMapRegister (Bool_t value)
 
void SetRadGridRegister (Bool_t value)
 
void AddMesh (FairMesh *Mesh)
 
void SetUserConfig (const TString &Config)
 
TString GetUserConfig ()
 
void SetUserCuts (const TString &Cuts)
 
TString GetUserCuts ()
 
void SetBeamMom (Double_t BeamMom)
 
Double_t GetBeamMom ()
 
Bool_t UseBeamMom ()
 
void SetFieldContainer ()
 
void SetSimSetup (std::function< void()> f)
 
void SetSimSetupPostInit (std::function< void()> f)
 
void SetSimulationConfig (FairGenericVMCConfig *tconf)
 
FairGenericVMCConfigGetSimulationConfig ()
 
void SetIsMT (Bool_t isMT)
 
Bool_t IsMT () const
 
void SetImportTGeoToVMC (Bool_t v)
 
Bool_t IsImportTGeoToVMC () const
 
void StopMCRun ()
 
- Public Member Functions inherited from FairRun
 FairRun (Bool_t isMaster=kTRUE)
 
virtual ~FairRun ()
 
virtual void AddTask (FairTask *t)
 
virtual void StoreTaskNames (const FairTask *t)
 
virtual void SetTask (FairTask *t)
 
void SetEventHeader (FairEventHeader *EvHeader)
 
FairRuntimeDbGetRuntimeDb (void)
 
void SetSink (FairSink *tempSink)
 
FairSinkGetSink ()
 
Int_t GetRunId ()
 
void SetRunId (UInt_t runId)
 
FairEventHeaderGetEventHeader ()
 
Bool_t IsAna ()
 
FairTaskGetTask (const char *taskName)
 
FairTaskGetMainTask ()
 
Int_t GetNTasks ()
 
void CreateGeometryFile (const char *geofile)
 
void SetWriteRunInfoFile (Bool_t write)
 
void SetGenerateRunInfo (Bool_t write)
 
Bool_t GetWriteRunInfoFile ()
 
Bool_t IsRunInfoGenerated ()
 
void SetUseFairLinks (Bool_t val)
 
Bool_t GetIsMaster () const
 
void MarkFill (Bool_t flag)
 
TString GetOptions ()
 
void SetOptions (const TString &s)
 
virtual void SetOutputFile (const char *fname)
 
virtual void SetOutputFile (TFile *f)
 
void SetOutputFileName (const TString &name)
 
TFile * GetOutputFile ()
 
void SetUserOutputFileName (const TString &name)
 
TString GetUserOutputFileName () const
 
void AddAlignmentMatrices (const std::map< std::string, TGeoHMatrix > &alignmentMatrices, bool invertMatrices=false)
 

Static Public Member Functions

static FairRunSimInstance ()
 
- Static Public Member Functions inherited from FairRun
static FairRunInstance ()
 

Protected Member Functions

 ClassDef (FairRunSim, 2)
 /** Simulation configuration */ More...
 
- Protected Member Functions inherited from FairRun
void AlignGeometry () const
 
 ClassDef (FairRun, 5)
 

Protected Attributes

Int_t count
 
FairMCApplicationfApp
 /** Internal counter*/ More...
 
Double_t fBeamMom
 /** Main VMC application */ More...
 
Bool_t fUseBeamMom
 /** Beam Energy in GeV/c */ More...
 
FairPrimaryGeneratorfGen
 /** flag for use Beam Energy */ More...
 
FairMCEventHeaderfMCEvHead
 /** Primary Event Generator */ More...
 
FairFieldfField
 /** Singleton Instance */ More...
 
const char * fMapName
 
TObjArray * fIons
 /** Input file name map*/ More...
 
TObjArray * fParticles
 /** Array of user defined ions */ More...
 
TObjArray * ListOfModules
 /** Array of user defined particles*/ More...
 
TString MatFname
 /** Array of used modules */ More...
 
Bool_t fStoreTraj
 /** Material file name */ More...
 
TString * fLoaderName
 /** Trajectory store flags */ More...
 
Bool_t fPythiaDecayer
 /** Geometry Model (TGeo or G3)*/ More...
 
TString fPythiaDecayerConfig
 /** flag for using Pythia decayer*/ More...
 
Bool_t fUserDecay
 /** Macro for Pythia decay configuration*/ More...
 
TString fUserDecayConfig
 
Bool_t fRadLength
 /** Macro for decay configuration*/ More...
 
Bool_t fRadMap
 /** flag for registring radiation length*/ More...
 
Bool_t fRadGrid
 /** flag for RadiationMapManager More...
 
TObjArray * fMeshList
 
TString fUserConfig
 /** radiation grid scoring More...
 
TString fUserCuts
 /** Macro for geant configuration*/ More...
 
Bool_t fIsMT
 /** Macro for geant cuts*/ More...
 
Bool_t fImportTGeoToVMC
 /** MT mode option (Geant4 only)*/ More...
 
std::function< void()> fSimSetup
 /** Allow importing TGeometry to VMC */ More...
 
*bool fUseSimSetupFunction = false
 
std::function< void()> fSimSetupPostInit
 
*bool fUseSimSetupPostInitFunction = false
 
FairGenericVMCConfigfSimulationConfig
 
- Protected Attributes inherited from FairRun
FairRuntimeDbfRtdb
 
FairTaskfTask
 
FairRootManagerfRootManager
 
FairSinkfSink
 
TString fUserOutputFileName
 
TString fOptions
 
UInt_t fRunId
 
Bool_t fAna
 
FairEventHeaderfEvtHeader
 
FairFileHeaderfFileHeader
 
Bool_t fGenerateRunInfo
 
Bool_t fIsMaster
 
Bool_t fMarkFill
 
FairAlignmentHandler fAlignmentHandler
 

Static Protected Attributes

static TMCThreadLocal FairRunSimfginstance = 0
 /** MC Event Header */ More...
 
- Static Protected Attributes inherited from FairRun
static TMCThreadLocal FairRunfRunInstance = 0
 

Detailed Description

Configure the Simulation session

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

Definition at line 35 of file FairRunSim.h.

Constructor & Destructor Documentation

FairRunSim::FairRunSim ( Bool_t  isMaster = kTRUE)

default ctor

Definition at line 49 of file FairRunSim.cxx.

FairRunSim::~FairRunSim ( )
virtual

default dtor

 List of Modules is filled via AddModule from the macro, but it

is the responsibility of FairRunSim to call the destructors of the modules-

Definition at line 89 of file FairRunSim.cxx.

Member Function Documentation

void FairRunSim::AddMesh ( FairMesh Mesh)

Definition at line 124 of file FairRunSim.cxx.

void FairRunSim::AddModule ( FairModule Mod)

Add a module to the simulation (e.g. PIPE, Magnet, ..etc)

Definition at line 118 of file FairRunSim.cxx.

void FairRunSim::AddNewIon ( FairIon ion)
inline

Add a user defined ion to the simulation

Definition at line 51 of file FairRunSim.h.

void FairRunSim::AddNewParticle ( FairParticle Particle)
inline

Add a user defined ion to the simulation

Definition at line 55 of file FairRunSim.h.

FairRunSim::ClassDef ( FairRunSim  ,
 
)
protected

/** Simulation configuration */

Double_t FairRunSim::GetBeamMom ( )
inline

Get the Beam energy

Definition at line 164 of file FairRunSim.h.

FairField* FairRunSim::GetField ( )
inlinevirtual

Get the field used in simulation

Implements FairRun.

Definition at line 112 of file FairRunSim.h.

TString* FairRunSim::GetGeoModel ( )
inline

return the geometry loader used in this session

Definition at line 109 of file FairRunSim.h.

TObjArray* FairRunSim::GetListOfModules ( )
inline

return the full list of modules used in simulation

Definition at line 118 of file FairRunSim.h.

FairMCEventHeader * FairRunSim::GetMCEventHeader ( )

Get the detector specific event header

Definition at line 357 of file FairRunSim.cxx.

FairPrimaryGenerator* FairRunSim::GetPrimaryGenerator ( )
inline

Get the used primary generator

Definition at line 121 of file FairRunSim.h.

FairGenericVMCConfig* FairRunSim::GetSimulationConfig ( )
inline

Definition at line 182 of file FairRunSim.h.

Bool_t FairRunSim::GetStoreTraj ( ) const
inline

Return the switch for the track visualisation

Definition at line 95 of file FairRunSim.h.

TString FairRunSim::GetUserConfig ( )
inline

Definition at line 151 of file FairRunSim.h.

TString FairRunSim::GetUserCuts ( )
inline

Definition at line 154 of file FairRunSim.h.

TObjArray * FairRunSim::GetUserDefIons ( )

this method is used by the FAIRMCApplication

return the array of user defined ions

Definition at line 131 of file FairRunSim.cxx.

TObjArray * FairRunSim::GetUserDefParticles ( )

this method is used by the FAIRMCApplication

return the array of user defined particles

Definition at line 137 of file FairRunSim.cxx.

void FairRunSim::Init ( )
virtual

Initialize the Simulation

Initialize the simulation session

Add Tasks to simulation if any

This call will create the container if it does not exist

This call will create the container if it does not exist

Set the configuration for MC engine

Implements FairRun.

Definition at line 143 of file FairRunSim.cxx.

FairRunSim * FairRunSim::Instance ( )
static

Singelton instance

Definition at line 116 of file FairRunSim.cxx.

Bool_t FairRunSim::IsExtDecayer ( )
inline

Flag for external decayer

Definition at line 136 of file FairRunSim.h.

Bool_t FairRunSim::IsImportTGeoToVMC ( ) const
inline

Definition at line 188 of file FairRunSim.h.

Bool_t FairRunSim::IsMT ( ) const
inline

Definition at line 185 of file FairRunSim.h.

Bool_t FairRunSim::IsUserDecay ( )
inline

Flag for User decay

Definition at line 139 of file FairRunSim.h.

void FairRunSim::Run ( Int_t  NEvents = 0,
Int_t  NotUsed = 0 
)
virtual

run the simulation

Implements FairRun.

Definition at line 306 of file FairRunSim.cxx.

void FairRunSim::SetBeamMom ( Double_t  BeamMom)
inline

Set Beam energy in GeV/c

Definition at line 157 of file FairRunSim.h.

void FairRunSim::SetField ( FairField field)

Set the magnetic that has to be used for simulation field

Definition at line 308 of file FairRunSim.cxx.

void FairRunSim::SetFieldContainer ( )

Definition at line 247 of file FairRunSim.cxx.

void FairRunSim::SetGenerator ( FairPrimaryGenerator Gen)

Set the event generator that has to be used for simulation field

Definition at line 310 of file FairRunSim.cxx.

void FairRunSim::SetGeoModel ( char *  name)

Set geometry builder

Definition at line 331 of file FairRunSim.cxx.

void FairRunSim::SetImportTGeoToVMC ( Bool_t  v)
inline

Definition at line 187 of file FairRunSim.h.

void FairRunSim::SetIsMT ( Bool_t  isMT)
inline

Definition at line 184 of file FairRunSim.h.

void FairRunSim::SetMaterials ( const char *  MatFileName)

Set the material file name to be used

Definition at line 312 of file FairRunSim.cxx.

void FairRunSim::SetMCEventHeader ( FairMCEventHeader McHeader)
inline

Set the experiment dependent event header for each Monte Carlo Event

Definition at line 86 of file FairRunSim.h.

void FairRunSim::SetPythiaDecayer ( Bool_t  decayer)
inline

switch On/Off external decayer (Pythia)

Definition at line 124 of file FairRunSim.h.

void FairRunSim::SetPythiaDecayer ( const TString &  Config)

switch On external decayer (Pythia). Config macro will be used

switch On external decayer (Pythia). Config macro will be used

Definition at line 343 of file FairRunSim.cxx.

void FairRunSim::SetRadGridRegister ( Bool_t  value)
inline

Definition at line 146 of file FairRunSim.h.

void FairRunSim::SetRadLenRegister ( Bool_t  value)
inline

Switch on/off Radiation length register

Definition at line 142 of file FairRunSim.h.

void FairRunSim::SetRadMapRegister ( Bool_t  value)
inline

Definition at line 144 of file FairRunSim.h.

void FairRunSim::SetSimSetup ( std::function< void()>  f)
inline

Definition at line 170 of file FairRunSim.h.

void FairRunSim::SetSimSetupPostInit ( std::function< void()>  f)
inline

Definition at line 175 of file FairRunSim.h.

void FairRunSim::SetSimulationConfig ( FairGenericVMCConfig tconf)
inline

Definition at line 181 of file FairRunSim.h.

void FairRunSim::SetStoreTraj ( Bool_t  storeTraj = kTRUE)
inline

switch On/Off the track visualisation

Definition at line 92 of file FairRunSim.h.

void FairRunSim::SetTrackingDebugMode ( Bool_t  set)
inline

switch On/Off the debug mode

Definition at line 98 of file FairRunSim.h.

void FairRunSim::SetUserConfig ( const TString &  Config)
inline

Definition at line 150 of file FairRunSim.h.

void FairRunSim::SetUserCuts ( const TString &  Cuts)
inline

Definition at line 153 of file FairRunSim.h.

void FairRunSim::SetUserDecay ( const TString &  Config)

switch On user defined decay, Config macro will be called

switch On user defined decay, Config macro will be called

Definition at line 350 of file FairRunSim.cxx.

void FairRunSim::SetUserDecay ( Bool_t  decay)
inline

switch On/Off user defined decay if true gconfig/UserDecay.C macro will be called

Definition at line 133 of file FairRunSim.h.

void FairRunSim::StopMCRun ( )
inline

Definition at line 190 of file FairRunSim.h.

Bool_t FairRunSim::UseBeamMom ( )
inline

Get beam energy flag

Definition at line 167 of file FairRunSim.h.

Member Data Documentation

Int_t FairRunSim::count
protected

Definition at line 199 of file FairRunSim.h.

FairMCApplication* FairRunSim::fApp
protected

/** Internal counter*/

Definition at line 200 of file FairRunSim.h.

Double_t FairRunSim::fBeamMom
protected

/** Main VMC application */

Definition at line 201 of file FairRunSim.h.

FairField* FairRunSim::fField
protected

/** Singleton Instance */

Definition at line 206 of file FairRunSim.h.

FairPrimaryGenerator* FairRunSim::fGen
protected

/** flag for use Beam Energy */

Definition at line 203 of file FairRunSim.h.

TMCThreadLocal FairRunSim * FairRunSim::fginstance = 0
staticprotected

/** MC Event Header */

Definition at line 205 of file FairRunSim.h.

Bool_t FairRunSim::fImportTGeoToVMC
protected

/** MT mode option (Geant4 only)*/

Definition at line 225 of file FairRunSim.h.

TObjArray* FairRunSim::fIons
protected

/** Input file name map*/

Definition at line 208 of file FairRunSim.h.

Bool_t FairRunSim::fIsMT
protected

/** Macro for geant cuts*/

Definition at line 224 of file FairRunSim.h.

TString* FairRunSim::fLoaderName
protected

/** Trajectory store flags */

Definition at line 213 of file FairRunSim.h.

const char* FairRunSim::fMapName
protected

Magnetic Field

Definition at line 207 of file FairRunSim.h.

FairMCEventHeader* FairRunSim::fMCEvHead
protected

/** Primary Event Generator */

Definition at line 204 of file FairRunSim.h.

TObjArray* FairRunSim::fMeshList
protected

Definition at line 221 of file FairRunSim.h.

TObjArray* FairRunSim::fParticles
protected

/** Array of user defined ions */

Definition at line 209 of file FairRunSim.h.

Bool_t FairRunSim::fPythiaDecayer
protected

/** Geometry Model (TGeo or G3)*/

Definition at line 214 of file FairRunSim.h.

TString FairRunSim::fPythiaDecayerConfig
protected

/** flag for using Pythia decayer*/

Definition at line 215 of file FairRunSim.h.

Bool_t FairRunSim::fRadGrid
protected

/** flag for RadiationMapManager

Definition at line 220 of file FairRunSim.h.

Bool_t FairRunSim::fRadLength
protected

/** Macro for decay configuration*/

Definition at line 218 of file FairRunSim.h.

Bool_t FairRunSim::fRadMap
protected

/** flag for registring radiation length*/

Definition at line 219 of file FairRunSim.h.

std::function<void()> FairRunSim::fSimSetup
protected

/** Allow importing TGeometry to VMC */

Definition at line 226 of file FairRunSim.h.

std::function<void()> FairRunSim::fSimSetupPostInit
protected

Definition at line 229 of file FairRunSim.h.

FairGenericVMCConfig* FairRunSim::fSimulationConfig
protected

Definition at line 232 of file FairRunSim.h.

Bool_t FairRunSim::fStoreTraj
protected

/** Material file name */

Definition at line 212 of file FairRunSim.h.

Bool_t FairRunSim::fUseBeamMom
protected

/** Beam Energy in GeV/c */

Definition at line 202 of file FairRunSim.h.

TString FairRunSim::fUserConfig
protected

/** radiation grid scoring

Definition at line 222 of file FairRunSim.h.

TString FairRunSim::fUserCuts
protected

/** Macro for geant configuration*/

Definition at line 223 of file FairRunSim.h.

Bool_t FairRunSim::fUserDecay
protected

/** Macro for Pythia decay configuration*/

Definition at line 216 of file FairRunSim.h.

TString FairRunSim::fUserDecayConfig
protected

flag for setting user decay

Definition at line 217 of file FairRunSim.h.

* bool FairRunSim::fUseSimSetupFunction = false
protected

/** A user provided function to do sim setup / instead of using macros

Definition at line 228 of file FairRunSim.h.

* bool FairRunSim::fUseSimSetupPostInitFunction = false
protected

/** A user provided function to do sim setup / instead of using macros

Definition at line 231 of file FairRunSim.h.

TObjArray* FairRunSim::ListOfModules
protected

/** Array of user defined particles*/

Definition at line 210 of file FairRunSim.h.

TString FairRunSim::MatFname
protected

/** Array of used modules */

Definition at line 211 of file FairRunSim.h.


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