BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
RadLenSim.C
Go to the documentation of this file.
1// Macro for running BM@N simulation with GEANTINO to exclude interactions
2R__ADD_INCLUDE_PATH($VMCWORKDIR)
3#include "macro/run/geometry_run/geometry_run8.C"
4
5void RadLenSim(Int_t nEvents = 50000, TString outFile = "RadLenSim.root")
6{
7
8 FairRunSim* fRun = new FairRunSim();
9 fRun->SetName("TGeant4");
10 fRun->SetOutputFile(outFile.Data()); // output file
11 geometry(fRun); // load bmn geometry
12
13 FairPrimaryGenerator* primGen = new FairPrimaryGenerator();
14 fRun->SetGenerator(primGen);
15
16 FairBoxGenerator* box = new FairBoxGenerator(0, 100);
17 box->SetPRange(.2, .2); // GeV/c
18 box->SetPhiRange(0, 360);
19 box->SetThetaRange(0, 180);
20 box->SetXYZ(0., 0., 0.);
21 primGen->AddGenerator(box);
22
23 fRun->SetStoreTraj(kFALSE);
24 fRun->SetRadLenRegister(kTRUE); // radiation length manager
25
26 fRun->Init();
27
28 // Fill the Parameter containers for this run
29 //-------------------------------------------
30
31 FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
32 rtdb->print();
33 fRun->Run(nEvents);
34}
int Int_t
constexpr Bool_t kFALSE
constexpr Bool_t kTRUE
#define R__ADD_INCLUDE_PATH(PATH)
void RadLenSim(Int_t nEvents=50000, TString outFile="RadLenSim.root")
Definition RadLenSim.C:5