36 #include "G4RunManager.hh" 37 #include "G4UImanager.hh" 38 #include "FTFP_BERT.hh" 43 #include "EventAction.hh" 44 #include "SteppingAction.hh" 45 #include "HistoManager.hh" 47 #include "G4VisExecutive.hh" 48 #include "G4UIExecutive.hh" 52 int main(
int argc,
char** argv)
56 G4UIExecutive* ui = 0;
58 ui =
new G4UIExecutive(argc, argv);
63 G4RunManager * runManager =
new G4RunManager;
68 runManager->SetUserInitialization(detector);
70 runManager->SetUserInitialization(
new FTFP_BERT);
74 HistoManager* histo =
new HistoManager();
80 runManager->SetUserAction(gen_action);
83 runManager->SetUserAction(run_action);
85 EventAction* event_action =
new EventAction(run_action,histo);
86 runManager->SetUserAction(event_action);
88 SteppingAction* stepping_action =
89 new SteppingAction(detector, event_action);
90 runManager->SetUserAction(stepping_action);
94 runManager->Initialize();
98 G4VisManager* visManager =
new G4VisExecutive;
99 visManager->Initialize();
103 G4UImanager* UImanager = G4UImanager::GetUIpointer();
107 G4String command =
"/control/execute ";
109 UImanager->ApplyCommand(command+fileName);
113 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
int main(int argc, char **argv)