PandaRoot
PndMasterRunSim Class Reference

Class for the master simulation chain. More...

#include <PndMasterRunSim.h>

Inheritance diagram for PndMasterRunSim:
PndMasterRunCompactSim PndMasterRunDay1Sim PndMasterRunPhase1Sim

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...
 
FairFilteredPrimaryGeneratorGetFilteredPrimaryGenerator ()
 Getter for the primary generator, e.g. to configure the event filter. More...
 
PndFilteredPrimaryGeneratorGetPndFilteredPrimaryGenerator ()
 
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...
 

Detailed Description

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 spata.nosp@m.ro@t.nosp@m.o.inf.nosp@m.n.it, Torino University
Version
1.0
Date
Feb 3, 2016

Definition at line 42 of file PndMasterRunSim.h.

Constructor & Destructor Documentation

◆ PndMasterRunSim()

PndMasterRunSim::PndMasterRunSim ( )

Default constructor.

◆ ~PndMasterRunSim()

virtual PndMasterRunSim::~PndMasterRunSim ( )
virtual

Default destructor.

Member Function Documentation

◆ AddGenerator()

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.

◆ AddSimTasks()

virtual void PndMasterRunSim::AddSimTasks ( )
virtual

Add simulation tasks.

It adds all the standard simulation tasks

Reimplemented in PndMasterRunCompactSim.

◆ CreateGeometry()

virtual void PndMasterRunSim::CreateGeometry ( )
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.

◆ CreateGeometryDefault()

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.

◆ CreatePrimGen()

void PndMasterRunSim::CreatePrimGen ( )
protected

Check and create primary generator.

Checks if the priomary generator is there and if not, creates it.

Referenced by PrintListOfTasks().

◆ DefineParticles()

virtual void PndMasterRunSim::DefineParticles ( )
protectedvirtual

Referenced by PrintListOfTasks().

◆ Finish()

void PndMasterRunSim::Finish ( )

Final diagnostics.

It prints CPU time, memory usage, used parameters, and eventually send the information to CDash

◆ GetCoords()

void PndMasterRunSim::GetCoords ( TString  par,
double &  X,
double &  Y,
double &  Z 
)
protected

Referenced by PrintListOfTasks().

◆ GetFilteredPrimaryGenerator()

FairFilteredPrimaryGenerator* PndMasterRunSim::GetFilteredPrimaryGenerator ( )
inline

Getter for the primary generator, e.g. to configure the event filter.

Definition at line 273 of file PndMasterRunSim.h.

273 { return (FairFilteredPrimaryGenerator *)fGen; }
Primary generator with added event filtering capabilities.

◆ GetOptions()

TString PndMasterRunSim::GetOptions ( )
inline

Definition at line 246 of file PndMasterRunSim.h.

References fOptions.

246 { return fOptions; }
TString fOptions
Options parsed to the simulation.

◆ GetPndFilteredPrimaryGenerator()

PndFilteredPrimaryGenerator* PndMasterRunSim::GetPndFilteredPrimaryGenerator ( )
inline

Definition at line 274 of file PndMasterRunSim.h.

References PrintListOfTasks().

274 { return (PndFilteredPrimaryGenerator *)fGen; }
Primary generator with added event filtering capabilities.

◆ GetRange()

void PndMasterRunSim::GetRange ( TString  par,
double &  min,
double &  max 
)
protected

Referenced by PrintListOfTasks().

◆ PrintListOfTasks() [1/2]

void PndMasterRunSim::PrintListOfTasks ( TList *  list,
TString  prefix = " - " 
)

◆ PrintListOfTasks() [2/2]

void PndMasterRunSim::PrintListOfTasks ( )
inline

◆ SetDpmFlag()

void PndMasterRunSim::SetDpmFlag ( Int_t  Mode)
inline

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

Definition at line 127 of file PndMasterRunSim.h.

References fDpmFlag.

127 { fDpmFlag = Mode; };
Int_t fDpmFlag
Flag for DPM event generator.

◆ SetEventCounterRate()

void PndMasterRunSim::SetEventCounterRate ( Int_t  par)
inline

Setter of the event counter rate.

Definition at line 256 of file PndMasterRunSim.h.

References fEventCounterRate.

256 { fEventCounterRate = par; }
Int_t fEventCounterRate
After how many events the counter will print.

◆ SetField()

virtual void PndMasterRunSim::SetField ( )
protectedvirtual

Reimplemented in PndMasterRunCompactSim.

Referenced by PrintListOfTasks().

◆ SetFtfFlag()

void PndMasterRunSim::SetFtfFlag ( Int_t  Mode)
inline

Set the FTF noelastic flag.

Parameters
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().

134 { fFtfFlag = Mode; };
Int_t fFtfFlag
Flag for FTF event generator.

◆ SetGenerator() [1/2]

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.

◆ SetGenerator() [2/2]

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.

◆ SetInput()

void PndMasterRunSim::SetInput ( TString  par)
inline

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

Definition at line 213 of file PndMasterRunSim.h.

References fInput.

213 { fInput = par; }
TString fInput
Name of the input for the simulation.

◆ SetInputDir()

void PndMasterRunSim::SetInputDir ( TString  par)
inline

Input directory of the simulation.

Definition at line 218 of file PndMasterRunSim.h.

References fInputDir.

218 { fInputDir = par; }
TString fInputDir
Name of the input directory for the simulation.

◆ SetNumberOfEvents()

void PndMasterRunSim::SetNumberOfEvents ( Int_t  par)
inline

Setter of the number of events.

Definition at line 251 of file PndMasterRunSim.h.

References fNEvents.

