FairRoot/PandaRoot
Functions
QA/day1/sim_day1.C File Reference

Go to the source code of this file.

Functions

int sim_day1 (Int_t nEvents=100, TString SimEngine="TGeant3", Double_t BeamMomentum=6.231552)
 

Function Documentation

int sim_day1 ( Int_t  nEvents = 100,
TString  SimEngine = "TGeant3",
Double_t  BeamMomentum = 6.231552 
)

Definition at line 8 of file QA/day1/sim_day1.C.

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

9 {
10  //-----User Settings:------------------------------------------------------
11  TString parAsciiFile = "all.par";
12  // TString inputGenerator =
13  // EvtGen -> "xxxxxxxx.dec"
14  // DPM -> "dpm_xxxxx"
15  // FTF -> "ftf_xxxxx"
16  TString inputGenerator = "psi2s_Jpsi2pi_Jpsi_mumu.dec";
17  TString inputDir = gSystem->Getenv("VMCWORKDIR");
18  inputDir += "/macro/QA/day1/";
19  gRandom->SetSeed(1234);
20  //-------------------------------------------------------------------------
21  // ----- Create the Simulation run manager ------------------------------
23  fRun->SetOptions("day1+fakeonline"); // day1 phase1 gem3 nogem fakeonline
24  fRun->SetInput(inputGenerator);
25  fRun->SetInputDir(inputDir);
26  fRun->SetName(SimEngine);
27  fRun->SetParamAsciiFile(parAsciiFile);
29  fRun->SetBeamMom(BeamMomentum);
30  // ----- Initialization ------------------------------------------------
31  fRun->Setup("fakeonline");
32  // ----- Geometry -----------------------------------------------------
33  fRun->CreateGeometry();
34  // ----- Event generator ----------------------------------------------
35  fRun->SetGenerator();
36  // ----- Add tasks ----------------------------------------------------
37  fRun->AddSimTasks();
38  // ----- Intialise and run --------------------------------------------
39  fRun->Init();
40  // --- now run!
41  fRun->Run(nEvents);
42  fRun->Finish();
43 
44  return 0;
45 };
void SetInputDir(TString par)
Input directory of the simulation.
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 SetOptions(TString par)
Setter of the simulation options This string can be: "" -> default settings full setup "day1" -> Set...
void SetGenerator()
Set the event generator.