48 #include "G4RunManager.hh" 49 #include "G4UImanager.hh" 50 #include "Randomize.hh" 54 #include "G4PhysListFactory.hh" 55 #include "G4VModularPhysicsList.hh" 60 #include "EventAction.hh" 61 #include "StackingAction.hh" 63 #include "G4UIExecutive.hh" 64 #include "G4VisExecutive.hh" 68 int main(
int argc,
char** argv) {
71 G4UIExecutive* ui =
nullptr;
72 if (argc == 1) { ui =
new G4UIExecutive(argc,argv); }
75 G4RunManager * runManager =
new G4RunManager();
80 G4PhysListFactory factory;
81 G4VModularPhysicsList* phys =
nullptr;
86 if (argc==3) { physName = argv[2]; }
90 char* path = std::getenv(
"PHYSLIST");
91 if (path) { physName =
G4String(path); }
95 if (
"" != physName && factory.IsReferencePhysList(physName)) {
96 phys = factory.GetReferencePhysList(physName);
106 runManager->SetUserInitialization(phys);
110 runManager->SetUserAction(
new RunAction());
111 runManager->SetUserAction(
new EventAction());
112 runManager->SetUserAction(
new StackingAction());
115 G4VisManager* visManager =
nullptr;
118 G4UImanager* UImanager = G4UImanager::GetUIpointer();
122 visManager =
new G4VisExecutive;
123 visManager->Initialize();
128 G4String command =
"/control/execute ";
130 UImanager->ApplyCommand(command+fileName);
TConfigurablePhysicsList< ModularPhysicsList > PhysicsList
int main(int argc, char **argv)