Loading src/modules/DepositionGeant4/AdditionalPhysicsLists.hpp +19 −20 Original line number Diff line number Diff line Loading @@ -12,22 +12,22 @@ #ifndef ALLPIX_ADDITIONAL_PHYSICS_LISTS_H #define ALLPIX_ADDITIONAL_PHYSICS_LISTS_H #include <G4VModularPhysicsList.hh> #include "MicroElecSiPhysics.hh" namespace allpix { /** * @brief Handler namespace for implementing additional PhysicsLists included in AllPix2 but not in the * G4PhysListFactory. */ namespace AdditionalPhysicsLists { namespace allpix::physicslists { /** * @brief Function to obtain * @param list_name Name of the additional physics list * @return Pointer to the G4VModularPhysicsList of the found physics list, or a nullptr if not found. */ G4VModularPhysicsList* getList(std::string list_name) { inline G4VModularPhysicsList* getList(const std::string& list_name) { if(list_name == "microelec-sionly") { // Downcasting from a G4VUserPhysicsList* to a G4VModularPhysicsList Loading @@ -37,7 +37,6 @@ namespace allpix { return nullptr; } } // namespace AdditionalPhysicsLists } // namespace allpix } // namespace allpix::physicslists #endif src/modules/DepositionGeant4/CMakeLists.txt +5 −3 Original line number Diff line number Diff line Loading @@ -37,8 +37,10 @@ ENDIF() IF(DEFINED GEANT4_EXAMPLES_DIR) MESSAGE(STATUS " Found Geant4 Examples, building add. physics lists") CONFIGURE_FILE(${GEANT4_EXAMPLES_DIR}/advanced/microelectronics/src/MicroElecSiPhysics.cc ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY) CONFIGURE_FILE(${GEANT4_EXAMPLES_DIR}/advanced/microelectronics/src/ElectronCapture.cc ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY) CONFIGURE_FILE( ${GEANT4_EXAMPLES_DIR}/advanced/microelectronics/src/MicroElecSiPhysics.cc ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY) CONFIGURE_FILE( ${GEANT4_EXAMPLES_DIR}/advanced/microelectronics/src/ElectronCapture.cc ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY) TARGET_SOURCES(${MODULE_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/MicroElecSiPhysics.cc Loading src/modules/DepositionGeant4/DepositionGeant4Module.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -222,7 +222,7 @@ void DepositionGeant4Module::initialize() { // If the specified physics list is one of the microelec variations, apply a target region to the volumes with silicon // materials if(specifiedPhysicsList == "microelec" || physics_list == "microelec-sionly") { if(physics_list == "microelec" || physics_list == "microelec-sionly") { // Create target region auto* region = new G4Region("Target"); Loading Loading
src/modules/DepositionGeant4/AdditionalPhysicsLists.hpp +19 −20 Original line number Diff line number Diff line Loading @@ -12,22 +12,22 @@ #ifndef ALLPIX_ADDITIONAL_PHYSICS_LISTS_H #define ALLPIX_ADDITIONAL_PHYSICS_LISTS_H #include <G4VModularPhysicsList.hh> #include "MicroElecSiPhysics.hh" namespace allpix { /** * @brief Handler namespace for implementing additional PhysicsLists included in AllPix2 but not in the * G4PhysListFactory. */ namespace AdditionalPhysicsLists { namespace allpix::physicslists { /** * @brief Function to obtain * @param list_name Name of the additional physics list * @return Pointer to the G4VModularPhysicsList of the found physics list, or a nullptr if not found. */ G4VModularPhysicsList* getList(std::string list_name) { inline G4VModularPhysicsList* getList(const std::string& list_name) { if(list_name == "microelec-sionly") { // Downcasting from a G4VUserPhysicsList* to a G4VModularPhysicsList Loading @@ -37,7 +37,6 @@ namespace allpix { return nullptr; } } // namespace AdditionalPhysicsLists } // namespace allpix } // namespace allpix::physicslists #endif
src/modules/DepositionGeant4/CMakeLists.txt +5 −3 Original line number Diff line number Diff line Loading @@ -37,8 +37,10 @@ ENDIF() IF(DEFINED GEANT4_EXAMPLES_DIR) MESSAGE(STATUS " Found Geant4 Examples, building add. physics lists") CONFIGURE_FILE(${GEANT4_EXAMPLES_DIR}/advanced/microelectronics/src/MicroElecSiPhysics.cc ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY) CONFIGURE_FILE(${GEANT4_EXAMPLES_DIR}/advanced/microelectronics/src/ElectronCapture.cc ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY) CONFIGURE_FILE( ${GEANT4_EXAMPLES_DIR}/advanced/microelectronics/src/MicroElecSiPhysics.cc ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY) CONFIGURE_FILE( ${GEANT4_EXAMPLES_DIR}/advanced/microelectronics/src/ElectronCapture.cc ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY) TARGET_SOURCES(${MODULE_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/MicroElecSiPhysics.cc Loading
src/modules/DepositionGeant4/DepositionGeant4Module.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -222,7 +222,7 @@ void DepositionGeant4Module::initialize() { // If the specified physics list is one of the microelec variations, apply a target region to the volumes with silicon // materials if(specifiedPhysicsList == "microelec" || physics_list == "microelec-sionly") { if(physics_list == "microelec" || physics_list == "microelec-sionly") { // Create target region auto* region = new G4Region("Target"); Loading