38#include "G4RunManager.hh"
39#include "G4UImanager.hh"
40#include "G4UIcommand.hh"
42#include "Randomize.hh"
44#include "G4VisExecutive.hh"
45#include "G4UIExecutive.hh"
53 G4cerr <<
" Usage: " << G4endl;
54 G4cerr <<
" Garfield++ [-m macro ] [-u UIsession]" << G4endl;
61int main(
int argc,
char** argv) {
74 for (G4int i = 1; i < argc; i = i + 2) {
75 if (G4String(argv[i]) ==
"-m")
77 else if (G4String(argv[i]) ==
"-u")
78 session = argv[i + 1];
87 G4UIExecutive* ui = 0;
89 ui =
new G4UIExecutive(argc, argv);
94 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
95 G4Random::setTheSeed(1);
102 G4RunManager * runManager =
new G4RunManager;
106 runManager->SetUserInitialization(detConstruction);
114 runManager->SetUserAction(eventAction);
121 G4VisManager* visManager =
new G4VisExecutive;
124 visManager->Initialize();
127 G4UImanager* UImanager = G4UImanager::GetUIpointer();
133 G4String command =
"/control/execute ";
134 UImanager->ApplyCommand(command + macro);
137 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
139 UImanager->ApplyCommand(
"/control/execute gui.mac");
Definition of the GarfieldDetectorConstruction class.
Definition of the GarfieldEventAction class.
Definition of the GarfieldPhysicsList class.
Definition of the GarfieldPhysics class.
Definition of the GarfieldPrimaryGeneratorAction class.
Definition of the GarfieldRunAction class.
Definition of the GarfieldSteppingAction class.
void Seed(unsigned int s)
Initialise the random number generator.
int main(int argc, char **argv)
RandomEngineRoot randomEngine
Random number generator.