Main program of the runAndEvent/RE02 example.
More...
#include "RE02DetectorConstruction.hh"
#include "QGS_BIC.hh"
#include "RE02ActionInitialization.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4SystemOfUnits.hh"
#include "G4UIExecutive.hh"
#include "G4VisExecutive.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the runAndEvent/RE02 example.
Definition in file RE02.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 50 of file RE02.cc.
53 G4UIExecutive* ui =
nullptr;
55 ui =
new G4UIExecutive(argc, argv);
59 #ifdef G4MULTITHREADED 60 G4MTRunManager * runManager =
new G4MTRunManager;
63 G4RunManager * runManager =
new G4RunManager;
69 RE02DetectorConstruction* detector =
new RE02DetectorConstruction;
70 detector->SetPhantomSize(G4ThreeVector(200*mm,200*mm,400*mm));
71 detector->SetNumberOfSegmentsInPhantom(100,100,200);
76 detector->SetLeadSegment(TRUE);
81 runManager->SetUserInitialization(detector);
83 runManager->SetUserInitialization(
new QGS_BIC());
86 G4VisManager* visManager =
new G4VisExecutive;
87 visManager->Initialize();
90 runManager->SetUserInitialization(
new RE02ActionInitialization);
93 runManager->Initialize();
96 G4UImanager * pUI = G4UImanager::GetUIpointer();
101 pUI->ApplyCommand(
"/control/execute vis.mac");
108 G4String command =
"/control/execute ";
110 pUI->ApplyCommand(command+fileName);