Main program of the electromagnetic/TestEm18 example.
More...
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "Randomize.hh"
#include "DetectorConstruction.hh"
#include "PhysicsList.hh"
#include "PrimaryGeneratorAction.hh"
#include "RunAction.hh"
#include "EventAction.hh"
#include "TrackingAction.hh"
#include "SteppingAction.hh"
#include "SteppingVerbose.hh"
#include "StackingAction.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/TestEm18 example.
Definition in file TestEm18.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 53 of file TestEm18.cc.
56 G4UIExecutive* ui =
nullptr;
57 if (argc == 1) ui =
new G4UIExecutive(argc,argv);
60 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanecuEngine);
63 G4VSteppingVerbose::SetInstance(
new SteppingVerbose);
66 G4RunManager * runManager =
new G4RunManager;
71 runManager->SetUserInitialization(detector);
72 runManager->SetUserInitialization(
new PhysicsList());
78 runManager->SetUserAction(primary);
82 runManager->SetUserAction(runaction);
85 EventAction* eventaction =
new EventAction(runaction);
86 runManager->SetUserAction(eventaction);
89 TrackingAction* trackingaction =
new TrackingAction(runaction);
90 runManager->SetUserAction(trackingaction);
93 SteppingAction* steppingaction =
new SteppingAction(runaction, eventaction);
94 runManager->SetUserAction(steppingaction);
97 StackingAction* stackingaction =
new StackingAction();
98 runManager->SetUserAction(stackingaction);
101 G4VisManager* visManager =
nullptr;
104 G4UImanager* UImanager = G4UImanager::GetUIpointer();
108 visManager =
new G4VisExecutive;
109 visManager->Initialize();
115 G4String command =
"/control/execute ";
117 UImanager->ApplyCommand(command+fileName);
TConfigurablePhysicsList< ModularPhysicsList > PhysicsList