Skip to content

Commit

Permalink
Import Geant4 11.1.1 source tree
Browse files Browse the repository at this point in the history
  • Loading branch information
gcosmo committed Feb 14, 2023
1 parent 9f34590 commit 831f693
Show file tree
Hide file tree
Showing 312 changed files with 32,035 additions and 33,022 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@
# Testing
/tests/ @gunterfolger @whokion

# Other
/source/error_propagation @arceciemat
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#-----------------------------------------------------------------------
# - Enforce an out-of-source builds before anything else
#
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
message(STATUS "Geant4 requires an out-of-source build.")
message(STATUS "Please remove these files from ${CMAKE_BINARY_DIR} first:")
message(STATUS "Please remove these files from ${CMAKE_CURRENT_BINARY_DIR} first:")
message(STATUS "CMakeCache.txt")
message(STATUS "CMakeFiles")
message(STATUS "Once these files are removed, create a separate directory")
Expand All @@ -19,8 +19,7 @@ endif()
cmake_minimum_required(VERSION 3.16...3.24)

# - Make overrides for default flags, so they appear in interfaces
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
${CMAKE_SOURCE_DIR}/cmake/Modules/G4MakeRules_cxx.cmake)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/G4MakeRules_cxx.cmake)

#-----------------------------------------------------------------------
# - Project definition and basic configuration
Expand All @@ -32,16 +31,16 @@ project(Geant4
HOMEPAGE_URL "https://geant4.cern.ch")
set(${PROJECT_NAME}_VERSION_MAJOR 11)
set(${PROJECT_NAME}_VERSION_MINOR 1)
set(${PROJECT_NAME}_VERSION_PATCH 0)
set(${PROJECT_NAME}_VERSION_PATCH 1)
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
# NB: if our custom modules include others that we don't supply, those in
# the base path will be used, so watch for incompatibilities!!
#
set(CMAKE_MODULE_PATH
${PROJECT_SOURCE_DIR}/cmake/Modules
${CMAKE_MODULE_PATH})
${PROJECT_SOURCE_DIR}/cmake/Modules
${CMAKE_MODULE_PATH})

#-----------------------------------------------------------------------
# - Include CMake category main module
Expand Down
161 changes: 161 additions & 0 deletions ReleaseNotes/Patch.11.1-1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@

Geant4 11.1 - patch-01 Release Notes
------------------------------------

10 February 2023

List of fixes included in this public patch since the public release 11.1.0:

o Configuration
-------------
+ CMake:
o Fixed configuration/use of TGS visualisation driver in geant4-config
Addresses problem report #2525.
o Use PROJECT_ or Geant4_ scoped _SOURCE/BINARY_DIR variables in place of
CMAKE_ scope version to ease use of Geant4 as a CMake subproject.
Based on GitHub PR#52 (https://github.com/Geant4/geant4/pull/52).
o Removed no longer required G4VecGeomShim module.
VecGeom supports/supplies full imported targets since 1.1.18
Use of VECGEOM_LIBRARIES variable is required to allow build against
CUDA-enabled VecGeom.

o Geometry:
--------
+ magneticfield:
o Reduced printout for setting any valid value for epsilon_min/_max in
G4FieldManager.
+ management:
o G4LogicalVolume: use std::shared_ptr for handling visualization attributes.
Ignore calls to SetVisAttributes() from worker threads.
+ solids/Boolean:
o Fixed hang-out in G4MultiUnion, caused by oveflow of 'size-1' when 'size'
value is zero.
+ solids/specific:
o G4QuadrangularFacet: fixed references to triangles in the warning message
in the check for collinear vertices.

o Global:
------
+ G4DataVector: simplified and corrected inline methods implementation.
+ Updated date and version for 11.1.1.

o Materials:
---------
+ G4Material: allow recursive search for based material.
Addressing problem report #2520.

o Particles:
---------
+ G4AntiNeutron: set the "PDG stable" flag to "false", as for G4Neutron.
+ G4(Anti)OmegacZero: updated mean life time.

