Skip to content

Commit d0f9119

Browse files
committed
Import Geant4 10.6.0.beta source tree
1 parent 28a7070 commit d0f9119

File tree

1,056 files changed

+83482
-66474
lines changed

Some content is hidden

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

1,056 files changed

+83482
-66474
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
3636
# the same form.
3737
project(Geant4)
3838
set(${PROJECT_NAME}_VERSION_MAJOR 10)
39-
set(${PROJECT_NAME}_VERSION_MINOR 5)
40-
set(${PROJECT_NAME}_VERSION_PATCH 1)
39+
set(${PROJECT_NAME}_VERSION_MINOR 6)
40+
set(${PROJECT_NAME}_VERSION_PATCH 0)
4141
set(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}")
4242

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

ReleaseNotes/Beta4.10.6-1.txt

+685
Large diffs are not rendered by default.

ReleaseNotes/Patch4.10.4-3.txt

+168
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
2+
Geant4 10.4 - patch-03 Release Notes
3+
------------------------------------
4+
5+
8 February 2019
6+
7+
List of fixes included in this public patch since the public release 10.4.p02:
8+
9+
o Configuration:
10+
-------------
11+
+ CMake:
12+
o Corrected URLs for data installation to use https; added -L flag to curl
13+
to follow redirects when accessing a dataset URL.
14+
o Geant4MakeRules_cxx.cmake: added -DGL_SILENCE_DEPRECATION to
15+
CMAKE_CXX_FLAGS_INIT for clang to silence GL deprecation compilation
16+
warnings on MacOS 10.14 Mojave.
17+
+ GNUMake:
18+
o Fixed setting of G4RUNPATHOPTION in Darwin/Linux-clang/g++ and binmake.cmk.
19+
Addressing problem report #2086.
20+
o Cleanup settings for GL in Darwin-clang.gmk and Darwin-g++.gmk.
21+
Added -DGL_SILENCE_DEPRECATION to CPPFLAGS to silence GL deprecation
22+
compilation warnings on MacOS 10.14 Mojave.
23+
24+
o Analysis:
25+
--------
26+
+ Fixed a deadlock issue with G4RootPNtupleManager where the mutex
27+
was locked before being passed to Root.
28+
+ Fixed compilation warnings on gcc-8.1.0.
29+
30+
o Geometry:
31+
--------
32+
+ management:
33+
o Use reverse_iterator in G4SolidStore::DeRegister() in order to speedup
34+
partial deregistration on setups with many solids instances.
35+
o G4Region: added possibility to disable search in the tree in
36+
AddRootLogicalVolume() for speeding up process in complex flat geometries.
37+
38+
o Global:
39+
------
40+
+ G4PhysicsVector, G4Physics2DVector: fixed possible out-of-bound access
41+
in FindBin() method. Addressing problem report #2087.
42+
+ Updated date and version for 10.4.p03.
43+
44+
o Interfaces:
45+
----------
46+
+ G4Xt: fixed compilation warnings for casts on gcc-8.1.
47+
+ Fixed compilation warnings for not used return parameters.
48+
49+
o Persistency - gdml
50+
------------------
51+
+ Clear auxiliary map information in G4GDMLReadStructure::Clear().
52+
Addressing problem report #2064.
53+
+ Added stripping of invalid characters for names generation in writer classes
54+
to prevent invalid NCName strings in exported GDML files. Adopt properly
55+
stripped generated strings for exporting names of optical surfaces.
56+
57+
o Processes - Electromagnetic:
58+
---------------------------
59+
+ dna:
60+
o Fixed header guards in G4ITFinder and G4AllITFinder.
61+
Addressing problem report #2084.
62+
+ standard:
63+
o G4GoudsmitSaundersonTable: fixed gcc-8.1.0 compilation warnings.
64+
+ utils:
65+
o G4EmElementSelector: optimisation of element selection for compound
66+
materials.
67+
+ xrays:
68+
o G4Cerenkov, G4Scintillation: correctly reset number of photons
69+
to 0 each step. Addressing problem report #2056.
70+
Added protection against infinite loops due to very small steps.
71+
Addressing problem report #1992.
72+
73+
o Processes - Hadronic:
74+
--------------------
75+
+ management:
76+
o G4HadronicProcess: added check if secondary particle is on the mass
77+
shell; if its mass differ from the PDG mass more for 1.5 MeV then mass
78+
is forced to the mass shell, energy conserved, but momentum is changed.
79+
Use correct return type when calling CheckResult() from PostStepDoIt():
80+
fixes case when the value of pointer 'result' does not get properly
81+
reset to NULL in case a non-conservation is detected, thus "bad"
82+
interaction does not get re-sampled.
83+
Fixed compilation warnings on gcc-8.1.0 regarding catching polymorphic
84+
type by value, instead of by reference.
85+
o G4HadronicProcess, G4VLeadingParticleBiasing, G4HadLeadBias: fixed
86+
compilation warning with gcc-7.
87+
+ models/binary_cascade
88+
o G4GeneratorPrecompoundInterface: fixed printout typo.
89+
+ models/cascade:
90+
o G4GDecay3: fixed problem reported by CMS due to wrong kinematics in
91+
the final state by removing loop check; adding protection for low value
92+
of mother mass.
93+
+ models/de_excitation:
94+
o G4LevelReader: fixed initialisation of 'fAlphaMax' from 1.e+6 to 1.e+15;
95+
needed for correct IC probability of some isotopes.
96+
Addresses problem reports #1986 and #2076, by change of handling of
97+
internal conversion data.
98+
+ models/particle_hp
99+
o G4ParticleHPCaptureFS::ApplyYourself(): Lorentz boost of neutron into
100+
target frame was backwards; reversed it. Also replaced SetDefinition()
101+
with SetDefinitionAndUpdateE(). Addresses problem report #1919.
102+
o Fixed definition of singletons for G4ParticleHPManager and
103+
G4ParticleHPThreadLocalManager and some code cleanup.
104+
Made G4ParticleHPThreadLocalManager a G4ThreadlLocalSingleton to avoid
105+
memory leaks generated each time a thread creates the instance.
106+
o Fixed bug for double allocation of G4ParticleHPReactionWhiteBoard in
107+
G4ParticleHPThreadLocalManager::OpenReactionWhiteBoard().
108+
o G4ParticleHPElementData: removed unnecessary inheritance from
109+
G4HadronicCrossSection.
110+
o Fixed incorrect sampling of isotropic distribution.
111+
Addressing problem report #1745.
112+
o Fixed gamma level mismatch in G4ParticleHPInelasticCompFS.
113+
Not a complete fix because gamma data comes from ENSDF and does not
114+
necessarily match excitations in ENDF.
115+
Addressing problem report #1789.
116+
o Fixed memory leaks in G4ParticleHPContEnergyAngular::Sample() and
117+
G4ParticleHPContAngularPar::cacheInit().
118+
Addressing problem report #2026.
119+
o G4ParticleHPElasticFS::ApplyYourself(): use correct reference frames for
120+
calculation of projectile and target momenta. Correction made for cases
121+
when cos(Theta) is given in lab frame and in center of momentum frame.
122+
Partial fix of momentum non-conservation for problem report #1918.
123+
o Fixed potential leaks in G4ParticleHPPhotonDist, G4ParticleHPContAngularPar
124+
and G4ParticleHPFinalState for use of pointers cached in G4Cache.
125+
o G4ENDFTapeRead, G4FissionProductYieldDist: fixed compilation warnings
126+
on gcc 8.1.0, regarding catching polymorphic type by value, instead of
127+
by reference.
128+
o Minor code cleanup and formatting.
129+
+ models/parton_string/diffraction
130+
o G4FTFAnnihilation: fix to get flat cos(theta) and phi distributions for
131+
antiproton annihilation at rest.
132+
+ models/rpg
133+
o G4RPGAntiKZeroInelastic, G4RPGInelastic: fixed compilation warnings on
134+
gcc-8.1.0, regarding catching polymorphic type by value, instead of by
135+
reference.
136+
+ processes:
137+
o G4HadronElasticProcess, G4NeutrinoElectronProcess: fixed compilation
138+
warnings on gcc 8.1.0, regarding catching polymorphic type by value,
139+
instead of by reference.
140+
+ stopping:
141+
o G4HadronStoppingProcess, G4MuonicAtomDecay: fixed compilation warnings
142+
on gcc 8.1.0, regarding catching polymorphic type by value, instead of
143+
by reference.
144+
145+
o Processes - Scoring:
146+
-------------------
147+
o G4ParallelWorldProcess: fixed track velocity of optical photons for the
148+
first step in a layered mass geometry.
149+
150+
o Examples:
151+
--------
152+
+ extended/fieldBlineTracer:
153+
o Fixed compilation error for missing header inclusion.
154+
155+
----------------------------------------------------------------------------
156+
157+
Technical Notes
158+
---------------
159+
160+
o This patch should be applied on top of release 10.4 or 10.4.p01 or p02.
161+
o Technical notes distributed for release 10.4 are also applicable and
162+
valid for this patch.
163+
164+
The code and rebuilt binary libraries for release 10.4.p03 are available
165+
through our "Download" Web page.
166+
167+
Please refer to the Geant4 User Documentation for further information about
168+
using Geant4.

