Import Geant4 11.0.0.beta source tree
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
#include "B2ActionInitialization.hh"
|
||||
|
||||
#include "G4RunManagerFactory.hh"
|
||||
|
||||
#include "G4SteppingVerbose.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "G4StepLimiterPhysics.hh"
|
||||
@@ -47,14 +47,16 @@ int main(int argc,char** argv)
|
||||
{
|
||||
// Detect interactive mode (if no arguments) and define UI session
|
||||
//
|
||||
G4UIExecutive* ui = 0;
|
||||
if ( argc == 1 ) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( argc == 1 ) { ui = new G4UIExecutive(argc, argv); }
|
||||
|
||||
// Optionally: choose a different Random engine...
|
||||
// G4Random::setTheEngine(new CLHEP::MTwistEngine);
|
||||
|
||||
//use G4SteppingVerboseWithUnits
|
||||
G4int precision = 4;
|
||||
G4SteppingVerbose::UseBestUnit(precision);
|
||||
|
||||
// Construct the default run manager
|
||||
//
|
||||
auto* runManager =
|
||||
@@ -67,10 +69,10 @@ int main(int argc,char** argv)
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
physicsList->RegisterPhysics(new G4StepLimiterPhysics());
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
|
||||
// Set user action classes
|
||||
runManager->SetUserInitialization(new B2ActionInitialization());
|
||||
|
||||
|
||||
// Initialize visualization
|
||||
//
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
@@ -83,13 +85,13 @@ int main(int argc,char** argv)
|
||||
|
||||
// Process macro or start UI session
|
||||
//
|
||||
if ( ! ui ) {
|
||||
if ( ! ui ) {
|
||||
// batch mode
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
// interactive mode
|
||||
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||
if (ui->IsGUI()) {
|
||||
|
||||
Reference in New Issue
Block a user