Main program of the eventgenerator/HepMC/HepMCEx01 example.
More...
#include "G4Types.hh"
#include "FTFP_BERT.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "ExN04DetectorConstruction.hh"
#include "ExN04EventAction.hh"
#include "ExN04PrimaryGeneratorAction.hh"
#include "ExN04RunAction.hh"
#include "ExN04StackingAction.hh"
#include "ExN04SteppingAction.hh"
#include "ExN04SteppingVerbose.hh"
#include "ExN04TrackingAction.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 eventgenerator/HepMC/HepMCEx01 example.
Definition in file HepMCEx01.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 52 of file HepMCEx01.cc.
55 G4UIExecutive* ui =
nullptr;
57 ui =
new G4UIExecutive(argc, argv);
62 G4VSteppingVerbose* verbosity =
new ExN04SteppingVerbose;
63 G4VSteppingVerbose::SetInstance(verbosity);
67 G4RunManager* runManager =
new G4RunManager;
71 G4VUserDetectorConstruction* detector =
new ExN04DetectorConstruction;
72 runManager->SetUserInitialization(detector);
74 G4VUserPhysicsList* physics =
new FTFP_BERT;
75 runManager->SetUserInitialization(physics);
77 runManager->Initialize();
81 G4VUserPrimaryGeneratorAction* gen_action =
new ExN04PrimaryGeneratorAction;
82 runManager->SetUserAction(gen_action);
84 G4UserRunAction* run_action =
new ExN04RunAction;
85 runManager->SetUserAction(run_action);
87 G4UserEventAction* event_action =
new ExN04EventAction;
88 runManager->SetUserAction(event_action);
90 G4UserStackingAction* stacking_action =
new ExN04StackingAction;
91 runManager->SetUserAction(stacking_action);
93 G4UserTrackingAction* tracking_action =
new ExN04TrackingAction;
94 runManager->SetUserAction(tracking_action);
96 G4UserSteppingAction* stepping_action =
new ExN04SteppingAction;
97 runManager->SetUserAction(stepping_action);
99 G4VisManager* visManager =
new G4VisExecutive;
100 visManager->Initialize();
103 G4UImanager* UImanager = G4UImanager::GetUIpointer();
107 visManager->SetVerboseLevel(
"quiet");
108 G4String command =
"/control/execute ";
110 UImanager->ApplyCommand(command+fileName);