cmake/History

+35-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,41 @@ add this in the documentation for the changed file as [BUGFIX #BUGNUMBER].
3030

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

33-
21st December 2018 - Makoto Asai (cmake-V10-04-28)
33+
6th June 2019 - Ben Morgan (cmake-V10-05-05)
34+
- Remove G4FPE_DEBUG from Debug build mode
35+
- Not appropriate for basic debug and incompatible with Qt
36+
- Provide new "Debug_FPE" build mode which copies Debug mode and
37+
appends -DG4FPE_DEBUG to allow continued use without clashing
38+
with common primary modes.
39+
40+
24th May 2019 - Gunter Folger (cmake-V10-05-04)
41+
- Switch to G4PARTICLEXS 2.0
42+
43+
14th May 2019 - Ben Morgan (cmake-V10-05-03)
44+
- Promote always required -D flags for VecGeom replacements to fixed
45+
#define/undef flags in a header
46+
- See geommng-V10-05-05, G4GeomTypes/G4GeomConfig.hh
47+
- Set CMake variables for G4GEOM_USE_... parameters as configured
48+
- Retain add_definitions for VecGeom until it supports usage requirements
49+
- Update XXHelpers scripts for generating GNUmake/pkg-config/CMake files
50+
51+
8th February 2019 - Ben Morgan (cmake-V10-05-02)
52+
- DEV-250: Promote global, always required, -D flags to fixed #define/undef
53+
in new G4GlobalConfig.hh header:
54+
- G4USE_STD11
55+
- G4MULTITHREADED
56+
- G4_STORE_TRAJECTORY
57+
- G4VERBOSE
58+
- GEANT4_USE_TIMEMORY
59+
- Remove use of add_definitions of CMAKE_CXX_FLAGS to set these in Geant4
60+
and client scripts
61+
- Used by global-V10-05-02
62+
63+
7th February 2019 - Ben Morgan (cmake-V10-05-01)
64+
- Remove obsolete GEANT4_BUILD_MUONIC_ATOMS_IN_USE option
65+
and associated configuration/compiler flags.
66+
67+
21st December 2018 - Makoto Asai (cmake-V10-05-00)
3468
- Modules/Geant4OptionalComponents.cmake:
3569
- Template/Geant4Config.cmake.in:
3670
Add GEANT4_USE_SMARTSTACK

cmake/Modules/G4BuildSettings.cmake

+12-34
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ include(IntelCompileFeatures)
7979
#
8080
if(NOT WIN32)
8181

82+
#.rst:
83+
# - ``Debug_FPE``
84+
# For debugging with full Floating Point Exception checking
85+
#
86+
set(CMAKE_CXX_FLAGS_DEBUG_FPE "${CMAKE_CXX_FLAGS_DEBUG_FPE_INIT}"
87+
CACHE STRING "Flags used by the compiler during Debug_FPE builds"
88+
)
89+
mark_as_advanced(CMAKE_CXX_FLAGS_DEBUG_FPE)
90+
8291
#.rst:
8392
# - ``TestRelease``:
8493
# For trial production and extended testing. It has verbose
@@ -110,18 +119,19 @@ if(NOT CMAKE_CONFIGURATION_TYPES)
110119
if(NOT CMAKE_BUILD_TYPE)
111120
# Default to a Release build if nothing else...
112121
set(CMAKE_BUILD_TYPE Release
113-
CACHE STRING "Choose the type of build, options are: None Release TestRelease MinSizeRel Debug RelWithDebInfo MinSizeRel Maintainer."
122+
CACHE STRING "Choose the type of build, options are: None Release TestRelease MinSizeRel Debug Debug_FPE RelWithDebInfo MinSizeRel Maintainer."
114123
FORCE
115124
)
116125
else()
117126
# Force to the cache, but use existing value.
118127
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}"
119-
CACHE STRING "Choose the type of build, options are: None Release TestRelease MinSizeRel Debug RelWithDebInfo MinSizeRel Maintainer."
128+
CACHE STRING "Choose the type of build, options are: None Release TestRelease MinSizeRel Debug Debug_FPE RelWithDebInfo MinSizeRel Maintainer."
120129
FORCE
121130
)
122131
endif()
123132
else()
124133
# Multimode tools like VS, Xcode
134+
list(APPEND CMAKE_CONFIGURATION_TYPES Debug_FPE)
125135
list(APPEND CMAKE_CONFIGURATION_TYPES TestRelease)
126136
list(APPEND CMAKE_CONFIGURATION_TYPES Maintainer)
127137
list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
@@ -200,9 +210,6 @@ endif()
200210
# An example of where a workaround is needed
201211
# Rest of concurrency a library implementation feature
202212

