#include "G4Types.hh"
#include "G4UImanager.hh"
#include "G4RunManagerFactory.hh"
#include "Par02DetectorConstruction.hh"
#include "Par02PhysicsList.hh"
#include "Par02ActionInitialization.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 54 of file examplePar02.cc.
54 {
55
56
58 if ( argc == 1 ) {
60 }
61
62
63
64
65 auto* runManager = G4RunManagerFactory::CreateRunManager();
66 runManager->SetNumberOfThreads(4);
67
68
70 runManager->SetUserInitialization( detector );
71
72
74 runManager->SetUserInitialization( physicsList );
75
76
77
78
80
81
82 runManager->Initialize();
83
84
85
86
87 G4cout << "Instantiating Visualization Manager......." << G4endl;
89 visManager->Initialize();
90
91 if ( ui ) {
92
93
94
95 ui->SessionStart();
96 delete ui;
97 } else {
98 G4String command =
"/control/execute ";
100 G4UImanager * UImanager = G4UImanager::GetUIpointer();
101 UImanager->ApplyCommand( command+fileName );
102 }
103
104
105
106
107
108 delete visManager;
109 delete runManager;
110
111 return 0;
112}
Construction of detector geometry.
Construction of a physics list.