Skip to content

Commit 831f693

Browse files
committed
Import Geant4 11.1.1 source tree
1 parent 9f34590 commit 831f693

File tree

312 files changed

+32035
-33022
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

312 files changed

+32035
-33022
lines changed

.github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@
7777
# Testing
7878
/tests/ @gunterfolger @whokion
7979

80+
# Other
81+
/source/error_propagation @arceciemat

CMakeLists.txt

+6-7
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#-----------------------------------------------------------------------
44
# - Enforce an out-of-source builds before anything else
55
#
6-
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
6+
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
77
message(STATUS "Geant4 requires an out-of-source build.")
8-
message(STATUS "Please remove these files from ${CMAKE_BINARY_DIR} first:")
8+
message(STATUS "Please remove these files from ${CMAKE_CURRENT_BINARY_DIR} first:")
99
message(STATUS "CMakeCache.txt")
1010
message(STATUS "CMakeFiles")
1111
message(STATUS "Once these files are removed, create a separate directory")
@@ -19,8 +19,7 @@ endif()
1919
cmake_minimum_required(VERSION 3.16...3.24)
2020

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

2524
#-----------------------------------------------------------------------
2625
# - Project definition and basic configuration
@@ -32,16 +31,16 @@ project(Geant4
3231
HOMEPAGE_URL "https://geant4.cern.ch")
3332
set(${PROJECT_NAME}_VERSION_MAJOR 11)
3433
set(${PROJECT_NAME}_VERSION_MINOR 1)
35-
set(${PROJECT_NAME}_VERSION_PATCH 0)
34+
set(${PROJECT_NAME}_VERSION_PATCH 1)
3635
set(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}")
3736

3837
# - Prepend our own CMake Modules to the search path
3938
# NB: if our custom modules include others that we don't supply, those in
4039
# the base path will be used, so watch for incompatibilities!!
4140
#
4241
set(CMAKE_MODULE_PATH
43-
${PROJECT_SOURCE_DIR}/cmake/Modules
44-
${CMAKE_MODULE_PATH})
42+
${PROJECT_SOURCE_DIR}/cmake/Modules
43+
${CMAKE_MODULE_PATH})
4544

4645
#-----------------------------------------------------------------------
4746
# - Include CMake category main module

ReleaseNotes/Patch.11.1-1.txt

