29 #ifdef G4MULTITHREADED 30 #include "G4MTRunManager.hh" 32 #include "G4RunManager.hh" 35 #include "G4VisExecutive.hh" 36 #include "G4UIExecutive.hh" 38 #include "G4UImanager.hh" 40 #include "GB03DetectorConstruction.hh" 41 #include "GB03PrimaryGeneratorAction.hh" 42 #include "GB03ActionInitialization.hh" 43 #include "FTFP_BERT.hh" 44 #include "G4GenericBiasingPhysics.hh" 46 int main(
int argc,
char** argv)
49 G4UIExecutive* ui =
nullptr;
51 ui =
new G4UIExecutive(argc, argv);
55 #ifdef G4MULTITHREADED 56 G4MTRunManager * runManager =
new G4MTRunManager;
57 G4cout <<
" ********** Run Manager constructed in MT mode ************ " << G4endl;
59 runManager->SetNumberOfThreads(4);
61 G4RunManager * runManager =
new G4RunManager;
62 G4cout <<
" ********** Run Manager constructed in sequential mode ************ " << G4endl;
66 G4VUserDetectorConstruction* detector =
new GB03DetectorConstruction;
67 runManager->SetUserInitialization(detector);
68 G4VModularPhysicsList* physicsList =
new FTFP_BERT;
72 G4GenericBiasingPhysics* biasingPhysics =
new G4GenericBiasingPhysics();
73 biasingPhysics->NonPhysicsBias(
"neutron");
74 physicsList->RegisterPhysics(biasingPhysics);
75 runManager->SetUserInitialization(physicsList);
78 G4VUserActionInitialization* actions =
new GB03ActionInitialization;
79 runManager->SetUserInitialization(actions);
83 G4VisManager* visManager =
new G4VisExecutive;
84 visManager->Initialize();
88 runManager->Initialize();
92 G4UImanager* UImanager = G4UImanager::GetUIpointer();
96 UImanager->ApplyCommand(
"/control/execute vis.mac");
102 G4String command =
"/control/execute ";
104 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)