46 #include "G4RunManager.hh" 47 #include "G4MTRunManager.hh" 48 #include "G4UImanager.hh" 49 #include "Randomize.hh" 52 #include "G4PhysListFactory.hh" 53 #include "G4VModularPhysicsList.hh" 55 #include "ActionInitialization.hh" 57 #include "G4UIExecutive.hh" 58 #include "G4VisExecutive.hh" 62 int main(
int argc,
char** argv) {
65 G4UIExecutive* ui =
nullptr;
66 if (argc == 1) { ui =
new G4UIExecutive(argc,argv); }
68 #ifdef G4MULTITHREADED 69 G4MTRunManager * runManager =
new G4MTRunManager();
73 G4int nThreads = G4UIcommand::ConvertToInt(argv[3]);
74 runManager->SetNumberOfThreads(nThreads);
76 G4cout <<
"##### Hadr00 started for " << runManager->GetNumberOfThreads()
77 <<
" threads" <<
" #####" << G4endl;
79 G4RunManager * runManager =
new G4RunManager();
80 G4cout <<
"##### Hadr00 started in sequential mode" 81 <<
" #####" << G4endl;
86 runManager->SetUserInitialization(det);
88 G4PhysListFactory factory;
89 G4VModularPhysicsList* phys =
nullptr;
93 if (argc>=3) { physName = argv[2]; }
97 char* path = std::getenv(
"PHYSLIST");
98 if (path) { physName =
G4String(path); }
102 if(
"" == physName || !factory.IsReferencePhysList(physName)) {
103 physName =
"FTFP_BERT";
107 phys = factory.GetReferencePhysList(physName);
109 runManager->SetUserInitialization(phys);
110 det->SetPhysicsList(phys);
113 runManager->SetUserInitialization(
new ActionInitialization(det));
116 G4VisManager* visManager =
nullptr;
119 G4UImanager* UImanager = G4UImanager::GetUIpointer();
123 visManager =
new G4VisExecutive;
124 visManager->Initialize();
129 G4String command =
"/control/execute ";
131 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)