Skip to content

Commit

Permalink
Import Geant4 10.4.3 source tree
Browse files Browse the repository at this point in the history
  • Loading branch information
gcosmo committed Feb 12, 2019
1 parent 4873be1 commit db23516
Show file tree
Hide file tree
Showing 7,368 changed files with 20,314 additions and 19,354 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# 21st September 2010 Ben Morgan
#
# $Id: CMakeLists.txt 110078 2018-05-15 10:04:54Z gcosmo $
# $Id$
#

#-----------------------------------------------------------------------
Expand Down Expand Up @@ -38,7 +38,7 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
project(Geant4)
set(${PROJECT_NAME}_VERSION_MAJOR 10)
set(${PROJECT_NAME}_VERSION_MINOR 4)
set(${PROJECT_NAME}_VERSION_PATCH 2)
set(${PROJECT_NAME}_VERSION_PATCH 3)
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
18 changes: 16 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
The Geant4 Collaboration:
http://geant4.cern.ch/collaboration/members.shtml
Contributing to Geant4
=====
To contribute patches to Geant4, users can submit Pull Requests (PR) such that:

- A single PR refers to a single particular topic (fix or suggested enhancement);
PRs including uncorrelated changes in codes in different areas or modules will
not be considered.

A PR will be examined by a responsible and eventually extracted for a patch in
the development repository of Geant4, to be included in a future release or
patch.

For simple bug-fixes, it is anyhow recommended to use the official
`Bugzilla problem reporting system <https://bugzilla-geant4.kek.jp/>`.

The Geant4 Collaboration
168 changes: 168 additions & 0 deletions ReleaseNotes/Patch4.10.4-3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@

Geant4 10.4 - patch-03 Release Notes
------------------------------------

8 February 2019

List of fixes included in this public patch since the public release 10.4.p02:

o Configuration:
-------------
+ CMake:
o Corrected URLs for data installation to use https; added -L flag to curl
to follow redirects when accessing a dataset URL.
o Geant4MakeRules_cxx.cmake: added -DGL_SILENCE_DEPRECATION to
CMAKE_CXX_FLAGS_INIT for clang to silence GL deprecation compilation
warnings on MacOS 10.14 Mojave.
+ GNUMake:
o Fixed setting of G4RUNPATHOPTION in Darwin/Linux-clang/g++ and binmake.cmk.
Addressing problem report #2086.
o Cleanup settings for GL in Darwin-clang.gmk and Darwin-g++.gmk.
Added -DGL_SILENCE_DEPRECATION to CPPFLAGS to silence GL deprecation
compilation warnings on MacOS 10.14 Mojave.

o Analysis:
--------
+ Fixed a deadlock issue with G4RootPNtupleManager where the mutex
was locked before being passed to Root.
+ Fixed compilation warnings on gcc-8.1.0.

o Geometry:
--------
+ management:
o Use reverse_iterator in G4SolidStore::DeRegister() in order to speedup
partial deregistration on setups with many solids instances.
o G4Region: added possibility to disable search in the tree in
AddRootLogicalVolume() for speeding up process in complex flat geometries.

o Global:
------
+ G4PhysicsVector, G4Physics2DVector: fixed possible out-of-bound access
in FindBin() method. Addressing problem report #2087.
+ Updated date and version for 10.4.p03.

o Interfaces:
----------
+ G4Xt: fixed compilation warnings for casts on gcc-8.1.
+ Fixed compilation warnings for not used return parameters.

o Persistency - gdml
------------------
+ Clear auxiliary map information in G4GDMLReadStructure::Clear().
Addressing problem report #2064.
+ Added stripping of invalid characters for names generation in writer classes
to prevent invalid NCName strings in exported GDML files. Adopt properly
stripped generated strings for exporting names of optical surfaces.

o Processes - Electromagnetic:
---------------------------
+ dna:
o Fixed header guards in G4ITFinder and G4AllITFinder.
Addressing problem report #2084.
+ standard:
o G4GoudsmitSaundersonTable: fixed gcc-8.1.0 compilation warnings.
+ utils:
o G4EmElementSelector: optimisation of element selection for compound
materials.
+ xrays:
o G4Cerenkov, G4Scintillation: correctly reset number of photons
to 0 each step. Addressing problem report #2056.
Added protection against infinite loops due to very small steps.
Addressing problem report #1992.

