FairRoot/PandaRoot
Functions
macro/QA/ftf3/sim_complete.C File Reference

Go to the source code of this file.

Functions

int sim_complete (Int_t nEvents=10, TString SimEngine="TGeant3", Double_t BeamMomentum=6.231552)
 

Function Documentation

int sim_complete ( Int_t  nEvents = 10,
TString  SimEngine = "TGeant3",
Double_t  BeamMomentum = 6.231552 
)

Definition at line 8 of file macro/QA/ftf3/sim_complete.C.

References PndMasterRunSim::AddSimTasks(), BeamMomentum, PndMasterRunSim::CreateGeometry(), PndMasterRunSim::Finish(), fRun, nEvents, PndMasterRunSim::SetGenerator(), PndMasterRunSim::SetInput(), PndMasterRunSim::SetNumberOfEvents(), PndMasterRunSim::SetParamAsciiFile(), PndMasterRunSim::Setup(), and TString.

9 {
10 // gSystem->Load("libFtfGenDirect.so");
11  //-----User Settings:------------------------------------------------------
12  TString parAsciiFile = "all.par";
13  // TString inputGenerator =
14  // EvtGen -> "xxxxxxxx.dec"
15  // DPM -> "dpm_xxxxx"
16  // FTF -> "ftf_xxxxx"
17  TString inputGenerator = "FTF.root";
18  gRandom->SetSeed(1234);
19  //-------------------------------------------------------------------------
20  // ----- Create the Simulation run manager ------------------------------
22  fRun->SetInput(inputGenerator);
23  fRun->SetName(SimEngine);
24  fRun->SetParamAsciiFile(parAsciiFile);
26  fRun->SetBeamMom(BeamMomentum);
27  // ----- Initialization ------------------------------------------------
28  fRun->Setup();
29  // ----- Geometry -----------------------------------------------------
30  fRun->CreateGeometry();
31  // ----- Event generator ----------------------------------------------
32  fRun->SetGenerator();
33  // ----- Add tasks ----------------------------------------------------
34  fRun->AddSimTasks();
35  // ----- Intialise and run --------------------------------------------
36  fRun->Init();
37  fRun->Run(nEvents);
38  fRun->Finish();
39 
40  //return 0;
41  return 0;
42 };
void Finish()
Final diagnostics.
Bool_t Setup(TString outprefix="")
Initial setup.
void SetParamAsciiFile(TString par)
Setter of the parameter ascii file.
double BeamMomentum
Definition: sim_ftof_stof.C:17
void SetInput(TString par)
Input of the simulation This string can be: a) the name of the dec file for EvtGen, ending w/ .dec b) "dpm" if you want to use dpm c) "ftf" if you want to use ftf d) "box:[...]" if you want to use box.
FairRunAna * fRun
Definition: hit_dirc.C:58
void AddSimTasks()
Add simulation tasks.
Int_t nEvents
Definition: hit_dirc.C:11
void SetNumberOfEvents(Int_t par)
Setter of the number of events.
void CreateGeometry()
It switches between different standard geometry volumes.
Class for the master simulation chain.
void SetGenerator()
Set the event generator.