File tree 1 file changed +41
-0
lines changed
1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include < iostream>
2
+
3
+ #include " G4RunManager.hh"
4
+ #include " G4UImanager.hh"
5
+ #include " G4VisManager.hh"
6
+ #include " G4VisExecutive.hh"
7
+ #include " G4UIExecutive.hh"
8
+
9
+ #include " DetectorConstruction.hh"
10
+ #include " PhysicsList.hh"
11
+ #include " ActionInitialization.hh"
12
+
13
+ int main (int argc, char ** argv)
14
+ {
15
+ G4RunManager runManager = new G4RunManager ();
16
+
17
+ runManager->SetUserInitialization (new DetectorConstruction ());
18
+ runManager->SetUserInitialization (new PhysicsList ());
19
+ runManager->SetUserInitialization (new ActionInitialization ());
20
+
21
+ runManager->Initialize ();
22
+
23
+ G4UIExecutive ui = new G4UIExecutive (argc, argv);
24
+
25
+ G4VisManager visManager = new GVisExecutive ();
26
+ visManager->Initialize ();
27
+
28
+ G4UImanager UImanager = G4UImanager::GetUIpointer ();
29
+
30
+ UImanager->ApplyCommand (" /vis/open OGL" );
31
+ UImanager->ApplyCommand (" /vis/viewer/set/viewpointVector 1 1 1" );
32
+ UImanager->ApplyCommand (" /vis/drawVolume" );
33
+ UImanager->ApplyCommand (" /vis/viewer/set/autoRefresh true" );
34
+ UImanager->ApplyCommand (" /vis/scene/add/trajectories smooth" );
35
+ UImanager->ApplyCommand (" /vis/scene/endofEventAction accumulate" );
36
+
37
+
38
+ ui->SessionStart ();
39
+
40
+ return 0 ;
41
+ }
You can’t perform that action at this time.
0 commit comments