Main program of the RE05 example.
More...
#include "G4Types.hh"
#include "G4RunManager.hh"
#include "RE05SteppingVerbose.hh"
#include "G4UImanager.hh"
#include "RE05DetectorConstruction.hh"
#include "RE05CalorimeterParallelWorld.hh"
#include "QBBC.hh"
#include "G4ParallelWorldPhysics.hh"
#include "RE05ActionInitialization.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the RE05 example.
Definition in file exampleRE05.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 55 of file exampleRE05.cc.
58 G4UIExecutive* ui =
nullptr;
60 ui =
new G4UIExecutive(argc, argv);
63 #ifdef G4MULTITHREADED 64 G4MTRunManager* runManager =
new G4MTRunManager;
65 G4int number_of_threads = 4;
66 runManager->SetNumberOfThreads(number_of_threads);
67 runManager->SetUserInitialization(
new RE05WorkerInitialization);
69 G4VSteppingVerbose* verbosity =
new RE05SteppingVerbose;
70 G4VSteppingVerbose::SetInstance(verbosity);
71 G4RunManager* runManager =
new G4RunManager;
74 G4String parallelWorldName =
"ReadoutWorld";
77 G4VUserDetectorConstruction* detector =
new RE05DetectorConstruction();
78 detector->RegisterParallelWorld
79 (
new RE05CalorimeterParallelWorld(parallelWorldName));
80 runManager->SetUserInitialization(detector);
82 G4VModularPhysicsList* physicsList =
new QBBC;
84 ->RegisterPhysics(
new G4ParallelWorldPhysics(parallelWorldName));
85 runManager->SetUserInitialization(physicsList);
87 G4VUserActionInitialization* actions =
new RE05ActionInitialization;
88 runManager->SetUserInitialization(actions);
90 runManager->Initialize();
92 G4VisManager* visManager =
new G4VisExecutive;
93 visManager->Initialize();
96 G4UImanager* UImanager = G4UImanager::GetUIpointer();
100 G4String command =
"/control/execute ";
102 UImanager->ApplyCommand(command+fileName);
106 UImanager->ApplyCommand(
"/control/execute vis.mac");