34 #include "G4RunManager.hh" 35 #include "G4MTRunManager.hh" 36 #include "G4UImanager.hh" 37 #include "Randomize.hh" 41 #include "G4VModularPhysicsList.hh" 43 #include "ActionInitialization.hh" 45 #include "G4GenericPhysicsList.hh" 48 #include "G4VisExecutive.hh" 52 #include "G4UIExecutive.hh" 57 int main(
int argc,
char** argv) {
60 G4Random::setTheEngine(
new CLHEP::RanecuEngine());
62 #ifdef G4MULTITHREADED 63 G4MTRunManager * runManager =
new G4MTRunManager();
67 G4int nThreads = G4UIcommand::ConvertToInt(argv[3]);
68 runManager->SetNumberOfThreads(nThreads);
70 G4cout <<
"##### Hadr05 started for " << runManager->GetNumberOfThreads()
71 <<
" threads" <<
" #####" << G4endl;
73 G4RunManager * runManager =
new G4RunManager();
74 G4cout <<
"##### Hadr05 started in sequential mode" 75 <<
" #####" << G4endl;
81 G4VModularPhysicsList* phys = 0;
82 G4UImanager* UImanager = G4UImanager::GetUIpointer();
87 phys =
new G4GenericPhysicsList();
89 UImanager->ApplyCommand(
"/control/execute "+physListMacro);
94 std::vector<G4String>* MyConstr =
new std::vector<G4String>;
96 MyConstr->push_back(
"G4EmStandardPhysics");
97 MyConstr->push_back(
"G4EmExtraPhysics");
98 MyConstr->push_back(
"G4DecayPhysics");
99 MyConstr->push_back(
"G4HadronElasticPhysics");
100 MyConstr->push_back(
"G4HadronPhysicsFTFP_BERT");
101 MyConstr->push_back(
"G4StoppingPhysics");
102 MyConstr->push_back(
"G4IonPhysics");
103 MyConstr->push_back(
"G4NeutronTrackingCut");
105 phys =
new G4GenericPhysicsList(MyConstr);
108 runManager->SetUserInitialization(phys);
111 runManager->SetUserInitialization(
new ActionInitialization());
114 G4VisManager* visManager = 0;
121 visManager =
new G4VisExecutive;
122 visManager->Initialize();
125 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
132 G4String command =
"/control/execute ";
134 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)