Skip to content

Commit 800bedf

Browse files
committed
Import Geant4 9.6.3 source tree
1 parent beb8e5d commit 800bedf

File tree

185 files changed

+4995
-8162
lines changed

Some content is hidden

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

185 files changed

+4995
-8162
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ set(CMAKE_MODULE_PATH
5252
# See the documentation in each of these modules for further details.
5353
#
5454
# - Versioning. We do this here for now
55-
set(${PROJECT_NAME}_VERSION "9.6.2")
55+
set(${PROJECT_NAME}_VERSION "9.6.3")
5656
set(${PROJECT_NAME}_VERSION_MAJOR "9")
5757
set(${PROJECT_NAME}_VERSION_MINOR "6")
58-
set(${PROJECT_NAME}_VERSION_PATCH "2")
58+
set(${PROJECT_NAME}_VERSION_PATCH "3")
5959

6060
# - Provide dependent options as these are needed for some Geant4 features
6161
include(CMakeDependentOption)

ReleaseNotes/Patch4.9.6-3.txt

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
2+
Geant4 9.6 - patch-03 Release Notes
3+
-----------------------------------
4+
5+
14 March 2014
6+
7+
List of fixes included in this public patch since the public release 9.6.p01:
8+
9+
o Configuration:
10+
-------------
11+
+ CMake:
12+
o Fixed bug in checking of status of Xmu include path and library
13+
variables that resulted in no error being emitted if these were not
14+
found.
15+
o Ported scripts to MacOSX 10.9 and use of Qt5.
16+
+ GNUMake:
17+
o Updated settings for Darwin targets.
18+
19+
o Analysis:
20+
--------
21+
+ Updated to g4tools 1.4.4, to fix incorrect setting of the list
22+
of free blocks in a Root file; addressing problem report #1523.
23+
Fixed failure in writing empty ntuples (in tools/wroot/basket).
24+
+ Fix in G4RootAnalysisManager::WriteOnAscii().
25+
Addressing problem report report #1473.
26+
27+
o Digits_Hits:
28+
-----------
29+
+ Fixed angle factor in G4PSSphereSurfaceFlux to keep it always
30+
positive. Addressing problem report #1479.
31+
32+
o Geometry:
33+
--------
34+
+ management:
35+
o Fix to G4VSolid::EstimateCubicVolume() to make proper use of specified
36+
accuracy. Addressing problem report #1493.
37+
+ navigation:
38+
o G4MultiNavigator: fixed use of enum as Boolean in GetGlobalExitNormal(). (+)
39+
+ solids/CSG:
40+
o Corrected sanity check for wrong/small dimensions in G4Box constructor.
41+
o Correctly initialise fSPhi to zero in G4Sphere constructor.
42+
+ solids/specific:
43+
o Fix in G4SurfaceVoxelizer affecting tessellated-solid (and
44+
extruded-solid) for wrong computation of DistanceToIn(p,v) for
45+
points outside, when optimisation is active.
46+
o Fix in G4TessellatedSolid::DistanceToIn(p,v) for specific cases
47+
where points are located near surface.
48+
o Fix in G4GenericTrap::InsidePolygone() to check if p lies between
49+
the two extremes of the segment. Addressing problem report #1541.
50+
51+
o Global:
52+
------
53+
+ Updated date and version for 9.6.p03.
54+
55+
o Electromagnetic Processes:
56+
-------------------------
57+
+ Low Energy:
58+
o Fixed case of exception from G4PenelopeOscillatorManager for
59+
specific materials.
60+
+ Muons:
61+
o G4MuPairProductionModel, G4MuBremsstrahlungModel: complete fix for
62+
cross-section computation. Addresses problem report #1471.
63+
+ Standard:
64+
o G4UrbanMscModel95, G4UrbanMscModel96: fixed bug in randomisation
65+
of 1st step in a volume (useDistanceToBoundary option).
66+
o G4NuclearStopping: do not reset dynamic charge of an ion, because
67+
G4ionIonisation process is responsible for that (fix for partially
68+
charged ion beam)
69+
+ Utils:
70+
o G4VMultipleScattering: increased lowest limit from 1 eV to 10 eV to
71+
avoid semi-infinite loop for low-energy particle tracking;
72+
fixed re-computation of post-step safety in AlongStepDoIt method.
73+
o G4VEnergyLossProcess, G4VEmProcess: set interaction length to
74+
DBL_MAX if process is de-activated (fixed problem of DNA simulation);
75+
fixed CrossSectionPerVolume access method.
76+
o Fixed typo in G4EmBiasingManager.
77+
78+
o Generic Processes:
79+
-----------------
80+
+ Decay:
81+
o Fixed problem of wrong global time for secondaries in case that the (+)
82+
primary track stops during along step. Addressing problem report #1555.
83+
84+
o Hadronic Processes:
85+
------------------
86+
+ cross_sections:
87+
o Code optimization for G4ElectroNuclearCrossSection and
88+
G4PhotoNuclearCrossSection.
89+
+ models/cascade:
90+
o G4NucleiModel: fixed rare cases of non-reproducibility in
91+
method generateParticleFate(). Some data was not properly
92+
initialized in the case that the interaction-partners list has
93+
one single element.
94+
o Fixed implementation of G4CascadeParameters singleton to follow
95+
canonical format. Addressing problem report #1557.
96+
o G4ParticleLargerEkin, G4ParticleLargerBeta: correct ">=" to ">"
97+
conditions to avoid error in case that both inputs are identical.
98+
+ models/de_excitation:
99+
o G4NeutronRadCapture: fixed run time memory leak, fixed time of
100+
reaction products.
101+
o G4ExcitationHandler: if FermiBreakUp returns unchanged fragment
102+
delete it to avoid minor memory leak; addressing HyperNews post
103+
#1371. Fixed typo in GetPhotoEvaporation() method name.
104+
Fixed typo in the SetMaxAForFermiBreakUp() method.
105+
o G4FermiFragmentsPool: fixed typo for use of G4endl for end line.
106+
o G4LevelReader, G4NuclearLevelManager: fixed trivial compilation issues
107+
detected on Visual C++ 18.
108+
+ models/em_dissociation:
109+
o Fixed memory leak of products from G4ExcitationHandler.
110+
+ models/parton_string/hadronization:
111+
o Fixed two mistakes in the index manipulation of the BaryonWeight
112+
4-dimensional vector in G4LundStringFragmentation.
113+
+ models/parton_string/management:
114+
o Fix to remove 'inline' qualifier from methods in G4VParticipants.cc
115+
and G4PomeronCrossSection.cc, responsible for cases of run-time
116+
errors for undefined symbols in library...
117+
+ stopping:
118+
o G4MuMinusCapturePrecompound: fixed case of infinite loop by
119+
reimplementing old algorithm of mu- capture which does not include
120+
direct muon reaction but only considering de-excitation of residual
121+
fragment. Addressing problem report #1536.
122+
123+
o Materials:
124+
---------
125+
+ G4IonisParamMat: fixed density effect parameterisation.
126+
127+
o Particles:
128+
---------
129+
+ Fixed properties for heavy anti-baryons G4AntiLambdab, G4AntiSigmabZero
130+
and G4AntiLambdacPlus. Addressing problem report #1571.
131+
132+
o Persistency:
133+
-----------
134+
+ ascii:
135+
o Corrected typo in G4tgrPlaceParameterisation::operator<<().
136+
Addressing problem report #1504.
137+
o Corrected typo in G4tgrUtils::WordIsUnit().
138+
o Replaced deprecated calls to solids accessor methods.
139+
+ gdml:
140+
o Fix in G4GDMLReadParamvol::ParametersRead() for reading parameterised
141+
Sphere, Orb, Torus and Para.
142+
o Replaced deprecated calls to G4Sphere accessor methods.
143+
144+
o Physics Lists:
145+
-------------
146+
+ G4EmStandardPhysics_option3, G4EmStandardPhysics_option4,
147+
G4EmLivermorePhysics, G4EmPenelopePhysics: use RangeFactor=0.01
148+
for increased simulation accuracy; use G4UrbanMscModel96.
149+
150+
o Visualization:
151+
-------------
152+
+ OpenGL:
153+
o Fixed bug in the G4OpenGLQtViewer for viewer iterator increment
154+
checking. Corrected use of 'true' in G4OpenGLQtExportDialog.
155+
156+
o Examples:
157+
--------
158+
+ Updated reference outputs.
159+
160+
----------------------------------------------------------------------------
161+
162+
Technical Notes
163+
---------------
164+
165+
o This patch should be applied on top of release 9.6.
166+
o Technical notes distributed for release 9.6 are also applicable and
167+
valid for this patch.
168+
169+
The code and rebuilt binary libraries for release 9.6.p03 are available
170+
through our "Download" Web page:
171+
http://cern.ch/geant4/support/download.shtml
172+
173+
Please refer to the Geant4 User Documentation:
174+
http://cern.ch/geant4/support/userdocuments.shtml
175+
for further information about using Geant4.

cmake/History

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,40 @@ add this in the documentation for the changed file as [BUGFIX #BUGNUMBER].
2929
----------------------------------------------------------
3030
* Reverse chronological order (last date on top), please *
3131
----------------------------------------------------------
32+
33+
21st January 2014 - Jonathan Madsen (cmake-V09-05-80)
34+
- Updated Modules/Geant4InterfaceOptions.cmake to include /opt/X11
35+
paths that are now the standard places for X11 and OpenGL on Mac OSX
36+
as of Mavericks (OS X 10.9). Without these paths configuring CMake with
37+
GEANT4_USE_OPENGL_X11=ON fails
38+
39+
27th November 2012 - Gabriele Cosmo
40+
- Added "-Wno-variadic-macros" compilation option g++ and clang.
41+
42+
21st November 2013 - Ben Morgan
43+
- Modules/Geant4InterfaceOptions.cmake : Fix bug in checking of status
44+
of Xmu include path and library variables that resulted in no error
45+
being emitted if these were not found.
46+
47+
19th November 2013 - Ben Morgan
48+
- Modules/Geant4ConfigureConfigScript.cmake : Fix bug in list manipulation
49+
of non-existant list backported in by accident by previous tag. This
50+
caused an error report when using Qt5.
51+
52+
25th October 2013 - Ben Morgan
53+
- Templates/Geant4Config.cmake.in : Re-find Qt5 when Geant4 uses it to ensure
54+
imported targets are recreated
55+
- Templates/geant4make-skeleton.in : Support export of QT4/5 variables to
56+
Geant4Make
57+
- Modules/Geant4ToolchainBackwardCompatibility.cmake : Support export of
58+
QT4/5 variables to Geant4Make
59+
- Modules/Geant4InterfaceOptions.cmake : Support export of QT4/5 variables
60+
to Geant4Make
61+
3262
27th November 2012 - Ben Morgan (cmake-V09-05-79)
3363
- Templates/geant4-config.in : Correct listing of G3toG4 library,
3464
replacing "-lG3ToG4" with "-lG3toG4"
3565

36-
3766
27th November 2012 - Gabriele Cosmo (cmake-V09-05-78)
3867
- Added "-Wno-variadic-macros -Wshadow" compilation options g++ and clang.
3968
- Extended description in Geant4CPackBase.cmake script.

cmake/Modules/Geant4ConfigureConfigScript.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,12 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS AND UNIX)
118118
# - Qt
119119
if(GEANT4_USE_QT)
120120
set(G4_BUILTWITH_QT "yes")
121-
set(G4_QT_INCLUDE_DIRS ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR})
121+
if(QT4_FOUND)
122+
set(G4_QT_INCLUDE_DIRS ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR})
123+
else()
124+
set(G4_QT_INCLUDE_DIRS ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS})
125+
endif()
126+
122127
list(REMOVE_DUPLICATES G4_QT_INCLUDE_DIRS)
123128
list(REMOVE_ITEM G4_QT_INCLUDE_DIRS ${_cxx_compiler_dirs})
124129

