47 #include "G4RunManager.hh" 48 #include "G4MTRunManager.hh" 49 #include "G4UImanager.hh" 50 #include "Randomize.hh" 54 #include "G4VModularPhysicsList.hh" 56 #include "ActionInitialization.hh" 59 #include "G4VisExecutive.hh" 63 #include "G4UIExecutive.hh" 68 int main(
int argc,
char** argv) {
71 G4Random::setTheEngine(
new CLHEP::RanecuEngine());
73 #ifdef G4MULTITHREADED 74 G4MTRunManager * runManager =
new G4MTRunManager();
78 G4int nThreads = G4UIcommand::ConvertToInt(argv[3]);
79 runManager->SetNumberOfThreads(nThreads);
81 G4cout <<
"##### Hadr00 started for " << runManager->GetNumberOfThreads()
82 <<
" threads" <<
" #####" << G4endl;
84 G4RunManager * runManager =
new G4RunManager();
85 G4cout <<
"##### Hadr00 started in sequential mode" 86 <<
" #####" << G4endl;
91 runManager->SetUserInitialization(det);
93 G4PhysListFactory factory;
94 G4VModularPhysicsList* phys = 0;
98 if (argc>=3) { physName = argv[2]; }
102 char* path = getenv(
"PHYSLIST");
103 if (path) { physName =
G4String(path); }
107 if(
"" == physName || !factory.IsReferencePhysList(physName)) {
108 physName =
"FTFP_BERT";
112 phys = factory.GetReferencePhysList(physName);
114 runManager->SetUserInitialization(phys);
117 runManager->SetUserInitialization(
new ActionInitialization(det));
120 G4UImanager* UImanager = G4UImanager::GetUIpointer();
122 G4VisManager* visManager = 0;
129 visManager =
new G4VisExecutive;
130 visManager->Initialize();
133 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
140 G4String command =
"/control/execute ";
142 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)