42 #include "G4RunManager.hh" 43 #include "G4UImanager.hh" 44 #include "Randomize.hh" 46 #include "G4PhysListFactory.hh" 47 #include "G4VModularPhysicsList.hh" 50 #include "EventAction.hh" 51 #include "StackingAction.hh" 52 #include "HistoManager.hh" 53 #include "G4UIExecutive.hh" 54 #include "G4VisExecutive.hh" 56 #include "CRMC_FTFP_BERT.hh" 59 int main(
int argc,
char** argv) {
62 G4UIExecutive* ui =
nullptr;
63 if (argc == 1) ui =
new G4UIExecutive(argc,argv);
66 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanecuEngine());
69 G4RunManager * runManager =
new G4RunManager();
74 G4PhysListFactory factory;
75 G4VModularPhysicsList* phys = 0;
81 if (argc==3) { physName = argv[2]; }
83 char* path = std::getenv(
"PHYSLIST");
84 if (path) { physName =
G4String(path); }
86 if ( physName ==
"UrQMD" ) {
88 }
else if ( physName ==
"CRMC_FTFP_BERT" ) {
89 phys =
new CRMC_FTFP_BERT;
91 phys = factory.GetReferencePhysList( physName );
96 G4cout <<
"Hadr02 FATAL ERROR: Physics List is not defined" 100 runManager->SetUserInitialization(phys);
101 HistoManager::GetPointer()->SetPhysicsList(phys);
106 runManager->SetUserAction(
new RunAction());
107 runManager->SetUserAction(
new EventAction());
108 runManager->SetUserAction(
new StackingAction());
111 G4VisManager* visManager =
new G4VisExecutive;
112 visManager->Initialize();
115 G4UImanager* UImanager = G4UImanager::GetUIpointer();
124 G4String command =
"/control/execute ";
126 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)