Main program of the B3a example.
More...
#include "G4Types.hh"
#include "G4RunManagerFactory.hh"
#include "G4SteppingVerbose.hh"
#include "G4UImanager.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
#include "G4AnalysisManager.hh"
#include "G4TScoreNtupleWriter.hh"
#include "Randomize.hh"
#include "DetectorConstruction.hh"
#include "PhysicsList.hh"
#include "ActionInitialization.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the B3a example.
Definition in file exampleB3a.cc.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 48 of file exampleB3a.cc.
49{
50
51
54
55
56
57
58
59 G4int precision = 4;
60 G4SteppingVerbose::UseBestUnit(precision);
61
62
63
64 auto runManager =
65 G4RunManagerFactory::CreateRunManager(G4RunManagerType::Default);
66
67
68
70
72
73
74
76
77
78
80
81
82 visManager->Initialize();
83
84
85 auto UImanager = G4UImanager::GetUIpointer();
86
87
88
89
90
91
93 scoreNtupleWriter.SetVerboseLevel(1);
94 scoreNtupleWriter.SetNtupleMerging(true);
95
96
97
98
99
100 if ( ! ui ) {
101
102 G4String command =
"/control/execute ";
104 UImanager->ApplyCommand(command+fileName);
105 }
106 else {
107
108 UImanager->ApplyCommand("/control/execute init_vis.mac");
109 ui->SessionStart();
110 delete ui;
111 }
112
113
114
115
116
117
118 delete visManager;
119 delete runManager;
120}
Detector construction class to define materials and geometry.
Action initialization class.