36 #include "G4UImanager.hh" 38 #ifdef G4MULTITHREADED 39 #include "G4MTRunManager.hh" 41 #include "G4RunManager.hh" 45 #include "ExGflash1DetectorConstruction.hh" 46 #include "ExGflashActionInitialization.hh" 48 #include "FTFP_BERT.hh" 49 #include "G4FastSimulationPhysics.hh" 51 #include "G4VisExecutive.hh" 52 #include "G4UIExecutive.hh" 56 int main(
int argc,
char** argv)
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 <<
"******************************************";
int main(int argc, char **argv)