52{
53
55 if (argc == 1) {
57 }
58
59
61 timer.Start();
62
63 G4cout << "+-------------------------------------------------------+" << G4endl;
64 G4cout << "| |" << G4endl;
65 G4cout << "| This is an example of Shower |" << G4endl;
66 G4cout << "| Parameterization with GFLASH |" << G4endl;
67 G4cout << "+-------------------------------------------------------+" << G4endl;
68
69 auto* runManager = G4RunManagerFactory::CreateRunManager();
70 runManager->SetNumberOfThreads(1);
71
72
73 G4cout << "# GFlash Example: Detector Construction" << G4endl;
76 runManager->SetUserInitialization(detector);
77
78
79
81
82
84
85
86
87
88
89 fastSimulationPhysics->ActivateFastSimulation("e-", "parallelWorld");
90 fastSimulationPhysics->ActivateFastSimulation("e+", "parallelWorld");
91
92
93
94
95
96 physicsList->RegisterPhysics(fastSimulationPhysics);
97 runManager->SetUserInitialization(physicsList);
98
99
101
103 visManager->Initialize();
104
105 G4UImanager* UImanager = G4UImanager::GetUIpointer();
106 UImanager->ApplyCommand("/run/verbose 0");
107 runManager->Initialize();
108 UImanager->ApplyCommand("/Step/Verbose 0");
109
110 if (ui)
111 {
112 UImanager->ApplyCommand("/control/execute vis.mac");
113 ui->SessionStart();
114 delete ui;
115 }
116 else
117 {
119 UImanager->ApplyCommand("/control/execute " + s);
120 }
121
122 delete visManager;
123 delete runManager;
124
125 timer.Stop();
126 G4cout << G4endl;
127 G4cout << "******************************************";
128 G4cout << G4endl;
129 G4cout << "Total Real Elapsed Time is: " << timer.GetRealElapsed();
130 G4cout << G4endl;
131 G4cout << "Total System Elapsed Time: " << timer.GetSystemElapsed();
132 G4cout << G4endl;
133 G4cout << "Total GetUserElapsed Time: " << timer.GetUserElapsed();
134 G4cout << G4endl;
135 G4cout << "******************************************";
136 G4cout << G4endl;
137
138 return 0;
139}
Action initialization class.