#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "Randomize.hh"
#include "DetectorConstruction.hh"
#include "G4PhysListFactory.hh"
#include "G4VModularPhysicsList.hh"
#include "PrimaryGeneratorAction.hh"
#include "RunAction.hh"
#include "EventAction.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 69 of file Hadr00.cc.
72 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanecuEngine());
75 G4RunManager * runManager =
new G4RunManager();
80 G4PhysListFactory factory;
81 G4VModularPhysicsList* phys = 0;
82 G4String physName =
"";
85 if (argc==3) { physName = argv[2]; }
89 char* path = getenv(
"PHYSLIST");
90 if (path) { physName = G4String(path); }
94 if(
"" == physName || !factory.IsReferencePhysList(physName)) {
95 physName =
"QGSP_BERT";
99 phys = factory.GetReferencePhysList(physName);
101 runManager->SetUserInitialization(phys);
106 runManager->SetUserAction(
new RunAction());
110 G4UImanager* UImanager = G4UImanager::GetUIpointer();
112 G4VisManager* visManager = 0;
119 visManager =
new G4VisExecutive;
120 visManager->Initialize();
123 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
130 G4String command =
"/control/execute ";
131 G4String fileName = argv[1];
132 UImanager->ApplyCommand(command+fileName);