34 #include "G4RunManager.hh" 35 #include "G4MTRunManager.hh" 36 #include "G4UImanager.hh" 37 #include "G4UIcommand.hh" 38 #include "Randomize.hh" 42 #include "ActionInitialization.hh" 43 #include "SteppingVerbose.hh" 45 #include "G4UIExecutive.hh" 46 #include "G4VisExecutive.hh" 50 int main(
int argc,
char** argv) {
53 G4UIExecutive* ui =
nullptr;
54 if (argc == 1) { ui =
new G4UIExecutive(argc,argv); }
56 #ifdef G4MULTITHREADED 57 G4MTRunManager * runManager =
new G4MTRunManager();
58 G4int nThreads = G4Threading::G4GetNumberOfCores();
59 if (argc==3) nThreads = G4UIcommand::ConvertToInt(argv[2]);
60 runManager->SetNumberOfThreads(nThreads);
62 G4VSteppingVerbose::SetInstance(
new SteppingVerbose);
63 G4RunManager * runManager =
new G4RunManager();
68 runManager->SetUserInitialization(detector);
69 runManager->SetUserInitialization(
new PhysicsList());
72 runManager->SetUserInitialization(
new ActionInitialization(detector));
75 G4VisManager* visManager =
nullptr;
78 G4UImanager* UImanager = G4UImanager::GetUIpointer();
82 visManager =
new G4VisExecutive;
83 visManager->Initialize();
88 G4String command =
"/control/execute ";
90 UImanager->ApplyCommand(command+fileName);
TConfigurablePhysicsList< ModularPhysicsList > PhysicsList
int main(int argc, char **argv)