32 #ifdef G4MULTITHREADED 33 #include "G4MTRunManager.hh" 35 #include "G4RunManager.hh" 37 #include "G4ScoringManager.hh" 38 #include "G4UImanager.hh" 40 #include "G4VisExecutive.hh" 41 #include "G4UIExecutive.hh" 43 #include "RE04ActionInitialization.hh" 44 #include "RE04DetectorConstruction.hh" 45 #include "RE04ParallelWorldConstruction.hh" 47 #include "FTFP_BERT.hh" 48 #include "G4ParallelWorldPhysics.hh" 50 int main(
int argc,
char** argv)
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);
int main(int argc, char **argv)