46 #include "G4RunManager.hh" 47 #include "G4UImanager.hh" 48 #include "Randomize.hh" 52 #include "G4VModularPhysicsList.hh" 56 #include "EventAction.hh" 57 #include "StackingAction.hh" 58 #include "HistoManager.hh" 61 #include "G4VisExecutive.hh" 65 #include "G4UIExecutive.hh" 71 int main(
int argc,
char** argv) {
74 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanecuEngine());
77 G4RunManager * runManager =
new G4RunManager();
82 G4PhysListFactory factory;
83 G4VModularPhysicsList* phys = 0;
89 if (argc==3) { physName = argv[2]; }
91 char* path = getenv(
"PHYSLIST");
92 if (path) { physName =
G4String(path); }
94 if ( physName ==
"UrQMD" ) { phys =
new UrQMD; }
95 else { phys = factory.GetReferencePhysList(physName); }
99 G4cout <<
"Hadr02 FATAL ERROR: Physics List is not defined" 103 runManager->SetUserInitialization(phys);
104 HistoManager::GetPointer()->SetPhysicsList(phys);
109 runManager->SetUserAction(
new RunAction());
110 runManager->SetUserAction(
new EventAction());
111 runManager->SetUserAction(
new StackingAction());
114 G4UImanager* UImanager = G4UImanager::GetUIpointer();
116 G4VisManager* visManager = 0;
123 visManager =
new G4VisExecutive;
124 visManager->Initialize();
127 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
134 G4String command =
"/control/execute ";
136 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)