o Processes - Hadronic:
--------------------
+ management:
o G4HadronicProcess: added check if secondary particle is on the mass
shell; if its mass differ from the PDG mass more for 1.5 MeV then mass
is forced to the mass shell, energy conserved, but momentum is changed.
Use correct return type when calling CheckResult() from PostStepDoIt():
fixes case when the value of pointer 'result' does not get properly
reset to NULL in case a non-conservation is detected, thus "bad"
interaction does not get re-sampled.
Fixed compilation warnings on gcc-8.1.0 regarding catching polymorphic
type by value, instead of by reference.
o G4HadronicProcess, G4VLeadingParticleBiasing, G4HadLeadBias: fixed
compilation warning with gcc-7.
+ models/binary_cascade
o G4GeneratorPrecompoundInterface: fixed printout typo.
+ models/cascade:
o G4GDecay3: fixed problem reported by CMS due to wrong kinematics in
the final state by removing loop check; adding protection for low value
of mother mass.
+ models/de_excitation:
o G4LevelReader: fixed initialisation of 'fAlphaMax' from 1.e+6 to 1.e+15;
needed for correct IC probability of some isotopes.
Addresses problem reports #1986 and #2076, by change of handling of
internal conversion data.
+ models/particle_hp
o G4ParticleHPCaptureFS::ApplyYourself(): Lorentz boost of neutron into
target frame was backwards; reversed it. Also replaced SetDefinition()
with SetDefinitionAndUpdateE(). Addresses problem report #1919.
o Fixed definition of singletons for G4ParticleHPManager and
G4ParticleHPThreadLocalManager and some code cleanup.
Made G4ParticleHPThreadLocalManager a G4ThreadlLocalSingleton to avoid
memory leaks generated each time a thread creates the instance.
o Fixed bug for double allocation of G4ParticleHPReactionWhiteBoard in
G4ParticleHPThreadLocalManager::OpenReactionWhiteBoard().
o G4ParticleHPElementData: removed unnecessary inheritance from
G4HadronicCrossSection.
o Fixed incorrect sampling of isotropic distribution.
Addressing problem report #1745.
o Fixed gamma level mismatch in G4ParticleHPInelasticCompFS.
Not a complete fix because gamma data comes from ENSDF and does not
necessarily match excitations in ENDF.
Addressing problem report #1789.
o Fixed memory leaks in G4ParticleHPContEnergyAngular::Sample() and
G4ParticleHPContAngularPar::cacheInit().
Addressing problem report #2026.
o G4ParticleHPElasticFS::ApplyYourself(): use correct reference frames for
calculation of projectile and target momenta. Correction made for cases
when cos(Theta) is given in lab frame and in center of momentum frame.
Partial fix of momentum non-conservation for problem report #1918.
o Fixed potential leaks in G4ParticleHPPhotonDist, G4ParticleHPContAngularPar
and G4ParticleHPFinalState for use of pointers cached in G4Cache.
o G4ENDFTapeRead, G4FissionProductYieldDist: fixed compilation warnings
on gcc 8.1.0, regarding catching polymorphic type by value, instead of
by reference.
o Minor code cleanup and formatting.
+ models/parton_string/diffraction
o G4FTFAnnihilation: fix to get flat cos(theta) and phi distributions for
antiproton annihilation at rest.
+ models/rpg
o G4RPGAntiKZeroInelastic, G4RPGInelastic: fixed compilation warnings on
gcc-8.1.0, regarding catching polymorphic type by value, instead of by
reference.
+ processes:
o G4HadronElasticProcess, G4NeutrinoElectronProcess: fixed compilation
warnings on gcc 8.1.0, regarding catching polymorphic type by value,
instead of by reference.
+ stopping:
o G4HadronStoppingProcess, G4MuonicAtomDecay: fixed compilation warnings
on gcc 8.1.0, regarding catching polymorphic type by value, instead of
by reference.

o Processes - Scoring:
-------------------
o G4ParallelWorldProcess: fixed track velocity of optical photons for the
first step in a layered mass geometry.

o Examples:
--------
+ extended/fieldBlineTracer:
o Fixed compilation error for missing header inclusion.

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

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

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

The code and rebuilt binary libraries for release 10.4.p03 are available
through our "Download" Web page.

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

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

18th October 2018 - Ben Morgan (cmake-V10-03-55)
- Modules/Geant4InstallData.cmake: Use https for URL
- Templates/geant4-config.in: Add -L flag to curl to follow redirects
when accessing dataset url

28th September 2018 - Gabriele Cosmo
- Modules/Geant4MakeRules_cxx.cmake: added -DGL_SILENCE_DEPRECATION
to CMAKE_CXX_FLAGS_INIT for clang to silence GL deprecation compilation
warnings on MacOS 10.14 Mojave.