o Physics Lists:
-------------
+ builders
o Updated table of processes.
+ constructors/decay
o G4RadioactiveDecayPhysics: assigned RadioactiveDecay process to G4Triton
(which is the only light ion that decays). Note: before, triton did not
have beta decay, i.e. it was wrongly treated as stable even when radioactive
decay physics was enabled; anti_triton did not, and still does not, have
beta decay (because RadioactiveDecay, in its current implementation, does
not handle any kind of anti-ions): in practice, this is an acceptable
approximation because of its relatively long lifetime and the fact
that annihilation and nuclear capture are more likely to happen before
decay.
+ constructors/electromagnetic
o G4GammaGeneralProcess: in all cases select the sub-process.
Addressing problem report #2521.
+ util
o G4HadProcesses: avoid double instantiation of capture cross-section.

o Processes - Electromagnetic:
---------------------------
+ standard
o G4UrbanMscModel: added flag for multiple-scattering positron correction.
o Fixed compilation warning in G4GoudsmithSoundersonMscModel.
+ utils
o G4EmParameters, G4EmParametersMessenger: added parameter, UI command
and Get/Set methods for positron correction in multiple-scattering.

o Processes - Hadronic:
--------------------
+ management
o G4HadronicProcess: moved some class members to protected.
+ models/lend
o Fixed potential uninitialised variables.
+ models/particle_hp
o Minor cleanup in G4ParticleHPDeExGammas header for data initialisation.
+ models/parton_string/qgsm
o Fixed potential uninitialised variables in G4QGSMSplitableHadron.
+ processes
o G4NeutronGeneralProcess: optimized code: initialisation methods are
moved to source; avoid double instantiation of capture cross-section;
reduced number of calls to cross-section, added cross-section data store
pointer. Added setter method for setting minimum energy limit.
o G4HadronElasticProcess: removed obsolete try/catch diagnostics not
applicable for hadron elastic models; added forgotten integral approach
for charged particles.

o Processes - Transportation:
--------------------------
+ Fixed inadvertent creation of G4TransportationParameters in
G4Transportation constructor, determining a change of default looper
parameters, responsible for observed warnings at run-time.
+ Fixed compilation warning about unused variable with G4VERBOSE unset.

o Run:
---
+ G4PhysicsListHelper: added forgotten process of muon pair production by
muons and added general process. Addressing problem report #2523.
+ Reduced printout in destruction of run-manager (master and workers),
to be coherent with verbose level greater than 1.

o Visualization:
-------------
+ modeling
o Fixed transform in G4TextModel; the rotation part of the transform was
being ignored. This impacted the implementation of
"/vis/scene/add/localAxes".
o G4AxesModel: Tidied.

o Examples:
--------
+ extended/eventgenerator/exgps
+ extended/exoticphysics
+ extended/geometry/vecGeomNavigation
o Use PROJECT_ or Geant4_ scoped _SOURCE/BINARY_DIR variables in place of
CMAKE_ scope version to ease use of Geant4 as a CMake subproject.
Based on GitHub PR#52 (https://github.com/Geant4/geant4/pull/52).
+ extended/hadronic/Hadr10
o In DetectorMessenger, define "/mydet/update" command also for PreInit
state and call "/run/initialize" after geometry update in hadr10.in script,
to avoid run-time warning messages in output for reinitialisation of
geometry.
o In SteppingAction, protecting the argument of acos to be within range.
+ extended/medical
o Use PROJECT_ or Geant4_ scoped _SOURCE/BINARY_DIR variables in place of
CMAKE_ scope version to ease use of Geant4 as a CMake subproject.
Based on GitHub PR#52 (https://github.com/Geant4/geant4/pull/52).
+ extended/medical/dna/moleculardna
o Fixed materials definition and corrected mistake in PhysicsList.
o Updated imput macros.
+ extended/parallel/MPI
o Use PROJECT_ or Geant4_ scoped _SOURCE/BINARY_DIR variables in place of
CMAKE_ scope version to ease use of Geant4 as a CMake subproject.
Based on GitHub PR#52 (https://github.com/Geant4/geant4/pull/52).

----------------------------------------------------------------------------

Technical Notes
---------------

o This patch should be applied on top of release 11.1 series.
o Technical notes distributed for release 11.1 are also applicable and
valid for this patch.

