Main program of the electromagnetic/TestEm2 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 "SteppingVerbose.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/TestEm2 example.
Definition in file TestEm2.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 50 of file TestEm2.cc.
53 G4UIExecutive* ui =
nullptr;
54 if (argc == 1) { ui =
new G4UIExecutive(argc,argv); }
56 #ifdef G4MULTITHREADED 57 G4MTRunManager * runManager =
new G4MTRunManager();
58 G4int nThreads = G4Threading::G4GetNumberOfCores();
59 if (argc==3) nThreads = G4UIcommand::ConvertToInt(argv[2]);
60 runManager->SetNumberOfThreads(nThreads);
62 G4VSteppingVerbose::SetInstance(
new SteppingVerbose);
63 G4RunManager * runManager =
new G4RunManager();
68 runManager->SetUserInitialization(detector);
69 runManager->SetUserInitialization(
new PhysicsList());
72 runManager->SetUserInitialization(
new ActionInitialization(detector));
75 G4VisManager* visManager =
nullptr;
78 G4UImanager* UImanager = G4UImanager::GetUIpointer();
82 visManager =
new G4VisExecutive;
83 visManager->Initialize();
88 G4String command =
"/control/execute ";
90 UImanager->ApplyCommand(command+fileName);
TConfigurablePhysicsList< ModularPhysicsList > PhysicsList