23rd May 2018 - Gunter Folger (cmake-V10-03-54)
- Update Geant4DatasetDefinitions to use G4RealSurface 2.1.1
patched version bringing back data lost in 2.1
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/Geant4InstallData.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
# retrieving them globally
#-----------------------------------------------------------------------
# Geant4 Data Repository
set(GEANT4_DATASETS_URL "http://cern.ch/geant4-data/datasets")
set(GEANT4_DATASETS_URL "https://cern.ch/geant4-data/datasets")

# Where to install data in the build tree
set(GEANT4_BUILD_FULL_DATADIR ${PROJECT_BINARY_DIR}/data)
Expand Down
4 changes: 2 additions & 2 deletions cmake/Modules/Geant4MakeRules_cxx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")

# Remove superfluous "unused argument" "warnings" from Clang
# Remove superfluous "unused argument" and "GL deprecation" "warnings" from Clang
if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} -Qunused-arguments")
set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} -Qunused-arguments -DGL_SILENCE_DEPRECATION")
endif()

# Though it should be the default, always use libc++ with AppleClang
Expand Down
2 changes: 1 addition & 1 deletion cmake/Templates/geant4-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ install_datasets()
# - Download bundle to cache
dataset_file=$(echo $ds | cut -d "|" -f4)
echo "+ downloading ${dataset_file}"
${G4CURL} -f -m ${dataset_timeout} -o ${g4downloaddir}/${dataset_file} ${dataset_url}/${dataset_file}
${G4CURL} -L -f -m ${dataset_timeout} -o ${g4downloaddir}/${dataset_file} ${dataset_url}/${dataset_file}
curl_status="$?"
if [ "$curl_status" != "0" ] ; then
echo "- download of '${dataset_file}' failed : CURL error $?"
Expand Down
2 changes: 1 addition & 1 deletion config/G4UI_BUILD.gmk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: G4UI_BUILD.gmk 66368 2012-12-18 09:20:17Z gcosmo $
# $Id$
# -------------------------------------------------------------
# Interfaces-specific CPPFLAGS for BUILD phase.
# John Allison, 6th July 1998.
Expand Down
2 changes: 1 addition & 1 deletion config/G4UI_USE.gmk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: G4UI_USE.gmk 66368 2012-12-18 09:20:17Z gcosmo $
# $Id$
# -------------------------------------------------------------
# GNUmakefile for CPPFLAGS for interfaces USE phase.
# John Allison, 6th July 1998.
Expand Down
2 changes: 1 addition & 1 deletion config/G4VIS_BUILD.gmk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: G4VIS_BUILD.gmk 66368 2012-12-18 09:20:17Z gcosmo $
# $Id$
# -------------------------------------------------------------
# Visualization-specific CPPFLAGS for BUILD phase.
# John Allison, 24th January 1998.
Expand Down
2 changes: 1 addition & 1 deletion config/G4VIS_USE.gmk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: G4VIS_USE.gmk 66368 2012-12-18 09:20:17Z gcosmo $
# $Id$
# -------------------------------------------------------------
# GNUmakefile for CPPFLAGS for visualization USE phase.
# John Allison, 24th January 1998.
Expand Down
17 changes: 16 additions & 1 deletion config/History
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
svn log $Id: History 110053 2018-05-15 08:55:49Z gcosmo $
svn log $Id$
-------------------------------------------------------------------

=========================================================
Expand All @@ -16,6 +16,21 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------

28th September 2018 Gabriele Cosmo (config-V10-03-10)
- Added -DGL_SILENCE_DEPRECATION to CPPFLAGS to Darwin setups to silence
deprecation compilation warnings on MacOS 10.14 Mojave.

18th September 2018 Gabriele Cosmo
- Cleanup settings for GL in Darwin-clang.gmk and Darwin-g++.gmk.

12th September 2018 Gabriele Cosmo
- Withdraw changes of last tag for Linux-g++ and corrected use of
G4RUNPATHOPTION in binmake.gmk for installed kernel libraries.

7th September 2018 Gabriele Cosmo
- Fixed setting of G4RUNPATHOPTION in Darwin/Linux-clang/g++ and binmake.cmk.
Addressing problem report #2086.

12th April 2018 Gabriele Cosmo (config-V10-03-09)
- WIN32-VC.gmk: updated obsolete configuration for Qt5.

