Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
+4 -7
View File
@@ -16,10 +16,7 @@ endif()
#-----------------------------------------------------------------------
# - Define CMake requirements and override make rules as needed
#
cmake_minimum_required(VERSION 3.8...3.18 FATAL_ERROR)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
cmake_minimum_required(VERSION 3.12...3.20 FATAL_ERROR)
# - Make overrides for default flags, so they appear in interfaces
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
@@ -31,9 +28,9 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
# in tests/examples which are subprojects. All calls must use
# the same form.
project(Geant4)
set(${PROJECT_NAME}_VERSION_MAJOR 10)
set(${PROJECT_NAME}_VERSION_MINOR 7)
set(${PROJECT_NAME}_VERSION_PATCH 2)
set(${PROJECT_NAME}_VERSION_MAJOR 11)
set(${PROJECT_NAME}_VERSION_MINOR 0)
set(${PROJECT_NAME}_VERSION_PATCH 0)
set(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}")
# - Prepend our own CMake Modules to the search path
File diff suppressed because it is too large Load Diff
+102 -9
View File
@@ -27,28 +27,121 @@ add this in the documentation for the changed file as [BUGFIX #BUGNUMBER].
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
19th March 2021 - Gunter Folger (cmake-V10-06-52)
21 June 2021 - Julia Yarba (cmake-V10-07-28)
- Clean cmake/Modules/FindPythia8.cmake
(remove trailing whitespaces)
18 June 2021 - Julia Yarba (cmake-V10-07-27)
- Add cmake/Modules/FindPythia8.cmake
- Update cmake/Modules/G4ConfigureCMakeHelpers.cmake
8 June 2021 - Gunter Folger (cmake-V10-07-26)
- Switch to G4EMLOW 7.17
03 June 2021 - Ben Morgan (cmake-V10-07-25)
- Remove explicit setting of PTL_ cmake options.
- Add GEANT4_USE_PTL_LOCKS option to forward to internal PTL
as PTL_USE_LOCKS.
27 May 2021 - Ben Morgan (cmake-V10-07-24)
- Implement build/test script in Python to check for cycles in the
declared source module dependency graph.
25 May 2021 - Jonathan Madsen (cmake-V10-07-23)
- External PTL requires v2.0.0
25 May 2021 - Ben Morgan (cmake-V10-07-22)
- Clarify use of Freetype for both analysis and visualization
- Remove use of no longer required imported target shim for build
24 May 2021 - Ben Morgan (cmake-V10-07-21)
- Bump minimum CMake version to 3.12
22 May 2021 - Ben Morgan (cmake-V10-07-20)
- Qualify geant4_add_feature descriptions with "G4_" to distinguish them from
CMake property descriptions.
18 May 2021 - Ben Morgan (cmake-V10-07-19)
- Require C++17 as minimum standard to compile Geant4
- Allow compilation against C++23 with CMake 3.20 and newer
- Check for filesystem support in native or extension (GNU/Clang) libraries
15 May 2021 - Jonathan Madsen (cmake-V10-07-18)
- Set GEANT4_BUILD_BUILTIN_BACKTRACE to ON by default so novice
and intermediate users can, by default, get valuable information
on segmentation faults. Projects with their own signal handlers
can configure with this option off, set G4BACKTRACE="none" in
the environment, create their signal handlers after G4RunManager
gets created, or add `G4BackTrace::DefaultSignals() = std::set<int>{};`
before G4RunManager gets created.
10 May 2021 - John Allison (cmake-V10-07-17)
- With vis-V10-07-03, incorporating visman-V10-07-06 and vis_toolsg-V10-07-00.
Introduce a new vis driver, TOOLSSG (Guy Barrand).
o Four (mutually exclusive) options:
. TOOLSSG_X11_GLES
. TOOLSSG_WINDOWS_GLES
. TOOLSSG_XT_GLES
. TOOLSSG_QT_GLES
7 May 2021 - Gunter Folger (cmake-V10-07-16)
- Switch to G4EMLOW 7.16
4th May 2021 - Ben Morgan (cmake-V10-07-15)
- Remove obsolete -stdlib flag for AppleClang
3 May 2021 - Gunter Folger (cmake-V10-07-14)
- Switch to G4EMLOW 7.15
28 April 2021 - Ben Morgan (cmake-V10-07-13)
- Preliminary support for sanitizers
22 March 2021 - Alberto Ribon (cmake-V10-07-12)
- Modules/G4BuildSettings.cmake : removed deprecated PHP_AS_HP
environmental variable.
19th March 2021 - Gunter Folger (cmake-V10-07-11)
- Update to older G4TENDL 1.3.2, 1.4 has problems.
30th January 2021 - Gunter Folger (cmake-V10-06-51)
- Update to patched dataset G4PARTICLEXS 3.1.1 as provided by Vladimir I.
18 March 2021 - Ben Morgan (cmake-V10-07-10)
- Check for unparsed arguments in G4DeveloperAPI functions to
provide better validation against typos/etc in use
22nd January 2021 - Ben Morgan (cmake-V10-06-50)
09 March 2021 - John Allison (cmake-V10-07-09)
- Remove all references to Wt.
23 February 2021 - Ben Morgan (cmake-V10-07-08)
- Store PUBLIC/PRIVATE/INTERFACE module usage requirements explicitly
18th February 2021 - Ben Morgan (cmake-V10-07-07)
- Add G4tools target to CMake/GNUmake configuration following its
migration from analysis to externals categories.
4th February 2021 - Igor Semeniouk (cmake-V10-07-06)
- geant4.bat prototype
- hint to run geant4-config on windows
30th January 2021 - Gunter Folger (cmake-V10-07-05)
- Update to patched dataset G4PARTICLEXS 3.1.1 as provided by Vladimir I.
22nd January 2021 - Ben Morgan (cmake-V10-07-04)
- Update for GitHub PR #17: Provide same fix for MacPorts
- Address Bugzilla #2303: Fail configuration if Qt is enabled with CMake < 3.9
15th January 2021 - Ben Morgan (cmake-V10-06-49)
15th January 2021 - Ben Morgan (cmake-V10-07-03)
- Apply GitHub PR #17 from Florian Uhlig: Fix installation
error with Homebrew X11/GL.
error with Homebrew X11/GL.
11th January 2021 - Ben Morgan (cmake-V10-06-48)
11th January 2021 - Ben Morgan (cmake-V10-07-02)
- Apply GitHub PR #16 from andriish: Fix configure/build with
system PTL 1.0.0.
14th December 2020 - Ben Morgan (cmake-V10-06-47)
5th January 2010 - Gunter Folger (cmake-V10-07-01)
- Update to dataset G4EMLOW 7.14 as provided by Sebastien
8th November 2020 - Ben Morgan (cmake-V10-07-00)
- Install/Use builtin PTL CMake scripts from PTL subdirectory
alongside Geant4Config.cmake
+24
View File
@@ -0,0 +1,24 @@
# Locate Pythia8 library
# in a directory defined via PYTHIA8 environment variable
#
# Defines:
# PYTHIA8_FOUND
# PYTHIA8_LIBRARIES
# PYTHIA8_INCLUDES
find_library(PYTHIA8_LIBRARY NAMES pythia8
HINTS $ENV{PYTHIA8} $ENV{PYTHIA8}/lib)
set(PYTHIA8_LIBRARIES ${PYTHIA8_LIBRARY})
#message(STATUS PYTHIA8_LIBRARIES ${PYTHIA8_LIBRARIES} )
find_path( PYTHIA8_INCLUDES Pythia8/Pythia.h
HINTS $ENV{PYTHIA8} $ENV{PYTHIA8}/include $ENV{PYTHIA8}/include/Pythia8 )
set(PYTHIA8_INCLUDES ${PYTHIA8_INCLUDES})
# handle the QUIETLY and REQUIRED arguments and set PYTHIA8_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pythia8 DEFAULT_MSG PYTHIA8_LIBRARIES)
mark_as_advanced(PYTHIA8_FOUND PYTHIA8_LIBRARIES PYTHIA8_INCLUDES)
-144
View File
@@ -1,144 +0,0 @@
# Find Wt includes and libraries
#
# This script sets the following variables:
#
# Wt_INCLUDE_DIR
# Wt_LIBRARIES - Release libraries
# Wt_FOUND - True if release libraries found
# WT_FOUND - True if release libraries found
# Wt_DEBUG_LIBRARIES - Debug libraries
# Wt_DEBUG_FOUND - True if debug libraries found
#
# To direct the script to a particular Wt installation, use the
# standard cmake variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH
#
# To use this script to find Wt, when using the new style for include files:
# #include <Wt/WLineEdit>
# #include <Wt/Ext/LineEdit>
# #include <Wt/Chart/WPieChart>
#
# include the following CMake snippet in your project:
#
# FIND_PACKAGE( Wt REQUIRED )
# INCLUDE_DIRECTORIES( ${Wt_INCLUDE_DIR} )
# TARGET_LINK_LIBRARIES( yourexe
# ${Wt_DEBUG_LIBRARY} # or {Wt_LIBRARY}
# ${Wt_HTTP_DEBUG_LIBRARY} # or {Wt_HTTP_LIBRARY}
# ${Wt_EXT_DEBUG_LIBRARY} # or {Wt_EXT_LIBRARY}
# )
#
# To use this script to find Wt, when using the old include style:
# #include <WLineEdit>
# #include <Ext/LineEdit>
# #include <Chart/WPieChart>
# style of include files, change the INCLUDE_DIRECTORIES statement to:
# INCLUDE_DIRECTORIES( ${Wt_INCLUDE_DIR} ${Wt_INCLUDE_DIR}/Wt )
#
#
#
#
# Copyright (c) 2007, Pau Garcia i Quiles, <pgquiles@elpauer.org>
#
# Modifications Copyright (c) 2013, Ben Morgan, <Ben.Morgan@warwick.ac.uk>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
find_path(Wt_INCLUDE_DIR NAMES Wt/WObject PATHS ENV PATH PATH_SUFFIXES include wt )
include(SelectLibraryConfigurations)
find_library( Wt_LIBRARY_RELEASE NAMES wt PATHS PATH PATH_SUFFIXES lib lib-release lib_release )
find_library( Wt_LIBRARY_DEBUG NAMES wtd PATHS PATH PATH_SUFFIXES lib libd lib-debug lib_debug HINTS /usr/lib/debug/usr/lib)
select_library_configurations(Wt)
find_library( Wt_EXT_LIBRARY_RELEASE NAMES wtext PATHS PATH PATH_SUFFIXES lib lib-release lib_release )
find_library( Wt_EXT_LIBRARY_DEBUG NAMES wtextd PATHS PATH PATH_SUFFIXES lib libd lib-debug lib_debug HINTS /usr/lib/debug/usr/lib)
select_library_configurations(Wt_EXT)
find_library( Wt_HTTP_LIBRARY_RELEASE NAMES wthttp PATHS PATH PATH_SUFFIXES lib lib-release lib_release )
find_library( Wt_HTTP_LIBRARY_DEBUG NAMES wthttpd PATHS PATH PATH_SUFFIXES lib libd lib-debug lib_debug HINTS /usr/lib/debug/usr/lib)
select_library_configurations(Wt_HTTP)
find_library( Wt_FCGI_LIBRARY_RELEASE NAMES wtfcgi PATHS PATH PATH_SUFFIXES lib lib-release lib_release )
find_library( Wt_FCGI_LIBRARY_DEBUG NAMES wtfcgid PATHS PATH PATH_SUFFIXES lib libd lib-debug lib_debug HINTS /usr/lib/debug/usr/lib)
select_library_configurations(Wt_FCGI)
find_library( Wt_DBO_LIBRARY_RELEASE NAMES wtdbo PATHS PATH PATH_SUFFIXES lib lib-release lib_release )
find_library( Wt_DBO_LIBRARY_DEBUG NAMES wtdbod PATHS PATH PATH_SUFFIXES lib lib-debug lib_debug HINTS /usr/lib/debug/usr/lib)
select_library_configurations(Wt_DBO)
find_library( Wt_DBOSQLITE3_LIBRARY_RELEASE NAMES wtdbosqlite3 PATHS PATH PATH_SUFFIXES lib lib-release lib_release )
find_library( Wt_DBOSQLITE3_LIBRARY_DEBUG NAMES wtdbosqlite3d PATHS PATH PATH_SUFFIXES lib lib-debug lib_debug HINTS /usr/lib/debug/usr/lib)
select_library_configurations(Wt_DBOSQLITE3)
find_library( Wt_DBOPOSTGRES_LIBRARY_RELEASE NAMES wtdbopostgres PATHS PATH PATH_SUFFIXES lib lib-release lib_release )
find_library( Wt_DBOPOSTGRES_LIBRARY_DEBUG NAMES wtdbopostgresd PATHS PATH PATH_SUFFIXES lib lib-debug lib_debug HINTS /usr/lib/debug/usr/lib)
select_library_configurations(Wt_DBOPOSTGRES)
# Need at least Boost signals...
find_package(Boost REQUIRED signals)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Wt REQUIRED_VARS Wt_INCLUDE_DIR Wt_LIBRARY)
# - Create imported targets as needed by Geant4
if(Wt_FOUND)
# Main library
if(NOT TARGET Wt::Wt)
add_library(Wt::Wt UNKNOWN IMPORTED)
set_target_properties(Wt::Wt PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Wt_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "Boost::signals;Boost::headers")
if(Wt_LIBRARY_RELEASE)
set_property(TARGET Wt::Wt APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(Wt::Wt PROPERTIES
IMPORTED_LOCATION_RELEASE "${Wt_LIBRARY_RELEASE}")
endif()
if(Wt_LIBRARY_DEBUG)
set_property(TARGET Wt::Wt APPEND PROPERTY
IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(Wt::Wt PROPERTIES
IMPORTED_LOCATION_DEBUG "${Wt_LIBRARY_DEBUG}")
endif()
if(NOT Wt_LIBRARY_RELEASE AND NOT Wt_LIBRARY_DEBUG)
set_property(TARGET Wt::Wt APPEND PROPERTY
IMPORTED_LOCATION "${Wt_LIBRARY}")
endif()
endif()
# Components
foreach(__wt_target HTTP)
if(NOT TARGET Wt::${__wt_target})
add_library(Wt::${__wt_target} UNKNOWN IMPORTED)
set_target_properties(Wt::${__wt_target} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Wt_INCLUDE_DIR}")
if(Wt_${__wt_target}_LIBRARY_RELEASE)
set_property(TARGET Wt::${__wt_target} APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(Wt::${__wt_target} PROPERTIES
IMPORTED_LOCATION_RELEASE "${Wt_${__wt_target}_LIBRARY_RELEASE}")
endif()
if(Wt_${__wt_target}_LIBRARY_DEBUG)
set_property(TARGET Wt::${__wt_target} APPEND PROPERTY
IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(Wt::${__wt_target} PROPERTIES
IMPORTED_LOCATION_DEBUG "${Wt_${__wt_target}_LIBRARY_DEBUG}")
endif()
if(NOT Wt_${__wt_target}_LIBRARY_RELEASE AND NOT Wt_${__wt_target}_LIBRARY_DEBUG)
set_property(TARGET Wt::${__wt_target} APPEND PROPERTY
IMPORTED_LOCATION "${Wt_${__wt_target}_LIBRARY}")
endif()
endif()
endforeach()
endif()
+97 -49
View File
@@ -156,70 +156,126 @@ endif() #NOT WIN32
#
#.rst
# - ``GEANT4_BUILD_CXXSTD`` (Allowed values: 11, 14, 17, 20)
# - ``CMAKE_CXX_STANDARD`` (Allowed values: 17, 20, 23)
# - ``GEANT4_BUILD_CXXSTD`` (DEPRECATED)
#
# - Choose C++ Standard to build against from supported list.
# - Note that only C++17 is supported on Windows with MSVC
# - C++20 awareness is only available from CMake 3.12 onwards
#
set(__g4_default_cxxstd 11 14 17)
if(MSVC)
set(__g4_default_cxxstd 17)
# - C++23 awareness is only available from CMake 3.20 onwards
set(__g4_default_cxxstd 17 20)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.20)
list(APPEND __g4_default_cxxstd 23)
endif()
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
list(APPEND __g4_default_cxxstd 20)
if(GEANT4_BUILD_CXXSTD)
message(WARNING
"The GEANT4_BUILD_CXXSTD argument is deprecated.\n"
"Please use CMAKE_CXX_STANDARD to set the required C++ Standard. "
"The value supplied will be used to set CMAKE_CXX_STANDARD, but this behaviour will "
"be removed in future releases.")
set(CMAKE_CXX_STANDARD ${GEANT4_BUILD_CXXSTD})
endif()
enum_option(GEANT4_BUILD_CXXSTD
enum_option(CMAKE_CXX_STANDARD
DOC "C++ Standard to compile against"
VALUES ${__g4_default_cxxstd}
CASE_INSENSITIVE
)
string(REGEX REPLACE "^c\\+\\+" "" GEANT4_BUILD_CXXSTD "${GEANT4_BUILD_CXXSTD}")
mark_as_advanced(GEANT4_BUILD_CXXSTD)
geant4_add_feature(GEANT4_BUILD_CXXSTD "Compiling against C++ Standard '${GEANT4_BUILD_CXXSTD}'")
mark_as_advanced(CMAKE_CXX_STANDARD)
geant4_add_feature(CMAKE_CXX_STANDARD "Compiling against C++ Standard '${CMAKE_CXX_STANDARD}'")
# Require at minimal set of C++11 features plus user's selection of standard, no extensions
# Explicit features are retained for C++11 to identify use of old compilers with partial support.
# Here, the `cxx_std_11` epoch feature might not be sufficient.
# Setup required CXX variables: must not use vendor extensions, must require standard
# Set convenience variable for compile features to use
set(CMAKE_CXX_EXTENSIONS OFF)
set(GEANT4_TARGET_COMPILE_FEATURES
cxx_alias_templates
cxx_auto_type
cxx_delegating_constructors
cxx_enum_forward_declarations
cxx_explicit_conversions
cxx_final
cxx_lambdas
cxx_nullptr
cxx_override
cxx_range_for
cxx_strong_enums
cxx_uniform_initialization
cxx_std_${GEANT4_BUILD_CXXSTD})
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(GEANT4_TARGET_COMPILE_FEATURES cxx_std_${CMAKE_CXX_STANDARD})
# Emit early fatal error if we don't have a record of the core standard
# in CMake's known features. CMake will check this for us as well, but doing
# Emit early fatal error if we don't have a record of the requested standard
# in CMake's known features. CMake *will* check this for us as well, but doing
# the check here only emits one error. We can also give a better hint on the
# cause/resolution
if(NOT ("${CMAKE_CXX_COMPILE_FEATURES}" MATCHES "cxx_std_${GEANT4_BUILD_CXXSTD}"))
if(NOT ("${CMAKE_CXX_COMPILE_FEATURES}" MATCHES "cxx_std_${CMAKE_CXX_STANDARD}"))
message(FATAL_ERROR
"Geant4 requested compilation using C++ standard '${GEANT4_BUILD_CXXSTD}' using compiler\n"
"Geant4 requested compilation using C++ standard '${CMAKE_CXX_STANDARD}' with compiler\n"
"'${CMAKE_CXX_COMPILER_ID}', version '${CMAKE_CXX_COMPILER_VERSION}'\n"
"but CMake ${CMAKE_VERSION} is not aware of any support for that standard by this compiler. You may need a newer CMake and/or compiler.\n")
endif()
# - Check for Standard Library Implementation Features
# e.g. Smart pointers are a library implementation feature
# and provide workarounds if needed
# - Check for Language/Standard Library Implementation Features
#
# - A very dumb wrapper round try_compile to give simple reporting
function(check_cxx_feature _flag _bindir _src)
try_compile(${_flag} ${_bindir} ${_src} ${ARGN})
# Can be simplified after 3.17 with CHECK_PASS/FAIL
set(__preamble "Checking C++ feature ${_flag} -")
if(${_flag})
message(STATUS "${__preamble} Success")
else()
message(STATUS "${__preamble} Failed")
endif()
endfunction()
# - Filesystem may be experimental/filesystem, and in stdc++fs (GCC/libstdc++), c++fs (Clang/libc++)
# G4global will provide this as a PUBLIC dependency, if required
# - native stdlib (nothing needed)
# - GNU: stdc++fs
# - Clang: c++fs
check_cxx_feature(CXXSTDLIB_FILESYSTEM_NATIVE
${PROJECT_BINARY_DIR}/cxx_filesystem/native
${PROJECT_SOURCE_DIR}/cmake/Modules/check_cxx_filesystem.cc)
if(NOT CXXSTDLIB_FILESYSTEM_NATIVE)
# GNU libstdc++fs
check_cxx_feature(CXXSTDLIB_FILESYSTEM_STDCXXFS
${PROJECT_BINARY_DIR}/cxx_filesystem/stdc++fs
${PROJECT_SOURCE_DIR}/cmake/Modules/check_cxx_filesystem.cc
LINK_LIBRARIES stdc++fs)
# LLVM libc++fs
check_cxx_feature(CXXSTDLIB_FILESYSTEM_CXXFS
${PROJECT_BINARY_DIR}/cxx_filesystem/c++fs
${PROJECT_SOURCE_DIR}/cmake/Modules/check_cxx_filesystem.cc
LINK_LIBRARIES c++fs)
endif()
# Derive name of library to link to
# Default is native...
if(CXXSTDLIB_FILESYSTEM_NATIVE)
set(GEANT4_CXX_FILESYSTEM_LIBRARY )
elseif(CXXSTDLIB_FILESYSTEM_STDCXXFS)
set(GEANT4_CXX_FILESYSTEM_LIBRARY "stdc++fs")
elseif(CXXSTDLIB_FILESYSTEM_CXXFS)
set(GEANT4_CXX_FILESYSTEM_LIBRARY "c++fs")
else()
message(FATAL_ERROR "No support for C++ filesystem found for compiler '${CMAKE_CXX_COMPILER_ID}', '${CMAKE_CXX_COMPILER_VERSION}'")
endif()
# Hold any appropriate compile flag(s) in variable for later export to
# non-cmake config files
set(GEANT4_CXXSTD_FLAGS "${CMAKE_CXX${GEANT4_BUILD_CXXSTD}_STANDARD_COMPILE_OPTION}")
set(GEANT4_CXXSTD_FLAGS "${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION}")
#.rst:
# - ``GEANT4_BUILD_SANITIZER`` (Allowed values: none address thread undefined)
#
# - Build libraries with instrumentation of the given sanitizer
# - Only for GNU/Clang at the moment
# - VS 2019 16.9 supports asan: https://devblogs.microsoft.com/cppblog/address-sanitizer-for-msvc-now-generally-available/)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|.*Clang")
enum_option(GEANT4_BUILD_SANITIZER
DOC "Build libraries with sanitizer instrumentation"
VALUES none address thread undefined
CASE_INSENSITIVE)
mark_as_advanced(GEANT4_BUILD_SANITIZER)
if(NOT (GEANT4_BUILD_SANITIZER STREQUAL "none"))
# Add flags - longer term, make compile/link options
# frame pointer flag to get more meaningful stack traces
# May need others for better/reliable output
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=${GEANT4_BUILD_SANITIZER}")
geant4_add_feature(GEANT4_BUILD_SANITIZER "Compiling/linking with sanitizer '${GEANT4_BUILD_SANITIZER}'")
endif()
endif()
#-----------------------------------------------------------------------
# Multithreading
#-----------------------------------------------------------------------
@@ -278,19 +334,11 @@ endif()
# Physics
#-----------------------------------------------------------------------
#.rst:
# - ``GEANT4_BUILD_PHP_AS_HP`` (Default: OFF, ON if ``PHP_AS_HP`` set in environment)
# - ``GEANT4_BUILD_PHP_AS_HP`` (Default: OFF)
#
# - Build ParticleHP as HP.
# - Use of the ``PHP_AS_HP`` environment variable to enable this build
# option is deprecated and will be removed in the next release
#
set(_default_build_php_as_hp OFF)
if(DEFINED ENV{PHP_AS_HP})
message(WARNING "Use of the PHP_AS_HP environment variable to enable building ParticleHP as HP is deprecated. "
"Use the GEANT4_BUILD_PHP_AS_HP CMake option to enable this functionality.")
set(_default_build_php_as_hp ON)
endif()
option(GEANT4_BUILD_PHP_AS_HP "Build ParticleHP as HP" ${_default_build_php_as_hp})
mark_as_advanced(GEANT4_BUILD_PHP_AS_HP)
geant4_add_feature(GEANT4_BUILD_PHP_AS_HP "Building ParticleHP as HP")
@@ -332,7 +380,7 @@ mark_as_advanced(GEANT4_BUILD_VERBOSE_CODE)
if(UNIX)
option(GEANT4_BUILD_BUILTIN_BACKTRACE
"Enable automatic G4Backtrace signal handling in G4RunManager. Switch off for applications implementing their own signal handling"
OFF)
ON)
mark_as_advanced(GEANT4_BUILD_BUILTIN_BACKTRACE)
endif()
+15
View File
@@ -112,6 +112,21 @@ add_custom_target(validate_sources
COMMENT "Validating Geant4 Module Source Lists"
)
#.rst:
# A custom ``validate_no_module_cycles`` is declared if Python3.9 is available.
# This runs the geant4_check_module_cycles Python script to check that the
# source module dependency graph has no cycles. It will fail if any cycles
# are found, listing the first found to stderr.
find_package(Python3 3.9 QUIET COMPONENTS Interpreter)
if(Python3_FOUND)
add_custom_target(validate_no_module_cycles
COMMAND Python3::Interpreter
${PROJECT_SOURCE_DIR}/cmake/Modules/geant4_check_module_cycles.py
-f ${PROJECT_BINARY_DIR}/G4ModuleAdjacencyList.txt
COMMENT "Checking for cycles in declared source module dependencies"
)
endif()
#-----------------------------------------------------------------------
#.rst:
# General Installation Settings
+4 -2
View File
@@ -135,7 +135,9 @@ function(geant4_add_feature _var _description)
set_property(GLOBAL APPEND PROPERTY GEANT4_DISABLED_FEATURES ${_var})
endif()
set_property(GLOBAL PROPERTY ${_var}_DESCRIPTION "${_description}")
# Property name qualified by "G4" prefix so we can provide seperate
# descriptions for CMake builtins we might expose (e.g. CXX_STANDARD)
set_property(GLOBAL PROPERTY G4_${_var}_DESCRIPTION "${_description}")
endfunction()
#-----------------------------------------------------------------------
@@ -149,7 +151,7 @@ function(geant4_print_enabled_features)
foreach(_feature ${_enabledFeatures})
set(_currentFeatureText "${_currentFeatureText}\n${_feature}")
get_property(_desc GLOBAL PROPERTY ${_feature}_DESCRIPTION)
get_property(_desc GLOBAL PROPERTY G4_${_feature}_DESCRIPTION)
if(_desc)
set(_currentFeatureText "${_currentFeatureText}: ${_desc}")
+2 -1
View File
@@ -168,6 +168,7 @@ configure_file(
COPYONLY
)
# Required for CMake clients between 3.8 and 3.10
configure_file(
${PROJECT_SOURCE_DIR}/cmake/Modules/G4FreetypeShim.cmake
${PROJECT_BINARY_DIR}/G4FreetypeShim.cmake
@@ -199,7 +200,7 @@ configure_file(
)
foreach(_mod AIDA HepMC Pythia6 StatTest TBB XQuartzGL)
foreach(_mod AIDA HepMC Pythia6 Pythia8 StatTest TBB XQuartzGL)
configure_file(
${PROJECT_SOURCE_DIR}/cmake/Modules/Find${_mod}.cmake
${PROJECT_BINARY_DIR}/Modules/Find${_mod}.cmake
+177 -67
View File
@@ -152,6 +152,12 @@ macro(_g4tc_shell_setup SHELL_FAMILY)
set(GEANT4_TC_SHELL_FAMILY "C shell")
set(GEANT4_TC_UNSET_COMMAND "unsetenv")
set(GEANT4_TC_SHELL_EXTENSION ".csh")
elseif(${SHELL_FAMILY} STREQUAL "cmd")
#the variable GEANT4_TC_SHELL_PROGRAM is not used in .bat generation
set(GEANT4_TC_SHELL_PROGRAM "cmd.exe")
set(GEANT4_TC_SHELL_FAMILY "Windows cmd.exe")
set(GEANT4_TC_UNSET_COMMAND "set")
set(GEANT4_TC_SHELL_EXTENSION ".bat")
else()
message(FATAL_ERROR "Unsupported shell '${SHELL_FAMILY}'")
endif()
@@ -250,6 +256,22 @@ set ${LOCATION_VARIABLE}=\"`cd \${g4sls_sourced_dir} > /dev/null ; pwd`\"
# For C-shell, set the values of the guard variables
set(GEANT4_TC_IF_SELFLOCATED "" PARENT_SCOPE)
set(GEANT4_TC_ENDIF_SELFLOCATED "" PARENT_SCOPE)
elseif(${SHELL_FAMILY} STREQUAL "cmd")
set(${TEMPLATE_NAME}
"set ${LOCATION_VARIABLE}=
rem Self locate script when sourced
for /F %%i in (\"%0\") do set BINDIR=%%~dpi
set BINDIR=%BINDIR:~0,-1%
set ${LOCATION_VARIABLE}=%BINDIR%
rem unset temparary variable
set BINDIR=
"
PARENT_SCOPE
)
# Set the values of the guard variables
set(GEANT4_TC_IF_SELFLOCATED "" PARENT_SCOPE)
set(GEANT4_TC_ENDIF_SELFLOCATED "" PARENT_SCOPE)
endif()
endfunction()
@@ -269,6 +291,11 @@ function(_g4tc_setenv_command TEMPLATE_NAME SHELL_FAMILY VARIABLE_NAME VARIABLE_
"setenv ${VARIABLE_NAME} ${VARIABLE_VALUE}"
PARENT_SCOPE
)
elseif(${SHELL_FAMILY} STREQUAL "cmd")
set(${TEMPLATE_NAME}
"set ${VARIABLE_NAME}=${VARIABLE_VALUE}"
PARENT_SCOPE
)
endif()
endfunction()
@@ -301,6 +328,17 @@ endif
"
PARENT_SCOPE
)
# -- cmd.exe block
elseif(${SHELL_FAMILY} STREQUAL "cmd")
# Again, this is verbatim so final output is formatted correctly
set(${TEMPLATE_NAME}
"
IF NOT DEFINED ${VARIABLE_NAME} (
set ${VARIABLE_NAME}=${VARIABLE_VALUE}
)
"
PARENT_SCOPE
)
endif()
endfunction()
@@ -338,6 +376,17 @@ endif
"
PARENT_SCOPE
)
# -- cmd.exe block
elseif(${SHELL_FAMILY} STREQUAL "cmd")
# Assime verible name passed hire
set(${TEMPLATE_NAME}
"
set ${PATH_VARIABLE}=%${APPEND_VARIABLE}%;%${PATH_VARIABLE}%
set ${APPEND_VARIABLE}=
"
PARENT_SCOPE
)
endif()
endfunction()
@@ -375,6 +424,17 @@ endif
"
PARENT_SCOPE
)
# -- cmd.exe block
elseif(${SHELL_FAMILY} STREQUAL "cmd")
# Assime verible name passed hire
set(${TEMPLATE_NAME}
"
set ${PATH_VARIABLE}=%${PATH_VARIABLE}%;%${APPEND_VARIABLE}%
set ${APPEND_VARIABLE}=
"
PARENT_SCOPE
)
endif()
endfunction()
@@ -862,9 +922,14 @@ file(RELATIVE_PATH
)
set(TOOLS_FONT_PATH "\"`cd \$geant4_envbindir/${G4ENV_BINDIR_TO_DATADIR}/fonts > /dev/null ; pwd`\"")
# list of shells
set(shells_list bourne;cshell)
if(WIN32)
list(APPEND shells_list cmd)
endif()
# - Configure for each shell
foreach(_shell bourne;cshell)
foreach(_shell IN LISTS shells_list)
# Setup the shell
_g4tc_shell_setup(${_shell})
@@ -878,88 +943,133 @@ foreach(_shell bourne;cshell)
geant4_envbindir
)
# Set path, which should be where the script itself is installed
_g4tc_prepend_path(GEANT4_ENV_BINPATH_SETUP
${_shell}
PATH
"\"\$geant4_envbindir\""
)
# Set library path, based on relative paths between bindir and libdir
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
_g4tc_prepend_path(GEANT4_ENV_LIBPATH_SETUP
if(NOT ${_shell} STREQUAL cmd)
# Set path, which should be where the script itself is installed
_g4tc_prepend_path(GEANT4_ENV_BINPATH_SETUP
${_shell}
LD_LIBRARY_PATH
"\"`cd $geant4_envbindir/${G4ENV_BINDIR_TO_LIBDIR} > /dev/null ; pwd`\""
PATH
"\"\$geant4_envbindir\""
)
endif()
# Third party lib paths
# - CLHEP, if system
set(GEANT4_TC_CLHEP_LIB_PATH_SETUP "# - Builtin CLHEP used")
if(GEANT4_USE_SYSTEM_CLHEP)
# Handle granular vs singular cases
if(GEANT4_USE_SYSTEM_CLHEP_GRANULAR)
get_target_property(_CLHEP_LIB_DIR CLHEP::Vector LOCATION)
else()
get_target_property(_CLHEP_LIB_DIR CLHEP::CLHEP LOCATION)
endif()
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" REALPATH)
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" DIRECTORY)
# Set library path, based on relative paths between bindir and libdir
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
_g4tc_append_path(GEANT4_TC_CLHEP_LIB_PATH_SETUP
_g4tc_prepend_path(GEANT4_ENV_LIBPATH_SETUP
${_shell}
LD_LIBRARY_PATH
"${_CLHEP_LIB_DIR}"
"\"`cd $geant4_envbindir/${G4ENV_BINDIR_TO_LIBDIR} > /dev/null ; pwd`\""
)
else()
set(GEANT4_TC_CLHEP_LIB_PATH_SETUP "# System CLHEP in use, no configuration required")
endif()
endif()
# - XercesC
set(GEANT4_TC_XERCESC_LIB_PATH_SETUP "# GDML SUPPORT NOT AVAILABLE")
if(GEANT4_USE_GDML)
get_filename_component(_XERCESC_LIB_DIR "${XercesC_LIBRARY}" REALPATH)
get_filename_component(_XERCESC_LIB_DIR "${XercesC_LIBRARY}" DIRECTORY)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
_g4tc_append_path(GEANT4_TC_XERCESC_LIB_PATH_SETUP
${_shell}
LD_LIBRARY_PATH
"${_XERCESC_LIB_DIR}"
)
else()
set(GEANT4_TC_XERCESC_LIB_PATH_SETUP "# GDML Supported, no configuration of Xerces-C required")
# Third party lib paths
# - CLHEP, if system
set(GEANT4_TC_CLHEP_LIB_PATH_SETUP "# - Builtin CLHEP used")
if(GEANT4_USE_SYSTEM_CLHEP)
# Handle granular vs singular cases
if(GEANT4_USE_SYSTEM_CLHEP_GRANULAR)
get_target_property(_CLHEP_LIB_DIR CLHEP::Vector LOCATION)
else()
get_target_property(_CLHEP_LIB_DIR CLHEP::CLHEP LOCATION)
endif()
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" REALPATH)
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" DIRECTORY)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
_g4tc_append_path(GEANT4_TC_CLHEP_LIB_PATH_SETUP
${_shell}
LD_LIBRARY_PATH
"${_CLHEP_LIB_DIR}"
)
else()
set(GEANT4_TC_CLHEP_LIB_PATH_SETUP "# System CLHEP in use, no configuration required")
endif()
endif()
# - XercesC
set(GEANT4_TC_XERCESC_LIB_PATH_SETUP "# GDML SUPPORT NOT AVAILABLE")
if(GEANT4_USE_GDML)
get_filename_component(_XERCESC_LIB_DIR "${XercesC_LIBRARY}" REALPATH)
get_filename_component(_XERCESC_LIB_DIR "${XercesC_LIBRARY}" DIRECTORY)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
_g4tc_append_path(GEANT4_TC_XERCESC_LIB_PATH_SETUP
${_shell}
LD_LIBRARY_PATH
"${_XERCESC_LIB_DIR}"
)
else()
set(GEANT4_TC_XERCESC_LIB_PATH_SETUP "# GDML Supported, no configuration of Xerces-C required")
endif()
endif()
endif()
# - Set data paths
set(GEANT4_ENV_DATASETS )
foreach(_ds ${GEANT4_EXPORTED_DATASETS})
_g4tc_setenv_command(_dssetenvcmd ${_shell} ${${_ds}_ENVVAR} ${${_ds}_PATH})
set(GEANT4_ENV_DATASETS "${GEANT4_ENV_DATASETS}${_dssetenvcmd}\n")
endforeach()
# - Set data paths
set(GEANT4_ENV_DATASETS )
foreach(_ds ${GEANT4_EXPORTED_DATASETS})
_g4tc_setenv_command(_dssetenvcmd ${_shell} ${${_ds}_ENVVAR} ${${_ds}_PATH})
set(GEANT4_ENV_DATASETS "${GEANT4_ENV_DATASETS}${_dssetenvcmd}\n")
endforeach()
# - Set Font Path
set(GEANT4_ENV_TOOLS_FONT_PATH "# FREETYPE SUPPORT NOT AVAILABLE")
if(GEANT4_USE_FREETYPE)
_g4tc_append_path(GEANT4_ENV_TOOLS_FONT_PATH
${_shell}
TOOLS_FONT_PATH
"${TOOLS_FONT_PATH}"
# - Set Font Path
set(GEANT4_ENV_TOOLS_FONT_PATH "# FREETYPE SUPPORT NOT AVAILABLE")
if(GEANT4_USE_FREETYPE)
_g4tc_append_path(GEANT4_ENV_TOOLS_FONT_PATH
${_shell}
TOOLS_FONT_PATH
"${TOOLS_FONT_PATH}"
)
endif()
# Configure the file
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-env-skeleton.in
${PROJECT_BINARY_DIR}/InstallTreeFiles/${_scriptfullname}
@ONLY
)
else()
# message(STATUS "bat skeleton")
# Set path, which should be where the script itself is installed
# the varible synax differnt
_g4tc_prepend_path(GEANT4_ENV_BINPATH_SETUP
${_shell}
PATH
"geant4_envbindir"
)
## Set library path, based on relative paths between bindir and libdir
#if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
# _g4tc_prepend_path(GEANT4_ENV_LIBPATH_SETUP
# ${_shell}
# LD_LIBRARY_PATH
# "\"`cd $geant4_envbindir/${G4ENV_BINDIR_TO_LIBDIR} > /dev/null ; pwd`\""
# )
# endif()
# Third party lib paths
# - CLHEP, if system
set(GEANT4_TC_CLHEP_LIB_PATH_SETUP "rem no configuration required")
# - XercesC
set(GEANT4_TC_XERCESC_LIB_PATH_SETUP "rem no configuration required")
# - Set data paths
set(GEANT4_ENV_DATASETS )
foreach(_ds ${GEANT4_EXPORTED_DATASETS})
file(TO_NATIVE_PATH ${${_ds}_PATH} _native_path)
_g4tc_setenv_command(_dssetenvcmd ${_shell} ${${_ds}_ENVVAR} ${_native_path})
set(GEANT4_ENV_DATASETS "${GEANT4_ENV_DATASETS}${_dssetenvcmd}\n")
endforeach()
# - Set Font Path
set(GEANT4_ENV_TOOLS_FONT_PATH "rem no configuration required")
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-bat-skeleton.in
${PROJECT_BINARY_DIR}/InstallTreeFiles/${_scriptfullname}
@ONLY
)
endif()
# Configure the file
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-env-skeleton.in
${PROJECT_BINARY_DIR}/InstallTreeFiles/${_scriptfullname}
@ONLY
)
# Install it to the required location
install(FILES
${PROJECT_BINARY_DIR}/InstallTreeFiles/${_scriptfullname}
+40 -43
View File
@@ -104,11 +104,17 @@ endfunction()
#-----------------------------------------------------------------------
# Only create script if we have a global library build...
#
if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
#if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
if(NOT GEANT4_BUILD_GRANULAR_LIBS)
# Get implicit search paths
get_system_include_dirs(_cxx_compiler_dirs)
# Setup variables needed for expansion in configuration file
# - C++ Filesystem, if needed
if(GEANT4_CXX_FILESYSTEM_LIBRARY)
set(G4_LINK_CXX_FILESYSTEM "-l${GEANT4_CXX_FILESYSTEM_LIBRARY}")
endif()
# - Static libs
if(BUILD_STATIC_LIBS)
set(G4_BUILTWITH_STATICLIBS "yes")
@@ -255,20 +261,6 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
set(G4_BUILTWITH_QT "no")
endif()
# - Wt
#if(GEANT4_USE_WT)
# set(G4_BUILTWITH_WT "yes")
# set(G4_WT_INCLUDE_DIRS ${Wt_INCLUDE_DIR} ${Boost_INCLUDE_DIR} )
# set(G4_WT_CFLAGS )
# foreach(_dir ${G4_WT_INCLUDE_DIRS})
# set(G4_WT_CFLAGS "${G4_WT_CFLAGS} -I${_dir}")
# endforeach()
#else()
# set(G4_BUILTWITH_WT "no")
#endif()
# - Motif
if(GEANT4_USE_XM)
set(G4_BUILTWITH_MOTIF "yes")
@@ -337,34 +329,20 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
geant4_export_datasets(BUILD GEANT4_CONFIG_DATASET_DESCRIPTIONS)
# Configure the build tree script
# If we're on CMake 2.8 and above, we try to use file(COPY) to create an
# executable script
# Not sure if version check is o.k., but I'll be shocked if we ever see
# a CMake 2.7 in the wild...
if(${CMAKE_VERSION} VERSION_GREATER 2.7)
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-config.in
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/geant4-config
@ONLY
)
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-config.in
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/geant4-config
@ONLY
)
file(COPY
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/geant4-config
DESTINATION ${PROJECT_BINARY_DIR}
FILE_PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
else()
# Changing permissions is awkward, so just configure and document
# that you have to do 'sh geant4-config' in this case.
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-config.in
${PROJECT_BINARY_DIR}/geant4-config
@ONLY
)
endif()
file(COPY
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/geant4-config
DESTINATION ${PROJECT_BINARY_DIR}
FILE_PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
# - Install Tree
# Much easier :-)
@@ -407,5 +385,24 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
WORLD_READ WORLD_EXECUTE
COMPONENT Development
)
endif()
# Win32 helper file geant4-config.cmd
if(WIN32)
# No configuration just a copy
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-config-cmd.in
${PROJECT_BINARY_DIR}/InstallTreeFiles/geant4-config.cmd
@ONLY
)
# Install helper
install(FILES ${PROJECT_BINARY_DIR}/InstallTreeFiles/geant4-config.cmd
DESTINATION ${CMAKE_INSTALL_BINDIR}
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
COMPONENT Development
)
endif()
endif()
+2 -2
View File
@@ -18,11 +18,11 @@ geant4_add_dataset(
# - Low energy electromagnetics
geant4_add_dataset(
NAME G4EMLOW
VERSION 7.13
VERSION 7.17
FILENAME G4EMLOW
EXTENSION tar.gz
ENVVAR G4LEDATA
MD5SUM 55922521aa331655a0494cdf8f9a70e8
MD5SUM 7cc8360a78fe6d501cdf34a945e71a25
)
# - Photon evaporation
+86 -35
View File
@@ -85,6 +85,7 @@ function(geant4_add_module _name)
"PUBLIC_HEADERS;SOURCES"
${ARGN}
)
__geant4_assert_no_unparsed_arguments(G4ADDMOD geant4_add_module)
# - Check required directory structure at definition point
# Headers always
@@ -151,14 +152,14 @@ function(geant4_module_include_directories _module)
"PUBLIC;PRIVATE;INTERFACE"
${ARGN}
)
__geant4_assert_no_unparsed_arguments(G4MODINCDIR geant4_module_include_directories)
foreach(_dir ${G4MODINCDIR_PUBLIC})
geant4_set_module_property(${_module} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_dir})
geant4_set_module_property(${_module} APPEND PROPERTY INCLUDE_DIRECTORIES ${_dir})
geant4_set_module_property(${_module} APPEND PROPERTY PUBLIC_INCLUDE_DIRECTORIES ${_dir})
endforeach()
foreach(_dir ${G4MODINCDIR_PRIVATE})
geant4_set_module_property(${_module} APPEND PROPERTY INCLUDE_DIRECTORIES ${_dir})
geant4_set_module_property(${_module} APPEND PROPERTY PRIVATE_INCLUDE_DIRECTORIES ${_dir})
endforeach()
foreach(_dir ${G4MODINCDIR_INTERFACE})
@@ -187,13 +188,14 @@ function(geant4_module_link_libraries _module)
"PUBLIC;PRIVATE;INTERFACE"
${ARGN}
)
__geant4_assert_no_unparsed_arguments(G4MODLINKLIB geant4_module_link_libraries)
foreach(_lib ${G4MODLINKLIB_PUBLIC})
geant4_set_module_property(${_module} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${_lib})
geant4_set_module_property(${_module} APPEND PROPERTY LINK_LIBRARIES ${_lib})
geant4_set_module_property(${_module} APPEND PROPERTY PUBLIC_LINK_LIBRARIES ${_lib})
endforeach()
foreach(_lib ${G4MODLINKLIB_PRIVATE})
geant4_set_module_property(${_module} APPEND PROPERTY LINK_LIBRARIES ${_lib})
geant4_set_module_property(${_module} APPEND PROPERTY PRIVATE_LINK_LIBRARIES ${_lib})
endforeach()
foreach(_dir ${G4MODLINKLIB_INTERFACE})
@@ -231,14 +233,14 @@ function(geant4_module_compile_definitions _module)
"PUBLIC;PRIVATE;INTERFACE"
${ARGN}
)
__geant4_assert_no_unparsed_arguments(G4MODCOMPILEDEF geant4_module_compile_definitions)
foreach(_lib ${G4MODCOMPILEDEF_PUBLIC})
geant4_set_module_property(${_module} APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS ${_lib})
geant4_set_module_property(${_module} APPEND PROPERTY COMPILE_DEFINITIONS ${_lib})
geant4_set_module_property(${_module} APPEND PROPERTY PUBLIC_COMPILE_DEFINITIONS ${_lib})
endforeach()
foreach(_lib ${G4MODCOMPILEDEF_PRIVATE})
geant4_set_module_property(${_module} APPEND PROPERTY COMPILE_DEFINITIONS ${_lib})
geant4_set_module_property(${_module} APPEND PROPERTY PRIVATE_COMPILE_DEFINITIONS ${_lib})
endforeach()
foreach(_dir ${G4MODCOMPILEDEF_INTERFACE})
@@ -297,12 +299,15 @@ endfunction()
# * ``PUBLIC_HEADERS``
# * ``PRIVATE_HEADERS``
# * ``SOURCES``
# * ``PRIVATE_COMPILE_DEFINITIONS``
# * ``PUBLIC_COMPILE_DEFINITIONS``
# * ``INTERFACE_COMPILE_DEFINITIONS``
# * ``COMPILE_DEFINITIONS``
# * ``PRIVATE_INCLUDE_DIRECTORIES``
# * ``PUBLIC_INCLUDE_DIRECTORIES``
# * ``INTERFACE_INCLUDE_DIRECTORIES``
# * ``INCLUDE_DIRECTORIES``
# * ``PRIVATE_LINK_LIBRARIES``
# * ``PUBLIC_LINK_LIBRARIES``
# * ``INTERFACE_LINK_LIBRARIES``
# * ``LINK_LIBRARIES``
# * ``PARENT_TARGET``
# * ``CMAKE_LIST_FILE``
# * ``GLOBAL_DEPENDENCIES``
@@ -352,14 +357,15 @@ endfunction()
# emitted.
#
function(geant4_set_module_property _module)
__geant4_module_assert_exists(${_module})
cmake_parse_arguments(G4SMP
"APPEND;APPEND_STRING"
""
"PROPERTY"
${ARGN}
)
# module must exist!
__geant4_module_assert_exists(${_module})
__geant4_assert_no_unparsed_arguments(G4SMP geant4_set_module_property)
# Append/Append_string are mutually exclusive
if(G4SMP_APPEND AND G4SMP_APPEND_STRING)
@@ -490,6 +496,19 @@ function(geant4_compose_targets)
endif()
endforeach()
# - For each module, write out files for
# 1. module -> used modules adjacency list for detecting module-module cycles
file(WRITE "${PROJECT_BINARY_DIR}/G4ModuleAdjacencyList.txt" "# Geant4 Module - Module Adjacencies\n")
foreach(__module ${__g4definedmodules})
# Adjacency list - take all dependencies
geant4_get_module_property(__publicdeps ${__module} PUBLIC_LINK_LIBRARIES)
geant4_get_module_property(__privatedeps ${__module} PRIVATE_LINK_LIBRARIES)
geant4_get_module_property(__interfacedeps ${__module} INTERFACE_LINK_LIBRARIES)
set(__alldeps_l ${__publicdeps} ${__privatedeps} ${__interfacedeps})
list(JOIN __alldeps_l " " __alldeps)
file(APPEND "${PROJECT_BINARY_DIR}/G4ModuleAdjacencyList.txt" "${__module} ${__alldeps}\n")
endforeach()
# Process all defined libraries, except for G4{clhep,expat,ptl}{-static}
# These are corner cases because its call to add_library happens
# at a different (lower) directory level than all the other targets
@@ -563,6 +582,7 @@ function(geant4_define_module)
"HEADERS;SOURCES;GRANULAR_DEPENDENCIES;GLOBAL_DEPENDENCIES;LINK_LIBRARIES;HEADERS_EXCLUDE_FORMAT;SOURCES_EXCLUDE_FORMAT"
${ARGN}
)
__geant4_assert_no_unparsed_arguments(G4DEFMOD geant4_define_module)
# HEADERS -> PUBLIC_HEADERS
# SOURCES -> SOURCES
# Don't support clang-formatting yet.
@@ -613,6 +633,7 @@ function(geant4_global_library_target)
"COMPONENTS"
${ARGN}
)
__geant4_assert_no_unparsed_arguments(G4GLOBLIB geant4_global_library_target)
# Because components are sources.cmake files, must know currently defined modules
# so we can pick up the newly defined ones
@@ -671,6 +692,8 @@ function(geant4_library_target)
"SOURCES;GEANT4_LINK_LIBRARIES;LINK_LIBRARIES"
${ARGN}
)
__geant4_assert_no_unparsed_arguments(G4GLOBLIB geant4_library_target)
# Currently a hack to get G4clhep to build, so an error if used elsewhere
if(NOT (${G4GLOBLIB_NAME} MATCHES "G4clhep|G4expat"))
message(FATAL_ERROR "geant4_library_target called for '${G4GLOBLIB_NAME}' in '${CMAKE_CURRENT_LIST_DIR}'")
@@ -740,6 +763,7 @@ macro(geant4_add_compile_definitions)
"SOURCES;COMPILE_DEFINITIONS"
${ARGN}
)
__geant4_assert_no_unparsed_arguments(G4ADDDEF geant4_add_compile_definitions)
# We assume that the sources have been added at the level of a
# a sources.cmake, so are inside the src subdir of the sources.cmake
@@ -776,6 +800,29 @@ endmacro()
# module and library functions. They should never be used directly
# in developer-level scripts.
#-----------------------------------------------------------------------
#.rst:
# .. cmake:command:: __geant4_assert_no_unparsed_arguments
#
# .. code-block:: cmake
#
# __geant4_assert_no_unparsed_arguments(<prefix> <function>)
#
# Emit a ``FATAL_ERROR`` if ``<prefix>_UNPARSED_ARGUMENTS`` is non-empty
# in ``<function>``
#
# This is a macro intended for use in G4DeveloperAPI functions that cannot
# have unparsed arguments to validate their input.
#
# From CMake 3.17, the ``<function>`` argument is no longer required and
# ``CMAKE_CURRENT_FUNCTION`` can be used
#
macro(__geant4_assert_no_unparsed_arguments _prefix _function)
if(${_prefix}_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "${_function} called with unparsed arguments: '${${_prefix}_UNPARSED_ARGUMENTS}'")
endif()
endmacro()
#-----------------------------------------------------------------------
#.rst:
# .. cmake:command:: __geant4_module_assert_exists
@@ -829,7 +876,7 @@ endmacro()
# This is used internally by the property get/set functions.
#
function(__geant4_module_validate_property _property)
if(NOT (${_property} MATCHES "PUBLIC_HEADERS|PRIVATE_HEADERS|SOURCES|INTERFACE_COMPILE_DEFINITIONS|COMPILE_DEFINITIONS|INTERFACE_INCLUDE_DIRECTORIES|INCLUDE_DIRECTORIES|INTERFACE_LINK_LIBRARIES|LINK_LIBRARIES|PARENT_TARGET|CMAKE_LIST_FILE|GLOBAL_DEPENDENCIES"))
if(NOT (${_property} MATCHES "PUBLIC_HEADERS|PRIVATE_HEADERS|SOURCES|PRIVATE_COMPILE_DEFINITIONS|PUBLIC_COMPILE_DEFINITIONS|INTERFACE_COMPILE_DEFINITIONS|PRIVATE_INCLUDE_DIRECTORIES|PUBLIC_INCLUDE_DIRECTORIES|INTERFACE_INCLUDE_DIRECTORIES|PRIVATE_LINK_LIBRARIES|PUBLIC_LINK_LIBRARIES|INTERFACE_LINK_LIBRARIES|PARENT_TARGET|CMAKE_LIST_FILE|GLOBAL_DEPENDENCIES"))
message(FATAL_ERROR "Undefined property '${_property}'")
endif()
endfunction()
@@ -918,16 +965,16 @@ function(__geant4_add_library _name _type)
target_sources(${_target_name} PRIVATE ${_headers} ${_srcs} ${_cmakescript})
# - Process usage properties
# Include dirs and compile definitions can be handled together
# Include dirs, compile definitions and libraries can be handled together
# Important to note that these promote PUBLIC/PRIVATE/INTERFACE
# from module level to library level. I.e. other modules in the
# library can see each other's PRIVATE include paths/compile defs.
# The only known way to fully wall things off is OBJECT libs,
# but then run into issues mentioned at start - linking and
# use in IDEs.
# use in IDEs (though newer CMake versions should resolve these)
# This "promotion" is probably correct though - interfaces are
# at physical library level rather than module, and in Geant4
# all files must have globally unique names (no nested hedaers
# all files must have globally unique names (no nested headers
# nor namespaces). Also, DLL export symbols may need this
# behaviour (esp. ALLOC_EXPORT).
# Only really an issue if header names/definitions aren't
@@ -937,15 +984,17 @@ function(__geant4_add_library _name _type)
# "Module" level really means "Source file" level, so same
# sets of rules should apply (i.e. can't specify inc dirs
# at source level).
foreach(_prop IN ITEMS INCLUDE_DIRECTORIES INTERFACE_INCLUDE_DIRECTORIES COMPILE_DEFINITIONS INTERFACE_COMPILE_DEFINITIONS)
geant4_get_module_property(_value ${__g4mod} ${_prop})
set_property(TARGET ${_target_name} APPEND PROPERTY ${_prop} ${_value})
endforeach()
foreach(_prop IN ITEMS PRIVATE PUBLIC INTERFACE)
geant4_get_module_property(_incdirs ${__g4mod} ${_prop}_INCLUDE_DIRECTORIES)
target_include_directories(${_target_name} ${_prop} ${_incdirs})
# Link libraries
foreach(_link_prop IN ITEMS LINK_LIBRARIES INTERFACE_LINK_LIBRARIES)
geant4_get_module_property(_linklibs ${__g4mod} ${_link_prop})
geant4_get_module_property(_defs ${__g4mod} ${_prop}_COMPILE_DEFINITIONS)
target_compile_definitions(${_target_name} ${_prop} ${_defs})
# Target linking requires additional processing to resolve
geant4_get_module_property(_linklibs ${__g4mod} ${_prop}_LINK_LIBRARIES)
geant4_resolve_link_libraries(_linklibs)
# Remove self-linking
if(_linklibs)
list(REMOVE_ITEM _linklibs ${_name})
@@ -966,17 +1015,17 @@ function(__geant4_add_library _name _type)
set(_linklibs ${_g4linklibs})
endif()
set_property(TARGET ${_target_name} APPEND PROPERTY ${_link_prop} ${_linklibs})
# Temp workaround for modules needing Qt. We use AUTOMOC, but can't yet set
# it on a per module basis. However, only have three modules that require
# moc-ing, so hard code for now.
# TODO: likely need an additional "module target properties" to hold things
# that can be passed to set_target_properties
if(__g4mod MATCHES "G4UIbasic|G4OpenGL|G4OpenInventor" AND GEANT4_USE_QT)
set_target_properties(${_target_name} PROPERTIES AUTOMOC ON)
endif()
target_link_libraries(${_target_name} ${_prop} ${_linklibs})
endforeach()
# Temp workaround for modules needing Qt. We use AUTOMOC, but can't yet set
# it on a per module basis. However, only have three modules that require
# moc-ing, so hard code for now.
# TODO: likely need an additional "module target properties" to hold things
# that can be passed to set_target_properties
if(__g4mod MATCHES "G4UIbasic|G4OpenGL|G4OpenInventor" AND GEANT4_USE_QT)
set_target_properties(${_target_name} PROPERTIES AUTOMOC ON)
endif()
endforeach()
# - Use stored total list of sources to create format target for one mode only
@@ -985,6 +1034,8 @@ function(__geant4_add_library _name _type)
endif()
# - Postprocess target properties to remove duplicates
# NB: This makes the assumption that there is no order dependence here (and any is considered a bug!)
# CMake will handle static link ordering internally
foreach(_link_prop IN ITEMS LINK_LIBRARIES INTERFACE_LINK_LIBRARIES INCLUDE_DIRECTORIES INTERFACE_INCLUDE_DIRECTORIES COMPILE_DEFINITIONS INTERFACE_COMPILE_DEFINITIONS)
get_target_property(__g4lib_link_libs ${_target_name} ${_link_prop})
if(__g4lib_link_libs)
+18 -6
View File
@@ -12,7 +12,6 @@
# UI category : Built on supported platforms when Third Party
# library(libraries) available
# G4UIQt : UNIX, WIN32 (Requires : Qt5)
# G4UIWt : Web (Requires : Wt) DEPRECATED
# G4UIXm : UNIX
#
# Vis Category: Always built on supported platforms
@@ -95,12 +94,30 @@ if(UNIX)
# RayTracer driver with X11 support
option(GEANT4_USE_RAYTRACER_X11 "Build RayTracer driver with X11 support" OFF)
geant4_add_feature(GEANT4_USE_RAYTRACER_X11 "Build RayTracer driver with X11 support")
# ToolsSG X11/GLES driver
option(GEANT4_USE_TOOLSSG_X11_GLES "Build Geant4 ToolsSG driver with X11/GLES support" OFF)
geant4_add_feature(GEANT4_USE_TOOLSSG_X11_GLES "Build Geant4 ToolsSG driver with X11/GLES support")
# ToolsSG Xt/GLES driver
option(GEANT4_USE_TOOLSSG_XT_GLES "Build Geant4 ToolsSG driver with Xt/GLES support" OFF)
geant4_add_feature(GEANT4_USE_TOOLSSG_XT_GLES "Build Geant4 ToolsSG driver with Xt/GLES support")
# ToolsSG Qt/GLES driver
option(GEANT4_USE_TOOLSSG_QT_GLES "Build Geant4 ToolsSG driver with Qt/GLES support" OFF)
geant4_add_feature(GEANT4_USE_TOOLSSG_QT_GLES "Build Geant4 ToolsSG driver with Qt/GLES support")
endif()
# Windows only
if(WIN32)
option(GEANT4_USE_OPENGL_WIN32 "Build OpenGL driver with Win32 support")
geant4_add_feature(GEANT4_USE_OPENGL_WIN32 "Build OpenGL driver with Win32 support")
# ToolsSG Windows/GLES driver
option(GEANT4_USE_TOOLSSG_WINDOWS_GLES "Build Geant4 ToolsSG driver with Windows/GLES support" OFF)
geant4_add_feature(GEANT4_USE_TOOLSSG_WINDOWS_GLES "Build Geant4 ToolsSG driver with Windows/GLES support")
endif()
#-----------------------------------------------------------------------
@@ -132,11 +149,6 @@ endif()
# - Qt5
if(GEANT4_USE_QT)
# Must have CMake > 3.8 to support automoc (Bugzilla 2303)
if(CMAKE_VERSION VERSION_LESS 3.9)
message(FATAL_ERROR "GEANT4_USE_QT requires CMake 3.9 or newer to support automatic MOC for UI/Vis libraries")
endif()
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED)
-5
View File
@@ -46,11 +46,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} -Qunused-arguments -DGL_SILENCE_DEPRECATION")
endif()
# Though it should be the default, always use libc++ with AppleClang
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} -stdlib=libc++")
endif()
# Extra Geant4 modes
# - Debug_FPE: Core Debug mode plus FPE)
set(CMAKE_CXX_FLAGS_DEBUG_FPE_INIT "${CMAKE_CXX_FLAGS_DEBUG_INIT} -DG4FPE_DEBUG")
+8 -8
View File
@@ -16,7 +16,7 @@
# G3TOG4 - UNIX only
# USOLIDS - Allow use of VecGeom classes in geometry, and must find
# external VecGeom install
# FREETYPE - For analysis module, find external FreeType install
# FREETYPE - For analysis/vis modules, find external FreeType install
#-----------------------------------------------------------------------
# CLHEP
@@ -175,12 +175,11 @@ geant4_add_feature(GEANT4_USE_TBB "Enable (optional) use of TBB as a tasking bac
# Rely on PTL::PTL imported target (since CMake 3.1)
option(GEANT4_USE_SYSTEM_PTL "Use system zlib library" OFF)
if(GEANT4_USE_SYSTEM_PTL)
find_package(PTL REQUIRED)
find_package(PTL 2.0.0 REQUIRED)
# Backward compatibility for sources.cmake using the variable
set(PTL_LIBRARIES PTL::ptl)
geant4_save_package_variables(PTL PTL_DIR)
else()
set(PTL_USE_TBB ${GEANT4_USE_TBB})
set(PTL_FOUND TRUE)
set(GEANT4_USE_BUILTIN_PTL TRUE)
set(PTL_LIBRARIES G4ptl)
@@ -188,6 +187,10 @@ endif()
mark_as_advanced(GEANT4_USE_SYSTEM_PTL)
geant4_add_feature(GEANT4_USE_SYSTEM_PTL "Using system PTL library")
# Internal PTL offers adding locks in task queues to help debugging
cmake_dependent_option(GEANT4_USE_PTL_LOCKS "Enable mutex locking in PTL task subqueues" OFF "NOT GEANT4_USE_SYSTEM_PTL" OFF)
mark_as_advanced(GEANT4_USE_PTL_LOCKS)
#-----------------------------------------------------------------------
# Optional Support for GDML - requires Xerces-C package
# Relies on XercesC::XercesC imported target (since CMake 3.5)
@@ -363,14 +366,11 @@ endif()
#-----------------------------------------------------------------------
# Optional support for Freetype - Requires external Freetype install
#
option(GEANT4_USE_FREETYPE "Build Geant4 analysis library with Freetype support" OFF)
option(GEANT4_USE_FREETYPE "Build Geant4 Analysis/Visualization with Freetype support" OFF)
mark_as_advanced(GEANT4_USE_FREETYPE)
if(GEANT4_USE_FREETYPE)
find_package(Freetype REQUIRED)
# Shim only needed until we require CMake >= 3.10
include("${CMAKE_CURRENT_LIST_DIR}/G4FreetypeShim.cmake")
geant4_save_package_variables(Freetype
FREETYPE_INCLUDE_DIR_freetype2
FREETYPE_INCLUDE_DIR_ft2build
@@ -378,7 +378,7 @@ if(GEANT4_USE_FREETYPE)
FREETYPE_LIBRARY_RELEASE)
endif()
geant4_add_feature(GEANT4_USE_FREETYPE "Building Geant4 analysis library with Freetype support")
geant4_add_feature(GEANT4_USE_FREETYPE "Building Geant4 Analysis/Visualization with Freetype support")
#-----------------------------------------------------------------------
# Optional support for HDF5
+15
View File
@@ -0,0 +1,15 @@
// Check that trivial use of <filesystem> works
// - https://en.cppreference.com/w/cpp/filesystem
#include <iostream>
#if __has_include( <filesystem>)
# include <filesystem>
namespace fs = std::filesystem;
#elif __has_include( <experimental/filesystem>)
# include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#endif
int main( int argc, char* argv[] ) {
fs::path p{ argv[0] };
std::cout << p << ", " << fs::canonical( p ) << std::endl;
}
@@ -0,0 +1,96 @@
#!/usr/bin/env python3
"""Check Geant4's module dependency graph for cycles
Geant4 organises source code into "Modules", with each Module being a
directory containing headers and sources in `include/` and `src/`
subdirectories respectively. One or more Modules are grouped/compiled
into the actual libraries.
CMake will raise errors if there are circular dependencies between
shared libraries (cycles are allowed between static libraries). However,
CMake cannot detect cycles between Modules directly, are these are a
Geant4 construct. Whilst cycles between modules that get added to the
same library are technically o.k., they still indicate either:
- A bad design/organisation of code
- A mistake in the declared dependencies for a module(s)
To help developers and CI pick module cycles, Geant4's CMake scripts
write out the declared module dependencies in a text file as an Adjacency
List graph. This comprises one line per module, with the first column
being the module name, and any remaining columns being the modules the
first one "depends on", i.e. uses code from.
This program reads that file and uses Python's graphlib module to try
topologically sorting this graph. Failure to sort indicates a cycle, and
this will be printed to stdout and a non-zero return code emitted on exit.
"""
import argparse
import graphlib
import sys
if __name__ == "__main__":
# Parse command line to get file to load
parser = argparse.ArgumentParser(
description=str(__doc__), formatter_class=argparse.RawDescriptionHelpFormatter
)
parser.add_argument(
"-f",
"--file",
required=True,
metavar="FILE",
help="file to read adjacency list from",
)
parser.add_argument(
"-v",
"--verbose",
action="store_true",
help="print topologically sorted list of modules",
)
args = parser.parse_args()
try:
# 1. Try and construct graph from input adjancey list file
adjList = {}
with open(args.file) as f:
for line in f:
if not line.strip().startswith("#"):
nodes = line.rstrip("\n").split(" ")
adjList[nodes[0]] = nodes[1:]
if not adjList:
print(f"warning: graph read from '{args.file}' is empty")
# NB also possible with networkx, but requires pip install:
# G = nx.read_adjlist(args.file, create_using=nx.DiGraph)
# cycles = nx.find_cycle(G, orientation='original')
# Topo sort throws cycle error if one occurs during prepare
ts = graphlib.TopologicalSorter(adjList)
ts.prepare()
# Verbose print of nodes in topological order
# NB: This uses the full graphlib interface in case we want to
# print out nodes grouped by level in the graph.
if args.verbose:
while ts.is_active():
nodes = ts.get_ready()
for n in nodes:
print(n)
ts.done(*nodes)
print(f"pass: No cycles detected in graph defined in '{args.file}'")
except OSError as err:
print(f"OS error: {err}")
sys.exit(1)
except graphlib.CycleError as err:
print(
f"error: cycles detected in input graph from '{args.file}':",
file=sys.stderr,
)
cycle = " <- ".join(err.args[1])
print(f"cycle: {cycle}", file=sys.stderr)
sys.exit(1)
+99 -8
View File
@@ -89,6 +89,11 @@
# vis_raytracer_x11 (RayTracer visualization with X11 interface)
# vis_openinventor (OpenInventor visualization)
#
# vis_toolssg_x11_gles (ToolsSG visualization with X11 windowing and GLES rendering)
# vis_toolssg_xt_gles (ToolsSG visualization with Xt windowing and GLES rendering)
# vis_toolssg_qt_gles (ToolsSG visualization with Qt windowing and GLES rendering)
# vis_toolssg_windows_gles (ToolsSG visualization with Windows windowing and GLES rendering)
#
# In addition, two 'shorthand' components are defined to help activate all
# available User Interface and Visualization drivers:
#
@@ -164,15 +169,19 @@ endif()
#-----------------------------------------------------------------------
# Check that consumers use the minimum needed CMake version
# Geant4 uses cxx_std_EP to define the standard it was built against
# 3.8 and above support EP=11,14,17. 3.12 and above add 20. We continue
# to support the earlier version whilst checking for consumers using 20
# 3.8 and above support EP=17. 3.12 and above add 20. 3.20 and above add 23.
# We continue to support the earlier version whilst checking for consumers using 20
cmake_policy(VERSION 3.8...3.18)
if(CMAKE_VERSION VERSION_LESS 3.8)
message(FATAL_ERROR "Projects consuming Geant4Config require CMake 3.8 or newer")
endif()
if(("@GEANT4_BUILD_CXXSTD@" GREATER_EQUAL 20) AND (CMAKE_VERSION VERSION_LESS 3.12))
message(FATAL_ERROR "Projects consuming Geant4Config require CMake 3.12 or newer")
if(("@CMAKE_CXX_STANDARD@" GREATER_EQUAL 23) AND (CMAKE_VERSION VERSION_LESS 3.20))
message(FATAL_ERROR "Projects consuming Geant4Config require CMake 3.20 or newer (for C++23 support)")
endif()
if(("@CMAKE_CXX_STANDARD@" GREATER_EQUAL 20) AND (CMAKE_VERSION VERSION_LESS 3.12))
message(FATAL_ERROR "Projects consuming Geant4Config require CMake 3.12 or newer (for C++20 support)")
endif()
# - Help find dependencies
@@ -191,7 +200,7 @@ get_filename_component(_geant4_thisdir "${CMAKE_CURRENT_LIST_FILE}" PATH)
@GEANT4_COMPILER_FLAG_HINTS@
# - Provide variable indicating C++ Standard we were compiled against
set(Geant4_CXXSTD "c++@GEANT4_BUILD_CXXSTD@")
set(Geant4_CXX_STANDARD "@CMAKE_CXX_STANDARD@")
#-----------------------------------------------------------------------
# Set the base compile definitions required to use Geant4 if the variable
@@ -456,14 +465,17 @@ if(Geant4_qt_FOUND)
# Qt must be activated both directly and for OpenInventor
if(("qt" IN_LIST Geant4_FIND_COMPONENTS)
OR ("vis_openinventor" IN_LIST Geant4_FIND_COMPONENTS)
OR ("vis_toolssg_qt_gles" IN_LIST Geant4_FIND_COMPONENTS)
OR Geant4_ui_all_FOUND OR Geant4_vis_all_FOUND)
list(APPEND
Geant4_DEFINITIONS
-DG4INTY_USE_QT
-DG4UI_USE_QT
-DG4VIS_USE_OPENGLQT
#-DG4VIS_USE_TOOLSSG_QT_GLES
)
set(_geant4_use_opengl_library ON)
#set(_geant4_use_toolssg_library ON)
# Qt3D is always on if available
set(_geant4_use_qt3D_library ${Geant4_qt3d_FOUND})
endif()
@@ -485,6 +497,7 @@ if(Geant4_motif_FOUND)
# Motif can be activated both directly and for OpenInventor
if(("motif" IN_LIST Geant4_FIND_COMPONENTS)
OR ("vis_openinventor" IN_LIST Geant4_FIND_COMPONENTS)
OR ("vis_toolssg_xt_gles" IN_LIST Geant4_FIND_COMPONENTS)
OR Geant4_ui_all_FOUND OR Geant4_vis_all_FOUND)
list(APPEND
Geant4_DEFINITIONS
@@ -566,6 +579,72 @@ if(Geant4_vis_openinventor_FOUND)
endif()
endif()
# - ToolsSG X11/GLES
set(Geant4_vis_toolssg_x11_gles_FOUND @GEANT4_USE_TOOLSSG_X11_GLES@)
if(Geant4_vis_toolssg_x11_gles_FOUND)
find_dependency(X11)
include("${CMAKE_CURRENT_LIST_DIR}/G4X11Shim.cmake")
if(APPLE)
find_dependency(XQuartzGL)
else()
find_dependency(OpenGL)
endif()
if(("vis_toolssg_x11_gles" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
list(APPEND
Geant4_DEFINITIONS
-DG4VIS_USE_TOOLSSG_X11_GLES
)
set(_geant4_use_toolssg_library ON)
endif()
endif()
# - ToolsSG Windows/GLES
set(Geant4_vis_toolssg_windows_gles_FOUND @GEANT4_USE_TOOLSSG_WINDOWS_GLES@)
if(Geant4_vis_toolssg_windows_gles_FOUND)
find_dependency(OpenGL)
if(("vis_toolssg_windows_gles" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
list(APPEND
Geant4_DEFINITIONS
-DG4VIS_USE_TOOLSSG_WINDOWS_GLES
)
set(_geant4_use_toolssg_library ON)
endif()
endif()
# - ToolsSG Xt/GLES
set(Geant4_vis_toolssg_xt_gles_FOUND @GEANT4_USE_TOOLSSG_XT_GLES@)
if(Geant4_vis_toolssg_xt_gles_FOUND)
find_dependency(X11)
include("${CMAKE_CURRENT_LIST_DIR}/G4X11Shim.cmake")
if(APPLE)
find_dependency(XQuartzGL)
else()
find_dependency(OpenGL)
endif()
if(("vis_toolssg_xt_gles" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
list(APPEND
Geant4_DEFINITIONS
-DG4VIS_USE_TOOLSSG_XT_GLES
)
set(_geant4_use_toolssg_library ON)
endif()
endif()
# - ToolsSG Qt/GLES
set(Geant4_vis_toolssg_qt_gles_FOUND @GEANT4_USE_TOOLSSG_QT_GLES@)
if(Geant4_vis_toolssg_qt_gles_FOUND)
find_dependency(OpenGL)
if(("vis_toolssg_qt_gles" IN_LIST Geant4_FIND_COMPONENTS) OR Geant4_vis_all_FOUND)
list(APPEND
Geant4_DEFINITIONS
-DG4VIS_USE_TOOLSSG_QT_GLES
)
set(_geant4_use_toolssg_library ON)
endif()
endif()
# Reset any OpenGL Preference
set(OpenGL_GL_PREFERENCE "${OpenGL_GL_PREFERENCE_SAVE}")
@@ -641,6 +720,14 @@ if(_geant4_use_inventor_library)
)
endif()
# - G4ToolsSG if it's requested.
if(_geant4_use_toolssg_library)
list(APPEND _geant4_internal_libraries
Geant4::G4ToolsSG${_geant4_lib_use_suffix}
)
list(APPEND Geant4_DEFINITIONS -DG4VIS_USE_TOOLSSG)
endif()
# - G3toG4 if it's requested
if(_geant4_use_g3tog4_library)
set(_geant4_g3tog4_library Geant4::G3toG4${_geant4_lib_use_suffix})
@@ -708,6 +795,7 @@ list(APPEND _geant4_internal_libraries
Geant4::G4graphics_reps${_geant4_lib_use_suffix}
Geant4::G4intercoms${_geant4_lib_use_suffix}
Geant4::G4global${_geant4_lib_use_suffix}
Geant4::G4tools${_geant4_lib_use_suffix}
)
# - Any externals built by Geant4
@@ -759,7 +847,7 @@ set(Geant4_USE_FILE "${_geant4_thisdir}/UseGeant4.cmake")
list(REMOVE_AT CMAKE_MODULE_PATH 0)
#-----------------------------------------------------------------------
# Finally, check FOUNDness of required components.
# Check FOUNDness of required components.
foreach(_comp ${Geant4_FIND_COMPONENTS})
if(NOT Geant4_${_comp}_FOUND)
if(Geant4_FIND_REQUIRED_${_comp})
@@ -769,5 +857,8 @@ foreach(_comp ${Geant4_FIND_COMPONENTS})
endif()
endforeach()
# And we should be done...
#-----------------------------------------------------------------------
# Reporting via FindPackageHandleStandardArgs "CONFIG_MODE" to give a better message on being found
include(FindPackageHandleStandardArgs)
set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG "${CMAKE_CURRENT_LIST_FILE}")
find_package_handle_standard_args(@PROJECT_NAME@ CONFIG_MODE)
+44
View File
@@ -0,0 +1,44 @@
@echo off
rem -----------------------------------------------------------------------
rem @GEANT4_TC_SHELL_FAMILY@ environment setup script for Geant4 @Geant4_VERSION@
rem
rem This script will configure your environment so that any Geant4 supplied
rem tools, libraries and data are available in your PATH, library paths etc.
rem Data libraries will only be setup if they were installed as part of the
rem Geant4 installation.
rem
rem Source this script to perform the setup.
rem
rem This script is autogenerated by CMake DO NOT EDIT
rem
rem -----------------------------------------------------------------------
rem Locate directory of self
rem
@GEANT4_ENV_SELFLOCATE_COMMAND@
@GEANT4_TC_IF_SELFLOCATED@
rem -----------------------------------------------------------------------
rem Setup Geant4 binary and library paths...
rem
@GEANT4_ENV_BINPATH_SETUP@
@GEANT4_ENV_LIBPATH_SETUP@
rem -----------------------------------------------------------------------
rem Setup Third-party binary and library paths...
rem - CLHEP
@GEANT4_TC_CLHEP_LIB_PATH_SETUP@
rem - XercesC
@GEANT4_TC_XERCESC_LIB_PATH_SETUP@
rem -----------------------------------------------------------------------
rem Resource file paths
rem - Datasets
@GEANT4_ENV_DATASETS@
rem - Fonts for Freetype
@GEANT4_ENV_TOOLS_FONT_PATH@
rem ----------------------------------------------------------------------
@GEANT4_TC_ENDIF_SELFLOCATED@
+8
View File
@@ -0,0 +1,8 @@
@echo off
rem
rem Self locate script when sourced
setlocal
for /F %%i in ("%~dp0.") do set BINDIR=%%~fi
pushd %BINDIR%
sh geant4-config %*
popd
+5 -18
View File
@@ -76,7 +76,7 @@ cflags="@CMAKE_CXX_FLAGS@ @GEANT4_CXXSTD_FLAGS@"
feature_list=""
# - CXX Standard
geant4_cxx_std="c++@GEANT4_BUILD_CXXSTD@"
geant4_cxx_std="@CMAKE_CXX_STANDARD@"
# - static libs
have_staticlibs="@G4_BUILTWITH_STATICLIBS@"
@@ -129,7 +129,9 @@ libs="-lG4interfaces \
-lG4materials \
-lG4graphics_reps \
-lG4intercoms \
-lG4global"
-lG4global \
-lG4tools \
@G4_LINK_CXX_FILESYSTEM@"
#-----------------------------------------------------------------------
# - Extra optional features that were enabled.
@@ -204,7 +206,7 @@ if test "x${have_qt}" = "xyes" ; then
vis_cflags="${vis_cflags} \
-DG4INTY_USE_QT -DG4UI_USE_QT -DG4VIS_USE_OPENGLQT @G4_QT_CFLAGS@"
if test "x${qt_version}" \< "5.15.0" ; then
if test "x${qt_version}" \< "5.15.0" ; then
vis_libs="-lG4visQt3D ${vis_libs}"
libs="-lG4visQt3D ${libs}"
vis_cflags="${vis_cflags} -DG4UI_USE_QT3D"
@@ -324,33 +326,18 @@ install_datasets()
exit 1
fi
if test ! -x "${G4CURL}" ; then
echo "- error: curl '${G4CURL}' is not executable"
exit 1
fi
G4OPENSSL=$(which openssl)
if test "x${G4OPENSSL}" = "x" ; then
echo "- error: no openssl executable found"
exit 1
fi
if test ! -x "${G4OPENSSL}" ; then
echo "- error: openssl '${G4OPENSSL}' is not executable"
exit 1
fi
G4TAR=$(which tar)
if test "x${G4TAR}" = "x" ; then
echo "- error: no tar executable found"
exit 1
fi
if test ! -x "${G4TAR}" ; then
echo "- error: tar '${G4TAR}' is not executable"
exit 1
fi
datasets_to_install=''
for ds in ${dataset_list} ; do
dataset_path=$(echo $ds | cut -d "|" -f3)
@@ -33,13 +33,6 @@ set(GEANT4_FALSEPOSITIVE_SOURCES
# - Xaw is deprecated...
G4UIXaw.hh
G4UIXaw.cc
# - OpenGL Wt not yet supported....
G4OpenGLImmediateWt.hh
G4OpenGLImmediateWtViewer.hh
G4OpenGLWtViewer.hh
G4OpenGLImmediateWt.cc
G4OpenGLImmediateWtViewer.cc
G4OpenGLWtViewer.cc
# - VRML has icc files in the src/ directory. These are only used
# internally but validate_sources assumes icc files will be in
# include/
+18 -3
View File
@@ -15,10 +15,25 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
12th March 2021 Gabriele Cosmo (config-V10-06-09)
- Fixed name of internal PTL module library for DLL build.
1st June 2021 Gabriele Cosmo (config-V10-07-05)
- Moved default to c++17 Standard.
11th December 2020 Gabriele Cosmo (config-V10-06-08)
15th April 2021 Gabriele Cosmo (config-V10-07-04)
- binmake.gmk: removed include paths to "hadronic/models/management" and
"hadronic/models/util" modules, now retired.
17th March 2021 Gabriele Cosmo (config-V10-07-03)
- binmake.gmk: removed include path to "rpg" hadronic model, now retired.
12th March 2021 Gabriele Cosmo (config-V10-07-02)
- Added comctl32.lib to UI32LIBS for WIN32-VC configuration and fixed name
of internal PTL module library for DLL build.
18th December 2020 Ben Morgan (config-V10-07-01)
- Update compiler/link flags for migration of g4tools to externals
category.
11th December 2020 Gabriele Cosmo (config-V10-07-00)
- Updated Qt5 settings in Linux targets.
22nd October 2020 Gabriele Cosmo (config-V10-06-07)
+10 -11
View File
@@ -37,14 +37,14 @@ ifndef SHAREDLIBS
endif
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/G4global.$(SHEXT) && echo yes)
endif
endif
ifndef INCFLAGS
ifeq ($(G4INCLUDE_EXEC),1)
INCFLAGS := -I$(G4INCLUDE)
else
INCFLAGS := \
-I$(G4BASE)/analysis/g4tools/include \
-I$(G4BASE)/externals/g4tools/include \
-I$(G4BASE)/analysis/management/include \
-I$(G4BASE)/analysis/hntools/include \
-I$(G4BASE)/analysis/csv/include \
@@ -132,7 +132,6 @@ ifndef INCFLAGS
-I$(G4BASE)/processes/hadronic/models/inclxx/incl_physics/include \
-I$(G4BASE)/processes/hadronic/models/lend/include \
-I$(G4BASE)/processes/hadronic/models/lepto_nuclear/include \
-I$(G4BASE)/processes/hadronic/models/management/include \
-I$(G4BASE)/processes/hadronic/models/particle_hp/include \
-I$(G4BASE)/processes/hadronic/models/parton_string/diffraction/include \
-I$(G4BASE)/processes/hadronic/models/parton_string/hadronization/include \
@@ -142,9 +141,7 @@ ifndef INCFLAGS
-I$(G4BASE)/processes/hadronic/models/qmd/include \
-I$(G4BASE)/processes/hadronic/models/quasi_elastic/include \
-I$(G4BASE)/processes/hadronic/models/radioactive_decay/include \
-I$(G4BASE)/processes/hadronic/models/rpg/include \
-I$(G4BASE)/processes/hadronic/models/theo_high_energy/include \
-I$(G4BASE)/processes/hadronic/models/util/include \
-I$(G4BASE)/processes/hadronic/processes/include \
-I$(G4BASE)/processes/hadronic/stopping/include \
-I$(G4BASE)/processes/hadronic/util/include \
@@ -191,7 +188,7 @@ ifdef G4EXLIB
LDFLAGS += -L$(G4TMPDIR)
ifdef SHAREDLIBS
ifdef G4RUNPATHOPTION
# For the example dependent directory, keep the
# For the example dependent directory, keep the
# path to the shared lib in the executable.
LDFLAGS += $(G4RUNPATHOPTION)$(G4TMPDIR)
LDFLAGS += $(G4RUNPATHOPTION)$(G4LIB)/$(G4SYSTEM)
@@ -219,7 +216,7 @@ ifdef G4EXLIB
TARGETLIB := -l$(G4TARGET)
else
# Windows
TARGETLIB := lib$(G4TARGET).a
TARGETLIB := lib$(G4TARGET).a
endif
endif
@@ -267,6 +264,8 @@ ifdef GLOBALLIBS
LDLIBS2 += -lG4expat
endif
LDLIBS += -lG4tools
ifdef G4LIB_USE_ZLIB
LDLIBS2 += -lG4zlib
endif
@@ -301,7 +300,7 @@ else
# Warning: do not add to LDLIBS2 with += because this causes it to be
# expanded too soon. Hence extra libraries must have a different name...
# Extra libraries to resolve remaining circular dependencies...
# LDLIBS2EXTRA =
# LDLIBS2EXTRA =
endif
# Bring all symbols in for libraries which requires this (templated factories).
#
@@ -346,7 +345,7 @@ ifdef USER_DEFINED_LDLIBS
else
# Again, do not use := or +=. See note on LDLIBS2 above.
LDLIBS_PREFINAL = $(LDLIBS1) $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3)
# Version leaving out EXTRALIBS
# Version leaving out EXTRALIBS
LDLIBS_KERNEL = $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3)
endif
LDLIBS_PREFINAL += $(LDLIBS4)
@@ -373,12 +372,12 @@ ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
else
# Unix
LDLIBS = $(TARGETLIB) $(LDLIBS_PREFINAL)
OUT := -o
OUT := -o
TARGOBJEXT := o
endif
ifdef transform-RPath
# Invoke system specific transformation of
# Invoke system specific transformation of
include $(G4INSTALL)/config/sys/$(G4SYSTEM)-runpath.gmk
endif
+4 -13
View File
@@ -1,6 +1,6 @@
#
# ------ MacOS-X ------
# MacOS 10.8/9/10/11, clang-3.6 and higher
# macOS 11, Apple clang-12 and higher
#
# Original author: Gabriele Cosmo - CERN
#
@@ -11,18 +11,9 @@ ifeq ($(G4SYSTEM),Darwin-clang)
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
CPPFLAGS += -DGL_SILENCE_DEPRECATION
ifdef G4USE_STD14
CPPFLAGS += -std=c++14
CXXFLAGS += -std=c++14
else
ifdef G4USE_STD17
CPPFLAGS += -std=c++17
CXXFLAGS += -std=c++17
else
CXXFLAGS += -std=c++11
CPPFLAGS += -std=c++11
endif
endif
CPPFLAGS += -std=c++17
CXXFLAGS += -std=c++17
G4USE_STD17 := 1
ifdef G4MULTITHREADED
CXXFLAGS += -ftls-model=initial-exec
endif
+4 -13
View File
@@ -1,6 +1,6 @@
#
# ------ MacOS-X ------
# MacOS 10.8/9/10/11, gcc-4.8 and higher
# macOS 11, gcc-9.3 and higher
#
# Original author: Helmut Burkhardt - CERN
# Revisions: Guy Barrand - LAL
@@ -14,19 +14,10 @@ ifeq ($(G4SYSTEM),Darwin-g++)
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
CPPFLAGS += -DGL_SILENCE_DEPRECATION
ifdef G4USE_STD14
CPPFLAGS += -std=c++14
CXXFLAGS += -std=c++14
else
ifdef G4USE_STD17
CPPFLAGS += -std=c++17
CXXFLAGS += -std=c++17
else
CXXFLAGS += -std=c++11
CPPFLAGS += -std=c++11
endif
endif
CPPFLAGS += -std=c++17
CXXFLAGS += -std=c++17
# CXXFLAGS += -stdlib=libstdc++
G4USE_STD17 := 1
ifdef G4OPTIMISE
CXXFLAGS += -O3
FCFLAGS := -O3
+3 -12
View File
@@ -9,18 +9,9 @@ ifeq ($(G4SYSTEM),Linux-clang)
CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe -pthread
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
ifdef G4USE_STD14
CPPFLAGS += -std=c++14
CXXFLAGS += -std=c++14
else
ifdef G4USE_STD17
CPPFLAGS += -std=c++17
CXXFLAGS += -std=c++17
else
CXXFLAGS += -std=c++11
CPPFLAGS += -std=c++11
endif
endif
CPPFLAGS += -std=c++17
CXXFLAGS += -std=c++17
G4USE_STD17 := 1
ifdef G4MULTITHREADED
CXXFLAGS += -ftls-model=initial-exec
endif
+3 -12
View File
@@ -7,18 +7,9 @@ ifeq ($(G4SYSTEM),Linux-g++)
CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe -pthread
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
ifdef G4USE_STD14
CPPFLAGS += -std=c++14
CXXFLAGS += -std=c++14
else
ifdef G4USE_STD17
CPPFLAGS += -std=c++17
CXXFLAGS += -std=c++17
else
CXXFLAGS += -std=c++11
CPPFLAGS += -std=c++11
endif
endif
CPPFLAGS += -std=c++17
CXXFLAGS += -std=c++17
G4USE_STD17 := 1
ifdef G4MULTITHREADED
CXXFLAGS += -ftls-model=initial-exec
endif
+3 -12
View File
@@ -4,18 +4,9 @@
ifeq ($(G4SYSTEM),Linux-icc)
CXX := icc
CXXFLAGS := -ansi -fp-model precise -w1 -pthread
ifdef G4USE_STD14
CPPFLAGS += -std=c++14
CXXFLAGS += -std=c++14
else
ifdef G4USE_STD17
CPPFLAGS += -std=c++17
CXXFLAGS += -std=c++17
else
CXXFLAGS += -std=c++11
CPPFLAGS += -std=c++11
endif
endif
CPPFLAGS += -std=c++17
CXXFLAGS += -std=c++17
G4USE_STD17 := 1
ifdef G4MULTITHREADED
CXXFLAGS += -ftls-model=initial-exec
endif
+1 -1
View File
@@ -36,7 +36,7 @@ ifeq ($(G4SYSTEM),WIN32-VC)
OGLLIBS := opengl32.lib gdi32.lib user32.lib
endif
ifndef UI32LIBS
UI32LIBS := gdi32.lib user32.lib
UI32LIBS := gdi32.lib user32.lib comctl32.lib
endif
ifndef QTHOME
QTHOME := /Qt
+4
View File
@@ -11,6 +11,10 @@ Geant4Py is a Geant4-Python bridge.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
12 Nov. 2021 V. Ivanchenko (geant4py-V10-07-00)
- TestEm0 - use default Geant4 EM physics, do not use obsolete class
G4EmProcessOptions
16 Nov. 2020 B. Morgan (geant4py-V10-06-04)
- Boost 1.73 modified use of its bind and placeholder functionality, resulting
in Boost.Python spamming pragma messages about deprecation of this.
@@ -90,13 +90,13 @@ void PhysListEmStandard::ConstructProcess()
//electron
pmanager->AddProcess(new G4eMultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4eBremsstrahlung, -1,-3,3);
} else if (particleName == "e+") {
//positron
pmanager->AddProcess(new G4eMultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
pmanager->AddProcess(new G4eBremsstrahlung, -1,-3,3);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
} else if( particleName == "mu+" ||
@@ -32,6 +32,7 @@
#include "PhysicsListMessenger.hh"
#include "PhysListEmStandard.hh"
#include "G4EmStandardPhysics.hh"
#include "G4LossTableManager.hh"
#include "G4UnitsTable.hh"
@@ -55,7 +56,7 @@ PhysicsList::PhysicsList()
// EM physics
emName = G4String("standard");
emPhysicsList = new PhysListEmStandard(emName);
emPhysicsList = new G4EmStandardPhysics(1);
}
@@ -164,8 +165,6 @@ void PhysicsList::ConstructParticle()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4EmProcessOptions.hh"
void PhysicsList::ConstructProcess()
{
// Transportation
@@ -174,15 +173,7 @@ void PhysicsList::ConstructProcess()
// Electromagnetic physics list
//
emPhysicsList->ConstructProcess();
// Em options
//
G4EmProcessOptions emOptions;
emOptions.SetBuildCSDARange(true);
emOptions.SetMaxEnergyForCSDARange(100*TeV);
emOptions.SetDEDXBinningForCSDARange(120);
emOptions.SetVerbose(0);
emPhysicsList->ConstructProcess();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -195,11 +186,17 @@ void PhysicsList::AddPhysicsList(const G4String& name)
if (name == emName) return;
if (name == "standard") {
if (name == "local") {
emName = name;
delete emPhysicsList;
emPhysicsList = new PhysListEmStandard(name);
} else if (name == "standard") {
emName = name;
delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics(verboseLevel);
} else {
+74
View File
@@ -16,6 +16,80 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
25th June 2021 Gabriele Cosmo (examples-V10-07-06)
- Updated reference outputs according to reference tag geant4-10-07-ref-06.
- Includes tags: exhgcaltb-V10-07-02, microbeam-V10-07-03, exampleB1-V10-07-01,
STCyclotron-V10-07-04, exampleB2-V10-07-01, exdna-V10-07-00,
exampleB3-V10-07-01, exampleB4-V10-07-03, exampleB5-V10-07-01,
exEventGenerator-V10-07-03, exExtHadFissFrag-V10-07-01,
p8decayer-V10-07-02, exGeometry-V10-07-02, AuNP-V10-07-01,
VecGeomNavigation-V10-07-01, NeutronSource-V10-07-06,
exTransforms-V10-07-02, exHadronic-V10-07-02
exhadr06-V10-07-09, exhadr07-V10-07-07, OpNovice-V10-07-03,
activation-V10-07-05, rdecay01-V10-07-01, rdecay02-V10-07-01.
28th May 2021 Gabriele Cosmo (examples-V10-07-05)
- Updated reference outputs according to reference tag geant4-10-07-ref-05.
- Includes tags: amsEcal-V10-07-01, ccal-V10-07-02, hadrontherapy-V10-07-05,
STCyclotron-V10-07-03, testem1-V10-07-03, testem3-V10-07-01,
testem4-V10-07-01, testem5-V10-07-04, testem6-V10-07-00,
testem7-V10-07-02, testem11-V10-07-02, testem12-V10-07-02,
testem13-V10-07-00, testem14-V10-07-00, testem15-V10-07-01,
testem16-V10-07-00, testem17-V10-07-00, testem18-V10-07-00,
exHadronic-V10-07-01, exhadr02-V10-07-03, exhadr10-V10-07-00,
electronScattering-V10-07-00, fano-V10-07-01, fano2-V10-07-01,
LXe-V10-07-01, OpNovice-V10-07-02, WLS-V10-07-01,
exam-ext-vis-movies-V10-07-02.
30th April 2021 Gabriele Cosmo (examples-V10-07-04)
- Updated reference outputs according to reference tag geant4-10-07-ref-04.
- Includes tags: ICRP110Phantoms-V10-07-00, gammaknife-V10-07-01,
purmag-V10-07-00, STCyclotron-V10-07-01, xraytel-V10-07-00,
particleGunExample-V10-07-00, userPrimaryGenerator-V10-07-00,
exTransforms-V10-07-00, exhadr03-V10-07-02, exhadr04-V10-07-02,
exhadr06-V10-07-08, exhadr07-V10-07-06, gtherapy-V10-07-00,
NeutronSource-V10-07-05, OpNovice-V10-07-01,
activation-V10-07-04, rdecay01-V10-07-00, rdecay02-V10-07-00.
31st March 2021 Gabriele Cosmo (examples-V10-07-03)
- Updated reference outputs according to reference tag geant4-10-07-ref-03.
- Includes tags: gammaraytel-V10-07-04, gorad-V10-07-00, exhgcaltb-V10-07-00,
microelectronics-V10-07-00, STCyclotron-V10-07-00,
DMX-V10-07-05, exampleB4-V10-07-02, B03-V10-07-02,
testem1-V10-07-02, testem2-V10-07-06, testem5-V10-07-03,
testem7-V10-07-01, testem15-V10-07-00, exhadr01-V10-07-00,
channelingExample-V10-07-00, exExtHadFissFrag-V10-07-00,
exhadr02-V10-07-02, exhadr03-V10-07-01, exhadr04-V10-07-01,
exhadr06-V10-07-07, exhadr07-V10-07-05, exhadr08-V10-07-02,
exhadr09-V10-07-00, NeutronSource-V10-07-04, fano-V10-07-00,
microdosimetry-V10-07-01, splitting-V10-07-00, fano2-V10-07-00,
LXe-V10-07-00, OpNovice-V10-07-00, OpNovice2-V10-07-00,
activation-V10-07-03, exam-ext-vis-movies-V10-07-01.
28th February 2021 Gabriele Cosmo (examples-V10-07-02)
- Updated reference outputs according to reference tag geant4-10-07-ref-02.
- Includes tags: brachy-V10-07-00, gammaraytel-V10-07-00, microbeam-V10-07-01,
hadrontherapy-V10-07-03, iort_therapy-V10-07-00,
radioprotection-V10-07-00, XRayFluo-V10-07-00,
testem1-V10-07-01, testem2-V10-07-03, testem5-V10-07-02,
testem7-V10-07-00, testem9-V10-07-01, testem11-V10-07-01,
testem12-V10-07-01, exhadr06-V10-07-04, exhadr07-V10-07-03,
NeutronSource-V10-07-03, microprox-V10-07-00, svalue-V10-07-00,
microyz-V10-07-00, slowing-V10-07-00, exampleES2-V10-07-00,
ThreadsafeScorers-V10-07-00, G01-V10-07-01, expol01-V10-07-01,
exampleRE05-V10-07-00, exam-ext-vis-movies-V10-07-00,
exampleRE06-V10-07-00.
31st January 2021 Gabriele Cosmo (examples-V10-07-01)
- Updated reference outputs according to reference tag geant4-10-07-ref-01.
- Includes tags: doiPET-V10-07-00, hadrontherapy-V10-07-02, exampleB4-V10-07-00,
testem0-V10-07-00, testem1-V10-07-00, testem2-V10-07-00,
testem3-V10-07-00, testem5-V10-07-00, testem9-V10-07-00,
testem11-V10-07-00, testem12-V10-07-00, exhadr03-V10-07-00,
exhadr06-V10-07-03, exhadr07-V10-07-02, DICOM-V10-07-00,
NeutronSource-V10-07-02, chem2-V10-07-00, chem3-V10-07-00,
neuron-V10-07-00, G01-V10-07-00, activation-V10-07-02.
4th December 2020 Gabriele Cosmo (examples-V10-07-00)
- Updated reference outputs according to reference tag geant4-10-07-ref-00.
- Includes tags: doxygen-V10-06-03, exadvanced-V10-06-00, air_shower-V10-06-04,
+2 -4
View File
@@ -1,8 +1,5 @@
#---Adding all advanced examples subdirectories explicitly
cmake_minimum_required(VERSION 3.8...3.18)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
cmake_minimum_required(VERSION 3.12...3.20)
#----------------------------------------------------------------------------
# some examples require Geant4 build with optional packages
@@ -50,3 +47,4 @@ add_subdirectory(underground_physics)
add_subdirectory(xray_fluorescence)
add_subdirectory(STCyclotron)
add_subdirectory(HGCal_testbeam)
add_subdirectory(ICRP110_HumanPhantoms)
@@ -1,7 +1,4 @@
cmake_minimum_required(VERSION 3.8...3.18)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
cmake_minimum_required(VERSION 3.12...3.20)
include(CMakeDependentOption)
set(name ChargeExchangeMC)
File diff suppressed because it is too large Load Diff
@@ -7,6 +7,9 @@ cirrone@lns.infn.it
History file of the ChargeExchangeMC application
====================================================
24.05.2021 - B. Morgan (ChargeExchangeMC-V10-07-00)
Bump required CMake version range to 3.12...3.20, matching core Geant4
02.11.2020 - B.Morgan, Tag ChargeExchangeMC-V10-06-01
Support same CMake version range as core Geant4
@@ -1,9 +1,6 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.8...3.18 FATAL_ERROR)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
cmake_minimum_required(VERSION 3.12...3.20)
project(HGCal_testbeam)
+15 -1
View File
@@ -14,5 +14,19 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
10-June-21 V. Ivanchenko (exhgcaltb-V10-07-02)
- SiliconPixelHit, SiPMHit - fixed bug in handling of NIEL energy
deposition
- CMSHadronPhysicsFTFP_BERT - added class from CMS
- CMSEmStandardPhysicsHcal - removed obsolete
- FTFPCMS_BERT_EMM - use correct combination of physics constructors
24-May-21 B. Morgan (exhgcaltb-V10-07-01)
- Bump required CMake version range to 3.12...3.20, matching core Geant4
21-Mar-21 V. Ivanchenko (exhgcaltb-V10-07-00)
- removed RanecuEngine
- updated CMS EM physics to 11.0
02-Nov-20 A. Zaborowska (exhgcaltb-V10-06-00)
- Create HGCal_testbeam example based on Thorben Quast application
- Create HGCal_testbeam example based on Thorben Quast application
@@ -50,9 +50,6 @@ int main(int argc,char** argv)
ui = new G4UIExecutive(argc, argv);
}
// Choose the Random engine
G4Random::setTheEngine(new CLHEP::RanecuEngine);
// Initialization of Run manager
auto* runManager =
G4RunManagerFactory::CreateRunManager(G4RunManagerType::Default);
@@ -23,45 +23,39 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//---------------------------------------------------------------------------
// Author: Vladimir Ivanchenko
// Date: March 2018
//
// Hadron inelastic physics for the new CMS physics list FTFP_BERT.
// The hadron physics of FTFP_BERT has the transition between Bertini
// (BERT) intra-nuclear cascade model and Fritiof (FTF) string model
// optimized for CMS.
//
// 15.04.2021 V.Ivanchenko Hadron inelastic physics of CMS
// mirgrated to Geant4 10.7
//
//---------------------------------------------------------------------------
//
// ClassName: PhysListEm5DStandard
//
// Author: IgS 07.11.2017
//
// Modified:
// 17.11.2017 Created using PhysListEmStandard from V.Ivanchenko
//----------------------------------------------------------------------------
//
// This class provides construction of default EM standard physics which
// 5D generator model for gamma conversion
//
#ifndef CMSHadronPhysicsFTFP_BERT_h
#define CMSHadronPhysicsFTFP_BERT_h
#ifndef PhysListEm5DStandard_h
#define PhysListEm5DStandard_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4HadronPhysicsFTFP_BERT.hh"
class PhysListEm5DStandard : public G4VPhysicsConstructor
{
class CMSHadronPhysicsFTFP_BERT : public G4HadronPhysicsFTFP_BERT {
public:
explicit CMSHadronPhysicsFTFP_BERT(G4int verb);
explicit PhysListEm5DStandard(G4int ver=0, const G4String& name="");
~CMSHadronPhysicsFTFP_BERT() override;
virtual ~PhysListEm5DStandard();
void ConstructProcess() override;
virtual void ConstructParticle();
virtual void ConstructProcess();
private:
G4int verbose;
// copy constructor and hide assignment operator
CMSHadronPhysicsFTFP_BERT(CMSHadronPhysicsFTFP_BERT &) = delete;
CMSHadronPhysicsFTFP_BERT &operator=(const CMSHadronPhysicsFTFP_BERT &right) = delete;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -1,381 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#include "CMSEmStandardPhysicsHcal.hh"
#include "G4EmParameters.hh"
#include "G4LossTableManager.hh"
#include "G4ParticleDefinition.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4CoulombScattering.hh"
#include "G4MuMultipleScattering.hh"
#include "G4UrbanMscModel.hh"
#include "G4WentzelVIModel.hh"
#include "G4eCoulombScatteringModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eIonisation.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuIonisation.hh"
#include "G4MuPairProduction.hh"
#include "G4hBremsstrahlung.hh"
#include "G4hIonisation.hh"
#include "G4hPairProduction.hh"
#include "G4ionIonisation.hh"
#include "G4Alpha.hh"
#include "G4AntiLambdacPlus.hh"
#include "G4AntiOmegaMinus.hh"
#include "G4AntiProton.hh"
#include "G4AntiSigmaMinus.hh"
#include "G4AntiSigmaPlus.hh"
#include "G4AntiXiMinus.hh"
#include "G4AntiXicPlus.hh"
#include "G4BMesonMinus.hh"
#include "G4BMesonPlus.hh"
#include "G4DMesonMinus.hh"
#include "G4DMesonPlus.hh"
#include "G4Deuteron.hh"
#include "G4Electron.hh"
#include "G4Gamma.hh"
#include "G4GenericIon.hh"
#include "G4He3.hh"
#include "G4KaonMinus.hh"
#include "G4KaonPlus.hh"
#include "G4LambdacPlus.hh"
#include "G4MuonMinus.hh"
#include "G4MuonPlus.hh"
#include "G4OmegaMinus.hh"
#include "G4PionMinus.hh"
#include "G4PionPlus.hh"
#include "G4Positron.hh"
#include "G4Proton.hh"
#include "G4SigmaMinus.hh"
#include "G4SigmaPlus.hh"
#include "G4TauMinus.hh"
#include "G4TauPlus.hh"
#include "G4Triton.hh"
#include "G4XiMinus.hh"
#include "G4XicPlus.hh"
#include "G4BuilderType.hh"
#include "G4PhysicsListHelper.hh"
#include "G4RegionStore.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
CMSEmStandardPhysicsHcal::CMSEmStandardPhysicsHcal(G4int ver)
: G4VPhysicsConstructor("CMSEmStandard_emm"), fVerbose(ver) {
G4EmParameters *param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(fVerbose);
param->SetApplyCuts(true);
param->SetMscRangeFactor(0.2);
param->SetMscStepLimitType(fMinimal);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
CMSEmStandardPhysicsHcal::~CMSEmStandardPhysicsHcal() {}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void CMSEmStandardPhysicsHcal::ConstructParticle() {
// gamma
G4Gamma::Gamma();
// leptons
G4Electron::Electron();
G4Positron::Positron();
G4MuonPlus::MuonPlus();
G4MuonMinus::MuonMinus();
G4TauMinus::TauMinusDefinition();
G4TauPlus::TauPlusDefinition();
// mesons
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4KaonPlus::KaonPlusDefinition();
G4KaonMinus::KaonMinusDefinition();
G4DMesonMinus::DMesonMinusDefinition();
G4DMesonPlus::DMesonPlusDefinition();
G4BMesonMinus::BMesonMinusDefinition();
G4BMesonPlus::BMesonPlusDefinition();
// barions
G4Proton::Proton();
G4AntiProton::AntiProton();
G4SigmaMinus::SigmaMinusDefinition();
G4AntiSigmaMinus::AntiSigmaMinusDefinition();
G4SigmaPlus::SigmaPlusDefinition();
G4AntiSigmaPlus::AntiSigmaPlusDefinition();
G4XiMinus::XiMinusDefinition();
G4AntiXiMinus::AntiXiMinusDefinition();
G4OmegaMinus::OmegaMinusDefinition();
G4AntiOmegaMinus::AntiOmegaMinusDefinition();
G4LambdacPlus::LambdacPlusDefinition();
G4AntiLambdacPlus::AntiLambdacPlusDefinition();
G4XicPlus::XicPlusDefinition();
G4AntiXicPlus::AntiXicPlusDefinition();
// ions
G4Deuteron::Deuteron();
G4Triton::Triton();
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void CMSEmStandardPhysicsHcal::ConstructProcess() {
if (fVerbose > 0) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
// This EM builder takes default models of Geant4 10 EMV.
// Multiple scattering by Urban for all particles
// except e+e- below 100 MeV for which the Urban93 model is used
G4PhysicsListHelper *ph = G4PhysicsListHelper::GetPhysicsListHelper();
// muon & hadron bremsstrahlung and pair production
G4MuBremsstrahlung *mub = nullptr;
G4MuPairProduction *mup = nullptr;
G4hBremsstrahlung *pib = nullptr;
G4hPairProduction *pip = nullptr;
G4hBremsstrahlung *kb = nullptr;
G4hPairProduction *kp = nullptr;
G4hBremsstrahlung *pb = nullptr;
G4hPairProduction *pp = nullptr;
// muon & hadron multiple scattering
G4MuMultipleScattering *mumsc = nullptr;
G4MuMultipleScattering *pimsc = nullptr;
G4MuMultipleScattering *kmsc = nullptr;
G4MuMultipleScattering *pmsc = nullptr;
G4hMultipleScattering *hmsc = nullptr;
G4CoulombScattering *muss = nullptr;
G4CoulombScattering *piss = nullptr;
G4CoulombScattering *kss = nullptr;
G4CoulombScattering *pss = nullptr;
// high energy limit for e+- scattering models and bremsstrahlung
G4double highEnergyLimit = 100 * CLHEP::MeV;
G4Region *aRegion = G4RegionStore::GetInstance()->GetRegion("HcalRegion");
auto myParticleIterator = GetParticleIterator();
myParticleIterator->reset();
while ((*myParticleIterator)()) {
G4ParticleDefinition *particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
ph->RegisterProcess(new G4ComptonScattering(), particle);
ph->RegisterProcess(new G4GammaConversion(), particle);
} else if (particleName == "e-") {
G4eIonisation *eioni = new G4eIonisation();
eioni->SetStepFunction(0.8, 1.0 * CLHEP::mm);
G4eMultipleScattering *msc = new G4eMultipleScattering;
msc->SetStepLimitType(fMinimal);
G4UrbanMscModel *msc1 = new G4UrbanMscModel();
G4WentzelVIModel *msc2 = new G4WentzelVIModel();
G4UrbanMscModel *msc3 = new G4UrbanMscModel();
msc3->SetLocked(true);
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc3->SetHighEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->AddEmModel(-1, msc3, aRegion);
G4eCoulombScatteringModel *ssm = new G4eCoulombScatteringModel();
G4CoulombScattering *ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(eioni, particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(ss, particle);
} else if (particleName == "e+") {
G4eIonisation *eioni = new G4eIonisation();
eioni->SetStepFunction(0.8, 1.0 * CLHEP::mm);
G4eMultipleScattering *msc = new G4eMultipleScattering;
msc->SetStepLimitType(fMinimal);
G4UrbanMscModel *msc1 = new G4UrbanMscModel();
G4WentzelVIModel *msc2 = new G4WentzelVIModel();
G4UrbanMscModel *msc3 = new G4UrbanMscModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc3->SetHighEnergyLimit(highEnergyLimit);
msc3->SetLocked(true);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
msc->AddEmModel(-1, msc3, aRegion);
G4eCoulombScatteringModel *ssm = new G4eCoulombScatteringModel();
G4CoulombScattering *ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(eioni, particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
ph->RegisterProcess(ss, particle);
} else if (particleName == "mu+" || particleName == "mu-") {
if (nullptr == mub) {
mub = new G4MuBremsstrahlung();
mup = new G4MuPairProduction();
mumsc = new G4MuMultipleScattering();
mumsc->AddEmModel(0, new G4WentzelVIModel());
muss = new G4CoulombScattering();
}
ph->RegisterProcess(mumsc, particle);
ph->RegisterProcess(new G4MuIonisation(), particle);
ph->RegisterProcess(mub, particle);
ph->RegisterProcess(mup, particle);
ph->RegisterProcess(muss, particle);
} else if (particleName == "alpha" || particleName == "He3") {
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4ionIonisation(), particle);
} else if (particleName == "GenericIon") {
if (nullptr == hmsc) {
hmsc = new G4hMultipleScattering("ionmsc");
}
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(new G4ionIonisation(), particle);
} else if (particleName == "pi+" || particleName == "pi-") {
if (nullptr == pib) {
pib = new G4hBremsstrahlung();
pip = new G4hPairProduction();
pimsc = new G4MuMultipleScattering();
pimsc->AddEmModel(0, new G4WentzelVIModel());
piss = new G4CoulombScattering();
}
ph->RegisterProcess(pimsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pib, particle);
ph->RegisterProcess(pip, particle);
ph->RegisterProcess(piss, particle);
} else if (particleName == "kaon+" || particleName == "kaon-") {
if (nullptr == kb) {
kb = new G4hBremsstrahlung();
kp = new G4hPairProduction();
kmsc = new G4MuMultipleScattering();
kmsc->AddEmModel(0, new G4WentzelVIModel());
kss = new G4CoulombScattering();
}
ph->RegisterProcess(kmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(kb, particle);
ph->RegisterProcess(kp, particle);
ph->RegisterProcess(kss, particle);
} else if (particleName == "proton" || particleName == "anti_proton") {
if (nullptr == pb) {
pb = new G4hBremsstrahlung();
pp = new G4hPairProduction();
pmsc = new G4MuMultipleScattering();
pmsc->AddEmModel(0, new G4WentzelVIModel());
pss = new G4CoulombScattering();
}
ph->RegisterProcess(pmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pb, particle);
ph->RegisterProcess(pp, particle);
ph->RegisterProcess(pss, particle);
} else if (particleName == "B+" || particleName == "B-" ||
particleName == "D+" || particleName == "D-" ||
particleName == "Ds+" || particleName == "Ds-" ||
particleName == "anti_He3" || particleName == "anti_alpha" ||
particleName == "anti_deuteron" ||
particleName == "anti_lambda_c+" ||
particleName == "anti_omega-" ||
particleName == "anti_sigma_c+" ||
particleName == "anti_sigma_c++" ||
particleName == "anti_sigma+" || particleName == "anti_sigma-" ||
particleName == "anti_triton" || particleName == "anti_xi_c+" ||
particleName == "anti_xi-" || particleName == "deuteron" ||
particleName == "lambda_c+" || particleName == "omega-" ||
particleName == "sigma_c+" || particleName == "sigma_c++" ||
particleName == "sigma+" || particleName == "sigma-" ||
particleName == "tau+" || particleName == "tau-" ||
particleName == "triton" || particleName == "xi_c+" ||
particleName == "xi-") {
if (nullptr == hmsc) {
hmsc = new G4hMultipleScattering("ionmsc");
}
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
}
}
// Deexcitation
//
G4VAtomDeexcitation *de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,24 +23,27 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Author: Dennis Wright (SLAC)
// Date: 27 July 2011
// Description: .cc file for G4DeuteronInelasticProcess, mainly for
// implementation of html output
//
#include "CMSHadronPhysicsFTFP_BERT.hh"
#include "G4SystemOfUnits.hh"
#include "G4Threading.hh"
#include "G4DeuteronInelasticProcess.hh"
#include <iostream>
G4DeuteronInelasticProcess::G4DeuteronInelasticProcess(const G4String& name)
:G4HadronInelasticProcess(name, G4Deuteron::Deuteron() )
{}
void G4DeuteronInelasticProcess::ProcessDescription(std::ostream& outFile) const
{
outFile << "G4DeuteronInelasticProcess handles the inelastic scattering of\n"
<< "deuterons from nuclei by invoking one or more hadronic models\n"
<< "and one or more hadronic cross section sets.\n";
CMSHadronPhysicsFTFP_BERT::CMSHadronPhysicsFTFP_BERT(G4int)
: G4HadronPhysicsFTFP_BERT("hInelastic FTFP_BERT", false) {
minFTFP_pion = 3 * CLHEP::GeV;
maxBERT_pion = 12 * CLHEP::GeV;
minFTFP_kaon = 3 * CLHEP::GeV;
maxBERT_kaon = 6 * CLHEP::GeV;
minFTFP_proton = 3 * CLHEP::GeV;
maxBERT_proton = 6 * CLHEP::GeV;
minFTFP_neutron = 3 * CLHEP::GeV;
maxBERT_neutron = 6 * CLHEP::GeV;
}
CMSHadronPhysicsFTFP_BERT::~CMSHadronPhysicsFTFP_BERT() {}
void CMSHadronPhysicsFTFP_BERT::ConstructProcess() {
if (G4Threading::IsMasterThread()) {
DumpBanner();
}
CreateModels();
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
#include "FTFPCMS_BERT_EMM.hh"
#include "CMSEmStandardPhysicsHcal.hh"
#include "G4EmStandardPhysics.hh"
#include "G4DecayPhysics.hh"
#include "G4EmExtraPhysics.hh"
#include "G4HadronElasticPhysics.hh"
@@ -34,6 +34,7 @@
#include "G4StoppingPhysics.hh"
#include "G4HadronPhysicsFTFP_BERT.hh"
#include "CMSHadronPhysicsFTFP_BERT.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -46,7 +47,7 @@ FTFPCMS_BERT_EMM::FTFPCMS_BERT_EMM(G4int ver) {
<< "FTFP_BERT_EMM " << G4endl;
// EM Physics
RegisterPhysics(new CMSEmStandardPhysicsHcal(ver));
RegisterPhysics(new G4EmStandardPhysics(ver));
// Synchroton Radiation & GN Physics
RegisterPhysics(new G4EmExtraPhysics(ver));
@@ -57,7 +58,8 @@ FTFPCMS_BERT_EMM::FTFPCMS_BERT_EMM(G4int ver) {
// Hadron Elastic scattering
RegisterPhysics(new G4HadronElasticPhysics(ver));
RegisterPhysics(new G4HadronPhysicsFTFP_BERT(ver));
// Hadron Inelastic physics
RegisterPhysics(new CMSHadronPhysicsFTFP_BERT(ver));
// Stopping Physics
RegisterPhysics(new G4StoppingPhysics(ver));
@@ -40,7 +40,7 @@ void SiPMHit::Digitise(const G4double aTimeWindow,
const G4double aToaThreshold) {
// process energy deposits
if (fEdep.size() == 0) {
if (fEdep.empty()) {
fIsValidHit = false;
return;
}
@@ -53,7 +53,7 @@ void SiPMHit::Digitise(const G4double aTimeWindow,
G4double firstHitTime = fEdep[0].second;
fEdepDigi = 0;
for (size_t i = 0; i < fEdep.size(); i++) {
for (size_t i = 0; i < fEdep.size(); ++i) {
if (aTimeWindow < 0 || fEdep[i].second < firstHitTime + aTimeWindow)
fEdepDigi += fEdep[i].first;
#ifdef DEBUG
@@ -68,7 +68,7 @@ void SiPMHit::Digitise(const G4double aTimeWindow,
fIsValidHit = (fEdepDigi > 0);
// non ionizing part, does not contribute to TOAs
if (fEdepNonIonizing.size() == 0)
if (fEdepNonIonizing.empty())
return;
std::sort(fEdepNonIonizing.begin(), fEdepNonIonizing.end(),
@@ -78,7 +78,7 @@ void SiPMHit::Digitise(const G4double aTimeWindow,
});
fEdepNonIonizingDigi = 0;
for (size_t i = 0; i < fEdep.size(); i++) {
for (size_t i = 0; i < fEdepNonIonizing.size(); ++i) {
if (aTimeWindow == -1 ||
fEdepNonIonizing[i].second < firstHitTime + aTimeWindow)
fEdepNonIonizingDigi += fEdepNonIonizing[i].first;
@@ -47,7 +47,7 @@ void SiliconPixelHit::Digitise(const G4double aTimeWindow,
const G4double aToaThreshold) {
// process energy deposits
if (fEdep.size() == 0) {
if (fEdep.empty()) {
fIsValidHit = false;
return;
}
@@ -60,7 +60,7 @@ void SiliconPixelHit::Digitise(const G4double aTimeWindow,
G4double firstHitTime = fEdep[0].second;
fEdepDigi = 0;
for (size_t i = 0; i < fEdep.size(); i++) {
for (size_t i = 0; i < fEdep.size(); ++i) {
if (aTimeWindow < 0 || fEdep[i].second < firstHitTime + aTimeWindow)
fEdepDigi += fEdep[i].first;
if (fEdepDigi > aToaThreshold) {
@@ -72,7 +72,7 @@ void SiliconPixelHit::Digitise(const G4double aTimeWindow,
fIsValidHit = (fEdepDigi > 0);
// non ionizing part, does not contribute to TOAs
if (fEdepNonIonizing.size() == 0)
if (fEdepNonIonizing.empty())
return;
std::sort(fEdepNonIonizing.begin(), fEdepNonIonizing.end(),
@@ -82,7 +82,7 @@ void SiliconPixelHit::Digitise(const G4double aTimeWindow,
});
fEdepNonIonizingDigi = 0;
for (size_t i = 0; i < fEdep.size(); i++) {
for (size_t i = 0; i < fEdepNonIonizing.size(); ++i) {
if (aTimeWindow == -1 ||
fEdepNonIonizing[i].second < firstHitTime + aTimeWindow)
fEdepNonIonizingDigi += fEdepNonIonizing[i].first;
@@ -1,9 +1,6 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.8...3.18 FATAL_ERROR)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
cmake_minimum_required(VERSION 3.12...3.20)
project(ICRPphantoms)
@@ -49,7 +46,7 @@ add_dependencies(ICRP110phantoms ICRPdata)
# relies on these scripts being in the current working directory.
#
set(ICRPphantoms_SCRIPTS
female.in female_head.in female_trunk.in male.in male_head.in male_trunk.in vis.mac primary.mac ColourMap.dat openGLVis.mac
female.in female_head.in female_trunk.in male.in male_head.in male_trunk.in vis.mac primary.mac ColourMap.dat openGLVis.mac g4views/g4_00.g4view g4views/g4_01.g4view
# ICRPdata/Data.dat
# "ICRPdata/ICRP110_g4dat/AF/*.g4dat"
# "ICRPdata/ICRP110_g4dat/AM/*.g4dat"
@@ -7,10 +7,16 @@
Category History file
---------------------
24.05.2021 - B. Morgan (ICRP110Phantoms-V10-07-01)
- Bump required CMake version range to 3.12...3.20, matching core Geant4
29.03.2021 - J. Allison; ICRP110Phantoms-V10-07-00
Introduced ICRP110PhantomVisAction
See vis.mac for how to activate
15.11.2020 - S. Guatelli; ICRP110Phantoms-V10-06-01
Migration to G4RunManagerFactory
27.10.2020 - S. Guatelli; ICRP110Phantoms-V10-06-00
New advanced example modelling ICRP110 phantom models
@@ -36,6 +36,7 @@
#include "ICRP110PhantomActionInitialization.hh"
#include "G4ScoringManager.hh"
#include "ICRP110UserScoreWriter.hh"
#include "ICRP110PhantomVisAction.hh"
#include "QGSP_BIC_HP.hh"
#include "G4RunManagerFactory.hh"
@@ -63,6 +64,8 @@ int main(int argc,char** argv)
// runManager -> SetUserInitialization(new ICRP110PhantomPhysicsList);
G4VisManager* visManager = new G4VisExecutive;
visManager->RegisterRunDurationUserVisAction
("phantom",new ICRP110PhantomVisAction(userPhantom));
visManager -> Initialize();
ICRP110PhantomActionInitialization* actions = new ICRP110PhantomActionInitialization();
@@ -0,0 +1,52 @@
#
# Camera and lights commands
/vis/viewer/set/viewpointVector -0.875284 -0.455741 0.162104
/vis/viewer/set/upVector 0.473127 -0.736972 0.482725
/vis/viewer/set/projection orthogonal
/vis/viewer/zoomTo 2.5393
/vis/viewer/scaleTo 1 1 1
/vis/viewer/set/targetPoint 0 0 0 fm
# Note that if you have not set a target point, the vis system sets
# a target point based on the scene - plus any panning and dollying -
# so don't be alarmed by strange coordinates here.
/vis/viewer/dollyTo 0 fm
/vis/viewer/set/lightsMove object
/vis/viewer/set/lightsVector 1 1 1
/vis/viewer/set/rotationStyle freeRotation
/vis/viewer/set/background 0 0 0 1
/vis/viewer/set/defaultColour 1 1 1 1
/vis/viewer/set/defaultTextColour 0 0 1 1
#
# Drawing style commands
/vis/viewer/set/style surface
/vis/viewer/set/hiddenEdge false
/vis/viewer/set/auxiliaryEdge false
/vis/viewer/set/hiddenMarker true
/vis/viewer/set/globalLineWidthScale 1
/vis/viewer/set/globalMarkerScale 1
/vis/viewer/set/numberOfCloudPoints 10000
#
# Scene-modifying commands
/vis/viewer/set/culling global true
/vis/viewer/set/culling invisible true
/vis/viewer/set/culling density false
/vis/viewer/set/culling coveredDaughters false
/vis/viewer/colourByDensity 0 g/cm3
/vis/viewer/set/sectionPlane off
/vis/viewer/set/cutawayMode union
/vis/viewer/clearCutawayPlanes
/vis/viewer/addCutawayPlane -10 -0 -0 cm 1 0 0
/vis/viewer/set/explodeFactor 1 0 0 0 fm
/vis/viewer/set/lineSegmentsPerCircle 24
#
# Touchable commands
# None
/vis/viewer/clearVisAttributesModifiers
#
# Time window commands
/vis/viewer/set/timeWindow/startTime -1e+100 ns
/vis/viewer/set/timeWindow/endTime 1e+100 ns
/vis/viewer/set/timeWindow/fadeFactor 0
/vis/viewer/set/timeWindow/displayHeadTime false
/vis/viewer/set/timeWindow/displayLightFront false
@@ -0,0 +1,52 @@
#
# Camera and lights commands
/vis/viewer/set/viewpointVector -0.875284 -0.455741 0.162104
/vis/viewer/set/upVector 0.473127 -0.736972 0.482725
/vis/viewer/set/projection orthogonal
/vis/viewer/zoomTo 2.5393
/vis/viewer/scaleTo 1 1 1
/vis/viewer/set/targetPoint 0 0 0 fm
# Note that if you have not set a target point, the vis system sets
# a target point based on the scene - plus any panning and dollying -
# so don't be alarmed by strange coordinates here.
/vis/viewer/dollyTo 0 fm
/vis/viewer/set/lightsMove object
/vis/viewer/set/lightsVector 1 1 1
/vis/viewer/set/rotationStyle freeRotation
/vis/viewer/set/background 0 0 0 1
/vis/viewer/set/defaultColour 1 1 1 1
/vis/viewer/set/defaultTextColour 0 0 1 1
#
# Drawing style commands
/vis/viewer/set/style surface
/vis/viewer/set/hiddenEdge false
/vis/viewer/set/auxiliaryEdge false
/vis/viewer/set/hiddenMarker true
/vis/viewer/set/globalLineWidthScale 1
/vis/viewer/set/globalMarkerScale 1
/vis/viewer/set/numberOfCloudPoints 10000
#
# Scene-modifying commands
/vis/viewer/set/culling global true
/vis/viewer/set/culling invisible true
/vis/viewer/set/culling density false
/vis/viewer/set/culling coveredDaughters false
/vis/viewer/colourByDensity 0 g/cm3
/vis/viewer/set/sectionPlane off
/vis/viewer/set/cutawayMode union
/vis/viewer/clearCutawayPlanes
/vis/viewer/addCutawayPlane 10 0 0 cm 1 0 0
/vis/viewer/set/explodeFactor 1 0 0 0 fm
/vis/viewer/set/lineSegmentsPerCircle 24
#
# Touchable commands
# None
/vis/viewer/clearVisAttributesModifiers
#
# Time window commands
/vis/viewer/set/timeWindow/startTime -1e+100 ns
/vis/viewer/set/timeWindow/endTime 1e+100 ns
/vis/viewer/set/timeWindow/fadeFactor 0
/vis/viewer/set/timeWindow/displayHeadTime false
/vis/viewer/set/timeWindow/displayLightFront false
@@ -53,11 +53,18 @@ class ICRP110PhantomConstruction : public G4VUserDetectorConstruction
ICRP110PhantomConstruction();
~ICRP110PhantomConstruction();
G4VPhysicalVolume* Construct();
G4VPhysicalVolume* GetMotherVolume() {return fMotherVolume;}
G4VPhysicalVolume* GetPhantumContainer() {return fPhantomContainer;}
inline G4int GetNumberVoxelX(){return fNVoxelX;};
inline G4int GetNumberVoxelY() {return fNVoxelY;};
inline G4int GetNumberVoxelZ() {return fNVoxelZ;};
inline G4double GetVoxelHalfDimX(){return fVoxelHalfDimX;};
inline G4double GetVoxelHalfDimY() {return fVoxelHalfDimY;};
inline G4double GetVoxelHalfDimZ() {return fVoxelHalfDimZ;};
void SetPhantomSex(G4String);
void SetPhantomSection(G4String);
@@ -68,6 +75,8 @@ class ICRP110PhantomConstruction : public G4VUserDetectorConstruction
ICRP110PhantomMaterial_Male* fMaterial_Male;
ICRP110PhantomMessenger* fMessenger;
// std::vector<G4Material*> fMaterials;
G4VPhysicalVolume* fMotherVolume;
G4VPhysicalVolume* fPhantomContainer;
G4int fNVoxelX;
G4int fNVoxelY;
G4int fNVoxelZ;
@@ -23,51 +23,43 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Authors: M. Large, S. Guatelli - University of Wollongong, Australia
// This class developed by John Allison, March 2021
//
//
// **********************************
// * *
// * BrachyMaterial.hh *
// * *
// **********************************
//
//Code developed by: Susanna Guatelli, Albert Le
//
// This class manages the elements and materials
//
#ifndef BrachyMaterial_H
#define BrachyMaterial_H 1
#include "globals.hh"
#ifndef ICRP110PhantomPseudoScene_h
#define ICRP110PhantomPseudoScene_h 1
#include "G4PseudoScene.hh"
#include "G4Colour.hh"
#include "G4ThreeVector.hh"
#include <map>
class G4PhysicalVolumeModel;
class G4Material;
class BrachyMaterial
{
class ICRP110PhantomPseudoScene: public G4PseudoScene
{
public:
BrachyMaterial();
~ BrachyMaterial();
public:
void DefineMaterials();
G4Material* GetMat(G4String); //returns the material
// Given a world volume, fill a multimap provided by the instantiator
ICRP110PhantomPseudoScene
(G4PhysicalVolumeModel* // input...the following are outputs
,std::multimap<const G4Material*,G4ThreeVector>& positionByMaterial
,std::map <const G4Material*,G4Colour>& colourByMaterial);
~ICRP110PhantomPseudoScene();
using G4PseudoScene::AddSolid; // except for...
void AddSolid(const G4Box&);
void ProcessVolume(const G4VSolid&);
const std::multimap<const G4Material*,G4ThreeVector>& GetPositionByMaterial()
{return fPositionByMaterial;}
const std::map <const G4Material*,G4Colour>& GetColourByMaterial()
{return fColourByMaterial;}
private:
G4Material* fW;
G4Material* fPlexiglass;
G4Material* fPb;
G4Material* fIr192;
G4Material* fTi;
G4Material* fAir;
G4Material* fH2O;
G4Material* fSoft;
G4Material* fSteel;
G4Material* fMat304steel;
G4Material* fAu;
G4Material* fI;
G4Material* fCeramic;
G4Material* fVacuum;
G4Material* fBone;
G4Material* fMuscle;
G4Material* fAg;
G4PhysicalVolumeModel* fpPVModel;
std::multimap<const G4Material*,G4ThreeVector>& fPositionByMaterial;
std::map <const G4Material*,G4Colour>& fColourByMaterial;
};
#endif
@@ -23,31 +23,34 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4PiMinusAbsorptionBertini_h
#define G4PiMinusAbsorptionBertini_h 1
// Class Description:
// Authors: M. Large, S. Guatelli - University of Wollongong, Australia
// This class developed by John Allison, March 2021
//
// Process for pi- absorption at rest.
// To be used in your physics list in case you need this physics.
#include "G4HadronicAbsorptionBertini.hh"
#include "G4PionMinus.hh"
#ifndef ICRP110PhantomVisAction_h
#define ICRP110PhantomVisAction_h 1
#include "G4VUserVisAction.hh"
class G4PiMinusAbsorptionBertini : public G4HadronicAbsorptionBertini {
private:
// hide assignment operator as private
G4PiMinusAbsorptionBertini& operator=(const G4PiMinusAbsorptionBertini&);
G4PiMinusAbsorptionBertini(const G4PiMinusAbsorptionBertini&);
#include "G4Colour.hh"
class G4Material;
#include <set>
class ICRP110PhantomConstruction;
class ICRP110PhantomVisAction: public G4VUserVisAction
{
public:
G4PiMinusAbsorptionBertini()
: G4HadronicAbsorptionBertini(G4PionMinus::Definition()) {}
virtual ~G4PiMinusAbsorptionBertini() {}
ICRP110PhantomVisAction(ICRP110PhantomConstruction* dc)
: fpDetectorConstruction(dc) {}
void Draw();
private:
ICRP110PhantomConstruction* fpDetectorConstruction;
std::multimap<const G4Material*,G4ThreeVector> fPositionByMaterial;
std::map <const G4Material*,G4Colour> fColourByMaterial;
std::set <const G4Material*> fSetOfMaterials;
};
#endif
@@ -51,6 +51,7 @@
#include "ICRP110PhantomNestedParameterisation.hh"
ICRP110PhantomConstruction::ICRP110PhantomConstruction():
fMotherVolume(nullptr), fPhantomContainer(nullptr),
fNVoxelX(0), fNVoxelY(0), fNVoxelZ(0),
fVoxelHalfDimX(0), fVoxelHalfDimY(0), fVoxelHalfDimZ(0),
fMinX(0),fMaxX(0), fMinY(0), fMaxY(0),
@@ -214,16 +215,16 @@ if(fSex == "female"){
G4double worldSize = 2.*m ;
G4Box* world = new G4Box("world", worldSize, worldSize, worldSize);
G4LogicalVolume* logicWorld = new G4LogicalVolume(world,
matAir,
"logicalWorld", 0, 0,0);
G4LogicalVolume* logicWorld = new G4LogicalVolume(world,
matAir,
"logicalWorld", 0, 0,0);
G4VPhysicalVolume* motherVolume = new G4PVPlacement(0,G4ThreeVector(),
"physicalWorld",
logicWorld,
0,
false,
0);
fMotherVolume = new G4PVPlacement(0,G4ThreeVector(),
"physicalWorld",
logicWorld,
0,
false,
0);
logicWorld -> SetVisAttributes(G4VisAttributes::GetInvisible());
@@ -258,7 +259,8 @@ if(fSex == "female"){
G4cout << " placing voxel container volume at " << posCentreVoxels << G4endl;
new G4PVPlacement(0, // rotation
fPhantomContainer
= new G4PVPlacement(0, // rotation
posCentreVoxels,
fContainer_logic, // The logic volume
"phantomContainer", // Name
@@ -312,7 +314,7 @@ if(fSex == "female"){
param -> SetMaterialIndices(fMateIDs); // fMateIDs is the vector with Material ID associated to each voxel, from ASCII input data files.
param -> SetNoVoxel(fNVoxelX,fNVoxelY,fNVoxelZ);
return motherVolume;
return fMotherVolume;
}
void ICRP110PhantomConstruction::ReadPhantomData(const G4String& sex, const G4String& section)
@@ -806,4 +808,4 @@ void ICRP110PhantomConstruction::SetPhantomSection(G4String newSection)
if ((fSection != "head") && (fSection != "trunk") && (fSection != "full"))
G4cout << fSection << " is not defined!" << G4endl;
}
}
@@ -23,48 +23,45 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// G4 Physics class: HadronCaptureDataSet for cross sections
// F.W. Jones, TRIUMF, 19-MAY-98
//
// 19 Aug 2011, V.Ivanchenko move to new design and make x-section per element
// Code developed by:
// S.Guatelli, M. Large and A. Malaroda, University of Wollongong
// This class developed by John Allison, March 2021
//
#include "G4HadronCaptureDataSet.hh"
#include <iostream>
#include "ICRP110PhantomPseudoScene.hh"
G4HadronCaptureDataSet::G4HadronCaptureDataSet(const G4String& nam)
: G4VCrossSectionDataSet(nam)
{
theHadronCrossSections = G4HadronCrossSections::Instance();
}
#include "G4PhysicalVolumeModel.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
G4HadronCaptureDataSet::~G4HadronCaptureDataSet()
// Given a world volume, fill maps provided by the instantiator
ICRP110PhantomPseudoScene::ICRP110PhantomPseudoScene
(G4PhysicalVolumeModel* pvm // input...the following are outputs
,std::multimap<const G4Material*,G4ThreeVector>& positionByMaterial
,std::map <const G4Material*,G4Colour>& colourByMaterial)
: fpPVModel(pvm)
, fPositionByMaterial(positionByMaterial)
, fColourByMaterial (colourByMaterial)
{}
G4bool
G4HadronCaptureDataSet::IsElementApplicable(const G4DynamicParticle*,
G4int /*Z*/, const G4Material*)
ICRP110PhantomPseudoScene::~ICRP110PhantomPseudoScene()
{}
void ICRP110PhantomPseudoScene::AddSolid(const G4Box&)
{
return true;
const G4Material* material = fpPVModel->GetCurrentLV()->GetMaterial();
const G4Colour& colour = fpPVModel->GetCurrentLV()->GetVisAttributes()->GetColour();
const G4ThreeVector& position = fpCurrentObjectTransformation->getTranslation();
// Fill maps for vis action
fPositionByMaterial.insert(std::make_pair(material,position));
fColourByMaterial[material] = colour;
}
G4double
G4HadronCaptureDataSet::GetElementCrossSection(const G4DynamicParticle* aParticle,
G4int Z, const G4Material*)
void ICRP110PhantomPseudoScene::ProcessVolume(const G4VSolid&)
{
return theHadronCrossSections->GetCaptureCrossSection(aParticle, Z);
}
void G4HadronCaptureDataSet::CrossSectionDescription(std::ostream& outFile) const
{
outFile << "G4HadronCaptureDataSet contains neutron capture cross\n"
<< "sections developed as part of the Gheisha hadronic package\n"
<< "by H. Fesefeldt. The cross sections are valid for all\n"
<< "incident neutron energies, but they do not represent any of\n"
<< "the detailed resonances known to exist at low energies.\n"
<< "The cross sections depend only on Z and not A.\n";
G4ExceptionDescription ed;
ed << "ICRP110PhantomPseudoScene::ProcessVolume called for solid that is NOT a G4Box.";
G4Exception("ICRP110PhantomPseudoScene::ProcessVolume", "ICRP110Phantom_0000",
FatalException, ed, "Contact @allison");
}
@@ -0,0 +1,126 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Code developed by:
// S.Guatelli, M. Large and A. Malaroda, University of Wollongong
// This class developed by John Allison, March 2021
//
#include "ICRP110PhantomVisAction.hh"
#include "G4VisManager.hh"
#include "ICRP110PhantomConstruction.hh"
#include "ICRP110PhantomPseudoScene.hh"
#include "G4PhysicalVolumeModel.hh"
#include "G4Polymarker.hh"
#include "G4SystemOfUnits.hh"
#include "Randomize.hh"
void ICRP110PhantomVisAction::Draw ()
{
// Get actual vis manager
G4VVisManager* pVisManager = G4VVisManager::GetConcreteInstance();
if (!pVisManager) return;
auto container = fpDetectorConstruction->GetPhantumContainer();
static G4bool first = true;
if (first && container) {
first = false;
// Use ICRP110PhantomPseudoScene to build dataset in fPositionByColour
G4ModelingParameters tmpMP;
tmpMP.SetCulling(true); // This avoids drawing transparent...
tmpMP.SetCullingInvisible(true); // ... or invisble volumes.
const G4bool useFullExtent = true; // To avoid clculating the extent
G4PhysicalVolumeModel tmpPVModel
(container,
G4PhysicalVolumeModel::UNLIMITED,
G4Transform3D(),
&tmpMP,
useFullExtent);
ICRP110PhantomPseudoScene tmpScene
(&tmpPVModel
,fPositionByMaterial
,fColourByMaterial);
tmpPVModel.DescribeYourselfTo(tmpScene);
// Make list of found materials
for (const auto& entry: fColourByMaterial) {
fSetOfMaterials.insert(entry.first);
}
for (const auto& material: fSetOfMaterials) {
G4cout << "fSetOfMaterials: " << material->GetName() << G4endl;
}
}
// Seems the quantities in ICRP110PhantomConstruction don't have units
const G4double voxelHalfDimX = fpDetectorConstruction->GetVoxelHalfDimX()*mm;
const G4double voxelHalfDimY = fpDetectorConstruction->GetVoxelHalfDimY()*mm;
const G4double voxelHalfDimZ = fpDetectorConstruction->GetVoxelHalfDimZ()*mm;
static G4bool firstPrint = true;
G4int nDotsTotal = 0;
const G4int nDotsPerPositionMin = 1;
const G4int nDotsPerPositionMax = 10;
const G4double densityMin = 1.*g/cm3;
const G4double densityMax = 3.*g/cm3;;
for (const auto& material: fSetOfMaterials) {
auto& colour = fColourByMaterial[material];
G4int nDots = 0;
G4Polymarker dots;
dots.SetVisAttributes(G4Colour(colour));
dots.SetMarkerType(G4Polymarker::dots);
dots.SetSize(G4VMarker::screen,1.);
dots.SetInfo(material->GetName());
const G4double currentDensity = material->GetDensity();
const auto range = fPositionByMaterial.equal_range(material);
for (auto posByMat = range.first; posByMat != range.second; ++posByMat) {
G4int nDotsPerPosition
= nDotsPerPositionMin
+ (nDotsPerPositionMax-nDotsPerPositionMin)
*(currentDensity-densityMin)/(densityMax-densityMin);
nDotsPerPosition = std::max(nDotsPerPositionMin,nDotsPerPosition);
nDotsPerPosition = std::min(nDotsPerPositionMax,nDotsPerPosition);
for (G4int i = 0; i < nDotsPerPosition; ++i) {
const G4double x = posByMat->second.getX() + (2.*G4UniformRand()-1.)*voxelHalfDimX;
const G4double y = posByMat->second.getY() + (2.*G4UniformRand()-1.)*voxelHalfDimY;
const G4double z = posByMat->second.getZ() + (2.*G4UniformRand()-1.)*voxelHalfDimZ;
dots.push_back(G4ThreeVector(x,y,z));
++nDots;
}
}
pVisManager->Draw(dots);
if (firstPrint) {
G4cout
<< "Number of dots for material " << material->GetName()
<< ", colour " << colour
<< ": " << nDots << G4endl;
}
nDotsTotal += nDots;
}
if (firstPrint) {
G4cout << "Total number of dots: " << nDotsTotal << G4endl;
firstPrint = false;
}
}
@@ -1,5 +1,7 @@
# Use this open statement to create an OpenGL view:
/phantom/setPhantomSection head
/run/initialize
#/vis/open OGLSX
/vis/open OGL 600x600-0+0
#
@@ -23,28 +25,52 @@
# Define background colour (comment out for black as default)
#/vis/viewer/set/background white
#
# Draw geometry:
/vis/drawVolume worlds
# Draw phantom
/vis/drawVolume
#
#
# Alternatively comment out "/vis/drawVolume" and un-comment the following
# commands
# Temporarily switch culling off so even a "transparent/invisible" volume
# is drawn
#/vis/viewer/set/culling global false
# phantomContainer is transparent - but defines "extent"
#/vis/drawVolume phantomContainer ! 0
#/vis/viewer/set/culling global true
# Add vis user action
#/vis/scene/add/userAction
# You could try making all materials (except air) opaque (last quantity) in
# ColorMap.dat.
# You could try "/vis/viewer/interpolate g4views/* 200", which runs a cutaway
# plane through the head, based on 2 view files - g4_00.g4view and
# g4_01.g4view in subdirectory g4views.
# (See examples/extended/visualization/movies for how to create view
# files for interpolation.)
# Also you may visualise the whole body by changing "head" to "full"
# at the head of this file before /run/initialize.
#
#
# Specify view angle:
/vis/viewer/set/viewpointThetaPhi 85 -75 deg
#/vis/viewer/set/lightsMove with-camera
#
# Set Voxels number to be visualised
/vis/ogl/set/displayListLimit 4000000
/vis/ogl/set/displayListLimit 9999999
# Specify zoom value:
#/vis/viewer/zoom 2.
#
# Specify style (surface or wireframe):
# Specify style (surface or wireframe, etc.):
#/vis/viewer/set/style wireframe
/vis/viewer/set/rotationStyle freeRotation
/vis/viewer/set/hiddenMarker true
#
# Draw coordinate axes:
#/vis/scene/add/axes 0 0 0 1 m
/vis/scene/add/axes
#
# Draw smooth trajectories at end of event, showing trajectory points
# Draw trajectories at end of event, showing trajectory points
# as markers 2 pixels wide:
/vis/scene/add/trajectories smooth
/vis/scene/add/trajectories
/vis/modeling/trajectories/create/drawByCharge
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
+1 -4
View File
@@ -1,9 +1,6 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.8...3.18)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
cmake_minimum_required(VERSION 3.12...3.20)
project(STCyclotron)
#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
+12 -2
View File
@@ -8,11 +8,21 @@
Category History file
---------------------
21.04.2021 - Gabriele Cosmo STCyclotron-V10-06-04
22.06.2021 - Gabriele Cosmo (STCyclotron-V10-07-04)
- Use new CLHEP units for minute, hour, day, year in STCyclotronPhysicsList.
26.05.2021 - Dennis Wright (STCyclotron-V10-07-03)
- STCyclotronSensitiveTarget.cc: remove #include of deprecated file
G4RadioactiveDecay.hh
24.05.2021 - B. Morgan (STCyclotron-V10-07-02)
- Bump required CMake version range to 3.12...3.20, matching core Geant4
21.04.2021 - Gabriele Cosmo STCyclotron-V10-07-01
- Fixed gui.mac macro to invoke init_parameters.mac.
Addressing GitHub PR#25.
18.03.2021 - Gunter Folger STCyclotron-V10-06-03
18.03.2021 - Gunter Folger STCyclotron-V10-07-00
- Update README to recommend G4TENDL 1.3.2
12.11.2020 - S. Guatelli STCyclotron-V10-06-02
@@ -61,20 +61,8 @@
#include "G4NuclideTable.hh"
STCyclotronPhysicsList::STCyclotronPhysicsList(STCyclotronDetectorConstruction* det)
: G4VModularPhysicsList(){
//add new units for radioActive decays
new G4UnitDefinition( "millielectronVolt", "meV", "Energy", 1.e-3*eV);
const G4double minute = 60*second;
const G4double hour = 60*minute;
const G4double day = 24*hour;
const G4double year = 365*day;
new G4UnitDefinition("minute", "min", "Time", minute);
new G4UnitDefinition("hour", "h", "Time", hour);
new G4UnitDefinition("day", "d", "Time", day);
new G4UnitDefinition("year", "y", "Time", year);
: G4VModularPhysicsList()
{
// Mandatory for G4NuclideTable
// Half-life threshold must be set small or many short-lived isomers
// will not be assigned life times (default to 0)
@@ -45,7 +45,6 @@
#include "G4ParticleDefinition.hh"
#include "G4DecayTable.hh"
#include "G4VDecayChannel.hh"
#include "G4RadioactiveDecay.hh"
#include "G4TrackVector.hh"
#include "G4VProcess.hh"
#include "G4Tubs.hh"
+1 -4
View File
@@ -1,9 +1,6 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.8...3.18)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
cmake_minimum_required(VERSION 3.12...3.20)
project(air_shower)
#----------------------------------------------------------------------------
+6 -4
View File
@@ -6,13 +6,15 @@
History file
------------
14.11.2020 - S. Guatelli(air_shower-V10-06-04)
Migration to G4RunFactoryManager
24.05.2021 - B. Morgan (air_shower-V10-07-00)
Bump required CMake version range to 3.12...3.20, matching core Geant4
14.11.2020 - S. Guatelli(air_shower-V10-06-04)
Migration to G4RunFactoryManager
05.11.2020 - B.Tome (air_shower-V10-06-03)
Output results histograms to ROOT file
Add ROOT macro file to plot histograms
Add ROOT macro file to plot histograms
03.11.2020 - D.Sawkey (air_shower-V10-06-02)
Create material properties using std::vectors
+128 -118
View File
@@ -4,8 +4,14 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
!!! WARNING - FPE detection is activated !!!
############################################
################################
!!! G4Backtrace is activated !!!
################################
**************************************************************
Geant4 version Name: geant4-10-07-patch-02 (11-June-2021)
Geant4 version Name: geant4-10-07-ref-06 (25-June-2021)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -188,48 +194,48 @@ physicsList->setCut() start.
phot: for gamma SubType=12 BuildTable=0
LambdaPrime table from 200 keV to 100 TeV in 61 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermorePhElectric : Emin= 0 eV Emax= 100 TeV SauterGavrila Fluo
LivermorePhElectric : Emin= 0 meV Emax= 100 TeV SauterGavrila Fluo
compt: for gamma SubType=13 BuildTable=1
Lambda table from 100 eV to 1 MeV, 7 bins/decade, spline: 1
LambdaPrime table from 1 MeV to 100 TeV in 56 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
Klein-Nishina : Emin= 0 eV Emax= 100 TeV
Klein-Nishina : Emin= 0 meV Emax= 100 TeV
conv: for gamma SubType=14 BuildTable=1
Lambda table from 1.022 MeV to 100 TeV, 18 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
BetheHeitlerLPM : Emin= 0 eV Emax= 100 TeV ModifiedTsai
BetheHeitlerLPM : Emin= 0 meV Emax= 100 TeV ModifiedTsai
Rayl: for gamma SubType=11 BuildTable=1
Lambda table from 100 eV to 100 keV, 7 bins/decade, spline: 0
LambdaPrime table from 100 keV to 100 TeV in 63 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermoreRayleigh : Emin= 0 eV Emax= 100 TeV CullenGenerator
LivermoreRayleigh : Emin= 0 meV Emax= 100 TeV CullenGenerator
msc: for e- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 MeV Nbins=42 100 eV - 100 MeV
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1
UrbanMsc : Emin= 0 meV Emax= 100 MeV Nbins=42 100 eV - 100 MeV
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llim=1 mm
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Nbins=42 100 MeV - 100 TeV
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llim=1 mm
eIoni: for e- SubType=2
eIoni: for e- XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
MollerBhabha : Emin= 0 eV Emax= 100 TeV
MollerBhabha : Emin= 0 meV Emax= 100 TeV
eBrem: for e- SubType=3
eBrem: for e- XStype:4 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV ModifiedTsai
eBremSB : Emin= 0 meV Emax= 1 GeV ModifiedTsai
eBremLPM : Emin= 1 GeV Emax= 100 TeV ModifiedTsai
CoulombScat: for e-, integral:1 SubType=1 BuildTable=1
CoulombScat: for e- XStype:3 SubType=1 BuildTable=1
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
@@ -237,31 +243,31 @@ CoulombScat: for e-, integral:1 SubType=1 BuildTable=1
msc: for e+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 MeV Nbins=42 100 eV - 100 MeV
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1
UrbanMsc : Emin= 0 meV Emax= 100 MeV Nbins=42 100 eV - 100 MeV
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llim=1 mm
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Nbins=42 100 MeV - 100 TeV
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llim=1 mm
eIoni: for e+ SubType=2
eIoni: for e+ XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
MollerBhabha : Emin= 0 eV Emax= 100 TeV
MollerBhabha : Emin= 0 meV Emax= 100 TeV
eBrem: for e+ SubType=3
eBrem: for e+ XStype:4 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV ModifiedTsai
eBremSB : Emin= 0 meV Emax= 1 GeV ModifiedTsai
eBremLPM : Emin= 1 GeV Emax= 100 TeV ModifiedTsai
annihil: for e+, integral:1 SubType=5 BuildTable=0
annihil: for e+ XStype:2 SubType=5 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
eplus2gg : Emin= 0 eV Emax= 100 TeV
eplus2gg : Emin= 0 meV Emax= 100 TeV
CoulombScat: for e+, integral:1 SubType=1 BuildTable=1
CoulombScat: for e+ XStype:3 SubType=1 BuildTable=1
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
@@ -269,288 +275,288 @@ CoulombScat: for e+, integral:1 SubType=1 BuildTable=1
msc: for proton SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llim=1 mm
hIoni: for proton SubType=2
hIoni: for proton XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 2 MeV
Bragg : Emin= 0 meV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
hBrems: for proton SubType=3
hBrems: for proton XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
hPairProd: for proton SubType=4
hPairProd: for proton XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for proton, integral:1 SubType=1 BuildTable=1
CoulombScat: for proton XStype:3 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for GenericIon SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
UrbanMsc : Emin= 0 meV Emax= 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llim=1 mm
ionIoni: for GenericIon SubType=2
ionIoni: for GenericIon XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.02
Stopping Power data for 17 ion/material pairs
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 2 MeV
BraggIon : Emin= 0 meV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
msc: for alpha SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
UrbanMsc : Emin= 0 meV Emax= 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llim=1 mm
ionIoni: for alpha SubType=2
ionIoni: for alpha XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax=7.9452 MeV
BraggIon : Emin= 0 meV Emax=7.9452 MeV
BetheBloch : Emin=7.9452 MeV Emax= 100 TeV
msc: for anti_proton SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llim=1 mm
hIoni: for anti_proton SubType=2
hIoni: for anti_proton XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 2 MeV
ICRU73QO : Emin= 0 meV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
hBrems: for anti_proton SubType=3
hBrems: for anti_proton XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
hPairProd: for anti_proton SubType=4
hPairProd: for anti_proton XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for anti_proton, integral:1 SubType=1 BuildTable=1
CoulombScat: for anti_proton XStype:3 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for kaon+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llim=1 mm
hIoni: for kaon+ SubType=2
hIoni: for kaon+ XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax=1.05231 MeV
Bragg : Emin= 0 meV Emax=1.05231 MeV
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV
hBrems: for kaon+ SubType=3
hBrems: for kaon+ XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
hPairProd: for kaon+ SubType=4
hPairProd: for kaon+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for kaon+, integral:1 SubType=1 BuildTable=1
CoulombScat: for kaon+ XStype:3 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for kaon- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llim=1 mm
hIoni: for kaon- SubType=2
hIoni: for kaon- XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax=1.05231 MeV
ICRU73QO : Emin= 0 meV Emax=1.05231 MeV
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV
hBrems: for kaon- SubType=3
hBrems: for kaon- XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
hPairProd: for kaon- SubType=4
hPairProd: for kaon- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for kaon-, integral:1 SubType=1 BuildTable=1
CoulombScat: for kaon- XStype:3 SubType=1 BuildTable=1
Used Lambda table of kaon+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for mu+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llim=1 mm
muIoni: for mu+ SubType=2
muIoni: for mu+ XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 200 keV
Bragg : Emin= 0 meV Emax= 200 keV
BetheBloch : Emin= 200 keV Emax= 1 GeV
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
muBrems: for mu+ SubType=3
muBrems: for mu+ XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
MuBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
muPairProd: for mu+ SubType=4
muPairProd: for mu+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 21x1001 from 1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
muPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for mu+, integral:1 SubType=1 BuildTable=1
CoulombScat: for mu+ XStype:3 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for mu- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llim=1 mm
muIoni: for mu- SubType=2
muIoni: for mu- XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 200 keV
ICRU73QO : Emin= 0 meV Emax= 200 keV
BetheBloch : Emin= 200 keV Emax= 1 GeV
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
muBrems: for mu- SubType=3
muBrems: for mu- XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
MuBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
muPairProd: for mu- SubType=4
muPairProd: for mu- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 21x1001 from 1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
muPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for mu-, integral:1 SubType=1 BuildTable=1
CoulombScat: for mu- XStype:3 SubType=1 BuildTable=1
Used Lambda table of mu+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for pi+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llim=1 mm
hIoni: for pi+ SubType=2
hIoni: for pi+ XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax=297.505 keV
Bragg : Emin= 0 meV Emax=297.505 keV
BetheBloch : Emin=297.505 keV Emax= 100 TeV
hBrems: for pi+ SubType=3
hBrems: for pi+ XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
hPairProd: for pi+ SubType=4
hPairProd: for pi+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for pi+, integral:1 SubType=1 BuildTable=1
CoulombScat: for pi+ XStype:3 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for pi- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llim=1 mm
hIoni: for pi- SubType=2
hIoni: for pi- XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax=297.505 keV
ICRU73QO : Emin= 0 meV Emax=297.505 keV
BetheBloch : Emin=297.505 keV Emax= 100 TeV
hBrems: for pi- SubType=3
hBrems: for pi- XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
hPairProd: for pi- SubType=4
hPairProd: for pi- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
Used Lambda table of pi+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
Region <DefaultRegionForTheWorld> -- -- appears in <World> world volume
This region is in the mass world.
@@ -620,8 +626,8 @@ See commands in /vis/modeling/trajectories/ for other options.
ooo Run 0 starts (global).
--------- Ranlux engine status ---------
Initial seed = 1623139744
float_seed_table[] = 0.321051 0.703891 0.623028 0.90283 0.918803 0.131837 0.342942 0.572057 0.402445 0.552796 0.767171 0.742507 0.79422 0.927811 0.441404 0.5084 0.231716 0.00218672 0.591102 0.361275 0.165952 0.497306 0.286562 0.612128
Initial seed = 1624405979
float_seed_table[] = 0.317296 0.389101 0.631632 0.285013 0.520975 0.306073 0.238364 0.906989 0.29402 0.125726 0.945472 0.20919 0.531815 0.144216 0.802618 0.980342 0.576209 0.432081 0.279602 0.129886 0.270921 0.759642 0.522357 0.66217
i_lag = 23, j_lag = 9
carry = 0, count24 = 0
luxury = 3 nskip = 199
@@ -632,7 +638,7 @@ mu- Mono Plane
Run terminated.
Run Summary
Number of events processed : 100
User=2.140000s Real=2.283902s Sys=0.000000s
User=0.050000s Real=0.089928s Sys=0.000000s
### Run 0 (global) ended.
0 events have been kept for refreshing and/or reviewing.
"/vis/reviewKeptEvents" to review them one by one.
@@ -643,6 +649,8 @@ G4 kernel has come to Quit state.
UserDetectorConstruction deleted.
UserPhysicsList deleted.
UserActionInitialization deleted.
UserWorkerInitialization deleted.
UserWorkerThreadInitialization deleted.
UserRunAction deleted.
UserPrimaryGenerator deleted.
RunManager is deleting RunManagerKernel.
@@ -651,6 +659,7 @@ EventManager deleted.
Units table cleared.
TransportationManager deleted.
Total navigation history collections cleaned: 10
G4RNGHelper object is deleted.
================== Deleting memory pools ===================
Pool ID '20G4NavigationLevelRep', size : 0.0135 MB
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
@@ -659,15 +668,16 @@ Pool ID '15G4PrimaryVertex', size : 0.000961 MB
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
Pool ID '15G4HCofThisEvent', size : 0.000961 MB
Pool ID '16G4HitsCollection', size : 0.000961 MB
Pool ID '17G4DynamicParticle', size : 0.024 MB
Pool ID '7G4Track', size : 0.0481 MB
Pool ID '17G4DynamicParticle', size : 0.0202 MB
Pool ID '7G4Track', size : 0.0404 MB
Pool ID '18G4TouchableHistory', size : 0.000961 MB
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
Pool ID '15UltraOpticalHit', size : 0.00385 MB
Pool ID '15UltraOpticalHit', size : 0.00673 MB
Number of memory pools allocated: 12 of which, static: 0
Dynamic pools deleted: 12 / Total memory freed: 0.097 MB
Dynamic pools deleted: 12 / Total memory freed: 0.088 MB
============================================================
G4Allocator objects are deleted.
UImanager deleted.
StateManager deleted.
RunManagerKernel is deleted. Good bye :)
RunManager is deleted.
+1 -4
View File
@@ -1,9 +1,6 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.8...3.18)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
cmake_minimum_required(VERSION 3.12...3.20)
project(amsEcal)
#----------------------------------------------------------------------------
+5
View File
@@ -13,6 +13,11 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
24-05-21, B. Morgan (amsEcal-V10-07-01)
- Bump required CMake version range to 3.12...3.20, matching core Geant4
16-05-21 mma (amsEcal-V10-07-00)
- Migration to G4RunManagerFactory and G4SteppingVerboseWithUnits.
02-11-20 Ben Morgan (amsEcal-V10-06-00)
- Support same CMake version range as core Geant4
+13 -19
View File
@@ -33,19 +33,14 @@
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif
#include "G4RunManagerFactory.hh"
#include "G4UImanager.hh"
#include "G4SteppingVerbose.hh"
#include "Randomize.hh"
#include "DetectorConstruction.hh"
#include "PhysicsList.hh"
#include "ActionInitialization.hh"
#include "SteppingVerbose.hh"
#include "G4UIExecutive.hh"
#include "G4VisExecutive.hh"
@@ -61,19 +56,18 @@ int main(int argc,char** argv) {
//choose the Random engine
G4Random::setTheEngine(new CLHEP::RanecuEngine);
// Construct the default run manager
#ifdef G4MULTITHREADED
G4MTRunManager* runManager = new G4MTRunManager;
// Number of threads can be defined via 3rd argument
if (argc==3) {
G4int nThreads = G4UIcommand::ConvertToInt(argv[2]);
if(nThreads > 0) { runManager->SetNumberOfThreads(nThreads); }
//Use SteppingVerbose with Unit
G4int precision = 4;
G4SteppingVerbose::UseBestUnit(precision);
//Creating run manager
auto runManager = G4RunManagerFactory::CreateRunManager();
if (argc==3) {
G4int nThreads = G4UIcommand::ConvertToInt(argv[2]);
runManager->SetNumberOfThreads(nThreads);
}
#else
G4VSteppingVerbose::SetInstance(new SteppingVerbose);
G4RunManager* runManager = new G4RunManager;
#endif
//set mandatory initialization classes
DetectorConstruction* detector = new DetectorConstruction;
runManager->SetUserInitialization(detector);
@@ -33,7 +33,6 @@
#include "G4VUserActionInitialization.hh"
class DetectorConstruction;
class G4VSteppingVerbose;
/// Action initialization class.
///
@@ -42,16 +41,13 @@ class ActionInitialization : public G4VUserActionInitialization
{
public:
ActionInitialization(DetectorConstruction*);
virtual ~ActionInitialization();
~ActionInitialization() override;
virtual void BuildForMaster() const;
virtual void Build() const;
virtual G4VSteppingVerbose* InitializeSteppingVerbose() const;
void BuildForMaster() const override;
void Build() const override;
private:
DetectorConstruction* fDetector;
};
#endif
+17 -5
View File
@@ -1,10 +1,17 @@
Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Forcing G4RunManager type...
############################################
!!! WARNING - FPE detection is activated !!!
############################################
################################
!!! G4Backtrace is activated !!!
################################
**************************************************************
Geant4 version Name: geant4-10-07-patch-02 (11-June-2021)
Geant4 version Name: geant4-10-07-ref-06 (25-June-2021)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -145,19 +152,19 @@ Start closing geometry.
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 32 kByte
Total CPU time elapsed for geometry optimisation: 0 seconds
Total CPU time elapsed for geometry optimisation: 0.01 seconds
Voxelisation: top CPU users:
Percent Total CPU System CPU Memory Volume
------- ---------- ---------- -------- ----------
0.00 0.00 0.00 31k layer
100.00 0.01 0.00 31k layer
0.00 0.00 0.00 1k module
0.00 0.00 0.00 1k calorimeter
Voxelisation: top memory users:
Percent Memory Heads Nodes Pointers Total CPU Volume
------- -------- ------ ------ -------- ---------- ----------
94.74 30k 1 490 980 0.00 layer
94.74 30k 1 490 980 0.01 layer
3.16 1k 1 17 20 0.00 module
2.10 0k 1 10 18 0.00 calorimeter
### Run 0 starts.
@@ -179,7 +186,7 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Run terminated.
Run Summary
Number of events processed : 10000
User=7.700000s Real=8.251293s Sys=0.010000s
User=6.370000s Real=6.668766s Sys=0.000000s
-------------------------------------------------------------
---> The calorimeter is 9 Modules
@@ -307,13 +314,17 @@ G4 kernel has come to Quit state.
UserDetectorConstruction deleted.
UserPhysicsList deleted.
UserActionInitialization deleted.
UserWorkerInitialization deleted.
UserWorkerThreadInitialization deleted.
UserRunAction deleted.
UserPrimaryGenerator deleted.
RunManager is deleting RunManagerKernel.
G4SDManager deleted.
EventManager deleted.
Units table cleared.
TransportationManager deleted.
Total navigation history collections cleaned: 7
G4RNGHelper object is deleted.
================== Deleting memory pools ===================
Pool ID '20G4NavigationLevelRep', size : 0.00865 MB
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
@@ -331,3 +342,4 @@ G4Allocator objects are deleted.
UImanager deleted.
StateManager deleted.
RunManagerKernel is deleted. Good bye :)
RunManager is deleted.
@@ -34,7 +34,6 @@
#include "EventAction.hh"
#include "TrackingAction.hh"
#include "SteppingAction.hh"
#include "SteppingVerbose.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -74,10 +73,3 @@ void ActionInitialization::Build() const
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VSteppingVerbose* ActionInitialization::InitializeSteppingVerbose() const
{
return new SteppingVerbose();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,157 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file radioactivedecay/rdecay01/src/SteppingVerbose.cc
/// \brief Implementation of the SteppingVerbose class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "SteppingVerbose.hh"
#include "G4SteppingManager.hh"
#include "G4ParticleTypes.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
SteppingVerbose::SteppingVerbose()
: G4SteppingVerbose()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
SteppingVerbose::~SteppingVerbose()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void SteppingVerbose::TrackingStarted()
{
CopyState();
G4int prec = G4cout.precision(3);
//Step zero
//
if( verboseLevel > 0 ){
G4cout << std::setw( 5) << "Step#" << " "
<< std::setw( 6) << "X" << " "
<< std::setw( 6) << "Y" << " "
<< std::setw( 6) << "Z" << " "
<< std::setw( 9) << "KineE" << " "
<< std::setw( 9) << "dEStep" << " "
<< std::setw(10) << "StepLeng"
<< std::setw(10) << "TrakLeng"
<< std::setw(10) << "Volume" << " "
<< std::setw(10) << "Process" << G4endl;
G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< std::setw(10) << fTrack->GetVolume()->GetName()
<< " initStep" << G4endl;
}
G4cout.precision(prec);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void SteppingVerbose::StepInfo()
{
CopyState();
G4int prec = G4cout.precision(3);
if( verboseLevel >= 1 ){
if( verboseLevel >= 4 ) VerboseTrack();
if( verboseLevel >= 3 ){
G4cout << G4endl;
G4cout << std::setw( 5) << "#Step#" << " "
<< std::setw( 6) << "X" << " "
<< std::setw( 6) << "Y" << " "
<< std::setw( 6) << "Z" << " "
<< std::setw( 9) << "KineE" << " "
<< std::setw( 9) << "dEStep" << " "
<< std::setw(10) << "StepLeng"
<< std::setw(10) << "TrakLeng"
<< std::setw(10) << "Volume" << " "
<< std::setw(10) << "Process" << G4endl;
}
G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< std::setw(10) << fTrack->GetVolume()->GetName();
const G4VProcess* process
= fStep->GetPostStepPoint()->GetProcessDefinedStep();
G4String procName = " UserLimit";
if (process) procName = process->GetProcessName();
if (fStepStatus == fWorldBoundary) procName = "OutOfWorld";
G4cout << " " << std::setw(10) << procName;
G4cout << G4endl;
if (verboseLevel == 2) {
const std::vector<const G4Track*>* secondary
= fStep->GetSecondaryInCurrentStep();
size_t nbtrk = (*secondary).size();
if (nbtrk) {
G4cout << "\n :----- List of secondaries ----------------" << G4endl;
G4cout.precision(4);
for (size_t lp=0; lp<(*secondary).size(); lp++) {
G4cout << " "
<< std::setw(13)
<< (*secondary)[lp]->GetDefinition()->GetParticleName()
<< ": energy ="
<< std::setw(6)
<< G4BestUnit((*secondary)[lp]->GetKineticEnergy(),"Energy")
<< " time ="
<< std::setw(6)
<< G4BestUnit((*secondary)[lp]->GetGlobalTime(),"Time");
G4cout << G4endl;
}
G4cout << " :------------------------------------------\n" << G4endl;
}
}
}
G4cout.precision(prec);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,9 +1,6 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.8...3.18)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
cmake_minimum_required(VERSION 3.12...3.20)
project(Brachy)
#----------------------------------------------------------------------------
+9
View File
@@ -7,6 +7,15 @@
Category History file
---------------------
24.05.2021 - B. Morgan; brachy-V10-07-01
Bump required CMake version range to 3.12...3.20, matching core Geant4
12.02.2021 - S. Guatelli; brachy-V10-07-00
Cleaning of the code. Use C++11 keywords and patterns.
Remove BrachyMaterial class. Materials implemented now
using NIST Material Manager of Geant4. Remove SetCuts from
the local PhysicsList as it is not thread-safe.
12.11.2020 - S. Guatelli; brachy-V10-06-03
Migration to G4RunManagerFactory
+134 -126
View File
@@ -4,8 +4,14 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
!!! WARNING - FPE detection is activated !!!
############################################
################################
!!! G4Backtrace is activated !!!
################################
**************************************************************
Geant4 version Name: geant4-10-07-patch-02 (11-June-2021)
Geant4 version Name: geant4-10-07-ref-06 (25-June-2021)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -80,16 +86,17 @@ Checking overlaps for volume phys_iridium_core (G4Tubs) ... OK!
/run/verbose 0
/event/verbose 0
/source/switch Flexi
Now the source is Flexi
Now the brachy source is Flexi
/run/geometryModified
Old Source is deleted ...
Old brachy source is deleted ...
G4Material WARNING: duplicate name of material Stainless steel 304
Checking overlaps for volume phys_steel_shell (G4Tubs) ... OK!
Checking overlaps for volume phys_air_gap (G4Tubs) ... OK!
Checking overlaps for volume phys_End1_steel_shell (G4Tubs) ... OK!
Checking overlaps for volume phys_End2_steel_shell (G4Cons) ... OK!
Checking overlaps for volume phys_cable (G4Tubs) ... OK!
Checking overlaps for volume phys_iridium_core (G4Tubs) ... OK!
... New source is created ...
New brachy source is created ...
/run/geometryModified
/control/execute iridium_source_primary.mac
/gps/ene/type Arb
@@ -238,63 +245,63 @@ G4ScoringBox : boxMesh_4 --- Shape: Box mesh
### === Deexcitation model UAtomDeexcitation is activated for 1 region:
DefaultRegionForTheWorld 1 1 0
### === Auger cascade flag: 1
### === Auger flag: 1
### === Ignore cuts flag: 1
phot: for gamma SubType=12 BuildTable=0
LambdaPrime table from 200 keV to 100 TeV in 174 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermorePhElectric : Emin= 0 eV Emax= 100 TeV SauterGavrila Fluo
LivermorePhElectric : Emin= 0 meV Emax= 100 TeV SauterGavrila Fluo
compt: for gamma SubType=13 BuildTable=1
Lambda table from 100 eV to 1 MeV, 20 bins/decade, spline: 1
LambdaPrime table from 1 MeV to 100 TeV in 160 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermoreCompton : Emin= 0 eV Emax= 1 GeV Fluo
LivermoreCompton : Emin= 0 meV Emax= 1 GeV Fluo
KleinNishina : Emin= 1 GeV Emax= 100 TeV Fluo
conv: for gamma SubType=14 BuildTable=1
Lambda table from 1.022 MeV to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
Livermore5DConversion : Emin= 0 eV Emax= 100 TeV ModifiedTsai
Livermore5DConversion : Emin= 0 meV Emax= 100 TeV ModifiedTsai
Rayl: for gamma SubType=11 BuildTable=1
Lambda table from 100 eV to 100 keV, 20 bins/decade, spline: 0
LambdaPrime table from 100 keV to 100 TeV in 180 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermoreRayleigh : Emin= 0 eV Emax= 100 TeV CullenGenerator
LivermoreRayleigh : Emin= 0 meV Emax= 100 TeV CullenGenerator
msc: for e- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
GoudsmitSaunderson : Emin= 0 eV Emax= 100 MeV Nbins=120 100 eV - 100 MeV
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
GoudsmitSaunderson : Emin= 0 meV Emax= 100 MeV Nbins=120 100 eV - 100 MeV
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Nbins=120 100 MeV - 100 TeV
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
eIoni: for e- SubType=2
eIoni: for e- XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.2, 0.01 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
LowEnergyIoni : Emin= 0 eV Emax= 100 keV deltaVI
LowEnergyIoni : Emin= 0 meV Emax= 100 keV deltaVI
MollerBhabha : Emin= 100 keV Emax= 100 TeV deltaVI
eBrem: for e- SubType=3
eBrem: for e- XStype:4 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV AngularGen2BS
eBremSB : Emin= 0 meV Emax= 1 GeV AngularGen2BS
eBremLPM : Emin= 1 GeV Emax= 100 TeV AngularGen2BS
ePairProd: for e- SubType=4
ePairProd: for e- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
ePairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
ePairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for e-, integral:1 SubType=1 BuildTable=1
CoulombScat: for e- XStype:3 SubType=1 BuildTable=1
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
@@ -302,38 +309,38 @@ CoulombScat: for e-, integral:1 SubType=1 BuildTable=1
msc: for e+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
GoudsmitSaunderson : Emin= 0 eV Emax= 100 MeV Nbins=120 100 eV - 100 MeV
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
GoudsmitSaunderson : Emin= 0 meV Emax= 100 MeV Nbins=120 100 eV - 100 MeV
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Nbins=120 100 MeV - 100 TeV
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
eIoni: for e+ SubType=2
eIoni: for e+ XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.2, 0.01 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
MollerBhabha : Emin= 0 eV Emax= 100 TeV deltaVI
MollerBhabha : Emin= 0 meV Emax= 100 TeV deltaVI
eBrem: for e+ SubType=3
eBrem: for e+ XStype:4 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV AngularGen2BS
eBremSB : Emin= 0 meV Emax= 1 GeV AngularGen2BS
eBremLPM : Emin= 1 GeV Emax= 100 TeV AngularGen2BS
ePairProd: for e+ SubType=4
ePairProd: for e+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
ePairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
ePairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
annihil: for e+, integral:1 SubType=5 BuildTable=0
annihil: for e+ XStype:2 SubType=5 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
eplus2gg : Emin= 0 eV Emax= 100 TeV
eplus2gg : Emin= 0 meV Emax= 100 TeV
CoulombScat: for e+, integral:1 SubType=1 BuildTable=1
CoulombScat: for e+ XStype:3 SubType=1 BuildTable=1
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
@@ -341,56 +348,56 @@ CoulombScat: for e+, integral:1 SubType=1 BuildTable=1
msc: for proton SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for proton SubType=2
hIoni: for proton XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 2 MeV deltaVI
Bragg : Emin= 0 meV Emax= 2 MeV deltaVI
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
hBrems: for proton SubType=3
hBrems: for proton XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
===== Limit on energy threshold has been applied
hPairProd: for proton SubType=4
hPairProd: for proton XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for proton, integral:1 SubType=1 BuildTable=1
CoulombScat: for proton XStype:3 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
nuclearStopping: for proton SubType=8 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
ICRU49NucStopping : Emin= 0 meV Emax= 1 MeV
msc: for GenericIon SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
UrbanMsc : Emin= 0 meV Emax= 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
ionIoni: for GenericIon SubType=2
ionIoni: for GenericIon XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
ParamICRU73 : Emin= 0 eV Emax= 100 TeV deltaVI
ParamICRU73 : Emin= 0 meV Emax= 100 TeV deltaVI
nuclearStopping: for GenericIon SubType=8 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
ICRU49NucStopping : Emin= 0 meV Emax= 1 MeV
======================================================================
====== Radioactive Decay Physics Parameters =======
======================================================================
@@ -404,269 +411,270 @@ Auger electron emission enabled 1
Auger cascade enabled 1
Check EM cuts disabled for atomic de-excitation 1
Use Bearden atomic level energies 0
Threshold for very long decay time at rest 1e+27 ns
======================================================================
msc: for alpha SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
UrbanMsc : Emin= 0 meV Emax= 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
ionIoni: for alpha SubType=2
ionIoni: for alpha XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax=7.9452 MeV deltaVI
BraggIon : Emin= 0 meV Emax=7.9452 MeV deltaVI
BetheBloch : Emin=7.9452 MeV Emax= 100 TeV deltaVI
nuclearStopping: for alpha SubType=8 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
ICRU49NucStopping : Emin= 0 meV Emax= 1 MeV
msc: for anti_proton SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for anti_proton SubType=2
hIoni: for anti_proton XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 2 MeV deltaVI
ICRU73QO : Emin= 0 meV Emax= 2 MeV deltaVI
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
hBrems: for anti_proton SubType=3
hBrems: for anti_proton XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
===== Limit on energy threshold has been applied
hPairProd: for anti_proton SubType=4
hPairProd: for anti_proton XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for anti_proton, integral:1 SubType=1 BuildTable=1
CoulombScat: for anti_proton XStype:3 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for kaon+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for kaon+ SubType=2
hIoni: for kaon+ XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax=1.05231 MeV deltaVI
Bragg : Emin= 0 meV Emax=1.05231 MeV deltaVI
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
hBrems: for kaon+ SubType=3
hBrems: for kaon+ XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
===== Limit on energy threshold has been applied
hPairProd: for kaon+ SubType=4
hPairProd: for kaon+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for kaon+, integral:1 SubType=1 BuildTable=1
CoulombScat: for kaon+ XStype:3 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for kaon- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for kaon- SubType=2
hIoni: for kaon- XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax=1.05231 MeV deltaVI
ICRU73QO : Emin= 0 meV Emax=1.05231 MeV deltaVI
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
hBrems: for kaon- SubType=3
hBrems: for kaon- XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
===== Limit on energy threshold has been applied
hPairProd: for kaon- SubType=4
hPairProd: for kaon- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for kaon-, integral:1 SubType=1 BuildTable=1
CoulombScat: for kaon- XStype:3 SubType=1 BuildTable=1
Used Lambda table of kaon+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for mu+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
muIoni: for mu+ SubType=2
muIoni: for mu+ XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 200 keV deltaVI
Bragg : Emin= 0 meV Emax= 200 keV deltaVI
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
muBrems: for mu+ SubType=3
muBrems: for mu+ XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
MuBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
===== Limit on energy threshold has been applied
muPairProd: for mu+ SubType=4
muPairProd: for mu+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 21x1001 from 1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
muPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for mu+, integral:1 SubType=1 BuildTable=1
CoulombScat: for mu+ XStype:3 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for mu- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
muIoni: for mu- SubType=2
muIoni: for mu- XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 200 keV deltaVI
ICRU73QO : Emin= 0 meV Emax= 200 keV deltaVI
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
muBrems: for mu- SubType=3
muBrems: for mu- XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
MuBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
===== Limit on energy threshold has been applied
muPairProd: for mu- SubType=4
muPairProd: for mu- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 21x1001 from 1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
muPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for mu-, integral:1 SubType=1 BuildTable=1
CoulombScat: for mu- XStype:3 SubType=1 BuildTable=1
Used Lambda table of mu+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for pi+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for pi+ SubType=2
hIoni: for pi+ XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax=297.505 keV deltaVI
Bragg : Emin= 0 meV Emax=297.505 keV deltaVI
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
hBrems: for pi+ SubType=3
hBrems: for pi+ XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
===== Limit on energy threshold has been applied
hPairProd: for pi+ SubType=4
hPairProd: for pi+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for pi+, integral:1 SubType=1 BuildTable=1
CoulombScat: for pi+ XStype:3 SubType=1 BuildTable=1
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
msc: for pi- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llimit=1
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for pi- SubType=2
hIoni: for pi- XStype:1 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax=297.505 keV deltaVI
ICRU73QO : Emin= 0 meV Emax=297.505 keV deltaVI
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
hBrems: for pi- SubType=3
hBrems: for pi- XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
===== Limit on energy threshold has been applied
hPairProd: for pi- SubType=4
hPairProd: for pi- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
CoulombScat: for pi-, integral:1 SubType=1 BuildTable=1
CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
Used Lambda table of pi+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
========= Table of registered couples ============================
Index : 0 used in the geometry : Yes
Material : Air
Material : G4_AIR
Range cuts : gamma 50 um e- 50 um e+ 50 um proton 50 um
Energy thresholds : gamma 250 eV e- 250 eV e+ 250 eV proton 5 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 1 used in the geometry : Yes
Material : Water
Material : G4_WATER
Range cuts : gamma 50 um e- 50 um e+ 50 um proton 50 um
Energy thresholds : gamma 250 eV e- 57.2461 keV e+ 56.4171 keV proton 5 keV
Region(s) which use this couple :
@@ -675,12 +683,12 @@ Index : 1 used in the geometry : Yes
Index : 2 used in the geometry : Yes
Material : Stainless steel 304
Range cuts : gamma 50 um e- 50 um e+ 50 um proton 50 um
Energy thresholds : gamma 4.39316 keV e- 154.358 keV e+ 151.017 keV proton 5 keV
Energy thresholds : gamma 4.34536 keV e- 155.488 keV e+ 151.017 keV proton 5 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 3 used in the geometry : Yes
Material : Iridium
Material : G4_Ir
Range cuts : gamma 50 um e- 50 um e+ 50 um proton 50 um
Energy thresholds : gamma 26.8116 keV e- 240.851 keV e+ 233.926 keV proton 5 keV
Region(s) which use this couple :
@@ -35,7 +35,7 @@ class G4GeneralParticleSource;
class BrachyActionInitialization: public G4VUserActionInitialization
{
public:
BrachyActionInitialization();
explicit BrachyActionInitialization();
virtual ~BrachyActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
@@ -24,7 +24,7 @@
// ********************************************************************
//
/*
Author: Susanna Guatelli
Author: Susanna Guatelli, susanna@uow.edu.au
The class BrachyAnalysisManager creates and manages histograms and ntuples
*/
@@ -28,64 +28,59 @@
// * BrachyDetectorConstruction.hh *
// * *
// ****************************************
// This class manages the geometry of the simulation experimental set-up
//
// S. Guatelli, A. Le
// S. Guatelli, A. Le, University of Wollongong
#ifndef BrachyDetectorConstruction_H
#define BrachyDetectorConstruction_H 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
#include "G4SystemOfUnits.hh"
class BrachyDetectorMessenger;
class BrachyFactory;
class G4LogicalVolume;
class G4Material;
class G4Box;
class G4Colour;
class G4VPhysicalVolume;
class G4VPhysicalVolume;
class BrachyMaterial;
class BrachyFactory;
class BrachyDetectorConstruction : public G4VUserDetectorConstruction
{
public:
BrachyDetectorConstruction();
explicit BrachyDetectorConstruction();
~BrachyDetectorConstruction();
G4VPhysicalVolume* Construct();
void SwitchBrachytherapicSeed(); //Change radiactive source through GUI
G4VPhysicalVolume* Construct() override;
void SwitchBrachytherapicSeed(); //Change brachy source through GUI
void SelectBrachytherapicSeed(G4String val);
void ConstructPhantom();
void PrintDetectorParameters();
void SetPhantomMaterial(G4String);
private:
G4int fDetectorChoice; //Select brachytherapic seed
BrachyFactory* fFactory;
// World ...
BrachyDetectorMessenger* fDetectorMessenger;
G4Box* fWorld; //pointer to the solid World
G4LogicalVolume* fWorldLog; //pointer to the logical World
G4VPhysicalVolume* fWorldPhys; //pointer to the physical World
// Phantom ...
G4Box* fPhantom; //pointer to solid phantom
G4LogicalVolume* fPhantomLog; //pointer to logic phantom
G4VPhysicalVolume* fPhantomPhys; //pointer to physical phantom
G4Material* fPhantomAbsorberMaterial;
G4double fPhantomSizeX; //Phantom XSize
G4double fPhantomSizeY; //Phantom YSize
G4double fPhantomSizeZ; //Phantom ZSize
G4double fWorldSizeX ; //World XSize
G4double fWorldSizeY ; //World YSize
G4double fWorldSizeZ ; //World XSize
BrachyDetectorMessenger* fDetectorMessenger;
BrachyMaterial* fMaterial;
G4double fPhantomSizeX; //Phantom X Size
G4double fPhantomSizeY; //Phantom Y Size
G4double fPhantomSizeZ; //Phantom Z Size
G4double fWorldSizeX; //World X Size
G4double fWorldSizeY; //World Y Size
G4double fWorldSizeZ; //World X Size
G4int fDetectorChoice; //Select brachytherapic seed
};
#endif
@@ -46,20 +46,19 @@ class G4LogicalVolume;
class G4Tubs;
class G4Cons;
class G4VPhysicalVolume;
class BrachyMaterial;
class G4VisAttributes;
class BrachyDetectorConstructionFlexi
{
public:
BrachyDetectorConstructionFlexi();
explicit BrachyDetectorConstructionFlexi();
~BrachyDetectorConstructionFlexi();
void ConstructFlexi(G4VPhysicalVolume*);
// Model the Flexi iridium source
void CleanFlexi();
// Destroy the Iridium source in the experimental set-up
// Clean the Iridium source in the experimental set-up
private:
G4Tubs* fSteelShell;
@@ -89,8 +88,6 @@ private:
G4VisAttributes* fSteelAttributes;
G4VisAttributes* fEndAttributes;
G4VisAttributes* fSimpleIridiumVisAtt;
BrachyMaterial* fMat;
};
#endif
@@ -30,7 +30,9 @@
// * BrachyDetectorConstructionI.hh *
// * *
// ****************************************
// Model of the Iodium source
//
// Author: Susanna Guatelli, susanna@uow.edu.au
// Model of Bebig Isoseed Iodine source
//
#ifndef BrachyDetectorConstructionI_H
#define BrachyDetectorConstructionI_H 1
@@ -42,16 +44,15 @@ class G4Tubs;
class G4Sphere;
class G4LogicalVolume;
class G4VPhysicalVolume;
class BrachyMaterial;
class G4VisAttributes;
class BrachyDetectorConstructionI
{
public:
BrachyDetectorConstructionI();
explicit BrachyDetectorConstructionI();
~BrachyDetectorConstructionI();
void ConstructIodine(G4VPhysicalVolume*);// Construct iodium source
void CleanIodine();
void ConstructIodine(G4VPhysicalVolume*);// Construct iodine source
void CleanIodine(); // Clean iodine source
private:
G4Tubs* fDefaultTub;
G4Tubs* fCapsule;
@@ -69,8 +70,6 @@ private:
G4VisAttributes* fSimpleIodineVisAtt;
G4VisAttributes* fSimpleCapsuleVisAtt;
G4VisAttributes* fSimpleCapsuleTipVisAtt;
BrachyMaterial* fMaterial;
};
#endif
@@ -43,7 +43,6 @@
#include "G4VUserDetectorConstruction.hh"
class G4VPhysicalVolume;
class BrachyMaterial;
class G4Sphere;
class G4Tubs;
class G4LogicalVolume;
@@ -58,9 +57,6 @@ public:
void CleanLeipzigApplicator();
private:
BrachyMaterial* fMaterial;
G4Tubs* fCapsule;
G4Sphere* fCapsuleTip;
G4Tubs* fIridiumCore;
@@ -83,5 +79,4 @@ private:
G4VisAttributes* fSimpleCapsuleTipVisAtt;
G4VisAttributes* fApplicatorVisAtt;
};
#endif
@@ -47,13 +47,12 @@ class G4Tubs;
class G4Box;
class G4Sphere;
class G4VPhysicalVolume;
class BrachyMaterial;
class G4VisAttributes;
class BrachyDetectorConstructionOncura6711
{
public:
BrachyDetectorConstructionOncura6711();
explicit BrachyDetectorConstructionOncura6711();
~BrachyDetectorConstructionOncura6711();
void ConstructOncura6711(G4VPhysicalVolume*);
@@ -78,9 +77,6 @@ private:
G4Tubs* fOncuraSilverCore;
G4LogicalVolume* fOncuraSilverCoreLog;
G4VPhysicalVolume* fOncuraSilverCorePhys;
BrachyMaterial* fMat;
G4VisAttributes* fOncuraCapsuleShellVisAtt;
G4VisAttributes* fOncuraCapsuleTipVisAtt;
G4VisAttributes* fOncuraSilverCoreVisAtt;
@@ -46,20 +46,19 @@ class G4Tubs;
class G4Box;
class G4Sphere;
class G4VPhysicalVolume;
class BrachyMaterial;
class G4VisAttributes;
class BrachyDetectorConstructionTG186
{
public:
BrachyDetectorConstructionTG186();
explicit BrachyDetectorConstructionTG186();
~BrachyDetectorConstructionTG186();
void ConstructTG186(G4VPhysicalVolume*);
// Model the TG186 reference source
void CleanTG186();
// Destroy the TG186 reference source in the experimental set-up
// Clean the TG186 reference source
private:
G4Tubs* fTG186capsule ;
@@ -74,9 +73,6 @@ private:
G4Tubs* fTG186cable;
G4LogicalVolume* fTG186cableLog;
G4VPhysicalVolume* fTG186cablePhys;
BrachyMaterial* fMat;
G4VisAttributes* fTG186simpleCapsuleVisAtt;
G4VisAttributes* fTG186simpleCapsuleTipVisAtt;
G4VisAttributes* fTG186simpleIridiumVisAtt;
@@ -42,14 +42,13 @@ class BrachyDetectorConstruction;
class G4UIdirectory;
class G4UIcmdWithAString;
class BrachyDetectorMessenger: public G4UImessenger
{
public:
BrachyDetectorMessenger(BrachyDetectorConstruction* );
explicit BrachyDetectorMessenger(BrachyDetectorConstruction* );
~BrachyDetectorMessenger();
void SetNewValue(G4UIcommand*, G4String);
void SetNewValue(G4UIcommand*, G4String) override;
private:
@@ -49,7 +49,7 @@ class BrachyFactory
{
public:
BrachyFactory();
explicit BrachyFactory();
virtual ~BrachyFactory();
// this function manages the creation of the source in terms of
@@ -40,24 +40,23 @@
#include "BrachyFactory.hh"
#include "G4RunManager.hh"
class BrachyFactory;
class BrachyDetectorConstructionFlexi;
class G4ParticleGun;
class G4Run;
class G4Event;
class BrachyFactory;
class BrachyDetectorConstructionFlexi;
// This class manages the creation of the Nucletron Flexi Source
class BrachyFactoryFlexi : public BrachyFactory
{
public:
BrachyFactoryFlexi();
explicit BrachyFactoryFlexi();
~BrachyFactoryFlexi();
void CreateSource(G4VPhysicalVolume*);
void CleanSource();
void CreateSource(G4VPhysicalVolume*)override;
void CleanSource() override;
private:
BrachyDetectorConstructionFlexi* fFlexiSource;
};
#endif
@@ -33,34 +33,30 @@
// Code developed by:
// S.Guatelli
//
//
//
//
// --------------------------------------------------------------
#ifndef BrachyFactoryI_h
#define BrachyFactoryI_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "BrachyDetectorConstructionI.hh"
#include "BrachyFactory.hh"
#include "G4RunManager.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
class BrachyFactory;
class BrachyDetectorConstructionI;
class G4ParticleGun;
class G4Run;
class G4Event;
class BrachyFactory;
class BrachyDetectorConstructionI;
// This class manages the creation of Bebig Isoseed I-125 source
// used in interstitial brachytherapy ...
class BrachyFactoryI:public BrachyFactory
{
public:
BrachyFactoryI();
explicit BrachyFactoryI();
~BrachyFactoryI();
void CreateSource(G4VPhysicalVolume*);
void CleanSource();
void CreateSource(G4VPhysicalVolume*)override;
void CleanSource() override;
private:
BrachyDetectorConstructionI* fIodineSource;
@@ -38,24 +38,24 @@
#ifndef BrachyFactoryLeipzig_h
#define BrachyFactoryLeipzig_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "BrachyFactory.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4RunManager.hh"
class BrachyDetectorConstructionLeipzig;
class G4ParticleGun;
class G4Run;
class G4Event;
class BrachyFactory;
class BrachyDetectorConstructionLeipzig;
class BrachyFactoryLeipzig : public BrachyFactory
{
public:
BrachyFactoryLeipzig();
explicit BrachyFactoryLeipzig();
~BrachyFactoryLeipzig();
void CreateSource(G4VPhysicalVolume*);
void CleanSource();
void CreateSource(G4VPhysicalVolume*)override;
void CleanSource()override;
private:
BrachyDetectorConstructionLeipzig* fLeipzigSource;
@@ -39,21 +39,21 @@
#include "BrachyFactory.hh"
#include "G4RunManager.hh"
class BrachyFactory;
class BrachyDetectorConstructionOncura6711;
class G4ParticleGun;
class G4Run;
class G4Event;
class BrachyFactory;
class BrachyDetectorConstructionOncura6711;
// This class manages the creation of iodine source
// brachytherapy ...
class BrachyFactoryOncura6711 : public BrachyFactory
{
public:
BrachyFactoryOncura6711();
explicit BrachyFactoryOncura6711();
~BrachyFactoryOncura6711();
void CreateSource(G4VPhysicalVolume*);
void CleanSource();
void CreateSource(G4VPhysicalVolume*) override;
void CleanSource() override;
private:
BrachyDetectorConstructionOncura6711* fOncura6711IodineSource;
@@ -39,21 +39,19 @@
#include "BrachyFactory.hh"
#include "G4RunManager.hh"
class BrachyFactory;
class BrachyDetectorConstructionTG186;
class G4ParticleGun;
class G4Run;
class G4Event;
class BrachyFactory;
class BrachyDetectorConstructionTG186;
// This class manages the creation of iridum source used in endocavitary
// brachytherapy ...
class BrachyFactoryTG186 : public BrachyFactory
class BrachyFactoryTG186: public BrachyFactory
{
public:
BrachyFactoryTG186();
explicit BrachyFactoryTG186();
~BrachyFactoryTG186();
void CreateSource(G4VPhysicalVolume*);
void CleanSource();
void CreateSource(G4VPhysicalVolume*) override;
void CleanSource() override;
private:
BrachyDetectorConstructionTG186* fTG186iridiumSource;
@@ -44,20 +44,17 @@ class BrachyPhysicsListMessenger;
class BrachyPhysicsList: public G4VModularPhysicsList
{
public:
BrachyPhysicsList();
explicit BrachyPhysicsList();
~BrachyPhysicsList();
void ConstructParticle();
void ConstructParticle() override;
void AddPhysicsList(const G4String& name);
void ConstructProcess();
protected:
void SetCuts();
void ConstructProcess() override;
private:
BrachyPhysicsListMessenger* fMessenger;
G4VPhysicsConstructor* fEmPhysicsList;
G4VPhysicsConstructor* fDecPhysicsList;
G4VPhysicsConstructor* fRadDecayPhysicsList;
BrachyPhysicsListMessenger* fMessenger;
G4String fEmName;
};
#endif
@@ -23,6 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Author: Susanna Guatelli susanna@uow.edu.au
//
#ifndef BrachyPhysicsListMessenger_h
#define BrachyPhysicsListMessenger_h 1
@@ -36,17 +38,16 @@ class G4UIcmdWithAString;
class BrachyPhysicsListMessenger: public G4UImessenger
{
public:
BrachyPhysicsListMessenger(BrachyPhysicsList* );
explicit BrachyPhysicsListMessenger(BrachyPhysicsList* );
~BrachyPhysicsListMessenger();
virtual
void SetNewValue(G4UIcommand*, G4String);
void SetNewValue(G4UIcommand*, G4String) override;
private:
BrachyPhysicsList* fPhysicsList;
G4UIdirectory* fPhysDir;
G4UIcmdWithAString* fListCmd;
};
#endif
@@ -32,7 +32,7 @@
// ********************************************
//
// code developed by Susanna Guatelli
//
#ifndef BrachyPrimaryGeneratorAction_h
#define BrachyPrimaryGeneratorAction_h 1
@@ -43,11 +43,11 @@ class G4GeneralParticleSource;
class BrachyPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
BrachyPrimaryGeneratorAction();
explicit BrachyPrimaryGeneratorAction();
~BrachyPrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event* anEvent);
void GeneratePrimaries(G4Event* anEvent) override;
private:
G4GeneralParticleSource* fGun;
@@ -24,14 +24,7 @@
// ********************************************************************
//
//
//
//
//
// ********************************************
// * *
// * BrachyRunAction.hh *
// * *
// ********************************************
// Author: Susanna Guatelli
//
#ifndef BrachyRunAction_h
#define BrachyRunAction_h 1
@@ -40,19 +33,18 @@
#include "G4RunManager.hh"
#include "globals.hh"
class G4Run;
class BrachyRunMessenger;
class G4Run;
class BrachyRunAction : public G4UserRunAction
{
public:
BrachyRunAction();
explicit BrachyRunAction();
~BrachyRunAction();
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run* );
void BeginOfRunAction(const G4Run*) override;
void EndOfRunAction(const G4Run*) override;
};
#endif
@@ -23,8 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// Code by Susanna Guatelli
//
//
@@ -37,9 +35,9 @@ class BrachySteppingAction: public G4UserSteppingAction
{
public:
BrachySteppingAction();
explicit BrachySteppingAction();
~BrachySteppingAction();
void UserSteppingAction(const G4Step*);
void UserSteppingAction(const G4Step*) override;
};
#endif
@@ -37,19 +37,15 @@ Original code from geant4/examples/extended/runAndEvent/RE03,
// by M. Asai
*/
//
// class description:
//
//This class represents storing the scored quantity into a file.
//
class BrachyUserScoreWriter:public G4VScoreWriter
{
public:
BrachyUserScoreWriter();
explicit BrachyUserScoreWriter();
virtual ~BrachyUserScoreWriter();
// store a quantity into a file
void DumpQuantityToFile(const G4String & psName,
const G4String & fileName,
const G4String & option);
const G4String & option) override;
};
#endif
@@ -37,6 +37,13 @@
// * *
// ****************************************
//
#include "BrachyFactoryLeipzig.hh"
#include "BrachyFactoryTG186.hh"
#include "BrachyFactoryI.hh"
#include "BrachyFactoryFlexi.hh"
#include "BrachyFactoryOncura6711.hh"
#include "BrachyDetectorMessenger.hh"
#include "BrachyDetectorConstruction.hh"
#include "G4SystemOfUnits.hh"
#include "G4CSGSolid.hh"
#include "G4MaterialPropertyVector.hh"
@@ -52,21 +59,16 @@
#include "G4Colour.hh"
#include "G4UserLimits.hh"
#include "G4VisAttributes.hh"
#include "BrachyMaterial.hh"
#include "BrachyFactoryLeipzig.hh"
#include "BrachyFactoryTG186.hh"
#include "BrachyFactoryI.hh"
#include "BrachyFactoryFlexi.hh"
#include "BrachyFactoryOncura6711.hh"
#include "BrachyDetectorMessenger.hh"
#include "BrachyDetectorConstruction.hh"
#include "G4NistManager.hh"
BrachyDetectorConstruction::BrachyDetectorConstruction():
fDetectorChoice(0), fFactory(nullptr),
fWorld(nullptr), fWorldLog(nullptr), fWorldPhys(nullptr),
fFactory(nullptr), fWorld(nullptr), fWorldLog(nullptr), fWorldPhys(nullptr),
fPhantom(nullptr), fPhantomLog(nullptr), fPhantomPhys(nullptr),
fPhantomAbsorberMaterial(nullptr)
fDetectorChoice(0)
{
// Define the messenger of the Detector component
fDetectorMessenger = new BrachyDetectorMessenger(this);
// Define half size of the phantom along the x, y, z axis
fPhantomSizeX = 15.*cm;
fPhantomSizeY = 15.*cm;
@@ -77,29 +79,18 @@ BrachyDetectorConstruction::BrachyDetectorConstruction():
fWorldSizeY = 4.0*m;
fWorldSizeZ = 4.0*m;
// Define the messenger of the Detector component
// It is possible to modify geometrical parameters through UI
fDetectorMessenger = new BrachyDetectorMessenger(this);
// Define the Flexi source as default source modelled in the geometry
fFactory = new BrachyFactoryFlexi();
// BrachyMaterial defined the all the materials necessary
// for the experimental set-up
fMaterial = new BrachyMaterial();
}
BrachyDetectorConstruction::~BrachyDetectorConstruction()
{
delete fMaterial;
delete fDetectorMessenger;
delete fFactory;
delete fDetectorMessenger;
}
G4VPhysicalVolume* BrachyDetectorConstruction::Construct()
{
fMaterial -> DefineMaterials();
// Model the phantom (water box)
ConstructPhantom();
@@ -113,7 +104,7 @@ void BrachyDetectorConstruction::SwitchBrachytherapicSeed()
{
// Change the source in the water phantom
fFactory -> CleanSource();
G4cout << "Old Source is deleted ..." << G4endl;
G4cout << "Old brachy source is deleted ..." << G4endl;
delete fFactory;
switch(fDetectorChoice)
@@ -139,7 +130,7 @@ void BrachyDetectorConstruction::SwitchBrachytherapicSeed()
}
fFactory -> CreateSource(fPhantomPhys);
G4cout << "... New source is created ..." << G4endl;
G4cout << "New brachy source is created ..." << G4endl;
// Notify run manager that the new geometry has been built
G4RunManager::GetRunManager() -> GeometryHasBeenModified();
@@ -171,7 +162,7 @@ void BrachyDetectorConstruction::SelectBrachytherapicSeed(G4String val)
}
}
}
G4cout << "Now the source is " << val << G4endl;
G4cout << "Now the brachy source is " << val << G4endl;
}
void BrachyDetectorConstruction::ConstructPhantom()
@@ -181,8 +172,10 @@ void BrachyDetectorConstruction::ConstructPhantom()
// Define the light blue color
G4Colour lblue (0.0, 0.0, .75);
G4Material* air = fMaterial -> GetMat("Air") ;
G4Material* water = fMaterial -> GetMat("Water");
//Get nist material manager
G4NistManager* nist = G4NistManager::Instance();
G4Material* air = nist -> FindOrBuildMaterial("G4_AIR");
G4Material* water = nist -> FindOrBuildMaterial("G4_WATER");
// World volume
fWorld = new G4Box("World", fWorldSizeX, fWorldSizeY, fWorldSizeZ);
@@ -222,7 +215,7 @@ void BrachyDetectorConstruction::PrintDetectorParameters()
<< fPhantomSizeZ *2./cm
<< " cm" << G4endl
<< "The phantom is made of "
<< fPhantomAbsorberMaterial -> GetName() <<G4endl
<< fPhantomLog -> GetMaterial() -> GetName() <<G4endl
<< "the source is at the center of the phantom" << G4endl
<< "----------------"
<< G4endl;
@@ -230,17 +223,16 @@ void BrachyDetectorConstruction::PrintDetectorParameters()
void BrachyDetectorConstruction::SetPhantomMaterial(G4String materialChoice)
{
// It is possible to change the material of the phantom
// interactively
// Method to change the material of the phantom
G4NistManager* nist = G4NistManager::Instance();
// Search the material by its name
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
G4Material* pttoMaterial = nist -> FindOrBuildMaterial(materialChoice);
if (pttoMaterial)
{
fPhantomAbsorberMaterial = pttoMaterial;
fPhantomLog -> SetMaterial(pttoMaterial);
PrintDetectorParameters();
} else
{ G4cout << "WARNING: material '" << materialChoice << "' not available!" << G4endl;}
} else G4cout << "WARNING: material '" << materialChoice << "' not available!" << G4endl;
}
@@ -51,9 +51,9 @@
#include "G4Transform3D.hh"
#include "G4RotationMatrix.hh"
#include "G4TransportationManager.hh"
#include "BrachyMaterial.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "G4NistManager.hh"
BrachyDetectorConstructionFlexi::BrachyDetectorConstructionFlexi()
: fSteelShell(nullptr), fLogicalSteelShell(nullptr), fAirGap(nullptr), fLogicalAirGap(nullptr), fPhysicalAirGap(nullptr),
@@ -62,21 +62,36 @@ BrachyDetectorConstructionFlexi::BrachyDetectorConstructionFlexi()
fCable(nullptr), fLogicalCable(nullptr), fPhysicalCable(nullptr),
fIridiumCore(nullptr), fLogicalIridiumCore(nullptr), fPhysicalIridiumCore(nullptr),
fSteelAttributes(nullptr), fEndAttributes(nullptr), fSimpleIridiumVisAtt(nullptr)
{
fMat = new BrachyMaterial();
}
{}
BrachyDetectorConstructionFlexi::~BrachyDetectorConstructionFlexi()
{
delete fMat;
}
{}
void BrachyDetectorConstructionFlexi::ConstructFlexi(G4VPhysicalVolume* mother)
{
G4Material* steelMat = fMat -> GetMat("Stainless steel 304");
G4Material* iridiumMat = fMat -> GetMat("Iridium");
G4Material* airMat = fMat -> GetMat("Air");
G4NistManager* nist = G4NistManager::Instance();
G4Material* iridiumMat = nist -> FindOrBuildMaterial("G4_Ir");
G4Material* airMat = nist -> FindOrBuildMaterial("G4_AIR");
//Define Stainless-steel-304 - Flexi source
G4int Z; //atomic number of the element
G4Element* elC = nist -> FindOrBuildElement(Z=6);
G4Element* elMn = nist -> FindOrBuildElement(Z=12);
G4Element* elSi = nist -> FindOrBuildElement(Z=14);
G4Element* elCr = nist -> FindOrBuildElement(Z=24);
G4Element* elFe = nist -> FindOrBuildElement(Z=26);
G4Element* elNi = nist -> FindOrBuildElement(Z=28);
constexpr G4double d = 7.999*g/cm3;
G4Material* steelMat = new G4Material("Stainless steel 304",d,6);
steelMat -> AddElement(elMn, 0.02);
steelMat -> AddElement(elSi, 0.01);
steelMat -> AddElement(elCr, 0.19);
steelMat -> AddElement(elNi, 0.10);
steelMat -> AddElement(elFe, 0.6792);
steelMat -> AddElement(elC, 0.0008);
//Define dimensions of the outer Steel shell around the solid source - not including the ends
G4double shellr_min = 0.00 * mm;

Some files were not shown because too many files have changed in this diff Show More