36 #include "ExN02DetectorConstruction.hh" 37 #include "ExN02PhysicsList.hh" 38 #include "ExN02PrimaryGeneratorAction.hh" 39 #include "ExN02RunAction.hh" 40 #include "ExN02EventAction.hh" 41 #include "ExN02SteppingAction.hh" 42 #include "ExN02SteppingVerbose.hh" 44 #include "G4RunManager.hh" 45 #include "G4UImanager.hh" 48 #include "G4VisExecutive.hh" 52 #include "G4UIExecutive.hh" 59 int main(
int argc,
char** 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);
81 G4VisManager* visManager =
new G4VisExecutive;
82 visManager->Initialize();
87 G4VUserPrimaryGeneratorAction* gen_action =
new ExN02PrimaryGeneratorAction(detector);
88 runManager->SetUserAction(gen_action);
90 G4UserRunAction* run_action =
new ExN02RunAction;
91 runManager->SetUserAction(run_action);
93 G4UserEventAction* event_action =
new ExN02EventAction;
94 runManager->SetUserAction(event_action);
96 G4UserSteppingAction* stepping_action =
new ExN02SteppingAction;
97 runManager->SetUserAction(stepping_action);
101 runManager->Initialize();
105 G4UImanager * UImanager = G4UImanager::GetUIpointer();
110 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
111 UImanager->ApplyCommand(
"/run/beamOn 10");
118 G4String command =
"/control/execute ";
120 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)