34 #include "G4RunManager.hh" 35 #include "G4UImanager.hh" 36 #include "Randomize.hh" 43 #include "EventAction.hh" 44 #include "SteppingAction.hh" 45 #include "TrackingAction.hh" 47 #include "G4UIExecutive.hh" 48 #include "G4VisExecutive.hh" 52 int main(
int argc,
char** argv) {
55 G4UIExecutive* ui =
nullptr;
56 if (argc == 1) { ui =
new G4UIExecutive(argc,argv); }
59 G4RunManager * runManager =
new G4RunManager;
65 runManager->SetUserInitialization(det);
66 runManager->SetUserInitialization(phys =
new PhysicsList);
70 runManager->SetUserAction(
new RunAction());
71 runManager->SetUserAction(
new EventAction());
72 runManager->SetUserAction(
new TrackingAction());
73 runManager->SetUserAction(
new SteppingAction());
76 G4VisManager* visManager =
nullptr;
79 G4UImanager* UImanager = G4UImanager::GetUIpointer();
83 visManager =
new G4VisExecutive;
84 visManager->Initialize();
89 G4String command =
"/control/execute ";
91 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)