203-
# Add Definition to flags for temporary back compatibility
204-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DG4USE_STD11")
205-
206213
# Hold any appropriate compile flag(s) in variable for later export to
207214
# config files. Needed to support clients using late CMake 2.8 where compile features
208215
# are not available.
@@ -261,7 +268,6 @@ if(GEANT4_BUILD_MULTITHREADED)
261268

262269
# Set Defs/Compiler Flags
263270
# TODO: Migrate def to header
264-
add_definitions(-DG4MULTITHREADED)
265271
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GEANT4_MULTITHREADED_CXX_FLAGS}")
266272
endif()
267273

@@ -280,11 +286,6 @@ option(GEANT4_BUILD_STORE_TRAJECTORY
280286
ON)
281287
mark_as_advanced(GEANT4_BUILD_STORE_TRAJECTORY)
282288

283-
# TODO: Migrate this to header
284-
if(GEANT4_BUILD_STORE_TRAJECTORY)
285-
add_definitions(-DG4_STORE_TRAJECTORY)
286-
endif()
287-
288289
#.rst:
289290
# - ``GEANT4_BUILD_VERBOSE_CODE`` (Default: ON)
290291
#
@@ -297,29 +298,6 @@ option(GEANT4_BUILD_VERBOSE_CODE
297298
ON)
298299
mark_as_advanced(GEANT4_BUILD_VERBOSE_CODE)
299300

