PandaRoot
PndMasterRunSim.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "FairRunSim.h"
16 #include "FairRuntimeDb.h"
17 #include "FairTask.h"
18 
19 #include "TStopwatch.h"
20 #include "TString.h"
21 
24 class FairGenerator;
25 
26 class FairBoxGenerator;
27 
28 class PndBoxGenerator;
29 
30 class PndMasterRunSim : public FairRunSim {
31  public:
36 
40  virtual ~PndMasterRunSim();
41 
49  Bool_t Setup(TString outprefix = "");
50 
57  void Finish();
58 
65  void CreateGeometry();
66 
73  void CreateGeometryDefault();
74 
82  void CreateGeometryPhase1();
83 
91  void CreateGeometryDay1();
92 
98  void AddSimTasks();
99 
109  void SetGenerator();
110 
117  void AddGenerator(FairGenerator *aGen);
118 
125  void SetGenerator(FairGenerator *aGen);
126 
133  void SetDpmFlag(Int_t Mode) { fDpmFlag = Mode; };
134 
140  void SetFtfFlag(Int_t Mode) { fFtfFlag = Mode; };
141 
145  void UseDpmGenerator();
146 
154  void UseFtfGenerator(TString ftfData);
155 
164  void UsePythia8Generator(TString py8Data);
165 
174  void UseEvtGenGenerator(TString EvtGenFile);
175 
188  void UseBoxGenerator(TString BoxConfig);
189 
198  void UsePiPiGenerator(TString pipiConfig);
199 
208  void UseLepLepGenerator(TString leplepConfig);
209  void UseAsciiGenerator(TString AsciiFile);
210 
219  void SetInput(TString par) { fInput = par; }
220 
224  void SetInputDir(TString par) { fInputDir = par; }
225 
229  void SetParamRootFile(TString par) { fParamRootFile = par; }
230 
234  void SetParamAsciiFile(TString par) { fParamAsciiFile = par; }
235 
247  void SetOptions(TString par)
248  {
249  fOptions = par;
250  fOptions.ToLower();
251  }
252  TString GetOptions() { return fOptions; }
253 
257  void SetNumberOfEvents(Int_t par) { fNEvents = par; }
258 
262  void SetEventCounterRate(Int_t par) { fEventCounterRate = par; }
263 
272  void SetTargetMode(Short_t par) { fTargetMode = par; }
273 
279 
280  void PrintListOfTasks(TList *list, TString prefix = " - ");
281  void PrintListOfTasks() { PrintListOfTasks(GetMainTask()->GetListOfTasks()); }
282 
283  private:
284  void GetRange(TString par, double &min, double &max);
285  void GetCoords(TString par, double &X, double &Y, double &Z);
291  void CreatePrimGen();
292 
293  TString fInput;
294  TString fInputDir;
295  TString fOutFile;
296  TString fParamRootFile;
297  TString fParamAsciiFile;
298  TString fOptions;
299 
300  Int_t fDpmFlag;
301  Int_t fFtfFlag;
302  Int_t fNEvents;
303  Int_t fEventCounterRate;
304  Short_t fTargetMode;
305 
306  FairRuntimeDb *fRtdb;
307  TStopwatch fTimer;
308 
310  ClassDef(PndMasterRunSim, 2);
311 
312 };
313 
void SetInputDir(TString par)
Input directory of the simulation.
void Finish()
Final diagnostics.
void CreateGeometryDefault()
It creates all the standard geometry volumes.
virtual ~PndMasterRunSim()
Default destructor.
Bool_t Setup(TString outprefix="")
Initial setup.
PndFilteredPrimaryGenerator * GetPndFilteredPrimaryGenerator()
void SetParamAsciiFile(TString par)
Setter of the parameter ascii file.
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:25
void UseEvtGenGenerator(TString EvtGenFile)
Use EvtGen as event generator.
void UsePythia8Generator(TString py8Data)
Use Pythia8 as event generator.
void UseDpmGenerator()
Use DPM as event generator.
void AddGenerator(FairGenerator *aGen)
Add a generator to existing setup.
void SetInput(TString par)
Input of the simulation.
void AddSimTasks()
Add simulation tasks.
void UseAsciiGenerator(TString AsciiFile)
Primary generator with added event filtering capabilities.
void SetParamRootFile(TString par)
Setter of the parameter root file.
FairFilteredPrimaryGenerator * GetFilteredPrimaryGenerator()
Getter for the primary generator, e.g. to configure the event filter.
void UsePiPiGenerator(TString pipiConfig)
Use PiPiGenerator as event generator.
Primary generator with added event filtering capabilities.
void SetTargetMode(Short_t par)
Setter of the target mode.
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:24
void SetNumberOfEvents(Int_t par)
Setter of the number of events.
void CreateGeometry()
It switches between different standard geometry volumes.
void CreateGeometryDay1()
It creates the standard geometry volumes for day1 phase.
Class for the master simulation chain.
void UseFtfGenerator(TString ftfData)
Use FTF as event generator.
void SetEventCounterRate(Int_t par)
Setter of the event counter rate.
PndMasterRunSim()
Default constructor.
void UseBoxGenerator(TString BoxConfig)
Use BoxGen as event generator.
void SetOptions(TString par)
Setter of the simulation options.
TString GetOptions()
void SetFtfFlag(Int_t Mode)
Set the FTF noelastic flag.
void SetGenerator()
Set the event generator.
void CreateGeometryPhase1()
It creates the standard geometry volumes for phase1 of the experiment.
void UseLepLepGenerator(TString leplepConfig)
Use LepLepGenerator as event generator.
void SetDpmFlag(Int_t Mode)
Set the DPM flag.