+161
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
2+
Geant4 11.1 - patch-01 Release Notes
3+
------------------------------------
4+
5+
10 February 2023
6+
7+
List of fixes included in this public patch since the public release 11.1.0:
8+
9+
o Configuration
10+
-------------
11+
+ CMake:
12+
o Fixed configuration/use of TGS visualisation driver in geant4-config
13+
Addresses problem report #2525.
14+
o Use PROJECT_ or Geant4_ scoped _SOURCE/BINARY_DIR variables in place of
15+
CMAKE_ scope version to ease use of Geant4 as a CMake subproject.
16+
Based on GitHub PR#52 (https://github.com/Geant4/geant4/pull/52).
17+
o Removed no longer required G4VecGeomShim module.
18+
VecGeom supports/supplies full imported targets since 1.1.18
19+
Use of VECGEOM_LIBRARIES variable is required to allow build against
20+
CUDA-enabled VecGeom.
21+
22+
o Geometry:
23+
--------
24+
+ magneticfield:
25+
o Reduced printout for setting any valid value for epsilon_min/_max in
26+
G4FieldManager.
27+
+ management:
28+
o G4LogicalVolume: use std::shared_ptr for handling visualization attributes.
29+
Ignore calls to SetVisAttributes() from worker threads.
30+
+ solids/Boolean:
31+
o Fixed hang-out in G4MultiUnion, caused by oveflow of 'size-1' when 'size'
32+
value is zero.
33+
+ solids/specific:
34+
o G4QuadrangularFacet: fixed references to triangles in the warning message
35+
in the check for collinear vertices.
36+
37+
o Global:
38+
------
39+
+ G4DataVector: simplified and corrected inline methods implementation.
40+
+ Updated date and version for 11.1.1.
41+
42+
o Materials:
43+
---------
44+
+ G4Material: allow recursive search for based material.
45+
Addressing problem report #2520.
46+
47+
o Particles:
48+
---------
49+
+ G4AntiNeutron: set the "PDG stable" flag to "false", as for G4Neutron.
50+
+ G4(Anti)OmegacZero: updated mean life time.
51+
52+
o Physics Lists:
53+
-------------
54+
+ builders
55+
o Updated table of processes.
56+
+ constructors/decay
57+
o G4RadioactiveDecayPhysics: assigned RadioactiveDecay process to G4Triton
58+
(which is the only light ion that decays). Note: before, triton did not
59+
have beta decay, i.e. it was wrongly treated as stable even when radioactive
60+
decay physics was enabled; anti_triton did not, and still does not, have
61+
beta decay (because RadioactiveDecay, in its current implementation, does
62+
not handle any kind of anti-ions): in practice, this is an acceptable
63+
approximation because of its relatively long lifetime and the fact
64+
that annihilation and nuclear capture are more likely to happen before
65+
decay.
66+
+ constructors/electromagnetic
67+
o G4GammaGeneralProcess: in all cases select the sub-process.
68+
Addressing problem report #2521.
69+
+ util
70+
o G4HadProcesses: avoid double instantiation of capture cross-section.
71+
72+
o Processes - Electromagnetic:
73+
---------------------------
74+
+ standard
75+
o G4UrbanMscModel: added flag for multiple-scattering positron correction.
76+
o Fixed compilation warning in G4GoudsmithSoundersonMscModel.
77+
+ utils
78+
o G4EmParameters, G4EmParametersMessenger: added parameter, UI command
79+
and Get/Set methods for positron correction in multiple-scattering.
80+
81+
o Processes - Hadronic:
82+
--------------------
83+
+ management
84+
o G4HadronicProcess: moved some class members to protected.
85+
+ models/lend
86+
o Fixed potential uninitialised variables.
87+
+ models/particle_hp
88+
o Minor cleanup in G4ParticleHPDeExGammas header for data initialisation.
89+
+ models/parton_string/qgsm
90+
o Fixed potential uninitialised variables in G4QGSMSplitableHadron.
91+
+ processes
92+
o G4NeutronGeneralProcess: optimized code: initialisation methods are
93+
moved to source; avoid double instantiation of capture cross-section;
94+
reduced number of calls to cross-section, added cross-section data store
95+
pointer. Added setter method for setting minimum energy limit.
96+
o G4HadronElasticProcess: removed obsolete try/catch diagnostics not
97+
applicable for hadron elastic models; added forgotten integral approach
98+
for charged particles.
99+
100+
o Processes - Transportation:
101+
--------------------------
102+
+ Fixed inadvertent creation of G4TransportationParameters in
103+
G4Transportation constructor, determining a change of default looper
104+
parameters, responsible for observed warnings at run-time.
105+
+ Fixed compilation warning about unused variable with G4VERBOSE unset.
106+
107+
o Run:
108+
---
109+
+ G4PhysicsListHelper: added forgotten process of muon pair production by
110+
muons and added general process. Addressing problem report #2523.
111+
+ Reduced printout in destruction of run-manager (master and workers),
112+
to be coherent with verbose level greater than 1.
113+
114+
o Visualization:
115+
-------------
116+
+ modeling
117+
o Fixed transform in G4TextModel; the rotation part of the transform was
118+
being ignored. This impacted the implementation of
119+
"/vis/scene/add/localAxes".
120+
o G4AxesModel: Tidied.
121+
122+
o Examples:
123+
--------
124+
+ extended/eventgenerator/exgps
125+
+ extended/exoticphysics
126+
+ extended/geometry/vecGeomNavigation
127+
o Use PROJECT_ or Geant4_ scoped _SOURCE/BINARY_DIR variables in place of
128+
CMAKE_ scope version to ease use of Geant4 as a CMake subproject.
129+
Based on GitHub PR#52 (https://github.com/Geant4/geant4/pull/52).
130+
+ extended/hadronic/Hadr10
131+
o In DetectorMessenger, define "/mydet/update" command also for PreInit
132+
state and call "/run/initialize" after geometry update in hadr10.in script,
133+
to avoid run-time warning messages in output for reinitialisation of
134+
geometry.
135+
o In SteppingAction, protecting the argument of acos to be within range.
136+
+ extended/medical
137+
o Use PROJECT_ or Geant4_ scoped _SOURCE/BINARY_DIR variables in place of
138+
CMAKE_ scope version to ease use of Geant4 as a CMake subproject.
139+
Based on GitHub PR#52 (https://github.com/Geant4/geant4/pull/52).
140+
+ extended/medical/dna/moleculardna
141+
o Fixed materials definition and corrected mistake in PhysicsList.
142+
o Updated imput macros.
143+
+ extended/parallel/MPI
144+
o Use PROJECT_ or Geant4_ scoped _SOURCE/BINARY_DIR variables in place of
145+
CMAKE_ scope version to ease use of Geant4 as a CMake subproject.
146+
Based on GitHub PR#52 (https://github.com/Geant4/geant4/pull/52).
147+
148+
----------------------------------------------------------------------------
149+
150+
Technical Notes
151+
---------------
152+
153+
o This patch should be applied on top of release 11.1 series.
154+
o Technical notes distributed for release 11.1 are also applicable and
155+
valid for this patch.
156+
157+
The code and rebuilt binary libraries for release 11.1.1 are available
158+
through the Geant4 "Download" Web page.
159+
160+
Please refer to the Geant4 User Documentation for further information about
161+
using Geant4.

