Skip to content

Commit

Permalink
Import Geant4 10.6.1 source tree
Browse files Browse the repository at this point in the history
  • Loading branch information
gcosmo committed Feb 14, 2020
1 parent 5baee23 commit b14d739
Show file tree
Hide file tree
Showing 278 changed files with 23,746 additions and 22,477 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
project(Geant4)
set(${PROJECT_NAME}_VERSION_MAJOR 10)
set(${PROJECT_NAME}_VERSION_MINOR 6)
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
Expand Down
174 changes: 174 additions & 0 deletions ReleaseNotes/Patch4.10.6-1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@

Geant4 10.6 - patch-01 Release Notes
------------------------------------

14 February 2020

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

o Configuration:
-------------
+ CMake:
o Applied patch to allow compilation on Windows using Clang.
o Quote VECGEOM_COMPILE_DEFINITIONS to avoid incorrect argument errors.
o Fix to prevent errors when a shell is in "set -u" mode.
Addressing problem report #2221.
o No longer create symlinks on Windows; Windows permissions may prevent
creation of symlinks, leading to errors at install time.
o Updated to data-set G4EMLOW-7.9.1.
+ GNUMake:
o Fixed and updated legacy setup for DLL builds on Windows.

o Digits_Hits:
-----------
+ G4ScoringManager, G4VScoreWriter, G4ScoringMessenger: added missing
setter/getter functions.
+ In G4ScoreQuantityMessenger, changed SetDefaultUnit() in trackLength
scorer to SetDefaultValue() to support various unit category.
Addressing problem report #2216.

o Geometry:
--------
+ magneticfield:
o Turn off verbosity flags by default in G4IntegratorDriver,
G4InterpolationDriver and G4MagIntegratorDriver.
+ navigation:
o Avoid looping infinitely by pushing N times with increasing step size.
Addressing problem report #2196.
+ solids/specific:
o Re-established parameterisation mechanism for G4Tet and G4UTet which was
removed by mistake. Addressing problem report #2209.
o Revision of G4Tet, for speed-up and issues detected in unit tests.
Implemented SetVertices(), direct modifier for vertices.
o Revision of G4Ellipsoid, fixing issues with previous implementation,
and 30%-70% speed-up in all main methods.
Also addressing problem report #2206.
o Added protection in G4VFacet header for double definition of global
symbols from Windows Kits code.

o Global:
------
+ Fixed symbol exporting problem in G4coutDestination on Windows; define
'masterG4coutDestination' as normal pointer.
Addressing problem report #2217.
+ Added windefs.hh header, including protections for double definition
of global symbols from Windows Kits code.
+ Updated date and version for 10.6.p01.

o Interfaces:
----------
+ Fixed obsolete URLs in UIQt splash screen.

o Particles
---------
+ Fixed broken if-block in G4DecayTableMessenger.
Addressing problem report #2193.

o Physics Lists
-------------
+ constructors/electromagnetic:
o G4EmModelActivator: fixed configuration of the default EM multiple
scattering on top of any other physics configuration.
Addressing problem report #2106.
+ constructors/gamma_lepto_nuclear
o Fixed reports from Coverity; removed double delete in destructor of
G4LENDBertiniGammaElectroNuclearBuilder.
+ lists:
o LBE: updated cross-sections to avoid crashes caused by the removal of
default Gheisha cross-sections, and to have consistency between elastic
and inelastic cross-sections.

o Processes - Electromagnetic:
---------------------------
+ muons:
o G4MuPairProductionModel: added Store/Retrieve data methods.
Co-works with new data-set G4EMLOW-7.9.1.
+ standard:
o G4BetheHeitler5DModel: added protection against negative argument of
sqrt(), due to precision lost.
+ utils:
o G4EmParameters, G4EmParametersMessenger: added new parameter to enable
read of e+e- production table from file.
Co-works with new data-set G4EMLOW-7.9.1.

o Processes - Hadronic:
--------------------
+ cross_sections:
o G4HadronInelasticDataSet: fixed wrong GHEISHA x-section.
Addressing problem report #2220.
+ management:
o G4HadronicProcess: for charge check assume that all final electrons
come from internal conversion.
+ cascade:
o G4CascadeCheckBalance: fixed outstanding problem of the interface with
native pre-compound model, happening when in the default de-excitation
internal electron conversion gets enabled.
o G4CascadeInterface: fixed memory leak by deleting ltcollider in class
destructor.
o G4CascadeParamMessenger.cc: ensure that Bertini-specific commands get
added to "/process/had/cascade/" UI directory, instead of
"/process/had".
+ models/coherent_elastic:
o G4ElasticHadrNucleusHE: for pi- and Z>1 reuse data structure computed
for pi+ in order to reduce memory and CPU at initialisation; added new
private methods to store/retrieve data tables. Co-works with new
data-set G4EMLOW-7.9.1. Fixed Coverity report.
Switch to parameterized model by cut on kinetic energy and not momentum.
+ models/lend:
o Removed inclusion of amp_math header on Windows as it is not required.
+ models/parton_string/qgsm:
o G4FTFParameters: fixed division by zero (Coverity report) due to wrong
protection.
+ models/radioactive_decay:
o In G4Radioactivation::AddDeexcitationSpectrumForBiasMode(), fixed
memory leak. Addressing problem report #2164.
o G4RadioactiveDecay, G4RadioactiveDecayBase: changed default verbosity
from 0 to 1, and remove G4cerr wherever it occurs and replace it with
G4Exception or G4cout.
Increased verbosity thresholds in order to reduce printout size.
o G4BetaPlusDecay: changed sign of daughterZ argument in
G4BetaDecayCorrections according to problem report #2199.
o Fixed Coverity warnings in G4RadioactiveDecay and
G4RadioactiveDecayBase. Fixed uninitialized data in G4SFDecay.
+ processes:
o G4HadronElasticProcess: removed forgotten try/catch pattern for
target isotope selection.
+ stopping:
o G4MuonicAtomDecay: fixed Coverity warning by addition of G4Exception.

