Main program of the field/field02 example.
More...
#include "G4Types.hh"
#include "F02SteppingVerbose.hh"
#include "G4RunManager.hh"
#include "F02DetectorConstruction.hh"
#include "F02ActionInitialization.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/field02 example.
Definition in file field02.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 58 of file field02.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 F02SteppingVerbose);
76 G4RunManager * runManager =
new G4RunManager;
82 F02DetectorConstruction* detector =
new F02DetectorConstruction();
83 runManager->SetUserInitialization(detector);
85 G4VModularPhysicsList* physicsList =
new FTFP_BERT;
86 physicsList->RegisterPhysics(
new G4StepLimiterPhysics());
87 runManager->SetUserInitialization(physicsList);
89 runManager->SetUserInitialization(
new F02ActionInitialization(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");