Main program of the medical/GammaTherapy example.
More...
#include "G4Types.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "Randomize.hh"
#include "G4UIExecutive.hh"
#include "G4VisExecutive.hh"
#include "DetectorConstruction.hh"
#include "PhysicsList.hh"
#include "ActionInitialization.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the medical/GammaTherapy example.
Definition in file GammaTherapy.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 65 of file GammaTherapy.cc.
68 G4UIExecutive* ui =
nullptr;
69 if (argc == 1) ui =
new G4UIExecutive(argc,argv);
72 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
75 #ifdef G4MULTITHREADED 76 G4MTRunManager* runManager =
new G4MTRunManager;
77 G4int nThreads = std::min(G4Threading::G4GetNumberOfCores(),2);
78 if (argc==3) nThreads = G4UIcommand::ConvertToInt(argv[2]);
79 runManager->SetNumberOfThreads(nThreads);
80 G4cout <<
"===== GammaTherapy is started with " 81 << runManager->GetNumberOfThreads() <<
" threads =====" << G4endl;
83 G4RunManager* runManager =
new G4RunManager();
88 runManager->SetUserInitialization(det);
90 runManager->SetUserInitialization(
new PhysicsList());
93 runManager->SetUserInitialization(
new ActionInitialization(det));
96 G4VisManager* visManager =
nullptr;
99 G4UImanager* UImanager = G4UImanager::GetUIpointer();
103 visManager =
new G4VisExecutive;
104 visManager->Initialize();
105 UImanager->ApplyCommand(
"/control/execute vis.mac");
111 G4String command =
"/control/execute ";
113 UImanager->ApplyCommand(command+fileName);
TConfigurablePhysicsList< ModularPhysicsList > PhysicsList