35 #ifdef G4MULTITHREADED 36 #include "G4MTRunManager.hh" 38 #include "G4RunManager.hh" 42 #include "G4VisExecutive.hh" 46 #include "G4UIExecutive.hh" 49 #include "G4UImanager.hh" 50 #include "FTFP_BERT.hh" 51 #include "G4ParallelWorldPhysics.hh" 53 #include "RE06DetectorConstruction.hh" 54 #include "RE06ParallelWorld.hh" 55 #include "RE06PrimaryGeneratorAction.hh" 56 #include "RE06RunAction.hh" 57 #include "RE06SteppingVerbose.hh" 58 #include "RE06ActionInitialization.hh" 59 #include "RE06WorkerInitialization.hh" 61 int main(
int argc,
char** argv)
64 RE06SteppingVerbose* verbosity =
new RE06SteppingVerbose;
65 G4VSteppingVerbose::SetInstance(verbosity);
69 #ifdef G4MULTITHREADED 70 G4MTRunManager * runManager =
new G4MTRunManager;
71 runManager->SetNumberOfThreads(4);
72 runManager->SetUserInitialization(
new RE06WorkerInitialization);
74 G4RunManager* runManager =
new G4RunManager;
79 G4String parallelWorldName =
"ParallelScoringWorld";
80 G4VUserDetectorConstruction* detector =
new RE06DetectorConstruction;
81 detector->RegisterParallelWorld(
new RE06ParallelWorld(parallelWorldName));
82 runManager->SetUserInitialization(detector);
84 G4VModularPhysicsList* physics =
new FTFP_BERT;
85 physics->RegisterPhysics(
new G4ParallelWorldPhysics(parallelWorldName));
86 runManager->SetUserInitialization(physics);
90 runManager->SetUserInitialization(
new RE06ActionInitialization);
95 G4VisManager* visManager =
new G4VisExecutive;
96 visManager->Initialize();
101 runManager->Initialize();
105 G4UImanager* UImanager = G4UImanager::GetUIpointer();
110 G4UIExecutive * ui =
new G4UIExecutive(argc,argv);
112 UImanager->ApplyCommand(
"/control/execute vis.mac");
120 G4String command =
"/control/execute ";
122 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)