300-
# TODO: Migrate this to header
301-
if(GEANT4_BUILD_VERBOSE_CODE)
302-
add_definitions(-DG4VERBOSE)
303-
endif()
304-
305-
#.rst:
306-
# - ``GEANT4_BUILD_MUONIC_ATOMS_IN_USE`` (Default: OFF)
307-
#
308-
# - Switched off by default to improve performance when not using
309-
# Muonic Atom code. It should be switched on if the project requires
310-
# support for Muonic Atoms.
311-
# Mark as advanced because most users should not need to worry about it
312-
#
313-
option(GEANT4_BUILD_MUONIC_ATOMS_IN_USE
314-
"Enable turning on some if statements in track and event code. Switch on if using new Muonic Atom code."
315-
OFF)
316-
mark_as_advanced(GEANT4_BUILD_MUONIC_ATOMS_IN_USE)
317-
318-
# TODO: Migrate this to header
319-
if(GEANT4_BUILD_MUONIC_ATOMS_IN_USE)
320-
add_definitions(-DG4MUATOMS_INUSE)
321-
endif()
322-
323301
#.rst:
324302
# - ``GEANT4_BUILD_MSVC_MP`` (Windows only, Default: OFF)
325303
#

cmake/Modules/G4ConfigureCMakeHelpers.cmake

