34 #include "G4RunManager.hh" 35 #include "G4UImanager.hh" 36 #include "Randomize.hh" 40 #include "G4MonopolePhysics.hh" 42 #include "G4VModularPhysicsList.hh" 46 #include "TrackingAction.hh" 47 #include "SteppingAction.hh" 50 #include "G4VisExecutive.hh" 54 #include "G4UIExecutive.hh" 59 int main(
int argc,
char** argv) {
64 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanluxEngine);
67 G4RunManager * runManager =
new G4RunManager;
71 G4PhysListFactory factory;
72 G4VModularPhysicsList* phys = factory.ReferencePhysList();
75 G4MonopolePhysics * theMonopole =
new G4MonopolePhysics();
76 phys->RegisterPhysics(theMonopole);
80 G4VisManager* visManager = 0;
84 G4UImanager* UImanager = G4UImanager::GetUIpointer();
88 if(argc > 2) { s = argv[2]; }
89 UImanager->ApplyCommand(
"/control/verbose 1");
90 UImanager->ApplyCommand(
"/monopole/setup "+s);
95 runManager->SetUserInitialization(det);
96 runManager->SetUserInitialization(phys);
99 runManager->SetUserAction(kin);
104 runManager->SetUserAction(run =
new RunAction(det, kin));
105 runManager->SetUserAction(
new TrackingAction(run));
106 runManager->SetUserAction(
new SteppingAction(run));
110 G4String command =
"/control/execute ";
112 UImanager->ApplyCommand(command+fileName);
118 visManager =
new G4VisExecutive;
119 visManager->Initialize();
122 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
int main(int argc, char **argv)