Skip to content

Commit

Permalink
Import Geant4 10.6.2 source tree
Browse files Browse the repository at this point in the history
  • Loading branch information
gcosmo committed May 29, 2020
1 parent b14d739 commit 2d174b7
Show file tree
Hide file tree
Showing 448 changed files with 23,209 additions and 30,946 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 1)
set(${PROJECT_NAME}_VERSION_PATCH 2)
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
124 changes: 124 additions & 0 deletions ReleaseNotes/Patch4.10.6-2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@

Geant4 10.6 - patch-02 Release Notes
------------------------------------

29 May 2020

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

o Configuration:
-------------
+ CMake:
o Added activation of build of G4Py through GEANT4_USE_PYTHON flag.
Requires Boost.Python (only 1.72 tested so far) using Python 3 or
newer (only 3.7 tested).
Verify that MT builds use 'global-dynamic' TLS mode to allow Python
module loading of dynamic libraries.
o Fix to avoid configuration of applications failure due to variables
having empty values, and consequently no "type" argument. Only store
values in the package cache if they are set and have a valid value.
o Use full path to datasets if GEANT4_INSTALL_DATADIR is an absolute path.
Customize CMAKE_INSTALL_DATADIR in a single location.
o Suppress warnings about icc libraries not existing for Intel icc-19.

o Environments:
------------
+ G4Py: integrated build, test, and install of geant4py with core Geant4
CMake build system.

o Geometry:
--------
+ solids/specific:
o Fixed mismatch in signature of constructors for the G4UExtrudedSolid
wrapper.

o Global:
------
+ G4UnitsTable: added inheriting constructors for std::vector.
Addressing problem report #2232.
+ Updated date and version for 10.6.p02.

o Intercoms:
---------
+ Accept null string as an alias value. Addessing problem report #2208.

o Physics Lists
-------------
+ constructors/limiters
o G4GenericBiasingPhysics: added missing code for parallel geometries
for all neutral and charged particles.

o Processes - Electromagnetic:
---------------------------
+ utils:
o G4LossTableBuilder: fixed typo. Addressing problem report #2230.

o Processes - Hadronic:
--------------------
+ models/de_excitation:
o G4DeexPrecoParameters: set default time limit to 1 microsecond
for isomer production (now, in all cases, isomers with half-life time
above 1 microsecond are produced, whereas before this happened
only when Radioactive Decay was activated, else only above 1000 sec).
Addressing problem report #2226.
+ models/lend:
o New class G4LENDGammaModel to sample GND gamma-nuclear reactions.
New class G4LENDGammaCrossSection to sample GND gamma-nuclear reactions.
Added documentation to MCGIDI_outputChannel.
Rewritten G4LENDInelastic to take care of large baryon number
violations. Addressing problem report #2174.
+ models/particle_hp:
o In G4ParticleHPInelasticBaseFS, use QI[0]-QI[it] for excitation and
added particle definition protection to 'iLevel' calculation.
Addressing problem report #1838.
o Correction in G4ParticleHPInelasticBaseFS and
G4ParticleHPInelasticCompFS. Removed deletion of 'theReactionXsec'
in G4ParticleHPPhotonDist() destructor as memory allocation does
not take place in this class. Addressing problem report #1824.
o In G4ParticleHPThermalScattering::create_E_isoAng_from_energy(),
added fatal exception for case when pointers panEPM_T_EL or panEPM_T_EH
are null; fixing Coverity reports.
o Corrected copy constructor in G4ParticleHPDataPoint.
+ models/parton_string/hadronization:
o G4QGSMFragmentation, G4LundStringFragmentation: fixed Coverity defects
warnings; if fragmentation at low energy is not possible, always return
flag "false"; use nullptr.
+ models/radioactive_decay:
o G4RadioactiveDecayBase, G4RadioactiveDecay, G4Radioactivation:
use G4VERBOSE consistently; in G4Radioactivation, fixed forgotten
change of verbosity from 0 to 1.

o Examples:
--------
+ advanced/ChargeExchangeMC
o Fixed compilation error on main().
o Fixed CMake build script for dependence on Qt libraries.
+ basic/B2
o Updated READMEs and added a comment in B2PrimaryGeneratorAction
that starting a primary particle on the world boundary requires
shooting in a direction towards inside the world.
+ extended/biasing/ReverseMC01
o RMC01AnalysisManager: use double for computation of mean and RMS;
added protection for sqrt() argument, to avoid a problem due to
precision loss in arithmetic computations.
+ extended/exoticphysics/monopole
o G4MonopolePhysics: minor code clean-up for thread safety
o Do not instantiate VisManager in the batch mode in main();
fixed some typos.
o G4MonopoleTransportation: removed check if monopole is opticalphoton
or not as no longer necessary.

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

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