o Visualization:
-------------
+ OpenInventor:
o Added include paths to Inventor to usage requirements on G4OpenInventor.
Inventor does not yet support imported targets, and paths added by
include_directories are now explicitly removed.
Addressing problem report #2215

o Data sets:
---------
+ G4EMLOW-7.9.1:
o Added a new directory mupair for double differential probability
of e+e- pairs produced by muons or hadrons.

o Examples:
--------
+ basic
o Fixed comment for suggested command "/run/numberOfThreads" in macros.
+ extended/hadronic/Hadr01
o HistoManager: fixed FPE happening if check on volume's material
is not vacuum.

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

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

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

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

Please refer to the Geant4 User Documentation for further information about
using Geant4.
21 changes: 21 additions & 0 deletions cmake/History
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,27 @@ add this in the documentation for the changed file as [BUGFIX #BUGNUMBER].

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

14th February 2020 - Ben Morgan (cmake-V10-05-34)
- No longer create gnumake symlinks on Windows
Windows permissions may prevent creation of symlinks, leading to
errors at install time. As gnumake is no longer supported on
Windows, protect symlink creation with test on host platform.

5th February 2020 - Ben Morgan (cmake-V10-05-33)
- Apply patch from TXCorp to allow compilation on Windows using Clang

4th February 2020 - Ben Morgan (cmake-V10-05-32)
- BUGFIX 2221
Use "${FOO:-}" variable expansion and "-z" test to check for
undefined variables in Bourne Shell scripts. Prevents errors when
shell is in "set -u" mode. Report and patch supplied by Michael Reilly

28th January 2020 - Gunter Folger (cmake-V10-05-31)
- Switch to patched dataset for G4EMLOW 7.9.1

15th January 2020 - Ben Morgan (cmake-V10-05-30)
- Quote VECGEOM_COMPILE_DEFINITIONS to avoid incorrect argument errors

25th November 2019 - Ben Morgan (cmake-V10-05-29)
- Disable configuration of Wt UI/Vis driver due to it no longer
compiling with recent Wt versions
Expand Down
19 changes: 8 additions & 11 deletions cmake/Modules/G4ConfigureGNUMakeHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ function(_g4tc_setenv_ifnotset_command TEMPLATE_NAME SHELL_FAMILY VARIABLE_NAME
# Have to make this section verbatim to get correct formatting
set(${TEMPLATE_NAME}
"
if test \"x\$${VARIABLE_NAME}\" = \"x\" ; then
if [ -z \"\$\{${VARIABLE_NAME}-\}\" ] ; then
export ${VARIABLE_NAME}=${VARIABLE_VALUE}
fi
"
Expand Down Expand Up @@ -317,7 +317,7 @@ function(_g4tc_prepend_path TEMPLATE_NAME SHELL_FAMILY PATH_VARIABLE
# We have to make this section verbatim
set(${TEMPLATE_NAME}
"
if test \"x\$${PATH_VARIABLE}\" = \"x\" ; then
if [ -z \"\$\{${PATH_VARIABLE}-\}\" ] ; then
export ${PATH_VARIABLE}=${APPEND_VARIABLE}
else
export ${PATH_VARIABLE}=${APPEND_VARIABLE}:\${${PATH_VARIABLE}}
Expand Down Expand Up @@ -354,7 +354,7 @@ function(_g4tc_append_path TEMPLATE_NAME SHELL_FAMILY PATH_VARIABLE
# We have to make this section verbatim
set(${TEMPLATE_NAME}
"
if test \"x\$${PATH_VARIABLE}\" = \"x\" ; then
if [ -z \"\$\{${PATH_VARIABLE}-\}\" ] ; then
export ${PATH_VARIABLE}=${APPEND_VARIABLE}
else
export ${PATH_VARIABLE}=\${${PATH_VARIABLE}}:${APPEND_VARIABLE}
Expand Down Expand Up @@ -805,14 +805,11 @@ install(DIRECTORY config
PATTERN "scripts/" EXCLUDE
)

# Compatibility softlink to library directory, we do this on all
# platforms, but it does nothing on Windows (well, at least the
# attempted symlink creation does not)
# Take care to quote the path names to avoid issues with spaces
install(CODE "execute_process(COMMAND \${CMAKE_COMMAND} -E make_directory \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/Geant4-${Geant4_VERSION}\")")

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}\")")

# Compatibility softlink to library directory on UNIX only
if(UNIX)
install(CODE "execute_process(COMMAND \${CMAKE_COMMAND} -E make_directory \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/Geant4-${Geant4_VERSION}\")")
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}\")")
endif()

#-----------------------------------------------------------------------
# TEMPORARY
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/G4VecGeomShim.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if(VecGeom_FOUND)

string(REGEX REPLACE "^\-D|;-D" ";" VECGEOM_COMPILE_DEFINITIONS "${VECGEOM_DEFINITIONS}")
set_target_properties(VecGeom::VecGeom PROPERTIES
INTERFACE_COMPILE_DEFINITIONS ${VECGEOM_COMPILE_DEFINITIONS}
INTERFACE_COMPILE_DEFINITIONS "${VECGEOM_COMPILE_DEFINITIONS}"
INTERFACE_INCLUDE_DIRECTORIES "${VECGEOM_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${VECGEOM_LIBRARIES}"
IMPORTED_LOCATION "${VECGEOM_LIBRARY}")
Expand Down
4 changes: 2 additions & 2 deletions cmake/Modules/Geant4DatasetDefinitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ geant4_add_dataset(
# - Low energy electromagnetics
geant4_add_dataset(
NAME G4EMLOW
VERSION 7.9
VERSION 7.9.1
FILENAME G4EMLOW
EXTENSION tar.gz
ENVVAR G4LEDATA
MD5SUM d28a09f0c93243522512cf2a3a733348
MD5SUM 1308dc5d73b5539557e2ec6b96f7e5ef
)

# - Photon evaporation
Expand Down
40 changes: 23 additions & 17 deletions cmake/Modules/MSVCCompileFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,31 @@
# 2) Set the compile flags/features when using CMake < 3.10
#
if(MSVC)
# This seems to indicate CMAKE_C_SIMULATE_ID
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# Require MSVC that supports standard flags and std::filesystem
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20)
message(FATAL_ERROR "Geant4 requires MSVC 19.20 (Visual Studio 2019 Version 16.0) or newer")
else()
# Set cxxstd flags on CMake < 3.10
if(CMAKE_VERSION VERSION_LESS 3.10)
# VS 2015 Update 3 and above support language standard level flags,
# with the default and minimum level being C++14.
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "")
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "")
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "")
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std:c++14")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std:c++14")
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std:c++17")
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std:c++17")
list(APPEND CMAKE_CXX17_COMPILE_FEATURES cxx_std_17)
set(CMAKE_CXX_COMPILE_FEATURES ${CMAKE_CXX_COMPILE_FEATURES} "${CMAKE_CXX17_COMPILE_FEATURES}")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20)
message(FATAL_ERROR "Geant4 requires MSVC 19.20 (Visual Studio 2019 Version 16.0) or newer")
else()
# Set cxxstd flags on CMake < 3.10
if(CMAKE_VERSION VERSION_LESS 3.10)
# VS 2015 Update 3 and above support language standard level flags,
# with the default and minimum level being C++14.
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "")
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "")
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "")
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std:c++14")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std:c++14")
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std:c++17")
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std:c++17")
list(APPEND CMAKE_CXX17_COMPILE_FEATURES cxx_std_17)
set(CMAKE_CXX_COMPILE_FEATURES ${CMAKE_CXX_COMPILE_FEATURES} "${CMAKE_CXX17_COMPILE_FEATURES}")
endif()
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
else()
message(FATAL_ERROR "Geant4 requires Visual Studio or Clang.")
endif()
endif()

3 changes: 3 additions & 0 deletions config/History
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------

12th Feb 2020 Gabriele Cosmo (config-V10-05-09)
- Fixed and updated setup for DLL builds on Windows.

20th Nov 2019 Gabriele Cosmo (config-V10-05-08)
- interactivity.gmk: added -DQT_NO_DEPRECATED_WARNINGS to Qt compilation
settings, to silence warnings from Qt for use of deprecated features.
Expand Down
4 changes: 0 additions & 4 deletions config/binmake.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,6 @@ ifdef GLOBALLIBS
LDLIBS2 += -lG4expat
endif

ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
LDLIBS2 += -lG4expat
endif

ifdef G4LIB_USE_ZLIB
LDLIBS2 += -lG4zlib
endif
Expand Down
2 changes: 1 addition & 1 deletion config/genwindef.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ typedef MEMORY_MAPPED_FILE* PMEMORY_MAPPED_FILE;

using namespace std;

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

/////////////////////////////////////////////////////////////////////////////
// CLibSymbolInfo
Expand Down
Loading

0 comments on commit b14d739

Please sign in to comment.