47{
50
51 if(argc > 2)
52 {
53 G4int change_seed(0);
54 change_seed = std::stoi(argv[2]);
55 long enterseed = change_seed;
56 G4Random::setTheSeed(enterseed);
57 G4Random::showEngineStatus();
58 G4cout<<"Used seed : "<<change_seed<<G4endl;
59 }
60
61#ifdef G4MULTITHREADED
63 pRunManager->SetNumberOfThreads(2);
64#else
65 std::unique_ptr<G4RunManager> pRunManager(
new G4RunManager);
66#endif
67
68
69 pRunManager->SetUserInitialization(
new PhysicsList());
72
73
75 pVisuManager->Initialize();
76
77
78 auto pUImanager = G4UImanager::GetUIpointer();
79
80
81 if ( pUi == nullptr )
82 {
83
84 pUImanager->ApplyCommand("/control/macroPath ../");
85 G4String command =
"/control/execute ";
87 pUImanager->ApplyCommand(command+fileName);
88 }
89 else
90 {
91
92 pUImanager->ApplyCommand("/control/execute vis.mac");
93 pUi->SessionStart();
94 delete pUi;
95 }
96 return 0;
97}
Instantiates and registers to Geant4 kernel all user action classes.
Defines the geometry and scorers for calculating chemical species yields.
Geant4 modular physics list using G4EmDNAPhysics_option2 and EmDNAChemistry constructors.