37 #include "ExP02DetectorConstruction.hh" 38 #include "ExP02DetConstrReader.hh" 39 #include "ExP02PrimaryGeneratorAction.hh" 41 #include "FTFP_BERT.hh" 43 #include "G4RunManager.hh" 44 #include "G4UImanager.hh" 46 #include "G4VisExecutive.hh" 47 #include "G4UIExecutive.hh" 51 int main(
int argc,
char** argv)
56 G4cout <<
"Please give 'write' or 'read' as argument " << G4endl;
60 G4VUserDetectorConstruction* det;
62 if(std::string(argv[1]) ==
"read")
64 det =
new ExP02DetConstrReader;
66 else if(std::string(argv[1]) ==
"write")
68 det =
new ExP02DetectorConstruction;
72 G4cout <<
"Wrong argument!" << G4endl;
77 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
80 G4RunManager * runManager =
new G4RunManager;
83 runManager->SetUserInitialization(det);
85 G4VModularPhysicsList* physicsList =
new FTFP_BERT;
86 runManager->SetUserInitialization(physicsList);
89 G4VisManager* visManager =
new G4VisExecutive;
90 visManager->Initialize();
93 runManager->SetUserAction(
new ExP02PrimaryGeneratorAction());
96 runManager->Initialize();
99 G4UImanager * UImanager = G4UImanager::GetUIpointer();
101 UImanager->ApplyCommand(
"/control/execute vis.mac");
int main(int argc, char **argv)