Skip to content

Commit f840b5d

Browse files
committed
Import Geant4 11.2.2 source tree
1 parent 57dce1b commit f840b5d

File tree

411 files changed

+22250
-20750
lines changed

Some content is hidden

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

411 files changed

+22250
-20750
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ project(Geant4
3131
HOMEPAGE_URL "https://geant4.cern.ch")
3232
set(${PROJECT_NAME}_VERSION_MAJOR 11)
3333
set(${PROJECT_NAME}_VERSION_MINOR 2)
34-
set(${PROJECT_NAME}_VERSION_PATCH 1)
34+
set(${PROJECT_NAME}_VERSION_PATCH 2)
3535
set(${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}")
3636

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

ReleaseNotes/Patch.11.2-2.txt

+261
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
2+
Geant4 11.2 - patch-02 Release Notes
3+
------------------------------------
4+
5+
21 June 2024
6+
7+
List of fixes included in this public patch since the public release 11.2.1:
8+
9+
o Configuration
10+
-------------
11+
+ CMake:
12+
o Fix to do not export HDF5 version to Geant4Config.
13+
o Fixed find_package(SoXt) and find_package(SoWin).
14+
o In main CMake source script, VTK driver library requires the application
15+
of VTK's vtk_module_autoinit cmake function, but the existence of the
16+
target was not checked, leading to configure time errors. Check for the
17+
existence of both G4visVTK and G4visVTK-static targets before applying
18+
vtk_module_autoinit. Addressing problem report #2600.
19+
o Mention the possibility of using cvmfs datasets in the cmake configuration.
20+
o Updated FindPythia6 module to account for lib64.
21+
Applies GitHub PR#63 (https://github.com/Geant4/geant4/pull/63).
22+
o Disabled use of FindPythia6 outside of internal Geant4 examples.
23+
o Updated FindPythia8 module to reduce capability to only that required by
24+
py8decayer example and emit error if used in project outside Geant4 or
25+
py8decayer. Applies GitHub PR#68 (https://github.com/Geant4/geant4/pull/68).
26+
o Fixed escaping of regex in geant4_module_check to satisfy latest Python3.
27+
o Updated dataset: G4NDL-4.7.1.
28+
29+
o Analysis
30+
--------
31+
+ Do not delete G4Accumulable<T> default constructor, as it prevents from
32+
using it in an array without an explicit initialization in the header.
33+
+ Fixed wrong conversion to G4String in G4THnToolsManager, leading to
34+
compilation error on gcc compiler with C++23 Standard enabled.
35+
36+
o Digits_Hits
37+
-----------
38+
+ Fixed compilation error in G4THitsMap on macOS/clang with C++23 Standard
39+
enabled.
40+
41+
o Externals
42+
---------
43+
+ g4tools:
44+
o Fixed compilation warnings on gcc when LTO settings are enabled.
45+
o Fixed string assignments in 'window' and 'pixwin', to support either
46+
UNICODE or UTF-16 encoding on Windows. Addressing problem report #2599.
47+
+ ptl:
48+
o Changed Windows.h to windows.h, to allow build Windows/MinGW.
49+
Not relevant for native VC++ builds.
50+
51+
o Geometry
52+
--------
53+
+ magnetic_field:
54+
o Fixed potential uninitialised data, detected in ATLAS LTO builds.
55+
+ navigation:
56+
o Fixed compilation error in G4Navigator on Windows VC++ with C++20 Standard
57+
enabled. Based on [GitHub PR#69](https://github.com/Geant4/geant4/pull/69).
58+
+ solids/specific:
59+
o Use std::size_t for array sizes in G4PolyhedraSide and G4PolyPhiFace,
60+
fixing compilation warnings on gcc when LTO settings are enabled.
61+
+ volumes:
62+
o Use std::map instead of std::vector to define G4LogicalSkinSurfaceTable,
63+
to speedup search of skin surfaces in large tables, as already done
64+
previously for G4LogicalBorderSurface. Addressing problem report #2598.
65+
66+
o Global
67+
------
68+
+ Changed Windows.h to windows.h, to allow build Windows/MinGW.
69+
Not relevant for native VC++ builds. Use _WIN32 to detect Windows system.
70+
+ Fixed compilation error in G4PhysicsModelCatalog on Windows VC++ with
71+
C++20 Standard enabled.
72+
Based on [GitHub PR#69](https://github.com/Geant4/geant4/pull/69).
73+
+ Provide helpful error message when GEANT4_DATA_DIR is set to an invalid
74+
location.
75+
+ Updated date and version for 11.2.2.
76+
77+
o Intercoms
78+
---------
79+
+ G4UIparsing: checking either 'int' or 'long int' parameter value are
80+
within range of G4int or G4long.
81+
+ Fix in G4GenericMessenger::DeclareMethod() which was wrongly converting
82+
valid Boolean parameters. Improved SetNewValue() function.
83+
Addressing problem report #2606.
84+
85+
o Interfaces
86+
----------
87+
+ Use std::size_t as arrays size in G4InteractorMessenger and G4UIArrayString,
88+
fixing compilation warnings on gcc when LTO settings are enabled
89+
+ Fixed string assignments in G4Win32 and G4UIWin32, to support either
90+
UNICODE or UTF-16 encoding on Windows. Addressing problem report #2599.
91+
92+
o Materials
93+
---------
94+
+ Fix in G4NistMaterialBuilder::HepAndNuclearMaterials(): G4_BRASS,
95+
G4_BRONZE and G4_STAILESS_STEEL are now defined using mass fractions
96+
of components instead of number of atoms, in order to have more natural
97+
description. Addressing problem report #2601.
98+
Results may be changed on level of 10^-5 due to numerical differences.
99+
100+
o Persistency
101+
-----------
102+
+ GDML:
103+
o Disabled schema validation on Windows platforms, as XercesC currently does
104+
support only 'http'.
105+
o Fix in schema module gdml_solids.xsd for tessellated solid semantics, to
106+
correctly reference facet types. Fixes schema validation errors which may
107+
occur on some custom XSD validation tools (fix included in GDML-3.1.7).
108+
o Use std::map instead of std::vector to iterate on logical-skin surfaces
109+
in G4GDMLWriteStructure::GetSkinSurface().
110+
Part of fix addressing problem report #2598.
111+
112+
o Physics Lists
113+
-------------
114+
+ lists:
115+
o G4PhysListFactory: added three new variants of 'Shielding' physics list,
116+
using the model G4LightIonQMDReaction: 'ShieldingLIQMD', 'ShieldingLIQMD_HP'
117+
and 'ShieldingLIQMD_HPT'. Addressing problem report #2615.
118+
Note that 'ShieldingLIQMD' and 'ShieldingLIQMD_HP' refer to the same
119+
configuration, the latter is introduced only for consistency.
120+
121+
o Processes - Electromagnetic
122+
---------------------------
123+
+ dna:
124+
o Fixed compilation error on Windows VC++ with C++20 Standard enabled.
125+
Added missing declarations for TG4MoleculeShoot specialisations on G4Track.
126+
Based on [GitHub PR#69](https://github.com/Geant4/geant4/pull/69).
127+
o Fixed compilation error on macOS/clang with C++23 enabled, for the use
128+
of std::function in G4OctreeFinder.
129+
+ standard:
130+
o G4BetheHeitler5DModel: fixed computation of sinTheta sampling and added
131+
checks on arguments of G4Exp in SampleSecondaries() method, to avoid FPE
132+
problems in the case of -O3 optimisation on alma9.
133+
+ utils:
134+
o G4EmUtility: simplified computation of cross-section maximum for
135+
discrete processes to fix FPE issues on alma9 when -O3 compiler
136+
option is used.
137+
o Fixed compilation error in G4EmConfigurator on Windows VC++ with
138+
C++20 Standard enabled.
139+
Based on [GitHub PR#69](https://github.com/Geant4/geant4/pull/69).
140+
141+
o Processes - Hadronic
142+
--------------------
143+
+ models/binary_cascade:
144+
o Removed throwing of exception if momentum cannot be corrected in rare
145+
cases for D + H around 1600 MeV; the initial state is now kept unchanged
146+
instead.
147+
+ models/coherent_elastic:
148+
o Fixed compilation warnings for potentially initialised local variables
149+
in SampleThetaCMS() for G4DiffuseElastic and G4NuclNuclDiffuseElastic.
150+
+ models/lend:
151+
o Fixed compilation warnings for potentially initialised local variables
152+
in ptwXY_createFromFunctionZeroCrossing().
153+
o Define _USE_MATH_DEFINES before inclusion of <cmath> to define
154+
non-standard math macros such as M_PI on Windows. Use _WIN32 instead of
155+
WIN32 to detect Windows system. Use basetsd.h instead of BaseTsd.h to
156+
allow for compilation on Windows/MinGW.
157+
+ models/inclxx:
158+
o Fix in G4INCLInteractionAvatar to not use local energy for all antibaryons.
159+
+ models/particle_hp:
160+
o G4CrossSectionHP: fixed method taking into account temperature effect
161+
(the difference due to this fix is small).
162+
Fixed elastic and capture cross-sections in Argon, by using only the main
163+
isotope Z=18, A=40 (there was up to 50% overestimation of cross-sections
164+
due to wrong data for rare isotopes of argon).
165+
Fixed cross-sections for rare target atoms Promethium, Astatine, Radon
166+
and Francium.
167+
o Fixed compilation error in G4ParticleHPManager and G4ParticleHPNames on
168+
Windows VC++ with C++20 Standard enabled.
169+
Based on [GitHub PR#69](https://github.com/Geant4/geant4/pull/69).
170+
o Fixed remaining compilation warnings on gcc compiler when LTO settings
171+
are enabled.
172+
+ radioactive_decay:
173+
o G4BetaPlusDecay, G4BetaMinusDecay: added extra numerical protection on
174+
level of 1 eV to avoid precision lost and production of neutrino with
175+
negative kinetic energy. In case Q-value is bigger than mass difference,
176+
betas in the tail of the spectrum may have more energy than residual free
177+
energy. To minimize the non-conservation of 4-momentum, in such cases,
178+
neutrino and daughter nucleus are given 1 eV, leading to non conservation
179+
of linear momentum because momentum of beta is not counterbalanced.
180+
181+
o processes - solidstate/phonon
182+
-----------------------------
183+
+ Fixed compilation error in G4LatticeManager on Windows VC++ with
184+
C++20 Standard enabled.
185+
Based on [GitHub PR#69](https://github.com/Geant4/geant4/pull/69).
186+
187+
o processes/optical
188+
-----------------
189+
+ G4OpBoundaryProcess: correctly calculate Fresnel reflection/refraction,
190+
when material property TRANSMITTANCE is specified. The ratio of Fresnel
191+
reflection/refraction now does not change when a non-zero transmission is
192+
specified. Previously, if transmission of X% was specified, there would be
193+
transmission of X% as expected, but the ratio of Fresnel refraction to
194+
Fresnel reflection would be set to X%. Addressing problem report #2578.
195+
196+
o Track
197+
-----
198+
+ Fixed compilation error in G4VParticleChange on Windows VC++ with
199+
C++20 Standard enabled.
200+
Based on [GitHub PR#69](https://github.com/Geant4/geant4/pull/69).
201+
202+
o Visualization
203+
-------------
204+
+ management:
205+
o G4VisExecutive: fixed use of static symbol 'fVerbosity' and replaced
206+
with call to dedicated static method, to avoid linkage problems on Windows.
207+
+ Qt3D:
208+
o Fixed compilation error on Windows for ambiguous string assignment in
209+
G4Qt3DSceneHandler::CreateNewNode().
210+
+ Vtk:
211+
o Porting code to compile on Windows Visual-Studio.
212+
o Fixed Ubuntu 22 & VTK 9.1 compilation error.
213+
214+
o Data
215+
----
216+
+ G4NDL-4.7.1:
217+
o Removed all files for Argon-36 and Argon-38 as significantly different
218+
from those of ENDF/B-VIII.0.
219+
o Reprocessed thermal scattering files after fixing a problem in NJOY.
220+
Addressing problem report #2552.
221+
222+
o Examples
223+
--------
224+
+ advanced/ChargeExchangeMC
225+
o Disabled GDML schema validation.
226+
+ advanced/hadrontherapy:
227+
o Fixed compilation error on Windows VC++ with C++20 Standard enabled.
228+
+ medical_linac:
229+
o Fixed geometry of medical linear accelerator's collimator.
230+
+ extended/biasing:
231+
o Fixed URls in documentation.
232+
+ extended/eventgenerator:
233+
o Updated CMake scripts to use new Pythia8 setup/build variables.
234+
+ extended/hadronic/FlukaCern/ProcessLevel/FinalState:
235+
+ extended/hadronic/Hadr09:
236+
o Fixed compilation error on Windows VC++ with C++20 Standard enabled.
237+
+ extended/medical/DICOM:
238+
o Corrected symbols for Chlorine and Potassium elements in function
239+
InitialisationOfMaterials().
240+
+ extended/parameterisations/Par04
241+
o Bump scipy version according to
242+
GitHub Dependabot PR#66(https://github.com/Geant4/geant4/pull/66).
243+
o Bump pymysql version according to
244+
GitHub Dependabot PR#72 (https://github.com/Geant4/geant4/pull/72).
245+
o Bump scikit-learn version according to
246+
GitHub Dependabot PR#73 (https://github.com/Geant4/geant4/pull/73).
247+
248+
----------------------------------------------------------------------------
249+
250+
Technical Notes
251+
---------------
252+
253+
o This patch should be applied on top of release 11.2 series.
254+
o Technical notes distributed for release 11.2 are also applicable and
255+
valid for this patch.
256+
257+
The code and rebuilt binary libraries for release 11.2.2 are available
258+
through the Geant4 "Download" Web page.
259+
260+
Please refer to the Geant4 User Documentation for further information about
261+
using Geant4.

cmake/History

+29
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,35 @@ It must **not** be used as a substitute for writing good git commit messages!
66

77
-------------------------------------------------------------------------------
88

9+
## 2024-06-07 Ben Morgan (cmake-V11-01-33)
10+
- Do not export HDF5 version to Geant4Config
11+
- Fixes Issue #214
12+
13+
## 2024-05-17 Gunter Folger
14+
- Use patched G4NDL 4.7.1 dataset.
15+
16+
## 2024-03-26 Ben Morgan
17+
- Disable use of FindPythia6 outside of internal Geant4 examples.
18+
19+
## 2024-04-17 Stephan Hageboeck
20+
- Mention the possibility of using cvmfs datasets in the cmake configure warning
21+
22+
## 2024-04-08 Guilherme Amadio
23+
- Fix also find_package(SoXt) and find_package(SoWin)
24+
25+
## 2024-04-20 Ben Morgan
26+
- Update FindPythia8 module to:
27+
- Apply [GitHub PR 68](https://github.com/Geant4/geant4/pull/68)
28+
- Reduce capability to only that required by py8decayer example
29+
- Emit error if used in project outside Geant4 or py8decayer
30+
31+
## 2024-03-12 Ben Morgan
32+
- Update FindPythia6 module to account for lib64
33+
- Applies [GitHub PR 63](https://github.com/Geant4/geant4/pull/63)
34+
35+
## 2024-03-11 Ben Morgan
36+
- Fix escaping of regex in geant4_module_check to satisfy latest Python3.
37+
938
## 2024-01-29 Ben Morgan (cmake-V11-01-32)
1039
- Manually check versions of found SoXX packages to workaround their use of
1140
the `ExactVersionOnly` version checking strategy in find_package. Geant4

cmake/Modules/FindPythia6.cmake

+56-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,56 @@
1-
# Locate Pythia6 library
2-
# in a directory defined via PYTHIA6 environment variable
3-
#
4-
# Defines:
5-
# PYTHIA6_FOUND
6-
# PYTHIA6_LIBRARIES
7-
8-
find_library(PYTHIA6_LIBRARY NAMES Pythia6 pythia6-$ENV{PYTHIA6_VERSION}
9-
HINTS $ENV{PYTHIA6} $ENV{PYTHIA6}/lib)
10-
11-
set(PYTHIA6_LIBRARIES ${PYTHIA6_LIBRARY})
12-
#message(STATUS PYTHIA6_LIBRARIES ${PYTHIA6_LIBRARIES} )
13-
14-
# handle the QUIETLY and REQUIRED arguments and set PYTHIA6_FOUND to TRUE if
15-
# all listed variables are TRUE
16-
INCLUDE(FindPackageHandleStandardArgs)
17-
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pythia6 DEFAULT_MSG PYTHIA6_LIBRARIES)
18-
19-
mark_as_advanced(PYTHIA6_FOUND PYTHIA6_LIBRARIES)
1+
#[=======================================================================[.rst:
2+
FindPythia6
3+
---------
4+
5+
Find the Pythia6 event generator library.
6+
7+
Imported Targets
8+
^^^^^^^^^^^^^^^^
9+
10+
This module defines the following :prop_tgt:`IMPORTED` targets:
11+
12+
``Pythia6::Pythia6``
13+
The Pythia6 ``pythia6`` library, if found.
14+
15+
Result Variables
16+
^^^^^^^^^^^^^^^^
17+
18+
This module will set the following variables in your project:
19+
20+
``Pythia6_FOUND``
21+
true if the Pythia6 headers and libraries were found.
22+
23+
Hints
24+
^^^^^
25+
26+
A user may set ``Pythia6_ROOT`` to a Pythia6 installation root to tell this
27+
module where to look.
28+
29+
#]=======================================================================]
30+
31+
# WE DO NOT ALLOW USE OF THIS MODULE OUTSIDE GEANT4 AND EXAMPLES
32+
if(NOT PROJECT_NAME MATCHES "Geant4|HepMCEx0[1-2]|decayer6")
33+
message(FATAL_ERROR "This FindPythia6.cmake module is only supported for use in Geant4's HepMCEx0{1,2} "
34+
"and decayer6 extended examples. No support or extension of this module for use outside of these examples "
35+
"will be provided.")
36+
endif()
37+
38+
find_library(Pythia6_LIBRARY
39+
NAMES Pythia6 pythia6 pythia6-$ENV{PYTHIA6_VERSION}
40+
HINTS $ENV{PYTHIA6} $ENV{PYTHIA6}/lib $ENV{PYTHIA6}/lib64 ${Pythia6_ROOT}/lib ${Pythia6_ROOT}/lib64)
41+
42+
# handle the QUIETLY and REQUIRED arguments and set Pythia6_FOUND to TRUE if
43+
# all listed variables are TRUE
44+
include(FindPackageHandleStandardArgs)
45+
find_package_handle_standard_args(Pythia6 DEFAULT_MSG Pythia6_LIBRARY)
46+
47+
mark_as_advanced(Pythia6_LIBRARY)
48+
49+
if(Pythia6_FOUND)
50+
set(Pythia6_LIBRARIES ${Pythia6_LIBRARY})
51+
if(NOT TARGET Pythia6::Pythia6)
52+
add_library(Pythia6::Pythia6 UNKNOWN IMPORTED)
53+
set_target_properties(Pythia6::Pythia6 PROPERTIES
54+
IMPORTED_LOCATION ${Pythia6_LIBRARY})
55+
endif()
56+
endif()

0 commit comments

Comments
 (0)