Import Geant4 11.0.2 source tree

This commit is contained in:
Gabriele Cosmo
2022-05-25 15:50:57 +02:00
parent de4f28d823
commit b3bf75a2a1
341 changed files with 93127 additions and 39343 deletions
+9
View File
@@ -16,6 +16,15 @@ commit in the repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
May 23, 2022 Gabriele Cosmo (global-V10-07-39)
- Updated tag IDs for geant4-11-00-patch-02.
April 1, 2022 Jonas Hahnfeld
- Fix two typos in Bremsstrahlung.
March 18, 2022 Ben Morgan
- Replace use of deprecated std::result_of with std::invoke_result_t.
March 8, 2022 Gabriele Cosmo (global-V10-07-38)
- Updated tag IDs for geant4-11-00-patch-01.
+11 -11
View File
@@ -99,8 +99,8 @@
#include <csignal>
#include <type_traits>
template <typename FuncT>
using G4ResultOf_t = typename std::result_of<FuncT>::type;
template <typename FuncT, typename... ArgTypes>
using G4ResultOf_t = std::invoke_result_t<FuncT, ArgTypes...>;
// compatible OS and compiler
#if defined(G4UNIX) && \
@@ -302,14 +302,14 @@ class G4Backtrace
// to ignore initial frames (such as this function). A callback
// can be provided to inspect and/or tweak the frame string
template <size_t Depth, size_t Offset = 0, typename FuncT = frame_func_t>
static std::array<G4ResultOf_t<FuncT(const char*)>, Depth> GetMangled(
static std::array<G4ResultOf_t<FuncT, const char*>, Depth> GetMangled(
FuncT&& func = FrameFunctor());
// gets a demangled backtrace of "Depth" frames. The offset parameter is
// used to ignore initial frames (such as this function). A callback
// can be provided to inspect and/or tweak the frame string
template <size_t Depth, size_t Offset = 0, typename FuncT = frame_func_t>
static std::array<G4ResultOf_t<FuncT(const char*)>, Depth> GetDemangled(
static std::array<G4ResultOf_t<FuncT, const char*>, Depth> GetDemangled(
FuncT&& func = FrameFunctor());
private:
@@ -358,12 +358,12 @@ inline void G4Backtrace::ExitAction(int sig)
//----------------------------------------------------------------------------//
template <size_t Depth, size_t Offset, typename FuncT>
inline std::array<G4ResultOf_t<FuncT(const char*)>, Depth>
inline std::array<G4ResultOf_t<FuncT, const char*>, Depth>
G4Backtrace::GetMangled(FuncT&& func)
{
static_assert((Depth - Offset) >= 1, "Error Depth - Offset should be >= 1");
using type = G4ResultOf_t<FuncT(const char*)>;
using type = G4ResultOf_t<FuncT, const char*>;
// destination
std::array<type, Depth> btrace;
btrace.fill((std::is_pointer<type>::value) ? nullptr : type{});
@@ -393,7 +393,7 @@ G4Backtrace::GetMangled(FuncT&& func)
//----------------------------------------------------------------------------//
template <size_t Depth, size_t Offset, typename FuncT>
inline std::array<G4ResultOf_t<FuncT(const char*)>, Depth>
inline std::array<G4ResultOf_t<FuncT, const char*>, Depth>
G4Backtrace::GetDemangled(FuncT&& func)
{
auto demangle_bt = [&](const char* cstr) {
@@ -764,20 +764,20 @@ class G4Backtrace
{}
template <size_t Depth, size_t Offset = 0, typename FuncT = frame_func_t>
static std::array<G4ResultOf_t<FuncT(const char*)>, Depth> GetMangled(
static std::array<G4ResultOf_t<FuncT, const char*>, Depth> GetMangled(
FuncT&& func = FrameFunctor())
{
using type = G4ResultOf_t<FuncT(const char*)>;
using type = G4ResultOf_t<FuncT, const char*>;
auto ret = std::array<type, Depth>{};
ret.fill(func(""));
return ret;
}
template <size_t Depth, size_t Offset = 0, typename FuncT = frame_func_t>
static std::array<G4ResultOf_t<FuncT(const char*)>, Depth> GetDemangled(
static std::array<G4ResultOf_t<FuncT, const char*>, Depth> GetDemangled(
FuncT&& func = FrameFunctor())
{
using type = G4ResultOf_t<FuncT(const char*)>;
using type = G4ResultOf_t<FuncT, const char*>;
auto ret = std::array<type, Depth>{};
ret.fill(func(""));
return ret;
@@ -40,11 +40,11 @@
// |--> patch number
#ifndef G4VERSION_NUMBER
#define G4VERSION_NUMBER 1101
#define G4VERSION_NUMBER 1102
#endif
#ifndef G4VERSION_TAG
#define G4VERSION_TAG "$Name: geant4-11-00-patch-01 $"
#define G4VERSION_TAG "$Name: geant4-11-00-patch-02 $"
#endif
// as variables
@@ -53,10 +53,10 @@
#include "G4Types.hh"
#ifdef G4MULTITHREADED
static const G4String G4Version = "$Name: geant4-11-00-patch-01 [MT]$";
static const G4String G4Version = "$Name: geant4-11-00-patch-02 [MT]$";
#else
static const G4String G4Version = "$Name: geant4-11-00-patch-01 $";
static const G4String G4Version = "$Name: geant4-11-00-patch-02 $";
#endif
static const G4String G4Date = "(8-March-2022)";
static const G4String G4Date = "(25-May-2022)";
#endif
@@ -92,8 +92,8 @@ void G4PhysicsModelCatalog::Initialize() {
InsertModel( 10014, "model_TripletElectron" );
// gamma production
InsertModel( 10020, "model_Bremsstruhlung" );
InsertModel( 10021, "model_SplitBremssrahlung" );
InsertModel( 10020, "model_Bremsstrahlung" );
InsertModel( 10021, "model_SplitBremsstrahlung" );
InsertModel( 10022, "model_ComptonGamma" );
InsertModel( 10023, "model_Annihilation" );
InsertModel( 10024, "model_TripletGamma" );