37 #include "ExP01DetectorConstruction.hh" 38 #include "ExP01PrimaryGeneratorAction.hh" 39 #include "ExP01RunAction.hh" 40 #include "ExP01EventAction.hh" 41 #include "ExP01SteppingAction.hh" 42 #include "ExP01SteppingVerbose.hh" 44 #include "FTFP_BERT.hh" 46 #include "G4RunManager.hh" 47 #include "G4UImanager.hh" 49 #include "G4VisExecutive.hh" 50 #include "G4UIExecutive.hh" 54 int main(
int argc,
char** argv) {
57 G4UIExecutive* ui =
nullptr;
59 ui =
new G4UIExecutive(argc, argv);
63 G4VSteppingVerbose::SetInstance(
new ExP01SteppingVerbose);
66 G4RunManager * runManager =
new G4RunManager;
69 ExP01DetectorConstruction* ExP01detector =
new ExP01DetectorConstruction;
70 runManager->SetUserInitialization(ExP01detector);
72 G4VModularPhysicsList* physicsList =
new FTFP_BERT;
73 runManager->SetUserInitialization(physicsList);
76 G4VisManager* visManager =
new G4VisExecutive;
77 visManager->Initialize();
80 runManager->SetUserAction(
new ExP01PrimaryGeneratorAction(ExP01detector));
81 runManager->SetUserAction(
new ExP01RunAction);
82 runManager->SetUserAction(
new ExP01EventAction);
83 runManager->SetUserAction(
new ExP01SteppingAction);
86 runManager->Initialize();
89 G4UImanager * UImanager = G4UImanager::GetUIpointer();
94 UImanager->ApplyCommand(
"/control/execute vis.mac");
101 G4String command =
"/control/execute ";
103 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)