33 #include "G4UImanager.hh" 34 #include "G4UserSteppingAction.hh" 36 #ifdef G4MULTITHREADED 37 #include "G4MTRunManager.hh" 39 #include "G4RunManager.hh" 42 #include "G4VisExecutive.hh" 43 #include "G4UIExecutive.hh" 45 #include "XActionInitialization.hh" 46 #include "XDetectorConstruction.hh" 47 #include "XPhysicsList.hh" 52 int main(
int argc,
char** argv) {
55 G4UIExecutive* ui =
nullptr;
57 ui =
new G4UIExecutive(argc, argv);
62 #ifdef G4MULTITHREADED 63 G4MTRunManager* runManager =
new G4MTRunManager;
65 G4RunManager* runManager =
new G4RunManager;
70 XDetectorConstruction* detector =
new XDetectorConstruction();
71 runManager->SetUserInitialization(detector);
73 G4VUserPhysicsList* physics =
new XPhysicsList();
75 runManager->SetUserInitialization(physics);
79 runManager->SetUserInitialization(
new XActionInitialization);
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)