The code and rebuilt binary libraries for release 11.1.1 are available
through the Geant4 "Download" Web page.

Please refer to the Geant4 User Documentation for further information about
using Geant4.
14 changes: 14 additions & 0 deletions cmake/History
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ It must **not** be used as a substitute for writing good git commit messages!

-------------------------------------------------------------------------------

## 2023-02-06 Ben Morgan (cmake-V11-00-53)
- Remove no longer required G4VecGeomShim module.
- VecGeom supports/supplies full imported targets since 1.1.18
- Use of VECGEOM_LIBRARIES variable required to allow build against CUDA-enabled VecGeom

## 2023-01-18 Ben Morgan (cmake-V11-00-52)
- Fix configuration/use of G4ToolsSG in geant4-config
- Addresses issue reported on [Geant4 Forum](https://geant4-forum.web.cern.ch/t/missing-g4toolssg-in-geant4-config-in-pre-compiled-geant4-11-1-for-linux/9738)

## 2023-01-09 Ben Morgan (cmake-V11-00-51)
- Use PROJECT_ or Geant4_ scoped _SOURCE/BINARY_DIR variables in place of CMAKE_
scope version to ease use of Geant4 as a CMake subproject.
- Fixes [GitHub PR #52](https://github.com/Geant4/geant4/pull/52)

## 2022-12-05 Ben Morgan (cmake-V11-00-50)
- Revert VecGeom minimum version to 1.2.0 due to issues with 1.2.1 reported by
CMS but not yet triaged in VecGeom itself.
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindStatTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ endif()
#Note that the second suggested path is G4 specific...
find_path(STATTEST_APP_DIR
NAMES StatTestVersion.py
PATHS ${STATTEST_ROOT_DIR} ${CMAKE_SOURCE_DIR}/verification/StatTest
PATHS ${STATTEST_ROOT_DIR} ${PROJECT_SOURCE_DIR}/verification/StatTest
NO_DEFAULT_PATH
)

Expand Down
4 changes: 2 additions & 2 deletions cmake/Modules/G4CMakeMain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ if(GEANT4_ENABLE_TESTING)
if(EXISTS ${PROJECT_SOURCE_DIR}/tests)
add_subdirectory(tests)
endif()
if(EXISTS ${CMAKE_SOURCE_DIR}/benchmarks)
if(EXISTS ${PROJECT_SOURCE_DIR}/benchmarks)
add_subdirectory(benchmarks)
endif()
if(EXISTS ${CMAKE_SOURCE_DIR}/verification)
if(EXISTS ${PROJECT_SOURCE_DIR}/verification)
add_subdirectory(verification)
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/G4CMakeUtilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function(geant4_add_unit_tests)
if(IS_ABSOLUTE ${incdir})
include_directories(${incdir})
else()
include_directories(${CMAKE_SOURCE_DIR}/source/${incdir})
include_directories(${PROJECT_SOURCE_DIR}/source/${incdir})
endif()
endforeach()

Expand Down
4 changes: 2 additions & 2 deletions cmake/Modules/G4CPack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ include(InstallRequiredSystemLibraries)

#-----------------------------------------------------------------------
# Copy/Generate common resource files into formats CPack generators like
file(WRITE ${CMAKE_BINARY_DIR}/README.txt "
file(WRITE ${PROJECT_BINARY_DIR}/README.txt "
Geant4
======
A toolkit for the simulation of the passage of particles through matter.
Expand Down Expand Up @@ -155,7 +155,7 @@ configure_file(
CMakeCPackOptions.cmake
@ONLY
)
set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_BINARY_DIR}/CMakeCPackOptions.cmake)
set(CPACK_PROJECT_CONFIG_FILE ${PROJECT_BINARY_DIR}/CMakeCPackOptions.cmake)
include(CPack)

#-----------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions cmake/Modules/G4CTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if(GEANT4_ENABLE_TESTING)

# - Geant4_DIR is needed to locate GeantConfig.cmake file required
# by tests and examples
set(Geant4_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Current build directory")
set(Geant4_DIR ${PROJECT_BINARY_DIR} CACHE PATH "Current build directory")

# - Add datasets to testing environment
geant4_get_datasetnames(_dslist)
Expand Down Expand Up @@ -53,7 +53,7 @@ endif()
# Add Unit Tests if required
#
if(GEANT4_BUILD_TESTS)
file(GLOB_RECURSE files RELATIVE ${CMAKE_SOURCE_DIR} source/CMakeLists.txt)
file(GLOB_RECURSE files RELATIVE ${PROJECT_SOURCE_DIR} source/CMakeLists.txt)
foreach( file ${files} )
get_filename_component(path ${file} PATH)
if(path MATCHES "/test$")
Expand Down
7 changes: 0 additions & 7 deletions cmake/Modules/G4ConfigureCMakeHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,6 @@ configure_file(
COPYONLY
)

configure_file(
${PROJECT_SOURCE_DIR}/cmake/Modules/G4VecGeomShim.cmake
${PROJECT_BINARY_DIR}/G4VecGeomShim.cmake
COPYONLY
)

configure_file(
${PROJECT_SOURCE_DIR}/cmake/Modules/G4X11Shim.cmake
${PROJECT_BINARY_DIR}/G4X11Shim.cmake
Expand Down Expand Up @@ -274,7 +268,6 @@ install(FILES
${PROJECT_BINARY_DIR}/G4EXPATShim.cmake
${PROJECT_BINARY_DIR}/G4FreetypeShim.cmake
${PROJECT_BINARY_DIR}/G4HDF5Shim.cmake
${PROJECT_BINARY_DIR}/G4VecGeomShim.cmake
${PROJECT_BINARY_DIR}/G4MotifShim.cmake
${PROJECT_BINARY_DIR}/G4X11Shim.cmake
${PROJECT_SOURCE_DIR}/cmake/Templates/UseGeant4.cmake
Expand Down
10 changes: 5 additions & 5 deletions cmake/Modules/G4ConfigureGNUMakeHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ macro(_g4tc_configure_build_tree_scripts SCRIPT_NAME)

# Configure the file - goes straight into the binary dir
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4make-skeleton.in
${PROJECT_SOURCE_DIR}/cmake/Templates/geant4make-skeleton.in
${PROJECT_BINARY_DIR}/${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION}
@ONLY
)
Expand All @@ -715,7 +715,7 @@ macro(_g4tc_configure_install_tree_scripts CONFIGURE_DESTINATION SCRIPT_NAME INS

# Configure the file
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4make-skeleton.in
${PROJECT_SOURCE_DIR}/cmake/Templates/geant4make-skeleton.in
${CONFIGURE_DESTINATION}/${SCRIPT_NAME}${GEANT4_TC_SHELL_EXTENSION}
@ONLY
)
Expand Down Expand Up @@ -835,7 +835,7 @@ set(TOOLS_FONT_PATH "\"`cd \$geant4make_root/../fonts > /dev/null ; pwd`\"")

# - Configure the shell scripts for the INSTALL TREE
_g4tc_configure_install_tree_scripts(
${CMAKE_BINARY_DIR}/InstallTreeFiles
${PROJECT_BINARY_DIR}/InstallTreeFiles
geant4make
${CMAKE_INSTALL_DATADIR}/geant4make
)
Expand Down Expand Up @@ -1010,7 +1010,7 @@ foreach(_shell IN LISTS shells_list)

# Configure the file
configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-env-skeleton.in
${PROJECT_SOURCE_DIR}/cmake/Templates/geant4-env-skeleton.in
${PROJECT_BINARY_DIR}/InstallTreeFiles/${_scriptfullname}
@ONLY
)
Expand Down Expand Up @@ -1099,7 +1099,7 @@ rem Uncomment the line and edit the path to the dataset if installed in not stan
endif()

configure_file(
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-bat-skeleton.in
${PROJECT_SOURCE_DIR}/cmake/Templates/geant4-bat-skeleton.in
${PROJECT_BINARY_DIR}/InstallTreeFiles/${_scriptfullname}
@ONLY
)
Expand Down
Loading

0 comments on commit 831f693

Please sign in to comment.