cmake/Modules/Geant4InterfaceOptions.cmake

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,42 @@ if(GEANT4_USE_QT)
8383
set(QT_USE_IMPORTED_TARGETS ON)
8484
endif()
8585

86-
find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui QtOpenGL)
86+
find_package(Qt5Core QUIET)
87+
find_package(Qt5Gui QUIET)
88+
find_package(Qt5Widgets QUIET)
89+
find_package(Qt5OpenGL QUIET)
90+
find_package(Qt5PrintSupport QUIET)
91+
92+
if(Qt5Core_FOUND
93+
AND Qt5Gui_FOUND
94+
AND Qt5Widgets_FOUND
95+
AND Qt5OpenGL_FOUND
96+
AND Qt5PrintSupport_FOUND)
97+
# Compatibility
98+
macro(qt4_wrap_cpp)
99+
qt5_wrap_cpp(${ARGN})
100+
endmacro()
101+
set(Qt5_USE_FILE_IN "${PROJECT_SOURCE_DIR}/cmake/Templates/Geant4UseQt5.cmake.in")
102+
set(QT_USE_FILE "${PROJECT_BINARY_DIR}/Geant4UseQt5.cmake")
103+
configure_file("${Qt5_USE_FILE_IN}" "${QT_USE_FILE}" @ONLY)
104+
get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION)
105+
set(G4QTLIBLIST "-lQt5PrintSupport -lQt5Widgets -lQt5Gui -lQt5Core")
106+
set(G4GLQTLIBLIST "-lQt5OpenGL ${G4QTLIBLIST}")
107+
else()
108+
unset(Qt5Core_DIR CACHE)
109+
unset(Qt5Gui_DIR CACHE)
110+
unset(Qt5Widgets_DIR CACHE)
111+
unset(Qt5OpenGL_DIR CACHE)
112+
unset(Qt5PrintSupport_DIR CACHE)
113+
find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui QtOpenGL)
114+
endif()
115+
87116
find_package(OpenGL REQUIRED)
88117

