#include "DetectorConstruction.hh"
#include "ActionInitialization.hh"
#include "G4RunManagerFactory.hh"
#include "G4SteppingVerbose.hh"
#include "G4UImanager.hh"
#include "QBBC.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
#include "Randomize.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 47 of file exampleB1Con.cc.
48{
49
51 if ( argc == 1 ) {
53 }
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 runManager->SetNumberOfThreads(8);
67
68
69
70
72
73
75 physicsList->SetVerboseLevel(1);
76 runManager->SetUserInitialization(physicsList);
77
78
80
81
83
84
85 visManager->Initialize();
86
87
88 G4UImanager* UImanager = G4UImanager::GetUIpointer();
89
90 if (!ui) {
91
92 G4String command =
"/control/execute ";
94 UImanager->ApplyCommand(command+fileName);
95 }
96 else {
97
98 UImanager->ApplyCommand("/control/execute init_vis.mac");
99 ui->SessionStart();
100 delete ui;
101 }
102
103
104
105
106
107
108 delete visManager;
109 delete runManager;
110}
Action initialization class.
Detector construction class to define materials and geometry.