35 #include "ExN02DetectorConstruction.hh" 36 #include "ExN02PhysicsList.hh" 37 #include "ExN02PrimaryGeneratorAction.hh" 38 #include "ExN02RunAction.hh" 39 #include "ExN02EventAction.hh" 40 #include "ExN02SteppingAction.hh" 41 #include "ExN02SteppingVerbose.hh" 43 #include "G4RunManager.hh" 44 #include "G4UImanager.hh" 45 #include "G4VisExecutive.hh" 46 #include "G4UIExecutive.hh" 52 int main(
int argc,
char** argv)
56 G4UIExecutive* ui = 0;
58 ui =
new G4UIExecutive(argc, argv);
63 G4VSteppingVerbose* verbosity =
new ExN02SteppingVerbose;
64 G4VSteppingVerbose::SetInstance(verbosity);
68 G4RunManager * runManager =
new G4RunManager;
72 ExN02DetectorConstruction* detector =
new ExN02DetectorConstruction;
73 runManager->SetUserInitialization(detector);
75 G4VUserPhysicsList* physics =
new ExN02PhysicsList;
76 runManager->SetUserInitialization(physics);
80 G4VUserPrimaryGeneratorAction* gen_action =
new ExN02PrimaryGeneratorAction(detector);
81 runManager->SetUserAction(gen_action);
83 G4UserRunAction* run_action =
new ExN02RunAction;
84 runManager->SetUserAction(run_action);
86 G4UserEventAction* event_action =
new ExN02EventAction;
87 runManager->SetUserAction(event_action);
89 G4UserSteppingAction* stepping_action =
new ExN02SteppingAction;
90 runManager->SetUserAction(stepping_action);
94 G4VisManager* visManager =
new G4VisExecutive;
95 visManager->Initialize();
99 runManager->Initialize();
103 G4UImanager * UImanager = G4UImanager::GetUIpointer();
109 G4String command =
"/control/execute ";
111 UImanager->ApplyCommand(command+fileName);
115 UImanager->ApplyCommand(
"/run/beamOn 10");
int main(int argc, char **argv)