36 #include "ExP02DetectorConstruction.hh" 37 #include "ExP02DetConstrReader.hh" 38 #include "ExP02PrimaryGeneratorAction.hh" 40 #include "FTFP_BERT.hh" 43 #include "G4RunManager.hh" 44 #include "G4UImanager.hh" 47 #include "G4VisExecutive.hh" 51 #include "G4UIExecutive.hh" 56 int main(
int argc,
char** argv)
61 G4cout <<
"Please give 'write' or 'read' as argument " << G4endl;
65 G4VUserDetectorConstruction* det;
67 if(std::string(argv[1]) ==
"read")
69 det =
new ExP02DetConstrReader;
71 else if(std::string(argv[1]) ==
"write")
73 det =
new ExP02DetectorConstruction;
77 G4cout <<
"Wrong argument!" << G4endl;
82 G4RunManager * runManager =
new G4RunManager;
85 runManager->SetUserInitialization(det);
87 G4VModularPhysicsList* physicsList =
new FTFP_BERT;
88 runManager->SetUserInitialization(physicsList);
92 G4VisManager* visManager =
new G4VisExecutive;
93 visManager->Initialize();
97 runManager->SetUserAction(
new ExP02PrimaryGeneratorAction());
100 runManager->Initialize();
103 G4UImanager * UImanager = G4UImanager::GetUIpointer();
106 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
108 UImanager->ApplyCommand(
"/control/execute vis.mac");
int main(int argc, char **argv)