35 #ifdef G4MULTITHREADED 36 #include "G4MTRunManager.hh" 37 #include "RE05WorkerInitialization.hh" 39 #include "G4RunManager.hh" 40 #include "RE05SteppingVerbose.hh" 43 #include "G4UImanager.hh" 45 #include "RE05DetectorConstruction.hh" 46 #include "RE05CalorimeterParallelWorld.hh" 48 #include "G4ParallelWorldPhysics.hh" 49 #include "RE05ActionInitialization.hh" 52 #include "G4VisExecutive.hh" 56 #include "G4UIExecutive.hh" 59 int main(
int argc,
char** argv)
61 #ifdef G4MULTITHREADED 62 G4MTRunManager* runManager =
new G4MTRunManager;
63 G4int number_of_threads = 4;
64 runManager->SetNumberOfThreads(number_of_threads);
65 runManager->SetUserInitialization(
new RE05WorkerInitialization);
67 G4VSteppingVerbose* verbosity =
new RE05SteppingVerbose;
68 G4VSteppingVerbose::SetInstance(verbosity);
69 G4RunManager* runManager =
new G4RunManager;
72 G4String parallelWorldName =
"ReadoutWorld";
75 G4VUserDetectorConstruction* detector =
new RE05DetectorConstruction();
76 detector->RegisterParallelWorld
77 (
new RE05CalorimeterParallelWorld(parallelWorldName));
78 runManager->SetUserInitialization(detector);
80 G4VModularPhysicsList* physicsList =
new QBBC;
82 ->RegisterPhysics(
new G4ParallelWorldPhysics(parallelWorldName));
83 runManager->SetUserInitialization(physicsList);
85 G4VUserActionInitialization* actions =
new RE05ActionInitialization;
86 runManager->SetUserInitialization(actions);
88 runManager->Initialize();
91 G4VisManager* visManager =
new G4VisExecutive;
92 visManager->Initialize();
96 G4UImanager* UImanager = G4UImanager::GetUIpointer();
100 G4String command =
"/control/execute ";
102 UImanager->ApplyCommand(command+fileName);
107 G4UIExecutive * ui =
new G4UIExecutive(argc,argv);
109 UImanager->ApplyCommand(
"/control/execute vis.mac");
int main(int argc, char **argv)