Main program of the RE06 example.
More...
#include "G4Types.hh"
#include "G4RunManager.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
#include "G4UImanager.hh"
#include "FTFP_BERT.hh"
#include "G4ParallelWorldPhysics.hh"
#include "RE06DetectorConstruction.hh"
#include "RE06ParallelWorld.hh"
#include "RE06PrimaryGeneratorAction.hh"
#include "RE06RunAction.hh"
#include "RE06SteppingVerbose.hh"
#include "RE06ActionInitialization.hh"
#include "RE06WorkerInitialization.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the RE06 example.
Definition in file exampleRE06.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 57 of file exampleRE06.cc.
60 G4UIExecutive* ui =
nullptr;
62 ui =
new G4UIExecutive(argc, argv);
66 RE06SteppingVerbose* verbosity =
new RE06SteppingVerbose;
67 G4VSteppingVerbose::SetInstance(verbosity);
71 #ifdef G4MULTITHREADED 72 G4MTRunManager * runManager =
new G4MTRunManager;
73 runManager->SetNumberOfThreads(4);
74 runManager->SetUserInitialization(
new RE06WorkerInitialization);
76 G4RunManager* runManager =
new G4RunManager;
81 G4String parallelWorldName =
"ParallelScoringWorld";
82 G4VUserDetectorConstruction* detector =
new RE06DetectorConstruction;
83 detector->RegisterParallelWorld(
new RE06ParallelWorld(parallelWorldName));
84 runManager->SetUserInitialization(detector);
86 G4VModularPhysicsList* physics =
new FTFP_BERT;
87 physics->RegisterPhysics(
new G4ParallelWorldPhysics(parallelWorldName));
88 runManager->SetUserInitialization(physics);
92 runManager->SetUserInitialization(
new RE06ActionInitialization);
96 G4VisManager* visManager =
new G4VisExecutive;
97 visManager->Initialize();
101 runManager->Initialize();
105 G4UImanager* UImanager = G4UImanager::GetUIpointer();
109 UImanager->ApplyCommand(
"/control/execute vis.mac");
115 G4String command =
"/control/execute ";
117 UImanager->ApplyCommand(command+fileName);