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

Go to the source code of this file.

Functions

int sim_complete (Int_t nEvents=100, TString SimEngine="TGeant3", Double_t BeamMomentum=15.)
 

Function Documentation

int sim_complete ( Int_t  nEvents = 100,
TString  SimEngine = "TGeant3",
Double_t  BeamMomentum = 15. 
)

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

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

9 {
10  //-----User Settings:------------------------------------------------------
11  TString parAsciiFile = "all.par";
12  TString inputGenerator = "box_1pi_1GeV_theta10-120";
13  //-------------------------------------------------------------------------
14  // ----- Create the Simulation run manager ------------------------------
16  fRun->SetInput(inputGenerator);
17  fRun->SetName(SimEngine);
18  fRun->SetParamAsciiFile(parAsciiFile);
20  fRun->SetBeamMom(BeamMomentum);
21  // ----- Initialization ------------------------------------------------
22  fRun->Setup();
23  // ----- Geometry -----------------------------------------------------
24  fRun->CreateGeometry();
25  // ----- Event generator ----------------------------------------------
26  FairBoxGenerator* boxGen = new FairBoxGenerator(13, 1); // 13 = muon; 1 = multipl.
27  boxGen->SetPRange(1.,1.); // GeV/c
28  boxGen->SetPhiRange(0., 360.); // Azimuth angle range [degree]
29  boxGen->SetThetaRange(10., 120.); // Polar angle in lab system range [degree]
30  boxGen->SetXYZ(0., 0., 0.); // cm
31  fRun->SetGenerator(boxGen);
32  // ----- Add tasks ----------------------------------------------------
33  fRun->AddSimTasks();
34  // ----- Intialise and run --------------------------------------------
35  fRun->Init();
36  fRun->Run(nEvents);
37  fRun->Finish();
38 
39  return 0;
40 };
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.
FairBoxGenerator * boxGen
Definition: sim_emc_apd.C:85
void SetGenerator()
Set the event generator.