Skip to content

Commit 8176f9e

Browse files
committed
Import Geant4 10.2.3 source tree
1 parent a4cd538 commit 8176f9e

File tree

509 files changed

+8377
-13226
lines changed

Some content is hidden

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

509 files changed

+8377
-13226
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# 21st September 2010 Ben Morgan
55
#
6-
# $Id: CMakeLists.txt 97459 2016-06-03 09:28:04Z gcosmo $
6+
# $Id: CMakeLists.txt 102302 2017-01-20 14:05:34Z gcosmo $
77
#
88

99
#-----------------------------------------------------------------------
@@ -35,10 +35,10 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
3535
project(Geant4)
3636

3737
# - Versioning. We do this here for now
38-
set(${PROJECT_NAME}_VERSION "10.2.2")
38+
set(${PROJECT_NAME}_VERSION "10.2.3")
3939
set(${PROJECT_NAME}_VERSION_MAJOR "10")
4040
set(${PROJECT_NAME}_VERSION_MINOR "2")
41-
set(${PROJECT_NAME}_VERSION_PATCH "2")
41+
set(${PROJECT_NAME}_VERSION_PATCH "3")
4242

4343

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

ReleaseNotes/Patch4.10.2-3.txt

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
2+
Geant4 10.2 - patch-03 Release Notes
3+
------------------------------------
4+
5+
27 January 2017
6+
7+
List of fixes included in this public patch since the public release 10.2.p02:
8+
9+
o Configuration:
10+
-------------
11+
+ CMake:
12+
o Correctly export USolids/VecGeom settings to GNUmake configuration
13+
scripts.
14+
o Provided placeholder variable for adding setting of XercesC library
15+
path. Addressing problem report #1877.
16+
17+
o Analysis
18+
--------
19+
+ Fixed incompatibility with ROOT 5.x and 6.x formats.
20+
+ Fixed compilation warnings and MacOSX and Win64.
21+
22+
o Error-Propagation
23+
-----------------
24+
+ G4ErrorPhysicsList: replaced direct use of 'aParticleIterator' with
25+
GetParticleIterator(), to allow for porting on clang-3.9 and XCode-8
26+
on MacOS.
27+
28+
o Event:
29+
-----
30+
+ Fixed way of deleting G4PrimaryVertex objects to avoid stack overflow
31+
for very large number of primary vertices.
32+
+ Set polarization to pre-assigned decay products in G4PrimaryTransformer.
33+
Addressing problem report #1914.
34+
35+
o Geometry:
36+
--------
37+
+ magnetic-field:
38+
o Fixed G4ClassicalRK4 header with protection against multiple inclusions.
39+
+ management:
40+
o Moved initialisation of G4GeomSplitter thread-local data to be inline
41+
along with generic template type; moved accessors/modifiers for splitter
42+
data to non-inline in G4Region, G4LogicalVolume and G4VPhysicalVolume.
43+
Fixing compilation/linking errors on clang-3.9 and XCode-8 on MacOS.
44+
o Removed redundant check in G4GeomSplitter::UseWorkArea().
45+
Addressing problem report #1876.
46+
+ navigation:
47+
o Fixed recursion test for overlaps in G4GeomTestVolume to iterate on
48+
all daughters.
49+
o G4ReplicaNavigation: use Cartesian tolerance in distance evaluation
50+
in DistanceToOutPhi(). Addressing problem report #1902.
51+
o G4Navigator: in ComputeStep() force abortion of event if track gets
52+
really stuck, but avoid check for overlaps if push-verbosity is set to
53+
false. Extended printout for stuck tracks, to show also local
54+
coordinates.
55+
o Fix in G4Navigator::GetGlobalExitNormal() to synchronise caching of
56+
'fExitNormalGlobalFrame' before returning.
57+
Addressing problem report #1750.
58+
Added more diagnostics in G4VERBOSE mode.
59+
o G4PhantomParameterisation: revisited precision checks.
60+
o G4PropagatorInField: fix to pass accuracy values to Intersection Locator
61+
after re-evaluating epsilon.
62+
o Added annotations for while-do loops.
63+
+ solids/Boolean:
64+
o G4SubtractionSolid: directly return previously computed distance in
65+
DistanceToIn(p,v) if no progress is made (zero step).
66+
+ solids/CSG:
67+
o Disabled check for intersection of cut planes in G4CutTubs constructor,
68+
as too strict and not necessary. Addressing problem report #1887.
69+
o Use G4RandFlat instead of RandFlat.
70+
+ solids/specific:
71+
o Moved accessors/modifiers for splitter data to non-inline in
72+
G4PolyhedraSide and G4PolyconeSide. Moved initialisation of
73+
G4GeomSplitter thread-local data to be inline along with generic
74+
template type.
75+
Fixing compilation/linking errors on clang-3.9 and XCode-8 on MacOS.
76+
o Fixed minor typo in function Create() for G4Polycone, G4Polyhedra and
77+
G4GenericPolycone. Fixed minor typos in G4GenericTrap::SurfaceNormal()
78+
and G4VTwistSurface::CurrentStatus::ResetfDone().
79+
Addressing problem report #1876.
80+
o Use G4RandFlat instead of RandFlat.
81+
+ volumes:
82+
o Correction in G4NavigationHistory default constructor to use
83+
GetLevels() instead of GetNewLevels() from G4NavigationHistoryPool,
84+
to favor re-use of already allocated space.
85+
Corrected printout in streaming operator.
86+
o Moved initialisation of G4GeomSplitter thread-local data to be inline
87+
along with generic template type.
88+
Fixing compilation/linking errors on clang-3.9 and XCode-8 on MacOS.
89+
90+
o Global:
91+
------
92+
+ G4StatDouble: fixed computation of RMS and added new constructor.
93+
+ G4UnitsTable: use 'hep_pascal' instead of 'pascal' to avoid potential
94+
symbol conflicts on Windows.
95+
+ Made initialisation of G4TWorkspacePool thread-local data to be inline
96+
along with generic template type. Fixing compilation/linking errors on
97+
clang-3.9 and XCode-8 on MacOS.
98+
+ Fixed compilation warning on MacOS Sierra in MT mode in function
99+
G4Threading::G4GetPidId().
100+
+ Updated date and version for 10.2.p03.
101+
102+
o Graphics Representations:
103+
------------------------
104+
+ G4VisAttributes::GetInvisible(): changed to use a static instance instead
105+
of G4VisAttributes::Invisible; moved implementation to be not inline.
106+
Deprecated G4VisAttributes::Invisible.
107+
108+
o Materials:
109+
---------
110+
+ Fixed incorrectly calculated index for MicroRoughness lookup table
111+
in G4UCNMaterialPropertiesTable. Fixed incorrectly calculated
112+
MicroRoughness amplitude in G4UCNMicroRoughnessHelper.
113+
114+
o Parameterisations:
115+
-----------------
116+
+ gflash:
117+
o Fixed memory leak in GVFlashShowerParameterisation.
118+
o Removed redundant condition in GFlashHitMaker::make().
119+
Addressing problem report #1876.
120+
121+
o Particles:
122+
---------
123+
+ Fixed way of deleting G4PrimaryVertex and G4PrimaryParticle objects
124+
to avoid stack overflow for very large number of primary vertices or
125+
primary particles.
126+
+ Fixed calculation of neutrino mass in G4MuonRadiativeDecayWithSpin.
127+
Addressing problem report #1928.
128+
+ Replaced use of obsolete G4PDefSplitter class by G4PDefManager, concrete
129+
class with implementation. This addresses initialisation problems of
130+
static data previously in template.
131+
Moved accessors/modifiers for splitter data to non-inline in
132+
G4ParticleDefinition and moved initialisation of Splitter thread-local
133+
data to be inline along with generic template type.
134+
Fixing compilation/linking errors on clang-3.9 and XCode-8 on MacOS.
135+
136+
o Persistency:
137+
-----------
138+
+ GDML:
139+
o Fixed check for correctness of the units for divisions and replicas
140+
along angular axis. Addressing problem report #1912.
141+
+ mctruth:
142+
o Fixed typo in G4PersistencyCenterMessenger::GetCurrentValue() in
143+
selection of verbose mode. Addressing problem report #1876.
144+
145+
o Physics Lists
146+
-------------
147+
+ Replaced direct use of aParticleIterator by GetParticleIterator().
148+
Fixing compilation/linking errors on clang-3.9 and XCode-8 on MacOS.
149+
150+
o Processes - Electromagnetic:
151+
---------------------------
152+
+ dna:
153+
o Removed check of c++ version for unique_ptr/auto_ptr selection in
154+
G4MoleculeCounter.
155+
+ lowenergy:
156+
o Removed verbosity in G4AtomicTransitionManager.
157+
Addressing problem report #1874.
158+
o Fixed typo in G4hParameterisedLossModel.
159+
Addressing problem report #1876.
160+
+ utils:
161+
o G4EmBiasingManager: fixed typo in condition.
162+
Addressing problem report #1876.
163+
164+
o Processes - Hadronic:
165+
--------------------
166+
+ models/im_r_matrix:
167+
o G4VScatteringCollision: fixed memory leak in MT-mode.
168+
Addressing problem report #1905.
169+
+ models/lend:
170+
o Fixed to use G4Random.
171+
o Improved memory consumption in multi-threaded runs.
172+
o Fixed compilation warning in GCC with -O3 optimisation option.
173+
+ models/particle_hp:
174+
o Reintroduced cache of cross-section in GetIsoCrossSection().
175+
Fixing CPU performance penalty introduced in release 10.2 on HP
176+
processes.
177+
o Fixed warning messages on clang-3.8,
178+
+ processes:
179+
o UCN processes: fixed incorrectly calculated MicroRoughness correction
180+
to absorption probability. Corrected calculation of refracted velocity
181+
after transmission.
182+
+ util:
183+
o Fix in G4Nucleus::GetThermalNucleus() in branch on total energy
184+
calculation using relativistic energy at higher energies.
185+
Addressing problem report #1911.
186+
187+
o Processes - Optical:
188+
-------------------
189+
+ Fixed potential problem of photon stuck when traveling almost
190+
perpendicular to the surface normal. Addressing problem report #1888.
191+
192+
o Run:
193+
---
194+
+ Added method GetParticleIterator() in G4VPhysicsConstructor and in
195+
G4VUserPhysicsList. Mved static GetInstance() method in G4RNGHelper to be
196+
not inline. Moved initialisation of G4VUPLSplitter thread-local data to
197+
be inline along with generic template type.
198+
Removed explicit initialisation of thread-local data from workspaces,
199+
as now happening inline in G4TWorkspacePool.
200+
Fixing compilation/linking errors on clang-3.9 and XCode-8 on MacOS.
201+
+ Removed redundant check in G4VUPLSplitter::UseWorkArea().
202+
Addressing problem report #1876.
203+
+ G4WorkerRunManager: minor printout improvement.
204+
205+
o Visualization:
206+
-------------
207+
+ management:
208+
o G4Scene: replaced warning reference to obsolete
209+
G4VisAttributes::Invisible to G4VisAttributes::GetInvisible().
210+
+ OpenGL:
211+
o Fixed compilation warning on Win64.
212+
213+
o Examples:
214+
--------
215+
+ Updated reference outputs.
216+
+ Replaced direct use of 'a/theParticleIterator' with GetParticleIterator().
217+
218+
----------------------------------------------------------------------------
219+
220+
Technical Notes
221+
---------------
222+
223+
o This patch should be applied on top of release 10.2.
224+
o Technical notes distributed for release 10.2 are also applicable and
225+
valid for this patch.
226+
227+
The code and rebuilt binary libraries for release 10.2.p03 are available
228+
through our "Download" Web page.
229+
230+
Please refer to the Geant4 User Documentation for further information about
231+
using Geant4.

