36 #ifdef G4MULTITHREADED 37 #include "G4MTRunManager.hh" 39 #include "G4RunManager.hh" 42 #include "G4VisExecutive.hh" 43 #include "G4UIExecutive.hh" 45 #include "G4UImanager.hh" 46 #include "FTFP_BERT.hh" 47 #include "G4ParallelWorldPhysics.hh" 49 #include "RE06DetectorConstruction.hh" 50 #include "RE06ParallelWorld.hh" 51 #include "RE06PrimaryGeneratorAction.hh" 52 #include "RE06RunAction.hh" 53 #include "RE06SteppingVerbose.hh" 54 #include "RE06ActionInitialization.hh" 55 #include "RE06WorkerInitialization.hh" 57 int main(
int argc,
char** argv)
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);
int main(int argc, char **argv)