cmake/History

+14
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ It must **not** be used as a substitute for writing good git commit messages!
66

77
-------------------------------------------------------------------------------
88

9+
## 2023-02-06 Ben Morgan (cmake-V11-00-53)
10+
- Remove no longer required G4VecGeomShim module.
11+
- VecGeom supports/supplies full imported targets since 1.1.18
12+
- Use of VECGEOM_LIBRARIES variable required to allow build against CUDA-enabled VecGeom
13+
14+
## 2023-01-18 Ben Morgan (cmake-V11-00-52)
15+
- Fix configuration/use of G4ToolsSG in geant4-config
16+
- 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)
17+
18+
## 2023-01-09 Ben Morgan (cmake-V11-00-51)
19+
- Use PROJECT_ or Geant4_ scoped _SOURCE/BINARY_DIR variables in place of CMAKE_
20+
scope version to ease use of Geant4 as a CMake subproject.
21+
- Fixes [GitHub PR #52](https://github.com/Geant4/geant4/pull/52)
22+
923
## 2022-12-05 Ben Morgan (cmake-V11-00-50)
1024
- Revert VecGeom minimum version to 1.2.0 due to issues with 1.2.1 reported by
1125
CMS but not yet triaged in VecGeom itself.

cmake/Modules/FindStatTest.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ endif()
2525
#Note that the second suggested path is G4 specific...
2626
find_path(STATTEST_APP_DIR
2727
NAMES StatTestVersion.py
28-
PATHS ${STATTEST_ROOT_DIR} ${CMAKE_SOURCE_DIR}/verification/StatTest
28+
PATHS ${STATTEST_ROOT_DIR} ${PROJECT_SOURCE_DIR}/verification/StatTest
2929
NO_DEFAULT_PATH
3030
)
3131

cmake/Modules/G4CMakeMain.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ if(GEANT4_ENABLE_TESTING)
103103
if(EXISTS ${PROJECT_SOURCE_DIR}/tests)
104104
add_subdirectory(tests)
105105
endif()
106-
if(EXISTS ${CMAKE_SOURCE_DIR}/benchmarks)
106+
if(EXISTS ${PROJECT_SOURCE_DIR}/benchmarks)
107107
add_subdirectory(benchmarks)
108108
endif()
109-
if(EXISTS ${CMAKE_SOURCE_DIR}/verification)
109+
if(EXISTS ${PROJECT_SOURCE_DIR}/verification)
110110
add_subdirectory(verification)
111111
endif()
112112
endif()

cmake/Modules/G4CMakeUtilities.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ function(geant4_add_unit_tests)
249249
if(IS_ABSOLUTE ${incdir})
250250
include_directories(${incdir})
251251
else()
252-
include_directories(${CMAKE_SOURCE_DIR}/source/${incdir})
252+
include_directories(${PROJECT_SOURCE_DIR}/source/${incdir})
253253
endif()
254254
endforeach()
255255

cmake/Modules/G4CPack.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ include(InstallRequiredSystemLibraries)
1616

1717
#-----------------------------------------------------------------------
1818
# Copy/Generate common resource files into formats CPack generators like
19-
file(WRITE ${CMAKE_BINARY_DIR}/README.txt "
19+
file(WRITE ${PROJECT_BINARY_DIR}/README.txt "
2020
Geant4
2121
======
2222
A toolkit for the simulation of the passage of particles through matter.
@@ -155,7 +155,7 @@ configure_file(
155155
CMakeCPackOptions.cmake
156156
@ONLY
157157
)
158-
set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_BINARY_DIR}/CMakeCPackOptions.cmake)
158+
set(CPACK_PROJECT_CONFIG_FILE ${PROJECT_BINARY_DIR}/CMakeCPackOptions.cmake)
159159
include(CPack)
160160

161161
#-----------------------------------------------------------------------

cmake/Modules/G4CTest.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if(GEANT4_ENABLE_TESTING)
2222

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

2727
# - Add datasets to testing environment
2828
geant4_get_datasetnames(_dslist)
@@ -53,7 +53,7 @@ endif()
5353
# Add Unit Tests if required
5454
#
5555
if(GEANT4_BUILD_TESTS)
56-
file(GLOB_RECURSE files RELATIVE ${CMAKE_SOURCE_DIR} source/CMakeLists.txt)
56+
file(GLOB_RECURSE files RELATIVE ${PROJECT_SOURCE_DIR} source/CMakeLists.txt)
5757
foreach( file ${files} )
5858
get_filename_component(path ${file} PATH)
5959
if(path MATCHES "/test$")

cmake/Modules/G4ConfigureCMakeHelpers.cmake

-7
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,6 @@ configure_file(
187187
COPYONLY
188188
)
189189

190-
configure_file(
191-
${PROJECT_SOURCE_DIR}/cmake/Modules/G4VecGeomShim.cmake
192-
${PROJECT_BINARY_DIR}/G4VecGeomShim.cmake
193-
COPYONLY
194-
)
195-
196190
configure_file(
197191
${PROJECT_SOURCE_DIR}/cmake/Modules/G4X11Shim.cmake
198192
${PROJECT_BINARY_DIR}/G4X11Shim.cmake
@@ -274,7 +268,6 @@ install(FILES
274268
${PROJECT_BINARY_DIR}/G4EXPATShim.cmake
275269
${PROJECT_BINARY_DIR}/G4FreetypeShim.cmake
276270
${PROJECT_BINARY_DIR}/G4HDF5Shim.cmake
277-
${PROJECT_BINARY_DIR}/G4VecGeomShim.cmake
278271
${PROJECT_BINARY_DIR}/G4MotifShim.cmake
279272
${PROJECT_BINARY_DIR}/G4X11Shim.cmake
280273
${PROJECT_SOURCE_DIR}/cmake/Templates/UseGeant4.cmake

cmake/Modules/G4ConfigureGNUMakeHelpers.cmake

+5-5
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ macro(_g4tc_configure_build_tree_scripts SCRIPT_NAME)
694694

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

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

836836
# - Configure the shell scripts for the INSTALL TREE
837837
_g4tc_configure_install_tree_scripts(
838-
${CMAKE_BINARY_DIR}/InstallTreeFiles
838+
${PROJECT_BINARY_DIR}/InstallTreeFiles
839839
geant4make
840840
${CMAKE_INSTALL_DATADIR}/geant4make
841841
)
@@ -1010,7 +1010,7 @@ foreach(_shell IN LISTS shells_list)
10101010

10111011
# Configure the file
10121012
configure_file(
1013-
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-env-skeleton.in
1013+
${PROJECT_SOURCE_DIR}/cmake/Templates/geant4-env-skeleton.in
10141014
${PROJECT_BINARY_DIR}/InstallTreeFiles/${_scriptfullname}
10151015
@ONLY
10161016
)
@@ -1099,7 +1099,7 @@ rem Uncomment the line and edit the path to the dataset if installed in not stan
10991099
endif()
11001100

11011101
configure_file(
1102-
${CMAKE_SOURCE_DIR}/cmake/Templates/geant4-bat-skeleton.in
1102+
${PROJECT_SOURCE_DIR}/cmake/Templates/geant4-bat-skeleton.in
11031103
${PROJECT_BINARY_DIR}/InstallTreeFiles/${_scriptfullname}
11041104
@ONLY
11051105
)

0 commit comments

Comments
 (0)