Main program of the parameterisations/gflash/gflash1 example.
More...
#include "G4Types.hh"
#include "G4ios.hh"
#include "G4Timer.hh"
#include "G4UImanager.hh"
#include "G4RunManager.hh"
#include "ExGflash1DetectorConstruction.hh"
#include "ExGflashActionInitialization.hh"
#include "FTFP_BERT.hh"
#include "G4FastSimulationPhysics.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the parameterisations/gflash/gflash1 example.
Definition in file ExGflash1.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 56 of file ExGflash1.cc.
59 G4UIExecutive* ui =
nullptr;
61 ui =
new G4UIExecutive(argc, argv);
68 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
69 G4cout<<
"| |"<<G4endl;
70 G4cout<<
"| This is an example of Shower |"<<G4endl;
71 G4cout<<
"| Parameterization with GFLASH |"<<G4endl;
72 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
76 #ifdef G4MULTITHREADED 77 G4MTRunManager * runManager =
new G4MTRunManager;
78 runManager->SetNumberOfThreads(1);
79 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
80 G4cout<<
"| Constructing MT run manager |"<<G4endl;
81 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
83 G4RunManager * runManager =
new G4RunManager;
84 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
85 G4cout<<
"| Constructing sequential run manager |"<<G4endl;
86 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
90 G4cout<<
"# GFlash Example: Detector Construction"<<G4endl;
91 runManager->SetUserInitialization(
new ExGflash1DetectorConstruction);
95 G4VModularPhysicsList* physicsList =
new FTFP_BERT();
98 G4FastSimulationPhysics* fastSimulationPhysics =
new G4FastSimulationPhysics();
104 fastSimulationPhysics->ActivateFastSimulation(
"e-");
105 fastSimulationPhysics->ActivateFastSimulation(
"e+");
111 physicsList->RegisterPhysics( fastSimulationPhysics );
112 runManager->SetUserInitialization(physicsList);
115 runManager->SetUserInitialization(
new ExGflashActionInitialization);
117 G4VisManager* visManager =
new G4VisExecutive;
118 visManager->Initialize();
120 G4UImanager* UImanager = G4UImanager::GetUIpointer();
121 UImanager->ApplyCommand(
"/run/verbose 0");
122 runManager->Initialize();
123 UImanager->ApplyCommand(
"/Step/Verbose 0");
127 UImanager->ApplyCommand(
"/control/execute vis.mac");
134 UImanager->ApplyCommand(
"/control/execute "+s);
142 G4cout <<
"******************************************";
144 G4cout <<
"Total Real Elapsed Time is: "<< timer.GetRealElapsed();
146 G4cout <<
"Total System Elapsed Time: " << timer.GetSystemElapsed();
148 G4cout <<
"Total GetUserElapsed Time: " << timer.GetUserElapsed();
150 G4cout <<
"******************************************";