#include "G4Types.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#include "G4UItcsh.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
#include "GammaKnifeDetectorConstruction.hh"
#include "GammaKnifePhysicsList.hh"
#include "GammaKnifePrimaryGeneratorAction.hh"
#include "GammaKnifeRunAction.hh"
#include "GammaKnifeActionInitialization.hh"
#include "Randomize.hh"
#include "G4UImessenger.hh"
#include "G4ScoringManager.hh"
#include "globals.hh"
#include "GammaKnifeController.hh"
#include "G4PhysListFactory.hh"
#include <ctime>
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 76 of file gammaknife.cc.
References Initialize().
79 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
81 G4Random::setTheSeed(seconds);
83 #ifdef G4MULTITHREADED 84 G4MTRunManager * runManager =
new G4MTRunManager;
86 G4RunManager * runManager =
new G4RunManager;
89 G4ScoringManager::GetScoringManager();
92 GammaKnifeDetectorConstruction* detector =
new GammaKnifeDetectorConstruction();
93 runManager -> SetUserInitialization(detector);
96 G4PhysListFactory factory;
97 G4VModularPhysicsList* phys = 0;
101 char* path = std::getenv(
"PHYSLIST");
102 if (path) { physName =
G4String(path); }
104 if(physName !=
"" && factory.IsReferencePhysList(physName))
106 phys = factory.GetReferencePhysList(physName);
109 if(!phys) { phys =
new GammaKnifePhysicsList(); }
111 runManager->SetUserInitialization(phys);
114 GammaKnifeActionInitialization* actionInitialization=
new GammaKnifeActionInitialization();
115 runManager->SetUserInitialization(actionInitialization);
117 GammaKnifeController* controller =
new GammaKnifeController( detector );
118 controller->ReadFile(
"MachineAngle.in");
122 runManager->Initialize();
125 G4VisManager* visManager =
new G4VisExecutive;
129 G4UImanager* UImanager = G4UImanager::GetUIpointer();
133 G4String command =
"/control/execute ";
135 UImanager->ApplyCommand(command+fileName);
140 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
142 UImanager->ApplyCommand(
"/control/execute defaultMacro.mac");
144 UImanager->ApplyCommand(
"/control/execute batch.mac");
second seconds
Alias for common language habits.