Expand Down
2 changes: 1 addition & 1 deletion config/analysis.gmk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: analysis.gmk 66368 2012-12-18 09:20:17Z gcosmo $
# $Id$
# Guy Barrand, 20th Mai 2000
#
# Analysis variables...
Expand Down
2 changes: 1 addition & 1 deletion config/architecture.gmk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: architecture.gmk 110053 2018-05-15 08:55:49Z gcosmo $
# $Id$
# ------------------------------------------------------------------------
# GEANT 4 - Architecture configuration script for GNU Make
#
Expand Down
2 changes: 1 addition & 1 deletion config/binmake.gmk
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# $Id: binmake.gmk 106467 2017-10-11 08:09:08Z gcosmo $
# ----------------------------------------------------------
# Script defining rules and paths for making binaries.
# First implementation: Gabriele Cosmo, 25/06/1998.
Expand Down Expand Up @@ -194,6 +193,7 @@ ifdef G4EXLIB
# For the example dependent directory, keep the
# path to the shared lib in the executable.
LDFLAGS += $(G4RUNPATHOPTION)$(G4TMPDIR)
LDFLAGS += $(G4RUNPATHOPTION)$(G4LIB)/$(G4SYSTEM)
endif
endif
include $(G4INSTALL)/config/common.gmk
Expand Down
2 changes: 1 addition & 1 deletion config/common.gmk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: common.gmk 66368 2012-12-18 09:20:17Z gcosmo $
# $Id$
# ----------------------------------------------------------------
# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
# ----------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion config/globlib.gmk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: globlib.gmk 66368 2012-12-18 09:20:17Z gcosmo $
# $Id$
# --------------------------------------------------------------
# Script for compound libraries. Gabriele Cosmo, 25/6/98.
# --------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion config/interactivity.gmk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: interactivity.gmk 66368 2012-12-18 09:20:17Z gcosmo $
# $Id$
# GNUmakefile for CPPFLAGS, LDFLAGS for interactivy,
# ie interfaces and visualization.
#
Expand Down
2 changes: 1 addition & 1 deletion config/liblist.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: liblist.c 66368 2012-12-18 09:20:17Z gcosmo $ */
/* $Id$ */

/*
Given a "libname.map" file on standard input and a list or directory
Expand Down
2 changes: 1 addition & 1 deletion config/moc.gmk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: moc.gmk 66368 2012-12-18 09:20:17Z gcosmo $
# $Id$
# ----------------------------------------------------------------
# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
# ----------------------------------------------------------------
Expand Down
15 changes: 8 additions & 7 deletions config/sys/Darwin-clang.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ifeq ($(G4SYSTEM),Darwin-clang)
CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
CXXFLAGS += -Wno-variadic-macros -Wshadow -pipe
CXXFLAGS += -fno-trapping-math -ftree-vectorize -fno-math-errno
CPPFLAGS += -DGL_SILENCE_DEPRECATION
G4USE_STD11 := 1
ifdef G4USE_STD14
CPPFLAGS += -std=c++14
Expand Down Expand Up @@ -47,7 +48,7 @@ ifeq ($(G4SYSTEM),Darwin-clang)
FCFLAGS += -O2 -g
CCFLAGS += -O2 -g
endif
G4RUNPATHOPTION := -Wl,-rpath
G4RUNPATHOPTION := -Wl,-rpath,
# G4STATIC_MODE += -Wl,-force_load
FC := gfortran
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
Expand Down Expand Up @@ -84,12 +85,12 @@ ifeq ($(G4SYSTEM),Darwin-clang)
OGLFLAGS := -I$(OGLHOME)/include
endif
ifndef OGLLIBS
QTGLPATH := $(shell test -f /System/Library/Frameworks/OpenGL.framework/OpenGL && echo "/System/Library/Frameworks/OpenGL.framework")
ifeq ($(QTGLPATH),/System/Library/Frameworks/OpenGL.framework)
OGLLIBS := -F/System/Library/Frameworks -framework OpenGL -framework AGL
ifeq ($(G4VIS_USE_OPENGLX),1)
OGLLIBS += -L$(OGLHOME)/lib -lGLU -lGL
endif
OGLPATH := $(shell test -f /Library/Frameworks/OpenGL.framework/OpenGL && echo "/Library/Frameworks/OpenGL.framework")
ifneq ($(OGLPATH),/Library/Frameworks/OpenGL.framework)
OGLPATH := $(shell test -f /System/Library/Frameworks/OpenGL.framework/OpenGL && echo "/System/Library/Frameworks/OpenGL.framework")
endif
ifneq ($(OGLPATH),)
OGLLIBS := -F$(OGLPATH)/.. -framework OpenGL -framework AGL
else
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
endif
Expand Down
Loading

0 comments on commit db23516

Please sign in to comment.