11#include "G4Version.hh"
21#include "G4PhysListFactoryAlt.hh"
24#include "G4PhysicsConstructorFactory.hh"
37 bool showPhys = gopts->getSwitch(
"showPhysics");
38 std::string gphysList = gopts->getRequiredScalarString(
"phys_list");
56 }
catch (
const std::exception& error) {
59 if (
const auto cut = gopts->getOptionalScalarDouble(
"production_cut")) {
70 log->info(2,
"G4PhysListFactory: <%1> loaded.", g4physList);
76void GPhysics::printAvailable()
const {
79 log->info(0,
"Geant4 Version %1 %2", g4ver, G4Date);;
81 g4alt::G4PhysListFactory factory;
82 factory.PrintAvailablePhysLists();
84 log->info(0,
"Available Geant4 Physics Lists:");
86 G4PhysicsConstructorRegistry* g4pctorFactory = G4PhysicsConstructorRegistry::Instance();
87 g4pctorFactory->PrintAvailablePhysicsConstructors();
GBase(const std::shared_ptr< GOptions > &gopt, std::string logger_name="")
std::shared_ptr< GLogger > log
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
constexpr int 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)