FairRoot/PandaRoot
Functions
sim_box.C File Reference

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 8 of file sim_box.C.

References PndMasterRunSim::AddSimTasks(), BeamMomentum, PndMasterRunSim::CreateGeometry(), 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  TString inputGenerator = "box:type(211,1):p(1):tht(10,120)";
14  //-------------------------------------------------------------------------
15  // ----- Create the Simulation run manager ------------------------------
17  fRun->SetInput(inputGenerator);
18  fRun->SetName(SimEngine);
19  fRun->SetParamAsciiFile(parAsciiFile);
21  fRun->SetBeamMom(BeamMomentum);
22  // ----- Initialization ------------------------------------------------
23  fRun->Setup();
24  // ----- Geometry -----------------------------------------------------
25  fRun->CreateGeometry();
26  // ----- Event generator ----------------------------------------------
27  fRun->SetGenerator();
28  /*
29  FairBoxGenerator* boxGen = new FairBoxGenerator(13, 1); // 13 = muon; 1 = multipl.
30  boxGen->SetPRange(1.,1.); // GeV/c
31  boxGen->SetPhiRange(0., 360.); // Azimuth angle range [degree]
32  boxGen->SetThetaRange(10., 120.); // Polar angle in lab system range [degree]
33  boxGen->SetXYZ(0., 0., 0.); // cm
34  fRun->SetGenerator(boxGen);*/
35 
36  // ----- Add tasks ----------------------------------------------------
37  fRun->AddSimTasks();
38  // ----- Intialise and run --------------------------------------------
39  fRun->Init();
40  //fRun->Run(nEvents);
41  //fRun->Finish();
42 
43  //exit(0);
44 };
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.