Skip to content

Commit b14d739

Browse files
committed
Import Geant4 10.6.1 source tree
1 parent 5baee23 commit b14d739

File tree

278 files changed

+23746
-22477
lines changed

Some content is hidden

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

278 files changed

+23746
-22477
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
3232
project(Geant4)
3333
set(${PROJECT_NAME}_VERSION_MAJOR 10)
3434
set(${PROJECT_NAME}_VERSION_MINOR 6)
35-
set(${PROJECT_NAME}_VERSION_PATCH 0)
35+
set(${PROJECT_NAME}_VERSION_PATCH 1)
3636
set(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}")
3737

3838
# - Prepend our own CMake Modules to the search path

ReleaseNotes/Patch4.10.6-1.txt

+174
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
2+
Geant4 10.6 - patch-01 Release Notes
3+
------------------------------------
4+
5+
14 February 2020
6+
7+
List of fixes included in this public patch since the public release 10.6:
8+
9+
o Configuration:
10+
-------------
11+
+ CMake:
12+
o Applied patch to allow compilation on Windows using Clang.
13+
o Quote VECGEOM_COMPILE_DEFINITIONS to avoid incorrect argument errors.
14+
o Fix to prevent errors when a shell is in "set -u" mode.
15+
Addressing problem report #2221.
16+
o No longer create symlinks on Windows; Windows permissions may prevent
17+
creation of symlinks, leading to errors at install time.
18+
o Updated to data-set G4EMLOW-7.9.1.
19+
+ GNUMake:
20+
o Fixed and updated legacy setup for DLL builds on Windows.
21+
22+
o Digits_Hits:
23+
-----------
24+
+ G4ScoringManager, G4VScoreWriter, G4ScoringMessenger: added missing
25+
setter/getter functions.
26+
+ In G4ScoreQuantityMessenger, changed SetDefaultUnit() in trackLength
27+
scorer to SetDefaultValue() to support various unit category.
28+
Addressing problem report #2216.
29+
30+
o Geometry:
31+
--------
32+
+ magneticfield:
33+
o Turn off verbosity flags by default in G4IntegratorDriver,
34+
G4InterpolationDriver and G4MagIntegratorDriver.
35+
+ navigation:
36+
o Avoid looping infinitely by pushing N times with increasing step size.
37+
Addressing problem report #2196.
38+
+ solids/specific:
39+
o Re-established parameterisation mechanism for G4Tet and G4UTet which was
40+
removed by mistake. Addressing problem report #2209.
41+
o Revision of G4Tet, for speed-up and issues detected in unit tests.
42+
Implemented SetVertices(), direct modifier for vertices.
43+
o Revision of G4Ellipsoid, fixing issues with previous implementation,
44+
and 30%-70% speed-up in all main methods.
45+
Also addressing problem report #2206.
46+
o Added protection in G4VFacet header for double definition of global
47+
symbols from Windows Kits code.
48+
49+
o Global:
50+
------
51+
+ Fixed symbol exporting problem in G4coutDestination on Windows; define
52+
'masterG4coutDestination' as normal pointer.
53+
Addressing problem report #2217.
54+
+ Added windefs.hh header, including protections for double definition
55+
of global symbols from Windows Kits code.
56+
+ Updated date and version for 10.6.p01.
57+
58+
o Interfaces:
59+
----------
60+
+ Fixed obsolete URLs in UIQt splash screen.
61+
62+
o Particles
63+
---------
64+
+ Fixed broken if-block in G4DecayTableMessenger.
65+
Addressing problem report #2193.
66+
67+
o Physics Lists
68+
-------------
69+
+ constructors/electromagnetic:
70+
o G4EmModelActivator: fixed configuration of the default EM multiple
71+
scattering on top of any other physics configuration.
72+
Addressing problem report #2106.
73+
+ constructors/gamma_lepto_nuclear
74+
o Fixed reports from Coverity; removed double delete in destructor of
75+
G4LENDBertiniGammaElectroNuclearBuilder.
76+
+ lists:
77+
o LBE: updated cross-sections to avoid crashes caused by the removal of
78+
default Gheisha cross-sections, and to have consistency between elastic
79+
and inelastic cross-sections.
80+
81+
o Processes - Electromagnetic:
82+
---------------------------
83+
+ muons:
84+
o G4MuPairProductionModel: added Store/Retrieve data methods.
85+
Co-works with new data-set G4EMLOW-7.9.1.
86+
+ standard:
87+
o G4BetheHeitler5DModel: added protection against negative argument of
88+
sqrt(), due to precision lost.
89+
+ utils:
90+
o G4EmParameters, G4EmParametersMessenger: added new parameter to enable
91+
read of e+e- production table from file.
92+
Co-works with new data-set G4EMLOW-7.9.1.
93+
94+
o Processes - Hadronic:
95+
--------------------
96+
+ cross_sections:
97+
o G4HadronInelasticDataSet: fixed wrong GHEISHA x-section.
98+
Addressing problem report #2220.
99+
+ management:
100+
o G4HadronicProcess: for charge check assume that all final electrons
101+
come from internal conversion.
102+
+ cascade:
103+
o G4CascadeCheckBalance: fixed outstanding problem of the interface with
104+
native pre-compound model, happening when in the default de-excitation
105+
internal electron conversion gets enabled.
106+
o G4CascadeInterface: fixed memory leak by deleting ltcollider in class
107+
destructor.
108+
o G4CascadeParamMessenger.cc: ensure that Bertini-specific commands get
109+
added to "/process/had/cascade/" UI directory, instead of
110+
"/process/had".
111+
+ models/coherent_elastic:
112+
o G4ElasticHadrNucleusHE: for pi- and Z>1 reuse data structure computed
113+
for pi+ in order to reduce memory and CPU at initialisation; added new
114+
private methods to store/retrieve data tables. Co-works with new
115+
data-set G4EMLOW-7.9.1. Fixed Coverity report.
116+
Switch to parameterized model by cut on kinetic energy and not momentum.
117+
+ models/lend:
118+
o Removed inclusion of amp_math header on Windows as it is not required.
119+
+ models/parton_string/qgsm:
120+
o G4FTFParameters: fixed division by zero (Coverity report) due to wrong
121+
protection.
122+
+ models/radioactive_decay:
123+
o In G4Radioactivation::AddDeexcitationSpectrumForBiasMode(), fixed
124+
memory leak. Addressing problem report #2164.
125+
o G4RadioactiveDecay, G4RadioactiveDecayBase: changed default verbosity
126+
from 0 to 1, and remove G4cerr wherever it occurs and replace it with
127+
G4Exception or G4cout.
128+
Increased verbosity thresholds in order to reduce printout size.
129+
o G4BetaPlusDecay: changed sign of daughterZ argument in
130+
G4BetaDecayCorrections according to problem report #2199.
131+
o Fixed Coverity warnings in G4RadioactiveDecay and
132+
G4RadioactiveDecayBase. Fixed uninitialized data in G4SFDecay.
133+
+ processes:
134+
o G4HadronElasticProcess: removed forgotten try/catch pattern for
135+
target isotope selection.
136+
+ stopping:
137+
o G4MuonicAtomDecay: fixed Coverity warning by addition of G4Exception.
138+
139+
o Visualization:
140+
-------------
141+
+ OpenInventor:
142+
o Added include paths to Inventor to usage requirements on G4OpenInventor.
143+
Inventor does not yet support imported targets, and paths added by
144+
include_directories are now explicitly removed.
145+
Addressing problem report #2215
146+
147+
o Data sets:
148+
---------
149+
+ G4EMLOW-7.9.1:
150+
o Added a new directory mupair for double differential probability
151+
of e+e- pairs produced by muons or hadrons.
152+
153+
o Examples:
154+
--------
155+
+ basic
156+
o Fixed comment for suggested command "/run/numberOfThreads" in macros.
157+
+ extended/hadronic/Hadr01
158+
o HistoManager: fixed FPE happening if check on volume's material
159+
is not vacuum.
160+
161+
----------------------------------------------------------------------------
162+
163+
Technical Notes
164+
---------------
165+
166+
o This patch should be applied on top of release 10.6.
167+
o Technical notes distributed for release 10.6 are also applicable and
168+
valid for this patch.
169+
170+
The code and rebuilt binary libraries for release 10.6.p01 are available
171+
through the Geant4 "Download" Web page.
172+
173+
Please refer to the Geant4 User Documentation for further information about
174+
using Geant4.

