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