118+
# Variables for export
119+
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PREFIX OUTPUT_VARIABLE G4QTHOME OUTPUT_STRIP_TRAILING_WHITESPACE)
120+
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_LIBS OUTPUT_VARIABLE G4QTLIBPATH OUTPUT_STRIP_TRAILING_WHITESPACE)
121+
89122
# OpenGL part of Qt is in OpenGL component so mark the need to
90123
# add OpenGL.
91124
set(GEANT4_USE_OPENGL ON)
@@ -148,18 +181,20 @@ if(UNIX)
148181
/usr/openwin/include
149182
/usr/openwin/share/include
150183
/opt/graphics/OpenGL/include
184+
/opt/X11/include
151185
)
152186

153187
set(X11_LIB_SEARCH_PATH
154188
/usr/pkg/xorg/lib
155189
/usr/X11R6/lib
156190
/usr/X11R7/lib
157191
/usr/openwin/lib
192+
/opt/X11/lib
158193
)
159194

160195
find_path(X11_Xmu_INCLUDE_PATH X11/Xmu/Xmu.h ${X11_INC_SEARCH_PATH})
161196
find_library(X11_Xmu_LIBRARY Xmu ${X11_SEARCH_PATH})
162-
if(X11_Xmu_LIBRARY-NOTFOUND OR X11_Xmu_INCLUDE_PATH-NOTFOUND)
197+
if(NOT X11_Xmu_LIBRARY OR NOT X11_Xmu_INCLUDE_PATH)
163198
message(FATAL_ERROR "could not find X11 Xmu library and/or headers")
164199
endif()
165200

