Main program of the eventgenerator/HepMC/HepMCEx01 example.
More...
#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"
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 56 of file HepMCEx01.cc.
60 G4VSteppingVerbose* verbosity =
new ExN04SteppingVerbose;
61 G4VSteppingVerbose::SetInstance(verbosity);
65 G4RunManager* runManager =
new G4RunManager;
69 G4VUserDetectorConstruction* detector =
new ExN04DetectorConstruction;
70 runManager->SetUserInitialization(detector);
72 G4VUserPhysicsList* physics =
new FTFP_BERT;
73 runManager->SetUserInitialization(physics);
75 runManager->Initialize();
79 G4VUserPrimaryGeneratorAction* gen_action =
new ExN04PrimaryGeneratorAction;
80 runManager->SetUserAction(gen_action);
82 G4UserRunAction* run_action =
new ExN04RunAction;
83 runManager->SetUserAction(run_action);
85 G4UserEventAction* event_action =
new ExN04EventAction;
86 runManager->SetUserAction(event_action);
88 G4UserStackingAction* stacking_action =
new ExN04StackingAction;
89 runManager->SetUserAction(stacking_action);
91 G4UserTrackingAction* tracking_action =
new ExN04TrackingAction;
92 runManager->SetUserAction(tracking_action);
94 G4UserSteppingAction* stepping_action =
new ExN04SteppingAction;
95 runManager->SetUserAction(stepping_action);
99 G4VisManager* visManager =
new G4VisExecutive;
100 visManager->Initialize();
104 G4UImanager* UImanager = G4UImanager::GetUIpointer();
109 visManager->SetVerboseLevel(
"quiet");
111 G4String command =
"/control/execute ";
113 UImanager->ApplyCommand(command+fileName);
118 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);