EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <EicRoot/blob/master/base/FairRunSim.h>
Public Member Functions | |
FairRunSim () | |
virtual | ~FairRunSim () |
virtual 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) |
virtual void | SetMaterials (const char *MatFileName) |
void | SetStoreTraj (Bool_t storeTraj=kTRUE) |
void | SetTrackingDebugMode (Bool_t set) |
void | SetGeoModel (char *name) |
TString * | GetGeoModel () |
FairField * | GetField () |
FairMCEventHeader * | GetMCEventHeader () |
TObjArray * | GetListOfModules () |
FairPrimaryGenerator * | GetPrimaryGenerator () |
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) |
void | SetUserCuts (const TString &Cuts) |
void | SetBeamMom (Double_t BeamMom) |
Double_t | GetBeamMom () |
Bool_t | UseBeamMom () |
void | SetFieldContainer () |
Public Member Functions inherited from FairRun | |
FairRun () | |
virtual | ~FairRun () |
virtual void | AddTask (FairTask *t) |
virtual void | SetTask (FairTask *t) |
virtual void | SetOutputFile (const char *fname) |
void | SetOutputFile (TFile *f) |
void | SetEventHeader (FairEventHeader *EvHeader) |
FairRuntimeDb * | GetRuntimeDb (void) |
TFile * | GetOutputFile () |
Int_t | GetRunId () |
FairEventHeader * | GetEventHeader () |
Bool_t | IsAna () |
FairTask * | GetTask (const char *taskName) |
FairTask * | GetMainTask () |
Int_t | GetNTasks () |
void | CreateGeometryFile (const char *geofile) |
void | SetWriteRunInfoFile (Bool_t write) |
Bool_t | GetWriteRunInfoFile () |
virtual void | RunCoreStart (Int_t NStart=0, Int_t NStop=0) |
virtual void | RunCoreFinish (void) |
virtual bool | RunCoreImportNextEvent (void) |
virtual void | RunCoreProcessNextEvent (void) |
virtual bool | JanaLoopPossible (void) const |
int | GetCurrentEventIndex (void) const |
Static Public Member Functions | |
static FairRunSim * | Instance () |
Static Public Member Functions inherited from FairRun | |
static FairRun * | Instance () |
static void | JanaPluginMode (bool what) |
static bool | JanaPluginMode (void) |
Protected Attributes | |
Int_t | count |
FairMCApplication * | fApp |
/** Internal counter*/ | |
Double_t | fBeamMom |
/** Main VMC application */ | |
Bool_t | fUseBeamMom |
/** Beam Energy in GeV/c */ | |
FairPrimaryGenerator * | fGen |
/** flag for use Beam Energy */ | |
FairMCEventHeader * | fMCEvHead |
/** Primary Event Generator */ | |
FairField * | fField |
/** Singelton Instance */ | |
const char * | fMapName |
TObjArray * | fIons |
/** Input file name map*/ | |
TObjArray * | fParticles |
/** Array of user defined ions */ | |
TObjArray * | ListOfModules |
/** Array of user defined particles*/ | |
TString | MatFname |
/** Array of used modules */ | |
Bool_t | fStoreTraj |
/** Material file name */ | |
TString * | fLoaderName |
/** Trajectory store flags */ | |
Bool_t | fPythiaDecayer |
/** Geometry Model (TGeo or G3)*/ | |
TString | fPythiaDecayerConfig |
/** flag for using Pythia decayer*/ | |
Bool_t | fUserDecay |
/** Macro for Pythia decay configuration*/ | |
TString | fUserDecayConfig |
Bool_t | fRadLength |
/** Macro for decay configuration*/ | |
Bool_t | fRadMap |
/** flag for registring radiation length*/ | |
Bool_t | fRadGrid |
/** flag for RadiationMapManager | |
TObjArray * | fMeshList |
TString | fUserConfig |
/** radiation grid scoring | |
TString | fUserCuts |
/** Macro for geant configuration*/ | |
Protected Attributes inherited from FairRun | |
FairLogger * | fLogger |
FairRuntimeDb * | fRtdb |
FairTask * | fTask |
const char * | fOutname |
FairRootManager * | fRootManager |
TFile * | fOutFile |
UInt_t | fRunId |
Bool_t | fAna |
FairEventHeader * | fEvHead |
FairFileHeader * | fFileHeader |
Bool_t | fWriteRunInfo |
int | mEvCurrent |
Static Protected Attributes | |
static FairRunSim * | fginstance = 0 |
/** MC Event Header */ | |
Static Protected Attributes inherited from FairRun | |
static FairRun * | fRunInstance = 0 |
static bool | mJanaPluginMode = false |
Private Member Functions | |
FairRunSim (const FairRunSim &M) | |
FairRunSim & | operator= (const FairRunSim &) |
void | SetMCConfig () |
void | CheckFlukaExec () |
Configure the Simulation session
Definition at line 25 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 25 of file FairRunSim.h
FairRunSim::FairRunSim | ( | ) |
default ctor
|
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 66 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 66 of file FairRunSim.cxx
References FairLogger::Debug(), fApp, fField, fGen, fIons, FairRun::fLogger, fMCEvHead, fParticles, ListOfModules, and MESSAGE_ORIGIN.
|
private |
void FairRunSim::AddMesh | ( | FairMesh * | Mesh | ) |
Definition at line 100 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 100 of file FairRunSim.cxx
References FairMesh::calculate(), fMeshList, and FairMesh::print().
|
virtual |
Add a module to the simulation (e.g. PIPE, Magnet, ..etc)
Reimplemented in EicRunSim.
Definition at line 94 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 94 of file FairRunSim.cxx
References count, ListOfModules, and FairModule::SetModId().
Referenced by EicRunSim::AddModule(), EicMagneticFieldFromGradients::CreateYokeVolumes(), and EicMagneticField::CreateYokeVolumes().
|
inline |
Add a user defined ion to the simulation
Definition at line 41 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 41 of file FairRunSim.h
References fIons.
|
inline |
Add a user defined ion to the simulation
Definition at line 45 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 45 of file FairRunSim.h
References fParticles.
|
private |
Private method for setting FLUKA simulation
Definition at line 208 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 208 of file FairRunSim.cxx
References FairRun::fLogger, FairLogger::Info(), and MESSAGE_ORIGIN.
Referenced by Init().
|
inline |
Get the Beam energy
Definition at line 140 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 140 of file FairRunSim.h
References fBeamMom.
Referenced by PndDipoleMap::PndDipoleMap(), and PndTransMap::PndTransMap().
|
inline |
Get the field used in simulation
Definition at line 94 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 94 of file FairRunSim.h
References fField.
Referenced by EicRunSim::AddField().
|
inline |
return the geometry loader used in this session
Definition at line 91 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 91 of file FairRunSim.h
References fLoaderName.
Referenced by Config().
|
inline |
return the full list of modules used in simulation
Definition at line 100 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 100 of file FairRunSim.h
References ListOfModules.
Referenced by Init(), and EicMCApplication::Stepping().
FairMCEventHeader * FairRunSim::GetMCEventHeader | ( | ) |
Get the detector specific event header
Definition at line 428 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 428 of file FairRunSim.cxx
References fMCEvHead.
Referenced by FairMCApplication::InitGeometry().
|
inline |
Get the used primary generator
Definition at line 103 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 103 of file FairRunSim.h
References fGen.
Referenced by EicRunSim::AddGenerator(), FairMCApplication::FinishRun(), and Init().
TObjArray * FairRunSim::GetUserDefIons | ( | ) |
this method is used by the FAIRMCApplication
return the array of user defined ions
Definition at line 107 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 107 of file FairRunSim.cxx
References fIons.
Referenced by FairMCApplication::AddIons(), and FairMCApplication::AddParticles().
TObjArray * FairRunSim::GetUserDefParticles | ( | ) |
this method is used by the FAIRMCApplication
return the array of user defined particles
Definition at line 113 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 113 of file FairRunSim.cxx
References fParticles.
Referenced by FairMCApplication::AddParticles().
|
virtual |
Initialize the Simulation
Initialize the simulation session
Add Tasks to simulation if any
Set the configuration for MC engine
Implements FairRun.
Reimplemented in EicRunSim.
Definition at line 119 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 119 of file FairRunSim.cxx
References FairMCApplication::AddMeshList(), FairRuntimeDb::addRun(), FairMCApplication::AddTask(), CheckFlukaExec(), fApp, fBeamMom, fField, FairRun::fFileHeader, fGen, fLoaderName, FairRun::fLogger, fMeshList, fPythiaDecayer, fRadGrid, fRadLength, fRadMap, FairRun::fRootManager, FairRun::fRtdb, FairRun::fRunId, fStoreTraj, FairRun::fTask, fUserDecay, FairRunIdGenerator::generateId(), FairRuntimeDb::getContainer(), FairGeoLoader::getGeoInterface(), FairRuntimeDb::getListOfContainers(), GetListOfModules(), GetPrimaryGenerator(), FairLogger::Info(), ListOfModules, loader, MatFname, MESSAGE_ORIGIN, FairBaseParSet::SetBeamMom(), FairParSet::setChanged(), FairBaseParSet::SetContListStr(), FairBaseParSet::SetDetList(), FairMCApplication::SetField(), SetFieldContainer(), FairBaseParSet::SetGen(), FairMCApplication::SetGenerator(), FairBaseParSet::SetGeometry(), FairParSet::setInputVersion(), SetMCConfig(), FairGeoInterface::SetNoOfSets(), FairMCApplication::SetPythiaDecayer(), FairMCApplication::SetRadiationLengthReg(), FairMCApplication::SetRadiationMapReg(), FairFileHeader::SetRunId(), FairMCApplication::SetUserDecay(), and FairRootManager::WriteFileHeader().
Referenced by EicRunSim::Init().
|
static |
Singelton instance
Definition at line 89 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 89 of file FairRunSim.cxx
References fginstance.
Referenced by FairMCApplication::AddIons(), FairMCApplication::AddParticles(), Config(), EicMagneticFieldFromGradients::CreateYokeVolumes(), EicMagneticField::CreateYokeVolumes(), FairMCApplication::FinishRun(), FairMCApplication::InitGeometry(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), EicEventGenerator::ReadEvent(), FairMCApplication::RunMC(), FairMCApplication::SetParTask(), EicMCApplication::Stepping(), and FairMCApplication::StopRun().
|
inline |
Flag for external decayer
Definition at line 118 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 118 of file FairRunSim.h
References fPythiaDecayer.
|
inline |
Flag for User decay
Definition at line 121 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 121 of file FairRunSim.h
References fUserDecay.
|
inlineprivate |
Definition at line 147 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 147 of file FairRunSim.h
|
virtual |
run the simulation
Implements FairRun.
Reimplemented in EicRunSim.
Definition at line 366 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 366 of file FairRunSim.cxx
References fApp, FairRun::GetOutputFile(), and FairMCApplication::RunMC().
Referenced by EicRunSim::RunCoreStart().
|
inline |
Set Beam energy in GeV/c
Definition at line 137 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 137 of file FairRunSim.h
References fBeamMom, and fUseBeamMom.
void FairRunSim::SetField | ( | FairField * | field | ) |
Set the magnetic that has to be used for simulation field
Definition at line 376 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 376 of file FairRunSim.cxx
References fField.
Referenced by EicRunSim::AddField(), and simulation().
void FairRunSim::SetFieldContainer | ( | ) |
Definition at line 201 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 201 of file FairRunSim.cxx
References fField.
Referenced by Init().
void FairRunSim::SetGenerator | ( | FairPrimaryGenerator * | Gen | ) |
Set the event generator that has to be used for simulation field
Definition at line 381 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 381 of file FairRunSim.cxx
References fGen.
Referenced by EicRunSim::AddGenerator().
void FairRunSim::SetGeoModel | ( | char * | name | ) |
Set geometry builder
Definition at line 401 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 401 of file FairRunSim.cxx
References fLoaderName, FairRun::fLogger, FairLogger::Info(), and MESSAGE_ORIGIN.
|
virtual |
Set the material file name to be used
Reimplemented in EicRunSim.
Definition at line 386 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 386 of file FairRunSim.cxx
References FairRun::fLogger, FairLogger::Info(), MatFname, and MESSAGE_ORIGIN.
Referenced by EicRunSim::Init().
|
private |
Private method for setting simulation and/or Geane configuration and cuts
Definition at line 233 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 233 of file FairRunSim.cxx
References fApp, FairRun::fLogger, fUserConfig, fUserCuts, FairLogger::Info(), FairMCApplication::InitMC(), and MESSAGE_ORIGIN.
Referenced by Init().
|
inline |
Set the experiment dependent event header for each Monte Carlo Event
Definition at line 76 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 76 of file FairRunSim.h
References fMCEvHead.
|
inline |
switch On/Off external decayer (Pythia)
Definition at line 106 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 106 of file FairRunSim.h
References fPythiaDecayer.
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 413 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 413 of file FairRunSim.cxx
References fPythiaDecayer, and fPythiaDecayerConfig.
|
inline |
Definition at line 128 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 128 of file FairRunSim.h
|
inline |
Switch on/off Radiation length register
Definition at line 124 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 124 of file FairRunSim.h
References fRadLength, and value.
|
inline |
Definition at line 126 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 126 of file FairRunSim.h
|
inline |
switch On/Off the track visualisation
Definition at line 82 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 82 of file FairRunSim.h
References fStoreTraj.
Referenced by EicRunSim::Init().
|
inline |
switch On/Off the debug mode
Definition at line 85 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 85 of file FairRunSim.h
References fApp, and FairMCApplication::SetTrackingDebugMode().
|
inline |
Definition at line 132 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 132 of file FairRunSim.h
References fUserConfig.
|
inline |
Definition at line 134 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 134 of file FairRunSim.h
References fUserCuts.
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 421 of file FairRunSim.cxx.
View newest version in sPHENIX GitHub at line 421 of file FairRunSim.cxx
References fUserDecay, and fUserDecayConfig.
|
inline |
switch On/Off user defined decay if true gconfig/UserDecay.C macro will be called
Definition at line 115 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 115 of file FairRunSim.h
References fUserDecay.
|
inline |
Get beam energy flag
Definition at line 143 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 143 of file FairRunSim.h
References fUseBeamMom.
|
protected |
Definition at line 152 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 152 of file FairRunSim.h
Referenced by AddModule().
|
protected |
/** Internal counter*/
Definition at line 153 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 153 of file FairRunSim.h
Referenced by Init(), EicRunSim::Init(), Run(), SetMCConfig(), SetTrackingDebugMode(), and ~FairRunSim().
|
protected |
/** Main VMC application */
Definition at line 154 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 154 of file FairRunSim.h
Referenced by GetBeamMom(), Init(), and SetBeamMom().
|
protected |
/** Singelton Instance */
Definition at line 159 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 159 of file FairRunSim.h
Referenced by GetField(), Init(), SetField(), SetFieldContainer(), and ~FairRunSim().
|
protected |
/** flag for use Beam Energy */
Definition at line 156 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 156 of file FairRunSim.h
Referenced by GetPrimaryGenerator(), Init(), SetGenerator(), and ~FairRunSim().
|
staticprotected |
/** MC Event Header */
Definition at line 158 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 158 of file FairRunSim.h
Referenced by Instance().
|
protected |
/** Input file name map*/
Definition at line 161 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 161 of file FairRunSim.h
Referenced by AddNewIon(), GetUserDefIons(), and ~FairRunSim().
|
protected |
/** Trajectory store flags */
Definition at line 166 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 166 of file FairRunSim.h
Referenced by GetGeoModel(), Init(), and SetGeoModel().
|
protected |
Magnetic Field
Definition at line 160 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 160 of file FairRunSim.h
|
protected |
/** Primary Event Generator */
Definition at line 157 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 157 of file FairRunSim.h
Referenced by GetMCEventHeader(), SetMCEventHeader(), and ~FairRunSim().
|
protected |
Definition at line 174 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 174 of file FairRunSim.h
|
protected |
/** Array of user defined ions */
Definition at line 162 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 162 of file FairRunSim.h
Referenced by AddNewParticle(), GetUserDefParticles(), and ~FairRunSim().
|
protected |
/** Geometry Model (TGeo or G3)*/
Definition at line 167 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 167 of file FairRunSim.h
Referenced by Init(), IsExtDecayer(), and SetPythiaDecayer().
|
protected |
/** flag for using Pythia decayer*/
Definition at line 168 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 168 of file FairRunSim.h
Referenced by SetPythiaDecayer().
|
protected |
/** flag for RadiationMapManager
Definition at line 173 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 173 of file FairRunSim.h
Referenced by Init(), and SetRadGridRegister().
|
protected |
/** Macro for decay configuration*/
Definition at line 171 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 171 of file FairRunSim.h
Referenced by Init(), and SetRadLenRegister().
|
protected |
/** flag for registring radiation length*/
Definition at line 172 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 172 of file FairRunSim.h
Referenced by Init(), and SetRadMapRegister().
|
protected |
/** Material file name */
Definition at line 165 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 165 of file FairRunSim.h
Referenced by Init(), and SetStoreTraj().
|
protected |
/** Beam Energy in GeV/c */
Definition at line 155 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 155 of file FairRunSim.h
Referenced by SetBeamMom(), and UseBeamMom().
|
protected |
/** radiation grid scoring
Definition at line 175 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 175 of file FairRunSim.h
Referenced by SetMCConfig(), and SetUserConfig().
|
protected |
/** Macro for geant configuration*/
Definition at line 176 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 176 of file FairRunSim.h
Referenced by SetMCConfig(), and SetUserCuts().
|
protected |
/** Macro for Pythia decay configuration*/
Definition at line 169 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 169 of file FairRunSim.h
Referenced by Init(), IsUserDecay(), and SetUserDecay().
|
protected |
flag for setting user decay
Definition at line 170 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 170 of file FairRunSim.h
Referenced by SetUserDecay().
|
protected |
/** Array of user defined particles*/
Definition at line 163 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 163 of file FairRunSim.h
Referenced by AddModule(), GetListOfModules(), EicRunSim::GetModule(), Init(), EicRunSim::Init(), and ~FairRunSim().
|
protected |
/** Array of used modules */
Definition at line 164 of file FairRunSim.h.
View newest version in sPHENIX GitHub at line 164 of file FairRunSim.h
Referenced by Init(), EicRunSim::Init(), and SetMaterials().