34 #ifdef G4MULTITHREADED 35 #include "G4MTRunManager.hh" 37 #include "G4RunManager.hh" 40 #include "G4UImanager.hh" 41 #include "Randomize.hh" 43 #include "ActionInitialization.hh" 49 #include "EventAction.hh" 50 #include "TrackingAction.hh" 51 #include "SteppingAction.hh" 52 #include "SteppingVerbose.hh" 55 #include "G4VisExecutive.hh" 59 #include "G4UIExecutive.hh" 64 int main(
int argc,
char** argv) {
67 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanecuEngine);
70 #ifdef G4MULTITHREADED 71 G4MTRunManager* runManager =
new G4MTRunManager;
72 G4int nThreads = G4Threading::G4GetNumberOfCores();
73 if (argc==3) nThreads = G4UIcommand::ConvertToInt(argv[2]);
74 runManager->SetNumberOfThreads(nThreads);
76 G4VSteppingVerbose::SetInstance(
new SteppingVerbose);
77 G4RunManager* runManager =
new G4RunManager;
93 runManager->SetUserInitialization(phys =
new PhysicsList());
96 runManager->SetUserInitialization(
new ActionInitialization(det));
100 G4UImanager* UImanager = G4UImanager::GetUIpointer();
103 G4VisManager* visManager =
new G4VisExecutive;
104 visManager->Initialize();
109 G4String command =
"/control/execute ";
111 UImanager->ApplyCommand(command+fileName);
117 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
119 UImanager->ApplyCommand(
"/control/execute vis.mac");
int main(int argc, char **argv)
TConfigurablePhysicsList< ModularPhysicsList > PhysicsList