+1-10
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ set(GEANT4_THIRD_PARTY_IMPORT_SETUP )
6464
# Externals libraries that may be present
6565
set(GEANT4_EXTERNALS_TARGETS )
6666

67-
# - Stuff from Geant4LibraryBuildOptions.cmake
68-
if(GEANT4_BUILD_STORE_TRAJECTORY)
69-
list(APPEND GEANT4_CORE_DEFINITIONS -DG4_STORE_TRAJECTORY)
70-
endif()
71-
72-
if(GEANT4_BUILD_VERBOSE_CODE)
73-
list(APPEND GEANT4_CORE_DEFINITIONS -DG4VERBOSE)
74-
endif()
75-
7667
# - Stuff from Geant4OptionalComponents.cmake
7768
# - CLHEP
7869
# If it's internal, add it to the externals list
@@ -104,11 +95,11 @@ endif()
10495
# Compile definitions
10596
if(GEANT4_USE_USOLIDS OR GEANT4_USE_PARTIAL_USOLIDS)
10697
set(GEANT4_USE_USOLIDS_EITHER ON)
107-
list(APPEND GEANT4_CORE_DEFINITIONS ${GEANT4_USOLIDS_COMPILE_DEFINITIONS})
10898

10999
# System USolids headers, because these do appear in Geant4's
110100
# public interface. The library should be in the link interface
111101
# of G4geometry (may need refinding)
102+
list(APPEND GEANT4_CORE_DEFINITIONS ${VECGEOM_DEFINITIONS})
112103
list(APPEND GEANT4_THIRD_PARTY_INCLUDES "${USOLIDS_INCLUDE_DIRS} ${VECGEOM_EXTERNAL_INCLUDES}")
113104
endif()
114105

cmake/Modules/G4ConfigurePkgConfigHelpers.cmake

+1-8
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,6 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
123123
set(G4_BUILTWITH_MULTITHREADING "no")
124124
endif()
125125

126-
# - Muonic Atom support
127-
if(GEANT4_BUILD_MUONIC_ATOMS_IN_USE)
128-
set(G4_BUILTWITH_MUONIC_ATOMS "yes")
129-
else()
130-
set(G4_BUILTWITH_MUONIC_ATOMS "no")
131-
endif()
132-
133126
# - CLHEP
134127
if(GEANT4_USE_SYSTEM_CLHEP)
135128
set(G4_BUILTWITH_CLHEP "no")
@@ -196,7 +189,7 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
196189
list(REMOVE_DUPLICATES G4_USOLIDS_INCLUDE_DIRS)
197190
list(REMOVE_ITEM G4_USOLIDS_INCLUDE_DIRS ${_cxx_compiler_dirs})
198191

199-
string(REPLACE ";" " " G4_USOLIDS_CFLAGS "${GEANT4_USOLIDS_COMPILE_DEFINITIONS}")
192+
string(REPLACE ";" " " G4_USOLIDS_CFLAGS "${VECGEOM_DEFINITIONS}")
200193
foreach(_dir ${G4_USOLIDS_INCLUDE_DIRS})
201194
set(G4_USOLIDS_CFLAGS "${G4_USOLIDS_CFLAGS} -I${_dir}")
202195
endforeach()

cmake/Modules/Geant4DatasetDefinitions.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ geant4_add_dataset(
4848
# - Particle XS - replaces Neutron XS
4949
geant4_add_dataset(
5050
NAME G4PARTICLEXS
51-
VERSION 1.1
51+
VERSION 2.0
5252
FILENAME G4PARTICLEXS
5353
EXTENSION tar.gz
5454
ENVVAR G4PARTICLEXSDATA
55-
MD5SUM 17dc6c6f11db7ca81dea1c2c2b3707d2
55+
MD5SUM bc115502d4524ef7625557d9cab355c0
5656
)
5757

5858
# - PII

0 commit comments

Comments
 (0)