cmake/History

+21
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,27 @@ add this in the documentation for the changed file as [BUGFIX #BUGNUMBER].
3030

3131
----------------------------------------------------------
3232

33+
14th February 2020 - Ben Morgan (cmake-V10-05-34)
34+
- No longer create gnumake symlinks on Windows
35+
Windows permissions may prevent creation of symlinks, leading to
36+
errors at install time. As gnumake is no longer supported on
37+
Windows, protect symlink creation with test on host platform.
38+
39+
5th February 2020 - Ben Morgan (cmake-V10-05-33)
40+
- Apply patch from TXCorp to allow compilation on Windows using Clang
41+
42+
4th February 2020 - Ben Morgan (cmake-V10-05-32)
43+
- BUGFIX 2221
44+
Use "${FOO:-}" variable expansion and "-z" test to check for
45+
undefined variables in Bourne Shell scripts. Prevents errors when
46+
shell is in "set -u" mode. Report and patch supplied by Michael Reilly
47+
48+
28th January 2020 - Gunter Folger (cmake-V10-05-31)
49+
- Switch to patched dataset for G4EMLOW 7.9.1
50+
51+
15th January 2020 - Ben Morgan (cmake-V10-05-30)
52+
- Quote VECGEOM_COMPILE_DEFINITIONS to avoid incorrect argument errors
53+
3354
25th November 2019 - Ben Morgan (cmake-V10-05-29)
3455
- Disable configuration of Wt UI/Vis driver due to it no longer
3556
compiling with recent Wt versions

cmake/Modules/G4ConfigureGNUMakeHelpers.cmake

+8-11
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ function(_g4tc_setenv_ifnotset_command TEMPLATE_NAME SHELL_FAMILY VARIABLE_NAME
284284
# Have to make this section verbatim to get correct formatting
285285
set(${TEMPLATE_NAME}
286286
"
287-
if test \"x\$${VARIABLE_NAME}\" = \"x\" ; then
287+
if [ -z \"\$\{${VARIABLE_NAME}-\}\" ] ; then
288288
export ${VARIABLE_NAME}=${VARIABLE_VALUE}
289289
fi
290290
"
@@ -317,7 +317,7 @@ function(_g4tc_prepend_path TEMPLATE_NAME SHELL_FAMILY PATH_VARIABLE
317317
# We have to make this section verbatim
318318
set(${TEMPLATE_NAME}
319319
"
320-
if test \"x\$${PATH_VARIABLE}\" = \"x\" ; then
320+
if [ -z \"\$\{${PATH_VARIABLE}-\}\" ] ; then
321321
export ${PATH_VARIABLE}=${APPEND_VARIABLE}
322322
else
323323
export ${PATH_VARIABLE}=${APPEND_VARIABLE}:\${${PATH_VARIABLE}}
@@ -354,7 +354,7 @@ function(_g4tc_append_path TEMPLATE_NAME SHELL_FAMILY PATH_VARIABLE
354354
# We have to make this section verbatim
355355
set(${TEMPLATE_NAME}
356356
"
357-
if test \"x\$${PATH_VARIABLE}\" = \"x\" ; then
357+
if [ -z \"\$\{${PATH_VARIABLE}-\}\" ] ; then
358358
export ${PATH_VARIABLE}=${APPEND_VARIABLE}
359359
else
360360
export ${PATH_VARIABLE}=\${${PATH_VARIABLE}}:${APPEND_VARIABLE}
@@ -805,14 +805,11 @@ install(DIRECTORY config
805805
PATTERN "scripts/" EXCLUDE
806806
)
807807

808-
# Compatibility softlink to library directory, we do this on all
809-
# platforms, but it does nothing on Windows (well, at least the
810-
# attempted symlink creation does not)
811-
# Take care to quote the path names to avoid issues with spaces
812-
install(CODE "execute_process(COMMAND \${CMAKE_COMMAND} -E make_directory \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/Geant4-${Geant4_VERSION}\")")
813-
814-
install(CODE "execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink .. ${GEANT4_SYSTEM}-${GEANT4_COMPILER} WORKING_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/Geant4-${Geant4_VERSION}\")")
815-
808+
# Compatibility softlink to library directory on UNIX only
809+
if(UNIX)
810+
install(CODE "execute_process(COMMAND \${CMAKE_COMMAND} -E make_directory \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/Geant4-${Geant4_VERSION}\")")
811+
install(CODE "execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink .. ${GEANT4_SYSTEM}-${GEANT4_COMPILER} WORKING_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/Geant4-${Geant4_VERSION}\")")
812+
endif()
816813

817814
#-----------------------------------------------------------------------
818815
# TEMPORARY

cmake/Modules/G4VecGeomShim.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if(VecGeom_FOUND)
1111

1212
string(REGEX REPLACE "^\-D|;-D" ";" VECGEOM_COMPILE_DEFINITIONS "${VECGEOM_DEFINITIONS}")
1313
set_target_properties(VecGeom::VecGeom PROPERTIES
14-
INTERFACE_COMPILE_DEFINITIONS ${VECGEOM_COMPILE_DEFINITIONS}
14+
INTERFACE_COMPILE_DEFINITIONS "${VECGEOM_COMPILE_DEFINITIONS}"
1515
INTERFACE_INCLUDE_DIRECTORIES "${VECGEOM_INCLUDE_DIRS}"
1616
INTERFACE_LINK_LIBRARIES "${VECGEOM_LIBRARIES}"
1717
IMPORTED_LOCATION "${VECGEOM_LIBRARY}")

cmake/Modules/Geant4DatasetDefinitions.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ geant4_add_dataset(
1818
# - Low energy electromagnetics
1919
geant4_add_dataset(
2020
NAME G4EMLOW
21-
VERSION 7.9
21+
VERSION 7.9.1
2222
FILENAME G4EMLOW
2323
EXTENSION tar.gz
2424
ENVVAR G4LEDATA
25-
MD5SUM d28a09f0c93243522512cf2a3a733348
25+
MD5SUM 1308dc5d73b5539557e2ec6b96f7e5ef
2626
)
2727

2828
# - Photon evaporation

cmake/Modules/MSVCCompileFeatures.cmake

+23-17
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,31 @@
1111
# 2) Set the compile flags/features when using CMake < 3.10
1212
#
1313
if(MSVC)
14+
# This seems to indicate CMAKE_C_SIMULATE_ID
15+
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
1416
# Require MSVC that supports standard flags and std::filesystem
15-
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20)
16-
message(FATAL_ERROR "Geant4 requires MSVC 19.20 (Visual Studio 2019 Version 16.0) or newer")
17-
else()
18-
# Set cxxstd flags on CMake < 3.10
19-
if(CMAKE_VERSION VERSION_LESS 3.10)
20-
# VS 2015 Update 3 and above support language standard level flags,
21-
# with the default and minimum level being C++14.
22-
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "")
23-
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "")
24-
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "")
25-
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "")
26-
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std:c++14")
27-
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std:c++14")
28-
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std:c++17")
29-
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std:c++17")
30-
list(APPEND CMAKE_CXX17_COMPILE_FEATURES cxx_std_17)
31-
set(CMAKE_CXX_COMPILE_FEATURES ${CMAKE_CXX_COMPILE_FEATURES} "${CMAKE_CXX17_COMPILE_FEATURES}")
17+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20)
18+
message(FATAL_ERROR "Geant4 requires MSVC 19.20 (Visual Studio 2019 Version 16.0) or newer")
19+
else()
20+
# Set cxxstd flags on CMake < 3.10
21+
if(CMAKE_VERSION VERSION_LESS 3.10)
22+
# VS 2015 Update 3 and above support language standard level flags,
23+
# with the default and minimum level being C++14.
24+
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "")
25+
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "")
26+
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "")
27+
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "")
28+
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std:c++14")
29+
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std:c++14")
30+
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std:c++17")
31+
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std:c++17")
32+
list(APPEND CMAKE_CXX17_COMPILE_FEATURES cxx_std_17)
33+
set(CMAKE_CXX_COMPILE_FEATURES ${CMAKE_CXX_COMPILE_FEATURES} "${CMAKE_CXX17_COMPILE_FEATURES}")
34+
endif()
3235
endif()
36+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
37+
else()
38+
message(FATAL_ERROR "Geant4 requires Visual Studio or Clang.")
3339
endif()
3440
endif()
3541

config/History

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ committal in the CVS repository !
1515
* Reverse chronological order (last date on top), please *
1616
----------------------------------------------------------
1717

18+
12th Feb 2020 Gabriele Cosmo (config-V10-05-09)
19+
- Fixed and updated setup for DLL builds on Windows.
20+
1821
20th Nov 2019 Gabriele Cosmo (config-V10-05-08)
1922
- interactivity.gmk: added -DQT_NO_DEPRECATED_WARNINGS to Qt compilation
2023
settings, to silence warnings from Qt for use of deprecated features.

config/binmake.gmk

-4
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,6 @@ ifdef GLOBALLIBS
261261
LDLIBS2 += -lG4expat
262262
endif
263263

264-
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
265-
LDLIBS2 += -lG4expat
266-
endif
267-
268264
ifdef G4LIB_USE_ZLIB
269265
LDLIBS2 += -lG4zlib
270266
endif

config/genwindef.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ typedef MEMORY_MAPPED_FILE* PMEMORY_MAPPED_FILE;
102102

103103
using namespace std;
104104

105-
#define MakePtr( cast, ptr, addValue ) (cast)( (DWORD)(ptr) + (DWORD)(addValue))
105+
#define MakePtr( cast, ptr, addValue ) (cast)( (DWORD_PTR)(ptr) + (DWORD_PTR)(addValue))
106106

107107
/////////////////////////////////////////////////////////////////////////////
108108
// CLibSymbolInfo

0 commit comments

Comments
 (0)