36 #ifdef G4MULTITHREADED 37 #include "G4MTRunManager.hh" 38 #include "RE05WorkerInitialization.hh" 40 #include "G4RunManager.hh" 41 #include "RE05SteppingVerbose.hh" 44 #include "G4UImanager.hh" 46 #include "RE05DetectorConstruction.hh" 47 #include "RE05CalorimeterParallelWorld.hh" 49 #include "G4ParallelWorldPhysics.hh" 50 #include "RE05ActionInitialization.hh" 52 #include "G4VisExecutive.hh" 53 #include "G4UIExecutive.hh" 55 int main(
int argc,
char** argv)
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");
int main(int argc, char **argv)