251 { fNEvents = par; }
Int_t fNEvents
Number of events.

◆ SetOptions()

void PndMasterRunSim::SetOptions ( TString  par)
inline

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

Definition at line 241 of file PndMasterRunSim.h.

References fOptions.

242  {
243  fOptions = par;
244  fOptions.ToLower();
245  }
TString fOptions
Options parsed to the simulation.

◆ SetOutputFile()

virtual void PndMasterRunSim::SetOutputFile ( TString  outprefix)
protectedvirtual

Referenced by PrintListOfTasks().

◆ SetParamAsciiFile()

void PndMasterRunSim::SetParamAsciiFile ( TString  par)
inline

Setter of the parameter ascii file.

Definition at line 228 of file PndMasterRunSim.h.

References fParamAsciiFile.

228 { fParamAsciiFile = par; }
TString fParamAsciiFile
Name of the parameter ascii file.

◆ SetParamRootFile()

void PndMasterRunSim::SetParamRootFile ( TString  par)
inline

Setter of the parameter root file.

Definition at line 223 of file PndMasterRunSim.h.

References fParamRootFile.

223 { fParamRootFile = par; }
TString fParamRootFile
Name of the parameter root file.

◆ SetRtdb()

virtual void PndMasterRunSim::SetRtdb ( )
protectedvirtual

Referenced by PrintListOfTasks().

◆ SetTargetMode()

void PndMasterRunSim::SetTargetMode ( Short_t  par)
inline

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

Definition at line 268 of file PndMasterRunSim.h.

References fTargetMode.

Referenced by PndMasterRunDay1Sim::SetupTargetMode().

268 { fTargetMode = par; }
Short_t fTargetMode
Target mode.

◆ Setup()

virtual Bool_t PndMasterRunSim::Setup ( TString  outprefix = "")
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.

◆ SetupTargetMode()

virtual void PndMasterRunSim::SetupTargetMode ( )
inlinevirtual

Reimplemented in PndMasterRunDay1Sim.

Definition at line 258 of file PndMasterRunSim.h.

258 {};

◆ UseAsciiGenerator()

void PndMasterRunSim::UseAsciiGenerator ( TString  AsciiFile)

Referenced by SetFtfFlag().

◆ UseBoxGenerator()

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.

Parameters
BoxConfigconfiguration string of the BOX generator

Referenced by SetFtfFlag().

◆ UseDpmGenerator()

void PndMasterRunSim::UseDpmGenerator ( )

Use DPM as event generator.

Referenced by SetFtfFlag().

◆ UseEvtGenGenerator()

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.

Parameters
EvtGenFileFilename of the .dec file

Referenced by SetFtfFlag().

◆ UseFtfGenerator()

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().

◆ UseLepLepGenerator()

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)'

Parameters
leplepConfigconfiguration string of the LepLep generator

Referenced by SetFtfFlag().

◆ UsePiPiGenerator()

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)'

Parameters
pipiConfigconfiguration string of the PiPi generator

Referenced by SetFtfFlag().

◆ UsePythia8Generator()

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().

Member Data Documentation

◆ fDpmFlag

Int_t PndMasterRunSim::fDpmFlag
protected

Flag for DPM event generator.

Definition at line 300 of file PndMasterRunSim.h.

Referenced by SetDpmFlag().

◆ fEventCounterRate

Int_t PndMasterRunSim::fEventCounterRate
protected

After how many events the counter will print.

Definition at line 303 of file PndMasterRunSim.h.

Referenced by SetEventCounterRate().

◆ fFtfFlag

Int_t PndMasterRunSim::fFtfFlag
protected

Flag for FTF event generator.

Definition at line 301 of file PndMasterRunSim.h.

Referenced by SetFtfFlag().

◆ fInput

TString PndMasterRunSim::fInput
protected

Name of the input for the simulation.

Definition at line 293 of file PndMasterRunSim.h.

Referenced by SetInput().

◆ fInputDir

TString PndMasterRunSim::fInputDir
protected

Name of the input directory for the simulation.

Definition at line 294 of file PndMasterRunSim.h.

Referenced by SetInputDir().

◆ fNEvents

Int_t PndMasterRunSim::fNEvents
protected

Number of events.

Definition at line 302 of file PndMasterRunSim.h.

Referenced by SetNumberOfEvents().

◆ fOptions

TString PndMasterRunSim::fOptions
protected

Options parsed to the simulation.

Definition at line 298 of file PndMasterRunSim.h.

Referenced by GetOptions(), and SetOptions().

◆ fOutFile

TString PndMasterRunSim::fOutFile
protected

Name of the output file.

Definition at line 295 of file PndMasterRunSim.h.

◆ fParamAsciiFile

TString PndMasterRunSim::fParamAsciiFile
protected

Name of the parameter ascii file.

Definition at line 297 of file PndMasterRunSim.h.

Referenced by SetParamAsciiFile().

◆ fParamRootFile

TString PndMasterRunSim::fParamRootFile
protected

Name of the parameter root file.

Definition at line 296 of file PndMasterRunSim.h.

Referenced by SetParamRootFile().

◆ fRtdb

FairRuntimeDb* PndMasterRunSim::fRtdb
protected

Runtime DB.

Definition at line 306 of file PndMasterRunSim.h.

◆ fTargetMode

Short_t PndMasterRunSim::fTargetMode
protected

Target mode.

Definition at line 304 of file PndMasterRunSim.h.

Referenced by SetTargetMode().

◆ fTimer

TStopwatch PndMasterRunSim::fTimer
protected

Timer.

Definition at line 307 of file PndMasterRunSim.h.


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