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