30 #include "B5DetectorConstruction.hh" 31 #include "B5ActionInitialization.hh" 33 #ifdef G4MULTITHREADED 34 #include "G4MTRunManager.hh" 36 #include "G4RunManager.hh" 39 #include "G4UImanager.hh" 40 #include "FTFP_BERT.hh" 41 #include "G4StepLimiterPhysics.hh" 43 #include "G4VisExecutive.hh" 44 #include "G4UIExecutive.hh" 48 int main(
int argc,
char** argv)
52 G4UIExecutive* ui = 0;
54 ui =
new G4UIExecutive(argc, argv);
59 #ifdef G4MULTITHREADED 60 auto runManager =
new G4MTRunManager;
62 auto runManager =
new G4RunManager;
66 runManager->SetUserInitialization(
new B5DetectorConstruction);
68 auto physicsList =
new FTFP_BERT;
69 physicsList->RegisterPhysics(
new G4StepLimiterPhysics());
70 runManager->SetUserInitialization(physicsList);
73 runManager->SetUserInitialization(
new B5ActionInitialization());
76 auto visManager =
new G4VisExecutive;
79 visManager->Initialize();
82 auto UImanager = G4UImanager::GetUIpointer();
86 G4String command =
"/control/execute ";
88 UImanager->ApplyCommand(command+fileName);
91 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
93 UImanager->ApplyCommand(
"/control/execute gui.mac");
int main(int argc, char **argv)