Main program of the Par01 example.
More...
#include "G4Types.hh"
#include "Par01DetectorConstruction.hh"
#include "Par01ParallelWorldForPion.hh"
#include "FTFP_BERT.hh"
#include "G4FastSimulationPhysics.hh"
#include "G4UImanager.hh"
#include "G4RunManager.hh"
#include "Par01ActionInitialization.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 Par01 example.
Definition in file examplePar01.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 72 of file examplePar01.cc.
References Initialize().
75 G4UIExecutive* ui =
nullptr;
77 ui =
new G4UIExecutive(argc, argv);
83 #ifdef G4MULTITHREADED 84 G4MTRunManager * runManager =
new G4MTRunManager;
85 runManager->SetNumberOfThreads(4);
86 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
87 G4cout<<
"| Constructing MT run manager |"<<G4endl;
88 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
90 G4RunManager * runManager =
new G4RunManager;
91 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
92 G4cout<<
"| Constructing sequential run manager |"<<G4endl;
93 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
100 G4VUserDetectorConstruction* detector =
new Par01DetectorConstruction();
102 detector->RegisterParallelWorld(
new Par01ParallelWorldForPion(
"pionGhostWorld"));
104 runManager->SetUserInitialization(detector);
112 FTFP_BERT* physicsList =
new FTFP_BERT;
114 G4FastSimulationPhysics* fastSimulationPhysics =
new G4FastSimulationPhysics();
115 fastSimulationPhysics->BeVerbose();
118 fastSimulationPhysics->ActivateFastSimulation(
"e-");
119 fastSimulationPhysics->ActivateFastSimulation(
"e+");
120 fastSimulationPhysics->ActivateFastSimulation(
"gamma");
123 fastSimulationPhysics->ActivateFastSimulation(
"pi+",
"pionGhostWorld");
124 fastSimulationPhysics->ActivateFastSimulation(
"pi-",
"pionGhostWorld");
126 physicsList->RegisterPhysics( fastSimulationPhysics );
128 runManager->SetUserInitialization(physicsList);
133 runManager->SetUserInitialization(
new Par01ActionInitialization );
136 runManager->Initialize();
141 G4cout <<
"Instantiating Visualization Manager......." << G4endl;
142 G4VisManager* visManager =
new G4VisExecutive;
155 G4String command =
"/control/execute ";
157 G4UImanager * UImanager = G4UImanager::GetUIpointer();
158 UImanager->ApplyCommand(command+fileName);