Main program of the hadronic/Hadr05 example.
More...
#include "G4RunManager.hh"
#include "G4MTRunManager.hh"
#include "G4UImanager.hh"
#include "Randomize.hh"
#include "DetectorConstruction.hh"
#include "G4PhysListFactory.hh"
#include "G4VModularPhysicsList.hh"
#include "PrimaryGeneratorAction.hh"
#include "ActionInitialization.hh"
#include "G4GenericPhysicsList.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the hadronic/Hadr05 example.
Definition in file Hadr05.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 57 of file Hadr05.cc.
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);