Main program of the Par01 example.
More...
#include "Par01DetectorConstruction.hh"
#include "Par01ParallelWorldForPion.hh"
#include "FTFP_BERT.hh"
#include "G4FastSimulationPhysics.hh"
#include "G4UImanager.hh"
#include "G4RunManager.hh"
#include "Par01ActionInitialization.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 76 of file examplePar01.cc.
References Initialize().
81 #ifdef G4MULTITHREADED 82 G4MTRunManager * runManager =
new G4MTRunManager;
83 runManager->SetNumberOfThreads(4);
84 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
85 G4cout<<
"| Constructing MT run manager |"<<G4endl;
86 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
88 G4RunManager * runManager =
new G4RunManager;
89 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
90 G4cout<<
"| Constructing sequential run manager |"<<G4endl;
91 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
98 G4VUserDetectorConstruction* detector =
new Par01DetectorConstruction();
100 detector->RegisterParallelWorld(
new Par01ParallelWorldForPion(
"pionGhostWorld"));
102 runManager->SetUserInitialization(detector);
110 FTFP_BERT* physicsList =
new FTFP_BERT;
112 G4FastSimulationPhysics* fastSimulationPhysics =
new G4FastSimulationPhysics();
113 fastSimulationPhysics->BeVerbose();
116 fastSimulationPhysics->ActivateFastSimulation(
"e-");
117 fastSimulationPhysics->ActivateFastSimulation(
"e+");
118 fastSimulationPhysics->ActivateFastSimulation(
"gamma");
121 fastSimulationPhysics->ActivateFastSimulation(
"pi+",
"pionGhostWorld");
122 fastSimulationPhysics->ActivateFastSimulation(
"pi-",
"pionGhostWorld");
124 physicsList->RegisterPhysics( fastSimulationPhysics );
126 runManager->SetUserInitialization(physicsList);
131 runManager->SetUserInitialization(
new Par01ActionInitialization );
134 runManager->Initialize();
140 G4cout <<
"Instantiating Visualization Manager......." << G4endl;
141 G4VisManager* visManager =
new G4VisExecutive;
151 G4UIExecutive * ui =
new G4UIExecutive(argc, argv);
158 G4String command =
"/control/execute ";
160 G4UImanager * UImanager = G4UImanager::GetUIpointer();
161 UImanager->ApplyCommand(command+fileName);