49 #include "G4RunManager.hh" 50 #include "G4UImanager.hh" 51 #include "Randomize.hh" 56 #include "G4VModularPhysicsList.hh" 61 #include "EventAction.hh" 62 #include "StackingAction.hh" 65 #include "G4VisExecutive.hh" 69 #include "G4UIExecutive.hh" 74 int main(
int argc,
char** argv) {
77 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanecuEngine());
80 G4RunManager * runManager =
new G4RunManager();
85 G4PhysListFactory factory;
86 G4VModularPhysicsList* phys =
nullptr;
91 if (argc==3) { physName = argv[2]; }
95 char* path = getenv(
"PHYSLIST");
96 if (path) { physName =
G4String(path); }
100 if(
"" != physName && factory.IsReferencePhysList(physName)) {
101 phys = factory.GetReferencePhysList(physName);
111 runManager->SetUserInitialization(phys);
115 runManager->SetUserAction(
new RunAction());
116 runManager->SetUserAction(
new EventAction());
117 runManager->SetUserAction(
new StackingAction());
120 G4UImanager* UImanager = G4UImanager::GetUIpointer();
122 G4VisManager* visManager =
nullptr;
129 visManager =
new G4VisExecutive;
130 visManager->Initialize();
133 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
140 G4String command =
"/control/execute ";
142 UImanager->ApplyCommand(command+fileName);
TConfigurablePhysicsList< ModularPhysicsList > PhysicsList
int main(int argc, char **argv)