FairRoot/PandaRoot
Functions
production/dayone-2017/fullsim/sim_day1.C File Reference

Go to the source code of this file.

Functions

int sim_day1 (Int_t nEvents=100)
 

Function Documentation

int sim_day1 ( Int_t  nEvents = 100)

Definition at line 8 of file production/dayone-2017/fullsim/sim_day1.C.

References PndMasterRunSim::AddSimTasks(), BeamMomentum, PndMasterRunSim::CreateGeometry(), Double_t, PndMasterRunSim::Finish(), fRun, PndMasterRunSim::GetFilteredPrimaryGenerator(), gGeoManager, nEvents, primGen, PndMasterRunSim::SetGenerator(), PndMasterRunSim::SetInput(), PndMasterRunSim::SetNumberOfEvents(), PndMasterRunSim::SetOptions(), PndMasterRunSim::SetParamAsciiFile(), PndMasterRunSim::Setup(), FairFilteredPrimaryGenerator::SetVerbose(), and TString.

9 {
10  //-----User Settings:------------------------------------------------------
11  Double_t BeamMomentum = 6.231552;
12  TString SimEngine ="TGeant3";
13  TString parAsciiFile = "all.par";
14  TString options = "day1+strip"; //with fts1234
15  //TString options = "day1+strip+fts1256";
16  TString prefix = "evtday1"; // prefix string for output files
17 
18  // TString inputGenerator =
19  // EvtGen -> "xxxxxxxx.dec" (parses dec-file for initial particle) or "xxxxxxx.dec:initial_particle"
20  // DPM -> "dpm_xxxxx"
21  // FTF -> "ftf_xxxxx"
22  // BOX -> "box:type(pdgcode,mult):p(min,max):tht(min,max):phi(min,max)"
23 
24  TString inputGenerator = "psi2s_Jpsi2pi_Jpsi_mumu.dec";
25  //TString inputGenerator = "dpm";
26  //TString inputGenerator = "ftf"; //caution, works only with Geant3 rihgt now (02/2017)
27  //TString inputGenerator = "box:type(211,1):p(1,1):tht(10,120):phi(0,360)";
28 
29  //-------------------------------------------------------------------------
30  // ----- Create the Simulation run manager ------------------------------
32  fRun->SetOptions(options);
33  fRun->SetInput(inputGenerator);
34  fRun->SetName(SimEngine);
35  fRun->SetParamAsciiFile(parAsciiFile);
37  fRun->SetBeamMom(BeamMomentum);
38  // ----- Initialization ------------------------------------------------
39  fRun->Setup(prefix);
40  // ----- Geometry -----------------------------------------------------
41  fRun->CreateGeometry();
42  // ----- Event generator ----------------------------------------------
43  fRun->SetGenerator();
44 
45  // ----- Event filter setup -------------------------------------------
47  primGen->SetVerbose(0);
48  // ---- Example configuration for the event filter ------------------------
49  //FairEvtFilterOnSingleParticleCounts* chrgFilter = new FairEvtFilterOnSingleParticleCounts("chrgFilter");
50  //chrgFilter->AndMinCharge(4, FairEvtFilter::kCharged);
51  //primGen->AndFilter(chrgFilter);
52 
53  // ----- Add tasks ----------------------------------------------------
54  fRun->AddSimTasks();
55  // ----- Intialise and run --------------------------------------------
56  fRun->Init();
57  fRun->Run(nEvents);
58  fRun->Finish();
59  if (gROOT->GetVersionInt() >= 60602) {
60  gGeoManager->GetListOfVolumes()->Delete();
61  gGeoManager->GetListOfShapes()->Delete();
62  delete gGeoManager;
63  }
64  return 0;
65 }
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
TGeoManager * gGeoManager
FairPrimaryGenerator * primGen
Definition: sim_emc_apd.C:81
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.
Primary generator with added event filtering capabilities.
FairFilteredPrimaryGenerator * GetFilteredPrimaryGenerator()
Getter for the primary generator, e.g. to configure the event filter.
Double_t
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.
void SetVerbose(Int_t verbose=12)
Set the level of commenting output.