35 #include "G4RunManager.hh" 36 #include "G4UImanager.hh" 37 #include "Randomize.hh" 41 #include "PrimaryGeneratorGPS.hh" 42 #include "PrimaryGeneratorGun1.hh" 43 #include "PrimaryGeneratorGun2.hh" 45 #include "TrackingAction.hh" 46 #include "SteppingVerbose.hh" 49 #include "G4VisExecutive.hh" 53 #include "G4UIExecutive.hh" 58 int main(
int argc,
char** argv) {
61 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanecuEngine);
64 G4VSteppingVerbose::SetInstance(
new SteppingVerbose);
67 G4RunManager * runManager =
new G4RunManager;
72 runManager->SetUserInitialization(detector);
79 PrimaryGeneratorGun1* prim =
new PrimaryGeneratorGun1();
81 TrackingAction*
track =
new TrackingAction();
83 runManager->SetUserAction(run);
84 runManager->SetUserAction(prim);
85 runManager->SetUserAction(track);
88 runManager->Initialize();
91 G4UImanager* UI = G4UImanager::GetUIpointer();
94 G4VisManager* visManager =
new G4VisExecutive;
95 visManager->Initialize();
100 G4String command =
"/control/execute ";
102 UI->ApplyCommand(command+fileName);
108 G4UIExecutive * ui =
new G4UIExecutive(argc,argv);
110 UI->ApplyCommand(
"/control/execute vis.mac");
int main(int argc, char **argv)