10#include "G4Version.hh"
20#include "G4PhysListFactoryAlt.hh"
22#include "G4StepLimiterPhysics.hh"
25#include "G4PhysicsConstructorFactory.hh"
38 bool showPhys = gopts->getSwitch(
"showPhysics");
39 std::string gphysList = gopts->getScalarString(
"phys_list");
52 g4alt::G4PhysListFactory factory;
57 physList = factory.GetReferencePhysList(g4physList);
61 physList->RegisterPhysics(
new G4StepLimiterPhysics());
65 log->
info(2,
"G4PhysListFactory: <" + g4physList +
"> loaded.");
71void GPhysics::printAvailable()
const {
74 log->
info(0,
"Geant4 Version ", g4ver,
" ", G4Date);;
76 g4alt::G4PhysListFactory factory;
77 factory.PrintAvailablePhysLists();
79 log->
info(0,
"Available Geant4 Physics Lists:");
81 G4PhysicsConstructorRegistry* g4pctorFactory = G4PhysicsConstructorRegistry::Instance();
82 g4pctorFactory->PrintAvailablePhysicsConstructors();
std::shared_ptr< GLogger > log
void debug(debug_type type, Args &&... args) const
void info(int level, Args &&... args) const
void error(int exit_code, Args &&... args) const
GPhysics(const std::shared_ptr< GOptions > &gopts)
Constructs the physics list builder and (unless requested otherwise) instantiates the physics list.
constexpr const char * GPHYSICS_LOGGER
#define ERR_PHYSLISTERROR
Error code used when the requested physics list cannot be loaded.
string removeAllSpacesFromString(const std::string &str)
string replaceCharInStringWithChars(const std::string &input, const std::string &toReplace, const std::string &replacement)