@@ -197,17 +232,17 @@ if(UNIX)
197232
set(CMAKE_FIND_FRAMEWORK NEVER)
198233

199234
find_path(OPENGL_X11_INCLUDE_DIR GL/gl.h
200-
PATHS /usr/X11R6/include
235+
PATHS /usr/X11R6/include /opt/X11/include
201236
NO_DEFAULT_PATH
202237
)
203238

204239
find_library(OPENGL_X11_gl_LIBRARY GL
205-
PATHS /usr/X11R6/lib
240+
PATHS /usr/X11R6/lib /opt/X11/lib
206241
NO_DEFAULT_PATH
207242
)
208243

209244
find_library(OPENGL_X11_glu_LIBRARY GLU
210-
PATHS /usr/X11R6/lib
245+
PATHS /usr/X11R6/lib /opt/X11/lib
211246
NO_DEFAULT_PATH
212247
)
213248

cmake/Modules/Geant4MakeRules_cxx.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ endfunction()
123123
# GNU C++ or LLVM/Clang Compiler on all(?) platforms
124124
# NB: At present, only identifies clang correctly on CMake > 2.8.1
125125
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
126-
set(CMAKE_CXX_FLAGS_INIT "-W -Wall -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe")
126+
set(CMAKE_CXX_FLAGS_INIT "-W -Wall -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wno-variadic-macros -pipe")
127127
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
128128
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
129129
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")