o This patch should be applied on top of release 10.6 or 10.6.p01.
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.p02 are available
through the Geant4 "Download" Web page.

Please refer to the Geant4 User Documentation for further information about
using Geant4.
18 changes: 18 additions & 0 deletions cmake/History
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@ add this in the documentation for the changed file as [BUGFIX #BUGNUMBER].
* Reverse chronological order (last date on top), please *

----------------------------------------------------------
21st April 2020 - Ben Morgan (cmake-V10-05-39)
- BUGFIX: Only store variables in Geant4PackageCache if they have
a value.

6th April 2020 - Ben Morgan (cmake-V10-05-38)
- Activate build of geant4py when GEANT4_USE_PYTHON is set
Check that MT builds use global-dynamic TLS to allow Python
module loading of the Geant4 dynamic libraries.

3rd April 2020 - Guilherme Amadio (cmake-V10-05-37)
- Use full path to datasets if GEANT4_INSTALL_DATADIR is an absolute path

2nd April 2020 - Guilherme Amadio (cmake-V10-05-36)
- Customize CMAKE_INSTALL_DATADIR in a single location

18th March 2020 - Gunter Folger (cmake-V10-05-35)
- In Modules/G4CPack.cmake suppress warnings about icc libraries not existing
for Intel icc version 19.

14th February 2020 - Ben Morgan (cmake-V10-05-34)
- No longer create gnumake symlinks on Windows
Expand Down
31 changes: 19 additions & 12 deletions cmake/Modules/G4CMakeMain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,37 @@ include(Geant4OptionalComponents)
# there are many complex options to handle.
include(Geant4InterfaceOptions)

# - Provide options to enable wrapping of Geant4 by other languages
include(Geant4Wrapping)
# - Installation of optional read-only architecture independent data files.
include(Geant4InstallData)

# - Include testing up front so both source and environments can use it if required
include(Geant4CTest)


#-----------------------------------------------------------------------
# Add the source and environments subdirectories
# source : Process all the Geant4 core targets
# environments : Process optional wrappings of Geant4 (NOTYETIMPLEMENTED)
add_subdirectory(source)
#add_subdirectory(environments)

option(GEANT4_USE_PYTHON "Build Python bindings for Geant4" OFF)
if(GEANT4_USE_PYTHON)
# We can only build g4py with MT geant4 if TLS is global-dynamic (or auto?)
if(GEANT4_BUILD_MULTITHREADED AND (NOT GEANT4_BUILD_TLS_MODEL MATCHES "global-dynamic"))
message(FATAL_ERROR "Geant4Py only supports 'global-dynamic' thread local storage
'${GEANT4_BUILD_TLS_MODEL}' selected by GEANT4_BUILD_TLS_MODEL option
")
endif()

add_subdirectory(environments/g4py)
endif()

#-----------------------------------------------------------------------
# - Perform all post build tasks
# At the CMake level, this simply means that we must know about targets
# and other properties processed in source and environments trees before
# these tasks can be performed.
#
# - Installation of optional read-only architecture independent data files.
# E.g. Examples, data libraries, documentation.
# Done before toolchain generation because it may affect what we have to do
# there!
#
include(Geant4InstallData)

# - Generate any Use/Config/Support files here once everything else has
# been processed e.g. "UseGeant4.cmake", "Geant4Config.cmake", library
# dependencies etc.
Expand All @@ -101,7 +109,6 @@ include(G4ConfigureCMakeHelpers)
#-----------------------------------------------------------------------
# - Testing configuration.
# Done here, as projects under 'tests' require Geant4Config.
include(Geant4CTest)
if(GEANT4_ENABLE_TESTING)
add_subdirectory(tests)
if(EXISTS ${CMAKE_SOURCE_DIR}/benchmarks)
Expand All @@ -121,7 +128,7 @@ mark_as_advanced(GEANT4_INSTALL_EXAMPLES)

if(GEANT4_INSTALL_EXAMPLES)
install(DIRECTORY examples
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}
DESTINATION ${CMAKE_INSTALL_DATADIR}
COMPONENT Examples
PATTERN "CVS" EXCLUDE
PATTERN ".svn" EXCLUDE
Expand Down
10 changes: 10 additions & 0 deletions cmake/Modules/G4CMakeSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ add_custom_target(validate_sources
#.rst:
# General Installation Settings
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#
# Geant4 custom defaults

set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH
"Read-only architecture-independent data root (share)")

set(CMAKE_INSTALL_DATADIR
"${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}" CACHE PATH
"Read-only architecture-independent data (DATAROOTDIR/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION})")

#
# CMake's builtin `GNUInstallDirs` module is used to set and provide variables
# for the destinations to which for executables, libraries and other files
Expand Down
9 changes: 6 additions & 3 deletions cmake/Modules/G4CMakeUtilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,12 @@ function(geant4_save_package_variables _title)
get_property(__exported_vars GLOBAL PROPERTY GEANT4_EXPORT_PACKAGE_${_title}_VARIABLES)
foreach(__varname ${ARGN})
if(NOT (${__varname} IN_LIST __exported_vars))
# TODO: Also check that the save variable is in the cache...
# if(CACHE ...) only available from 3.14
set_property(GLOBAL APPEND PROPERTY GEANT4_EXPORT_PACKAGE_${_title}_VARIABLES ${__varname})
# Some variables might be empty on certain systems. Only save those with a value
if(${__varname})
# TODO: Also check that the save variable is in the cache...
# if(CACHE ...) only available from 3.14
set_property(GLOBAL APPEND PROPERTY GEANT4_EXPORT_PACKAGE_${_title}_VARIABLES ${__varname})
endif()
endif()
endforeach()
endfunction()
Expand Down
36 changes: 20 additions & 16 deletions cmake/Modules/G4ConfigureGNUMakeHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ _g4tc_configure_build_tree_scripts(geant4make)
# +- CMAKE_INSTALL_PREFIX
# +- LIBDIR/Geant4-VERSION (G4LIB)
# +- INCLUDEDIR/Geant4 (G4INCLUDE)
# +- DATAROOTDIR/Geant4-VERSION/
# +- DATADIR/
# +- geant4make (THIS IS G4INSTALL!)
# +- geant4make.(c)sh
# +- config/
Expand All @@ -742,23 +742,23 @@ set(G4INSTALL "\"\$geant4make_root\"")
# - Include dir
file(RELATIVE_PATH
G4MAKE_TO_INCLUDEDIR
${CMAKE_INSTALL_FULL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
${CMAKE_INSTALL_FULL_DATADIR}/geant4make
${CMAKE_INSTALL_FULL_INCLUDEDIR}/${PROJECT_NAME}
)
set(G4INCLUDE "\"`cd \$geant4make_root/${G4MAKE_TO_INCLUDEDIR} > /dev/null \; pwd`\"")

# - Bin dir
file(RELATIVE_PATH
G4MAKE_TO_BINDIR
${CMAKE_INSTALL_FULL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
${CMAKE_INSTALL_FULL_DATADIR}/geant4make
${CMAKE_INSTALL_FULL_BINDIR}
)
set(G4BIN_DIR "\"`cd \$geant4make_root/${G4MAKE_TO_BINDIR} > /dev/null \; pwd`\"")

# - Lib dir
file(RELATIVE_PATH
G4MAKE_TO_LIBDIR
${CMAKE_INSTALL_FULL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
${CMAKE_INSTALL_FULL_DATADIR}/geant4make
${CMAKE_INSTALL_FULL_LIBDIR}
)
set(G4LIB "\"`cd \$geant4make_root/${G4MAKE_TO_LIBDIR}/Geant4-${Geant4_VERSION} > /dev/null \; pwd`\"")
Expand All @@ -775,7 +775,7 @@ foreach(_ds ${GEANT4_EXPORTED_DATASETS})

file(RELATIVE_PATH
G4MAKE_TO_DATADIR
${CMAKE_INSTALL_FULL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
${CMAKE_INSTALL_FULL_DATADIR}/geant4make
${${_ds}_PATH}
)
set(${_ds}_PATH "\"`cd \$geant4make_root/${G4MAKE_TO_DATADIR} > /dev/null \; pwd`\"")
Expand All @@ -788,7 +788,7 @@ set(TOOLS_FONT_PATH "\"`cd \$geant4make_root/../fonts > /dev/null ; pwd`\"")
_g4tc_configure_install_tree_scripts(
${CMAKE_BINARY_DIR}/InstallTreeFiles
geant4make
${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
${CMAKE_INSTALL_DATADIR}/geant4make
)


Expand All @@ -797,7 +797,7 @@ _g4tc_configure_install_tree_scripts(
# softlink to the G4SYSTEM directory.
#
install(DIRECTORY config
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
DESTINATION ${CMAKE_INSTALL_DATADIR}/geant4make
COMPONENT Development
FILES_MATCHING PATTERN "*.gmk"
PATTERN "CVS" EXCLUDE
Expand Down Expand Up @@ -835,21 +835,25 @@ foreach(_ds ${GEANT4_EXPORTED_DATASETS})
geant4_get_dataset_property(${_ds} ENVVAR ${_ds}_ENVVAR)
geant4_get_dataset_property(${_ds} INSTALL_DIR ${_ds}_PATH)

file(RELATIVE_PATH
G4ENV_BINDIR_TO_DATADIR
${CMAKE_INSTALL_FULL_BINDIR}
${${_ds}_PATH}
)
set(${_ds}_PATH "\"`cd \$geant4_envbindir/${G4ENV_BINDIR_TO_DATADIR} > /dev/null \; pwd`\"")
if(NOT IS_ABSOLUTE ${${_ds}_PATH})
file(RELATIVE_PATH
G4ENV_BINDIR_TO_DATADIR
${CMAKE_INSTALL_FULL_BINDIR}
${${_ds}_PATH}
)
set(${_ds}_PATH "\"`cd \$geant4_envbindir/${G4ENV_BINDIR_TO_DATADIR} > /dev/null \; pwd`\"")
else()
set(${_ds}_PATH "\"${${_ds}_PATH}\"")
endif()
endforeach()

# - Fonts
file(RELATIVE_PATH
G4ENV_BINDIR_TO_DATAROOTDIR
G4ENV_BINDIR_TO_DATADIR
"${CMAKE_INSTALL_FULL_BINDIR}"
"${CMAKE_INSTALL_FULL_DATAROOTDIR}/Geant4-${Geant4_VERSION}"
"${CMAKE_INSTALL_FULL_DATADIR}"
)
set(TOOLS_FONT_PATH "\"`cd \$geant4_envbindir/${G4ENV_BINDIR_TO_DATAROOTDIR}/fonts > /dev/null ; pwd`\"")
set(TOOLS_FONT_PATH "\"`cd \$geant4_envbindir/${G4ENV_BINDIR_TO_DATADIR}/fonts > /dev/null ; pwd`\"")


# - Configure for each shell
Expand Down
5 changes: 5 additions & 0 deletions cmake/Modules/Geant4CPackBase.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
#-----------------------------------------------------------------------
# Package up needed system libraries - only for WIN32?
#
# for Intel icc suppress warnings about icc libraries not existing for 19.
if(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS True)
endif()

include(InstallRequiredSystemLibraries)

#-----------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions cmake/Modules/Geant4InstallData.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ set(GEANT4_DATASETS_URL "https://cern.ch/geant4-data/datasets")
set(GEANT4_BUILD_FULL_DATADIR ${PROJECT_BINARY_DIR}/data)

# Where to install data in the install tree (a Default)
set(GEANT4_INSTALL_DATADIR_DEFAULT "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}/data")
set(GEANT4_INSTALL_DATADIR_DEFAULT "${CMAKE_INSTALL_DATADIR}/data")

# File containing dataset list
set(GEANT4_DATASETS_DEFINITIONS "Geant4DatasetDefinitions")
Expand Down Expand Up @@ -596,7 +596,7 @@ endfunction()
# Choose Physics Data Install Dir
# This follows the pattern for interface and setting as in GNUInstallDirs
if(NOT GEANT4_INSTALL_DATADIR)
set(GEANT4_INSTALL_DATADIR "" CACHE PATH "read-only architecture independent Geant4 physics data (DATAROOTDIR/${GEANT4_INSTALL_DATADIR_DEFAULT}")
set(GEANT4_INSTALL_DATADIR "" CACHE PATH "read-only architecture independent Geant4 physics data (DATADIR/data")
set(GEANT4_INSTALL_DATADIR "${GEANT4_INSTALL_DATADIR_DEFAULT}")
endif()

Expand Down
Loading

0 comments on commit 2d174b7

Please sign in to comment.