Main program of the RE05 example.
More...
#include "G4RunManager.hh"
#include "RE05SteppingVerbose.hh"
#include "G4UImanager.hh"
#include "RE05DetectorConstruction.hh"
#include "RE05CalorimeterParallelWorld.hh"
#include "QBBC.hh"
#include "G4ParallelWorldPhysics.hh"
#include "RE05ActionInitialization.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the RE05 example.
Definition in file exampleRE05.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 59 of file exampleRE05.cc.
61 #ifdef G4MULTITHREADED 62 G4MTRunManager* runManager =
new G4MTRunManager;
63 G4int number_of_threads = 4;
64 runManager->SetNumberOfThreads(number_of_threads);
65 runManager->SetUserInitialization(
new RE05WorkerInitialization);
67 G4VSteppingVerbose* verbosity =
new RE05SteppingVerbose;
68 G4VSteppingVerbose::SetInstance(verbosity);
69 G4RunManager* runManager =
new G4RunManager;
72 G4String parallelWorldName =
"ReadoutWorld";
75 G4VUserDetectorConstruction* detector =
new RE05DetectorConstruction();
76 detector->RegisterParallelWorld
77 (
new RE05CalorimeterParallelWorld(parallelWorldName));
78 runManager->SetUserInitialization(detector);
80 G4VModularPhysicsList* physicsList =
new QBBC;
82 ->RegisterPhysics(
new G4ParallelWorldPhysics(parallelWorldName));
83 runManager->SetUserInitialization(physicsList);
85 G4VUserActionInitialization* actions =
new RE05ActionInitialization;
86 runManager->SetUserInitialization(actions);
88 runManager->Initialize();
91 G4VisManager* visManager =
new G4VisExecutive;
92 visManager->Initialize();
96 G4UImanager* UImanager = G4UImanager::GetUIpointer();
100 G4String command =
"/control/execute ";
102 UImanager->ApplyCommand(command+fileName);
107 G4UIExecutive * ui =
new G4UIExecutive(argc,argv);
109 UImanager->ApplyCommand(
"/control/execute vis.mac");