38 #include "G4RunManager.hh" 39 #include "G4UImanager.hh" 41 #include "ExN04DetectorConstruction.hh" 42 #include "QGSP_BERT.hh" 43 #include "ExN04PrimaryGeneratorAction.hh" 44 #include "ExN04RunAction.hh" 45 #include "ExN04EventAction.hh" 46 #include "ExN04StackingAction.hh" 47 #include "ExN04TrackingAction.hh" 48 #include "ExN04SteppingAction.hh" 49 #include "ExN04SteppingVerbose.hh" 52 #include "G4VisExecutive.hh" 56 #include "G4UIExecutive.hh" 61 int main(
int argc,
char** argv)
65 G4VSteppingVerbose* verbosity =
new ExN04SteppingVerbose;
66 G4VSteppingVerbose::SetInstance(verbosity);
70 G4RunManager* runManager =
new G4RunManager;
74 G4VUserDetectorConstruction* detector =
new ExN04DetectorConstruction;
75 runManager->SetUserInitialization(detector);
77 G4VUserPhysicsList* physics =
new QGSP_BERT();
78 runManager->SetUserInitialization(physics);
83 G4VisManager* visManager =
new G4VisExecutive;
84 visManager->Initialize();
87 runManager->Initialize();
91 G4VUserPrimaryGeneratorAction* gen_action =
new ExN04PrimaryGeneratorAction;
92 runManager->SetUserAction(gen_action);
94 G4UserRunAction* run_action =
new ExN04RunAction;
95 runManager->SetUserAction(run_action);
97 G4UserEventAction* event_action =
new ExN04EventAction;
98 runManager->SetUserAction(event_action);
100 G4UserStackingAction* stacking_action =
new ExN04StackingAction;
101 runManager->SetUserAction(stacking_action);
103 G4UserTrackingAction* tracking_action =
new ExN04TrackingAction;
104 runManager->SetUserAction(tracking_action);
106 G4UserSteppingAction* stepping_action =
new ExN04SteppingAction;
107 runManager->SetUserAction(stepping_action);
111 G4UImanager* UImanager = G4UImanager::GetUIpointer();
116 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
117 UImanager->ApplyCommand(
"/control/execute vis.mac");
124 G4String command =
"/control/execute ";
126 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)