Main program of the runAndEvent/RE04 example.
More...
#include "G4Types.hh"
#include "G4RunManager.hh"
#include "G4ScoringManager.hh"
#include "G4UImanager.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
#include "RE04ActionInitialization.hh"
#include "RE04DetectorConstruction.hh"
#include "RE04ParallelWorldConstruction.hh"
#include "FTFP_BERT.hh"
#include "G4ParallelWorldPhysics.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the runAndEvent/RE04 example.
Definition in file RE04.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 50 of file RE04.cc.
53 G4UIExecutive* ui =
nullptr;
55 ui =
new G4UIExecutive(argc, argv);
60 #ifdef G4MULTITHREADED 61 G4MTRunManager * runManager =
new G4MTRunManager;
64 G4RunManager * runManager =
new G4RunManager;
67 G4ScoringManager::GetScoringManager();
69 G4String paraWorldName =
"ParallelWorld";
73 RE04DetectorConstruction* realWorld =
new RE04DetectorConstruction;
74 RE04ParallelWorldConstruction* parallelWorld
75 =
new RE04ParallelWorldConstruction(paraWorldName);
76 realWorld->RegisterParallelWorld(parallelWorld);
77 runManager->SetUserInitialization(realWorld);
79 G4VModularPhysicsList* physicsList =
new FTFP_BERT;
80 physicsList->RegisterPhysics
81 (
new G4ParallelWorldPhysics(paraWorldName,
true));
82 runManager->SetUserInitialization(physicsList);
86 runManager->SetUserInitialization(
new RE04ActionInitialization);
90 G4VisManager* visManager =
new G4VisExecutive;
91 visManager->Initialize();
95 runManager->Initialize();
99 G4UImanager* pUImanager = G4UImanager::GetUIpointer();
103 pUImanager->ApplyCommand(
"/control/execute vis.mac");
109 G4String command =
"/control/execute ";
111 pUImanager->ApplyCommand(command+fileName);