Commit 9d191591 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Fix some linter suggestions

parent f2988a70
Loading
Loading
Loading
Loading
+19 −20
Original line number Diff line number Diff line
@@ -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
@@ -37,7 +37,6 @@ namespace allpix {
        return nullptr;
    }

    } // namespace AdditionalPhysicsLists
} // namespace allpix
} // namespace allpix::physicslists

#endif
+5 −3
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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");