cmake/Modules/Geant4ToolchainBackwardCompatibility.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,16 @@ macro(_g4tc_configure_tc_variables SHELL_FAMILY SCRIPT_NAME)
362362

363363
# - Qt UI AND VIS
364364
if(GEANT4_USE_QT)
365+
_g4tc_setenv_command(GEANT4_TC_QTHOME ${SHELL_FAMILY} QTHOME ${G4QTHOME})
366+
_g4tc_setenv_command(GEANT4_TC_QTLIBPATH ${SHELL_FAMILY} QTLIBPATH ${G4QTLIBPATH})
367+
if(QT4_FOUND)
368+
set(GEANT4_TC_QTLIBS "#Geant4Make automatically handles QTLIBS for Qt4")
369+
set(GEANT4_TC_GLQTLIBS "#Geant4Make automatically handles GLQTLIBS for Qt4")
370+
else()
371+
_g4tc_setenv_command(GEANT4_TC_QTLIBS ${SHELL_FAMILY} QTLIBS "\"-L${G4QTLIBPATH} ${G4QTLIBLIST}\"")
372+
_g4tc_setenv_command(GEANT4_TC_GLQTLIBS ${SHELL_FAMILY} GLQTLIBS "\"-L${G4QTLIBPATH} ${G4GLQTLIBLIST}\"")
373+
endif()
374+
365375
_g4tc_setenv_command(GEANT4_TC_G4UI_USE_QT ${SHELL_FAMILY} G4UI_USE_QT 1)
366376
_g4tc_setenv_command(GEANT4_TC_G4VIS_USE_OPENGLQT ${SHELL_FAMILY} G4VIS_USE_OPENGLQT 1)
367377

cmake/Templates/Geant4Config.cmake.in

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,23 @@ endif()
262262

263263
# - Qt (UI and Vis!)
264264
set(Geant4_qt_FOUND @GEANT4_USE_QT@)
265+
set(Geant4_USES_QT5 @Qt5Core_FOUND@)
265266
if(Geant4_qt_FOUND)
266267
if(Geant4_FIND_REQUIRED_qt OR Geant4_FIND_REQUIRED_ui_all OR
267268
Geant4_FIND_REQUIRED_vis_all)
268-
list(APPEND
269-
Geant4_DEFINITIONS
269+
# If we have Qt5, we need to refind the components because they use
270+
# imported targets, so linking will not work unless we recreate
271+
# them
272+
if(Geant4_USES_QT5)
273+
find_package(Qt5Core REQUIRED PATHS "@Qt5Core_DIR@")
274+
find_package(Qt5Gui REQUIRED PATHS "@Qt5Gui_DIR@")
275+
find_package(Qt5Widgets REQUIRED PATHS "@Qt5Widgets_DIR@")
276+
find_package(Qt5OpenGL REQUIRED PATHS "@Qt5OpenGL_DIR@")
277+
find_package(Qt5PrintSupport REQUIRED PATHS "@Qt5PrintSupport_DIR@")
278+
endif()
279+
280+
list(APPEND
281+
Geant4_DEFINITIONS
270282
-DG4INTY_USE_QT
271283
-DG4UI_USE_QT
272284
-DG4VIS_USE_OPENGLQT

0 commit comments

Comments
 (0)