cmake/History

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@ add this in the documentation for the changed file as [BUGFIX #BUGNUMBER].
3131

3232
----------------------------------------------------------
3333

34+
15th November 2016 - Ben Morgan (cmake-V10-01-47)
35+
- Export USolids/VecGeom compile defs to Geant4GNUmake environment setup scripts
36+
- Modules/Geant4ToolchainBackwardCompatibility.cmake :
37+
Configure export variables based on choice of USolids full/partial
38+
replacement
39+
- Templates/geant4make-skeleton.in : Add entries for required env vars
40+
41+
31st October 2016 - Ben Morgan
42+
- Bugfix #1877
43+
- Templates/geant4-env-skeleton.in : Provide placeholder
44+
variable for adding setting of XercesC libpath
45+
- Modules/Geant4ToolchainBackwardCompatibility.cmake
46+
Extract and export XercesC library directory to geant4.(c)sh
47+
scripts. Add new _g4tc_append_path function to allow appending
48+
of entries to a path-like variable. This ensures paths to third
49+
party libraries appear after the core Geant4 library path which
50+
should prevent clashes.
51+
3452
3rd June 2016 - Gunter Folger (cmake-V10-01-46)
3553
- Switch to corrected datasets to correct bad packing in patch01:
3654
- G4ENSDFSTATE.1.2.3

cmake/Modules/Geant4ToolchainBackwardCompatibility.cmake

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,43 @@ endif
256256
endif()
257257
endfunction()
258258

259+
#-----------------------------------------------------------------------
260+
# function _g4tc_append_path(<output> <shell> <name> <value>)
261+
# Set output to a string whose value is the shell command to
262+
# append supplied value to the path style environment variable
263+
# name (e.g. 'PATH')
264+
#
265+
function(_g4tc_append_path TEMPLATE_NAME SHELL_FAMILY PATH_VARIABLE
266+
APPEND_VARIABLE)
267+
# -- bourne block
268+
if(${SHELL_FAMILY} STREQUAL "bourne")
269+
# We have to make this section verbatim
270+
set(${TEMPLATE_NAME}
271+
"
272+
if test \"x\$${PATH_VARIABLE}\" = \"x\" ; then
273+
export ${PATH_VARIABLE}=${APPEND_VARIABLE}
274+
else
275+
export ${PATH_VARIABLE}=\${${PATH_VARIABLE}}:${APPEND_VARIABLE}
276+
fi
277+
"
278+
PARENT_SCOPE
279+
)
280+
# -- cshell block
281+
elseif(${SHELL_FAMILY} STREQUAL "cshell")
282+
# Again, this is verbatim so final output is formatted correctly
283+
set(${TEMPLATE_NAME}
284+
"
285+
if ( ! \${?${PATH_VARIABLE}} ) then
286+
setenv ${PATH_VARIABLE} ${APPEND_VARIABLE}
287+
else
288+
setenv ${PATH_VARIABLE} \${${PATH_VARIABLE}}:${APPEND_VARIABLE}
289+
endif
290+
"
291+
PARENT_SCOPE
292+
)
293+
endif()
294+
endfunction()
295+
259296
#-----------------------------------------------------------------------
260297
# MACRO(_g4tc_configure_tc_variables)
261298
# Macro to perform the actual setting of the low level toolchain variables
@@ -408,6 +445,28 @@ macro(_g4tc_configure_tc_variables SHELL_FAMILY SCRIPT_NAME)
408445
set(GEANT4_TC_G4LIB_USE_G3TOG4 "# NOT BUILT WITH G3TOG4 SUPPORT")
409446
endif()
410447

448+
# - USolids/VecGeom
449+
if(GEANT4_USE_USOLIDS)
450+
# Derive base dir from include path, NB, not 100% robust as Geant4GNUmake makes
451+
# significant assumptions about how USolids was installed
452+
get_filename_component(_USOLIDS_INCLUDE_DIR "${USOLIDS_INCLUDE_DIRS}" REALPATH)
453+
get_filename_component(_USOLIDS_BASE_DIR "${_USOLIDS_INCLUDE_DIR}" DIRECTORY)
454+
_g4tc_setenv_command(GEANT4_TC_USOLIDS_BASE_DIR ${SHELL_FAMILY} USOLIDS_BASE_DIR "${_USOLIDS_BASE_DIR}")
455+
456+
if(GEANT4_USE_ALL_USOLIDS)
457+
_g4tc_setenv_command(GEANT4_TC_G4GEOM_USE_USOLIDS ${SHELL_FAMILY} G4GEOM_USE_USOLIDS 1)
458+
set(GEANT4_TC_G4GEOM_USE_PARTIAL_USOLIDS "# FULL USOLIDS REPLACEMENT")
459+
else()
460+
set(GEANT4_TC_G4GEOM_USE_USOLIDS "# PARTIAL USOLIDS REPLACEMENT")
461+
_g4tc_setenv_command(GEANT4_TC_G4GEOM_USE_PARTIAL_USOLIDS ${SHELL_FAMILY} G4GEOM_USE_PARTIAL_USOLIDS 1)
462+
foreach(__g4_usolid_shape ${GEANT4_USE_PARTIAL_USOLIDS_SHAPE_LIST})
463+
_g4tc_setenv_command(GEANT4_TC_G4GEOM_USE_U${__g4_usolid_shape} ${SHELL_FAMILY} G4GEOM_USE_U${__g4_usolid_shape} 1)
464+
endforeach()
465+
endif()
466+
else()
467+
set(GEANT4_TC_USOLIDS_BASE_DIR "# NOT BUILT WITH USOLIDS SUPPORT")
468+
endif()
469+
411470
# - USER INTERFACE AND VISUALIZATION MODULES...
412471
# - Terminals
413472
if(NOT WIN32)
@@ -769,13 +828,26 @@ foreach(_shell bourne;cshell)
769828
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" REALPATH)
770829
get_filename_component(_CLHEP_LIB_DIR "${_CLHEP_LIB_DIR}" DIRECTORY)
771830

772-
_g4tc_prepend_path(GEANT4_TC_CLHEP_LIB_PATH_SETUP
831+
_g4tc_append_path(GEANT4_TC_CLHEP_LIB_PATH_SETUP
773832
${_shell}
774833
${_libpathname}
775834
"${_CLHEP_LIB_DIR}"
776835
)
777836
endif()
778837

838+
# - XercesC
839+
set(GEANT4_TC_XERCESC_LIB_PATH_SETUP "# GDML SUPPORT NOT AVAILABLE")
840+
if(GEANT4_USE_GDML)
841+
get_filename_component(_XERCESC_LIB_DIR "${XERCESC_LIBRARY}" REALPATH)
842+
get_filename_component(_XERCESC_LIB_DIR "${XERCESC_LIBRARY}" DIRECTORY)
843+
_g4tc_append_path(GEANT4_TC_XERCESC_LIB_PATH_SETUP
844+
${_shell}
845+
${_libpathname}
846+
"${_XERCESC_LIB_DIR}"
847+
)
848+
endif()
849+
850+
779851
# - Set data paths
780852
set(GEANT4_ENV_DATASETS )
781853
foreach(_ds ${GEANT4_EXPORTED_DATASETS})
@@ -786,7 +858,7 @@ foreach(_shell bourne;cshell)
786858
# - Set Font Path
787859
set(GEANT4_ENV_TOOLS_FONT_PATH "# FREETYPE SUPPORT NOT AVAILABLE")
788860
if(GEANT4_USE_FREETYPE)
789-
_g4tc_prepend_path(GEANT4_ENV_TOOLS_FONT_PATH
861+
_g4tc_append_path(GEANT4_ENV_TOOLS_FONT_PATH
790862
${_shell}
791863
TOOLS_FONT_PATH
792864
"${TOOLS_FONT_PATH}"

cmake/Templates/geant4-env-skeleton.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
# - CLHEP
3030
@GEANT4_TC_CLHEP_LIB_PATH_SETUP@
3131

32+
# - XercesC
33+
@GEANT4_TC_XERCESC_LIB_PATH_SETUP@
34+
3235
#-----------------------------------------------------------------------
3336
# Resource file paths
3437
# - Datasets

0 commit comments

Comments
 (0)