Main program of the field/field03 example.
More...
#include "G4Types.hh"
#include "F03SteppingVerbose.hh"
#include "G4RunManager.hh"
#include "F03DetectorConstruction.hh"
#include "F03ActionInitialization.hh"
#include "G4UImanager.hh"
#include "FTFP_BERT.hh"
#include "G4StepLimiterPhysics.hh"
#include "Randomize.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the field/field03 example.
Definition in file field03.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 58 of file field03.cc.
61 G4UIExecutive* ui =
nullptr;
63 ui =
new G4UIExecutive(argc, argv);
68 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
72 #ifdef G4MULTITHREADED 73 G4MTRunManager * runManager =
new G4MTRunManager;
75 G4VSteppingVerbose::SetInstance(
new F03SteppingVerbose);
76 G4RunManager * runManager =
new G4RunManager;
82 F03DetectorConstruction* detector =
new F03DetectorConstruction();
83 runManager->SetUserInitialization(detector);
85 G4VModularPhysicsList* physicsList =
new FTFP_BERT;
86 physicsList->RegisterPhysics(
new G4StepLimiterPhysics());
87 runManager->SetUserInitialization(physicsList);
89 runManager->SetUserInitialization(
new F03ActionInitialization(detector));
93 runManager->Initialize();
97 G4VisManager* visManager =
new G4VisExecutive;
100 visManager->Initialize();
104 G4UImanager* UImanager = G4UImanager::GetUIpointer();
108 G4String command =
"/control/execute ";
110 UImanager->ApplyCommand(command+fileName);
114 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
116 UImanager->ApplyCommand(
"/control/execute gui.mac");