PndMasterRunSim¶
-
class PndMasterRunSim : public FairRunSim¶
Class for the master simulation chain.
Master Simulation Class¶
This class is the basic for the simulation macro. It loads the environment and all the standard detectors.
- Author
Stefano Spataro spataro@to.infn.it, Torino University
- Version
1.0
- Date
Feb 3, 2016
Public Functions
-
PndMasterRunSim()¶
Default constructor.
-
virtual ~PndMasterRunSim()¶
Default destructor.
-
Bool_t Setup(TString outprefix = "")¶
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.
-
void Finish()¶
Final diagnostics.
It prints CPU time, memory usage, used parameters, and eventually send the information to CDash
-
void CreateGeometry()¶
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)
-
void 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.
-
void CreateGeometryPhase1()¶
It creates the standard geometry volumes for phase1 of the experiment.
It creates all the standard geometry volumes which have to be used in simulation, with the setup for phase1 experiments. All the MCPoint will be stored, except for EMC
-
void CreateGeometryDay1()¶
It creates the standard geometry volumes for day1 phase.
It creates all the standard geometry volumes which have to be used in simulation, with the setup for day1 experiments. All the MCPoint will be stored, except for EMC
-
void AddSimTasks()¶
Add simulation tasks.
It adds all the standard simulation tasks
-
void 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 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.
-
void 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 void SetDpmFlag(Int_t Mode)¶
Set the DPM flag.
- Parameters
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
-
inline void SetFtfFlag(Int_t Mode)¶
Set the FTF noelastic flag.
- Parameters
Mode – = 0. - FTF - Elastic and inelastic interactions (default)
Mode – = 1. - FTF - No elastic scattering, only inelastic
-
void UseDpmGenerator()¶
Use DPM as event generator.
-
void 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.
-
void 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
-
void 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.
- Parameters
EvtGenFile – Filename of the .dec file
-
void 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.
- Parameters
BoxConfig – configuration string of the BOX generator
-
void 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)’
- Parameters
pipiConfig – configuration string of the PiPi generator
-
void 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)’
- Parameters
leplepConfig – configuration string of the LepLep generator
-
void UseAsciiGenerator(TString AsciiFile)¶
-
inline void SetInput(TString par)¶
Input of the simulation.
- Parameters
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
-
inline void SetInputDir(TString par)¶
Input directory of the simulation.
-
inline void SetParamRootFile(TString par)¶
Setter of the parameter root file.
-
inline void SetParamAsciiFile(TString par)¶
Setter of the parameter ascii file.
-
inline void SetOptions(TString par)¶
Setter of the simulation options.
- Parameters
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
-
inline TString GetOptions()¶
-
inline void SetNumberOfEvents(Int_t par)¶
Setter of the number of events.
-
inline void SetEventCounterRate(Int_t par)¶
Setter of the event counter rate.
-
inline void SetTargetMode(Short_t par)¶
Setter of the target mode.
- Parameters
par – = 0 - No IP smearing (default)
par – = 1 - Cluster Jet
par – = 2 - Pellet target
par – = 3 - Pellet Tracking target
-
inline FairFilteredPrimaryGenerator *GetFilteredPrimaryGenerator()¶
Getter for the primary generator, e.g. to configure the event filter.
-
inline PndFilteredPrimaryGenerator *GetPndFilteredPrimaryGenerator()¶
-
void PrintListOfTasks(TList *list, TString prefix = " - ")¶
-
inline void PrintListOfTasks()¶