PandaRoot
PndMasterRunSim Class Reference

Class for the master simulation chain. More...

#include <PndMasterRunSim.h>

Inheritance diagram for PndMasterRunSim:

Public Member Functions

 PndMasterRunSim ()
 Default constructor. More...
 
virtual ~PndMasterRunSim ()
 Default destructor. More...
 
Bool_t Setup (TString outprefix="")
 Initial setup. More...
 
void Finish ()
 Final diagnostics. More...
 
void CreateGeometry ()
 It switches between different standard geometry volumes. More...
 
void CreateGeometryDefault ()
 It creates all the standard geometry volumes. More...
 
void CreateGeometryPhase1 ()
 It creates the standard geometry volumes for phase1 of the experiment. More...
 
void CreateGeometryDay1 ()
 It creates the standard geometry volumes for day1 phase. More...
 
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...
 
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 ()
 

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

void PndMasterRunSim::AddSimTasks ( )

Add simulation tasks.

It adds all the standard simulation tasks

◆ CreateGeometry()

void PndMasterRunSim::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)

◆ CreateGeometryDay1()

void PndMasterRunSim::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

◆ 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.

◆ CreateGeometryPhase1()

void PndMasterRunSim::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

◆ Finish()

void PndMasterRunSim::Finish ( )

Final diagnostics.

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

◆ GetFilteredPrimaryGenerator()

FairFilteredPrimaryGenerator* PndMasterRunSim::GetFilteredPrimaryGenerator ( )
inline

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

Definition at line 277 of file PndMasterRunSim.h.

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

◆ GetOptions()

TString PndMasterRunSim::GetOptions ( )
inline

Definition at line 252 of file PndMasterRunSim.h.

252 { return fOptions; }

◆ GetPndFilteredPrimaryGenerator()

PndFilteredPrimaryGenerator* PndMasterRunSim::GetPndFilteredPrimaryGenerator ( )
inline

Definition at line 278 of file PndMasterRunSim.h.

References PrintListOfTasks().

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

◆ PrintListOfTasks() [1/2]

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

◆ PrintListOfTasks() [2/2]

void PndMasterRunSim::PrintListOfTasks ( )
inline

Definition at line 281 of file PndMasterRunSim.h.

References max(), min(), and PrintListOfTasks().

Referenced by GetPndFilteredPrimaryGenerator(), and PrintListOfTasks().

281 { PrintListOfTasks(GetMainTask()->GetListOfTasks()); }

◆ 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 133 of file PndMasterRunSim.h.

133 { fDpmFlag = Mode; };

◆ SetEventCounterRate()

void PndMasterRunSim::SetEventCounterRate ( Int_t  par)
inline

Setter of the event counter rate.

Definition at line 262 of file PndMasterRunSim.h.

262 { fEventCounterRate = par; }

◆ 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 140 of file PndMasterRunSim.h.

References UseAsciiGenerator(), UseBoxGenerator(), UseDpmGenerator(), UseEvtGenGenerator(), UseFtfGenerator(), UseLepLepGenerator(), UsePiPiGenerator(), and UsePythia8Generator().

140 { fFtfFlag = Mode; };

◆ 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 219 of file PndMasterRunSim.h.

219 { fInput = par; }

◆ SetInputDir()

void PndMasterRunSim::SetInputDir ( TString  par)
inline

Input directory of the simulation.

Definition at line 224 of file PndMasterRunSim.h.

224 { fInputDir = par; }

◆ SetNumberOfEvents()

void PndMasterRunSim::SetNumberOfEvents ( Int_t  par)
inline

Setter of the number of events.

Definition at line 257 of file PndMasterRunSim.h.

257 { fNEvents = par; }

◆ 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 247 of file PndMasterRunSim.h.

248  {
249  fOptions = par;
250  fOptions.ToLower();
251  }

◆ SetParamAsciiFile()

void PndMasterRunSim::SetParamAsciiFile ( TString  par)
inline

Setter of the parameter ascii file.

Definition at line 234 of file PndMasterRunSim.h.

234 { fParamAsciiFile = par; }

◆ SetParamRootFile()

void PndMasterRunSim::SetParamRootFile ( TString  par)
inline

Setter of the parameter root file.

Definition at line 229 of file PndMasterRunSim.h.

229 { fParamRootFile = par; }

◆ 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 272 of file PndMasterRunSim.h.

272 { fTargetMode = par; }

◆ Setup()

Bool_t PndMasterRunSim::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.

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


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