Main program of the electromagnetic/TestEm8 example.
More...
#include "G4RunManager.hh"
#include "G4MTRunManager.hh"
#include "G4UImanager.hh"
#include "G4UIcommand.hh"
#include "Randomize.hh"
#include "DetectorConstruction.hh"
#include "PhysicsList.hh"
#include "ActionInitialization.hh"
#include "G4UIExecutive.hh"
#include "G4VisExecutive.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the electromagnetic/TestEm8 example.
Definition in file TestEm8.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 48 of file TestEm8.cc.
51 G4UIExecutive* ui =
nullptr;
52 if (argc == 1) { ui =
new G4UIExecutive(argc,argv); }
55 CLHEP::HepRandom::setTheEngine(
new CLHEP::MixMaxRng);
57 #ifdef G4MULTITHREADED 58 G4MTRunManager* runManager =
new G4MTRunManager;
63 nThreads = G4Threading::G4GetNumberOfCores();
65 nThreads = G4UIcommand::ConvertToInt(argv[2]);
70 if (nThreads > 0) { runManager->SetNumberOfThreads(nThreads); }
71 G4cout <<
"===== TestEm8 is started with " 72 << runManager->GetNumberOfThreads() <<
" threads =====" << G4endl;
74 G4RunManager* runManager =
new G4RunManager;
79 runManager->SetUserInitialization(det);
80 runManager->SetUserInitialization(
new PhysicsList(det));
83 runManager->SetUserInitialization(
new ActionInitialization());
86 G4VisManager* visManager =
nullptr;
89 G4UImanager* UImanager = G4UImanager::GetUIpointer();
93 visManager =
new G4VisExecutive();
94 visManager->Initialize();
99 G4String command =
"/control/execute ";
101 UImanager->ApplyCommand(command+fileName);
TConfigurablePhysicsList< ModularPhysicsList > PhysicsList