![]() |
PandaRoot
|
Class for the master simulation chain. More...
#include <PndMasterRunSim.h>
Public Member Functions | |
PndMasterRunSim () | |
Default constructor. More... | |
virtual | ~PndMasterRunSim () |
Default destructor. More... | |
virtual Bool_t | Setup (TString outprefix="") |
Initial setup. More... | |
void | Finish () |
Final diagnostics. More... | |
virtual void | CreateGeometry () |
It switches between different standard geometry volumes. More... | |
void | CreateGeometryDefault () |
It creates all the standard geometry volumes. More... | |
virtual void | AddSimTasks () |
Add simulation tasks. More... | |
void | SetGenerator () |
Set the event generator. More... | |
void | AddGenerator (FairGenerator *aGen) |
Add a generator to existing setup. More... | |
void | SetGenerator (FairGenerator *aGen) |
Set the event generator. More... | |
void | SetDpmFlag (Int_t Mode) |
Set the DPM flag. More... | |
void | SetFtfFlag (Int_t Mode) |
Set the FTF noelastic flag. More... | |
void | UseDpmGenerator () |
Use DPM as event generator. More... | |
void | UseFtfGenerator (TString ftfData) |
Use FTF as event generator. More... | |
void | UsePythia8Generator (TString py8Data) |
Use Pythia8 as event generator. More... | |
void | UseEvtGenGenerator (TString EvtGenFile) |
Use EvtGen as event generator. More... | |
void | UseBoxGenerator (TString BoxConfig) |
Use BoxGen as event generator. More... | |
void | UsePiPiGenerator (TString pipiConfig) |
Use PiPiGenerator as event generator. More... | |
void | UseLepLepGenerator (TString leplepConfig) |
Use LepLepGenerator as event generator. More... | |
void | UseAsciiGenerator (TString AsciiFile) |
void | SetInput (TString par) |
Input of the simulation. More... | |
void | SetInputDir (TString par) |
Input directory of the simulation. More... | |
void | SetParamRootFile (TString par) |
Setter of the parameter root file. More... | |
void | SetParamAsciiFile (TString par) |
Setter of the parameter ascii file. More... | |
void | SetOptions (TString par) |
Setter of the simulation options. More... | |
TString | GetOptions () |
void | SetNumberOfEvents (Int_t par) |
Setter of the number of events. More... | |
void | SetEventCounterRate (Int_t par) |
Setter of the event counter rate. More... | |
virtual void | SetupTargetMode () |
void | SetTargetMode (Short_t par) |
Setter of the target mode. More... | |
FairFilteredPrimaryGenerator * | GetFilteredPrimaryGenerator () |
Getter for the primary generator, e.g. to configure the event filter. More... | |
PndFilteredPrimaryGenerator * | GetPndFilteredPrimaryGenerator () |
void | PrintListOfTasks (TList *list, TString prefix=" - ") |
void | PrintListOfTasks () |
Protected Member Functions | |
void | GetRange (TString par, double &min, double &max) |
void | GetCoords (TString par, double &X, double &Y, double &Z) |
virtual void | SetOutputFile (TString outprefix) |
virtual void | SetRtdb () |
virtual void | SetField () |
virtual void | DefineParticles () |
void | CreatePrimGen () |
Check and create primary generator. More... | |
Protected Attributes | |
TString | fInput |
Name of the input for the simulation. More... | |
TString | fInputDir |
Name of the input directory for the simulation. More... | |
TString | fOutFile |
Name of the output file. More... | |
TString | fParamRootFile |
Name of the parameter root file. More... | |
TString | fParamAsciiFile |
Name of the parameter ascii file. More... | |
TString | fOptions |
Options parsed to the simulation. More... | |
Int_t | fDpmFlag |
Flag for DPM event generator. More... | |
Int_t | fFtfFlag |
Flag for FTF event generator. More... | |
Int_t | fNEvents |
Number of events. More... | |
Int_t | fEventCounterRate |
After how many events the counter will print. More... | |
Short_t | fTargetMode |
Target mode. More... | |
FairRuntimeDb * | fRtdb |
Runtime DB. More... | |
TStopwatch | fTimer |
Timer. More... | |
Class for the master simulation chain.
This class is the basic for the simulation macro. It loads the environment and all the standard detectors.
Definition at line 42 of file PndMasterRunSim.h.
PndMasterRunSim::PndMasterRunSim | ( | ) |
Default constructor.
|
virtual |
Default destructor.
void PndMasterRunSim::AddGenerator | ( | FairGenerator * | aGen | ) |
Add a generator to existing setup.
Adds a generator to the existing one. ALL generators will be active and produce their particle content in each event simultaneously.
|
virtual |
Add simulation tasks.
It adds all the standard simulation tasks
Reimplemented in PndMasterRunCompactSim.
|
virtual |
It switches between different standard geometry volumes.
According to fOptions, it creates the standard geometry volumes for the full setup, or dedicated geometries (such as day1)
Reimplemented in PndMasterRunCompactSim, PndMasterRunDay1Sim, and PndMasterRunPhase1Sim.
void PndMasterRunSim::CreateGeometryDefault | ( | ) |
It creates all the standard geometry volumes.
It creates all the standard geometry volumes which have to be used in simulation. All the MCPoint will be stored, expect for EMC.
|
protected |
Check and create primary generator.
Checks if the priomary generator is there and if not, creates it.
Referenced by PrintListOfTasks().
|
protectedvirtual |
Referenced by PrintListOfTasks().
void PndMasterRunSim::Finish | ( | ) |
Final diagnostics.
It prints CPU time, memory usage, used parameters, and eventually send the information to CDash
|
protected |
Referenced by PrintListOfTasks().
|
inline |
Getter for the primary generator, e.g. to configure the event filter.
Definition at line 273 of file PndMasterRunSim.h.
|
inline |
Definition at line 246 of file PndMasterRunSim.h.
References fOptions.
|
inline |
Definition at line 274 of file PndMasterRunSim.h.
References PrintListOfTasks().
|
protected |
Referenced by PrintListOfTasks().
void PndMasterRunSim::PrintListOfTasks | ( | TList * | list, |
TString | prefix = " - " |
||
) |
|
inline |
Definition at line 277 of file PndMasterRunSim.h.
References CreatePrimGen(), DefineParticles(), GetCoords(), GetRange(), max(), min(), PrintListOfTasks(), SetField(), SetOutputFile(), and SetRtdb().
Referenced by GetPndFilteredPrimaryGenerator(), and PrintListOfTasks().
|
inline |
Set the DPM flag.
Mode | = 0. - DPM - No elastic scattering, only inelastic |
Mode | = 1. - DPM - Elastic and inelastic interactions (default) |
Mode | = 2. - DPM - Only elastic scattering, no inelastic one |
Definition at line 127 of file PndMasterRunSim.h.
References fDpmFlag.
|
inline |
Setter of the event counter rate.
Definition at line 256 of file PndMasterRunSim.h.
References fEventCounterRate.
|
protectedvirtual |
Reimplemented in PndMasterRunCompactSim.
Referenced by PrintListOfTasks().
|
inline |
Set the FTF noelastic flag.
Mode | = 0. - FTF - Elastic and inelastic interactions (default) |
Mode | = 1. - FTF - No elastic scattering, only inelastic |
Definition at line 134 of file PndMasterRunSim.h.
References fFtfFlag, UseAsciiGenerator(), UseBoxGenerator(), UseDpmGenerator(), UseEvtGenGenerator(), UseFtfGenerator(), UseLepLepGenerator(), UsePiPiGenerator(), and UsePythia8Generator().
void PndMasterRunSim::SetGenerator | ( | ) |
Set the event generator.
This call set the event generator according to the input name. If the input name contains "dpm" it uses dpm, if it contains "ftf" then ftf, if ".dec" it runs evtgen using the input name as namefile of the .dec file. If the input name contains "box" the macro breaks, since in that case the SetGenerator(PndBoxGenerator *boxGen) function must be used.
void PndMasterRunSim::SetGenerator | ( | FairGenerator * | aGen | ) |
Set the event generator.
The user should create a FairGenerator derived object with all the settings, and pass it as argument to the function.
|
inline |
Input of the simulation.
par | = the name of the dec file for EvtGen, ending w/ .dec |
par | = "dpm" if you want to use dpm |
par | = "ftf" if you want to use ftf |
par | = "box:[...]" if you want to use box |
Definition at line 213 of file PndMasterRunSim.h.
References fInput.
|
inline |
Input directory of the simulation.
Definition at line 218 of file PndMasterRunSim.h.
References fInputDir.
|
inline |
Setter of the number of events.
Definition at line 251 of file PndMasterRunSim.h.
References fNEvents.
|
inline |
Setter of the simulation options.
par | = "" -> default settings full setup |
par | = "day1" -> Setup for day1 experiment: no GEM, FTS1234, NO DISC, NO RICH |
par | = "gem2" (added to "day1") -> Setup for day1 experiment with 2 GEM planes (first two) |
par | = "gem3" (added to "day1") -> Setup for day1 experiment with 3 GEM planes |
par | = "fts1256" (added to "day1") -> Setup for day1 experiment with FTS1256 insted of FTS1234 |
par | = "strip" (added to "day1") -> Setup for day1 experiment with only the strip part of the MVD instead of the full MVD Example: "day1+gem+fts1256" means day1 setup + GEM planes + fst1256 |
Definition at line 241 of file PndMasterRunSim.h.
References fOptions.
|
protectedvirtual |
Referenced by PrintListOfTasks().
|
inline |
Setter of the parameter ascii file.
Definition at line 228 of file PndMasterRunSim.h.
References fParamAsciiFile.
|
inline |
Setter of the parameter root file.
Definition at line 223 of file PndMasterRunSim.h.
References fParamRootFile.
|
protectedvirtual |
Referenced by PrintListOfTasks().
|
inline |
Setter of the target mode.
par | = 0 - No IP smearing (default) |
par | = 1 - Cluster Jet |
par | = 2 - Pellet target |
par | = 3 - Pellet Tracking target |
Definition at line 268 of file PndMasterRunSim.h.
References fTargetMode.
Referenced by PndMasterRunDay1Sim::SetupTargetMode().
|
virtual |
Initial setup.
This command set the source files, load the proper parameters, and set the relevant flags. If something fails, it returns a kFALSE value.
|
inlinevirtual |
void PndMasterRunSim::UseAsciiGenerator | ( | TString | AsciiFile | ) |
Referenced by SetFtfFlag().
void PndMasterRunSim::UseBoxGenerator | ( | TString | BoxConfig | ) |
Use BoxGen as event generator.
This call sets BoxGenerator as event generator. The format of the config string is for isotrop events in theta: 'BOX:type(pdg,mult):p(min,max):phi(min,max):tht(min,max)' for isotrop events in cos(theta): 'BOX:type(pdg,mult):p(min,max):phi(min,max):ctht(min,max)' Instead of range 'var(min,max)' also a fixed value can be set with 'var(value)' The origin of particle generation can be specified using 'xyz(X,Y,Z)'. All variables left out are set to defaults.
BoxConfig | configuration string of the BOX generator |
Referenced by SetFtfFlag().
void PndMasterRunSim::UseDpmGenerator | ( | ) |
Use DPM as event generator.
Referenced by SetFtfFlag().
void PndMasterRunSim::UseEvtGenGenerator | ( | TString | EvtGenFile | ) |
Use EvtGen as event generator.
This call set EvtGen as event generator. The user should set the .dec file, and the function will retrieve automaticall beam momentum and initial state.
EvtGenFile | Filename of the .dec file |
Referenced by SetFtfFlag().
void PndMasterRunSim::UseFtfGenerator | ( | TString | ftfData | ) |
Use FTF as event generator.
This call set FTF as event generator. If no input file is given FtfDirect is used. With input file the events are taken from ftfData.
Referenced by SetFtfFlag().
void PndMasterRunSim::UseLepLepGenerator | ( | TString | leplepConfig | ) |
Use LepLepGenerator as event generator.
This call sets the PndLepLepGenerator as event generator. The format of the config string is: 'LEPLEP:pid(value):gegm(value):cosTheta(min, max)'
leplepConfig | configuration string of the LepLep generator |
Referenced by SetFtfFlag().
void PndMasterRunSim::UsePiPiGenerator | ( | TString | pipiConfig | ) |
Use PiPiGenerator as event generator.
This call sets the PndPiPiGenerator as event generator. The format of the config string is: 'PIPI:cosTheta(min, max)'
pipiConfig | configuration string of the PiPi generator |
Referenced by SetFtfFlag().
void PndMasterRunSim::UsePythia8Generator | ( | TString | py8Data | ) |
Use Pythia8 as event generator.
This call sets Pythia8 as event generator. PndPythia8Direct is used. An input file will be interpreted as a sequence of Pyhtia8 options separated by semicolons
Referenced by SetFtfFlag().
|
protected |
Flag for DPM event generator.
Definition at line 300 of file PndMasterRunSim.h.
Referenced by SetDpmFlag().
|
protected |
After how many events the counter will print.
Definition at line 303 of file PndMasterRunSim.h.
Referenced by SetEventCounterRate().
|
protected |
Flag for FTF event generator.
Definition at line 301 of file PndMasterRunSim.h.
Referenced by SetFtfFlag().
|
protected |
Name of the input for the simulation.
Definition at line 293 of file PndMasterRunSim.h.
Referenced by SetInput().
|
protected |
Name of the input directory for the simulation.
Definition at line 294 of file PndMasterRunSim.h.
Referenced by SetInputDir().
|
protected |
Number of events.
Definition at line 302 of file PndMasterRunSim.h.
Referenced by SetNumberOfEvents().
|
protected |
Options parsed to the simulation.
Definition at line 298 of file PndMasterRunSim.h.
Referenced by GetOptions(), and SetOptions().
|
protected |
Name of the output file.
Definition at line 295 of file PndMasterRunSim.h.
|
protected |
Name of the parameter ascii file.
Definition at line 297 of file PndMasterRunSim.h.
Referenced by SetParamAsciiFile().
|
protected |
Name of the parameter root file.
Definition at line 296 of file PndMasterRunSim.h.
Referenced by SetParamRootFile().
|
protected |
Runtime DB.
Definition at line 306 of file PndMasterRunSim.h.
|
protected |
|
protected |
Timer.
Definition at line 307 of file PndMasterRunSim.h.