37 #include "ExN04DetectorConstruction.hh" 38 #include "ExN04PrimaryGeneratorAction.hh" 39 #include "ExN04RunAction.hh" 40 #include "ExN04EventAction.hh" 41 #include "ExN04StackingAction.hh" 42 #include "ExN04TrackingAction.hh" 43 #include "ExN04SteppingAction.hh" 44 #include "ExN04SteppingVerbose.hh" 46 #include "G4RunManager.hh" 47 #include "G4UImanager.hh" 48 #include "QGSP_BERT.hh" 49 #include "G4VisExecutive.hh" 50 #include "G4UIExecutive.hh" 54 int main(
int argc,
char** argv)
58 G4UIExecutive* ui = 0;
60 ui =
new G4UIExecutive(argc, 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);
82 G4VisManager* visManager =
new G4VisExecutive;
83 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();
117 G4String command =
"/control/execute ";
119 UImanager->ApplyCommand(command+fileName);
123 UImanager->ApplyCommand(
"/control/execute vis.mac");
int main(int argc, char **argv)