Main program of the field/field01 example.
More...
#include "G4Types.hh"
#include "F01SteppingVerbose.hh"
#include "G4RunManager.hh"
#include "F01DetectorConstruction.hh"
#include "F01ActionInitialization.hh"
#include "F01RunAction.hh"
#include "G4UImanager.hh"
#include "G4EmParameters.hh"
#include "G4HadronicProcessStore.hh"
#include "G4PhysicsListHelper.hh"
#include "FTFP_BERT.hh"
#include "G4StepLimiterPhysics.hh"
#include "Randomize.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
#include "G4Electron.hh"
#include "G4Transportation.hh"
#include "G4CoupledTransportation.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the field/field01 example.
Definition in file field01.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 75 of file field01.cc.
78 G4UIExecutive* ui =
nullptr;
80 ui =
new G4UIExecutive(argc, argv);
85 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
89 #ifdef USE_MULTITHREADED 90 G4MTRunManager * runManager =
new G4MTRunManager;
92 G4VSteppingVerbose::SetInstance(
new F01SteppingVerbose);
93 G4RunManager * runManager =
new G4RunManager;
99 F01DetectorConstruction* detector =
new F01DetectorConstruction();
102 runManager->SetUserInitialization(detector);
106 auto plHelper = G4PhysicsListHelper::GetPhysicsListHelper();
107 plHelper->UseLowLooperThresholds();
112 G4VModularPhysicsList* physicsList =
new FTFP_BERT;
113 physicsList->RegisterPhysics(
new G4StepLimiterPhysics());
114 runManager->SetUserInitialization(physicsList);
117 runManager->SetUserInitialization(
new F01ActionInitialization(detector));
120 auto runAction=
new F01RunAction();
121 runAction->SetWarningEnergy( 10.0 * CLHEP::keV );
125 runAction->SetImportantEnergy( 0.1 * CLHEP::MeV );
126 runAction->SetNumberOfTrials( 30 );
132 runManager->SetUserAction(runAction);
135 G4EmParameters::Instance()->SetVerbose(-1);
136 G4HadronicProcessStore::Instance()->SetVerbose(0);
140 runManager->Initialize();
144 G4VisManager* visManager =
new G4VisExecutive;
147 visManager->Initialize();
151 G4UImanager* UImanager = G4UImanager::GetUIpointer();
155 G4String command =
"/control/execute ";
157 UImanager->ApplyCommand(command+fileName);
161 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
163 UImanager->ApplyCommand(
"/control/execute gui.mac");