Import Geant4 11.3.2 source tree
This commit is contained in:
@@ -5,7 +5,7 @@ option(WITH_ROOT "WITH ROOT SUPPORT" OFF)
|
||||
option(BUILTIN_G4VECGEOMNAV "Build G4VecGeomNav from source (requires VecGeom)" ON)
|
||||
|
||||
find_package(Geant4 REQUIRED gdml)
|
||||
find_package(VecGeom REQUIRED)
|
||||
find_package(VecGeom 1.2.4 REQUIRED)
|
||||
if(WITH_ROOT)
|
||||
find_package(ROOT REQUIRED)
|
||||
find_package(TGeo2VecGeom REQUIRED)
|
||||
@@ -28,7 +28,7 @@ if(BUILTIN_G4VECGEOMNAV)
|
||||
|
||||
FetchContent_GetProperties(g4vecgeomnav)
|
||||
|
||||
# G4VecGeomNav builds a shared lib by default. As this links to Geant4 libs, if Geant4 is
|
||||
# G4VecGeomNav builds a shared lib by default. As this links to Geant4 libs, if Geant4 is
|
||||
# static-only, then we should also build G4VecGeomNav statically because:
|
||||
# - Geant4 static libs are not guaranteed to be PIC
|
||||
# - Geant4 symbols will be duplicated in g4vecgeomnav and the exampleVecGeomNac program
|
||||
|
||||
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-03-21 S. Johnson (VecGeomNavigation-V11-02-00)
|
||||
- Use G4cout for VecGeom logger output
|
||||
|
||||
## 2023-11-10 I. Hrivnacova (VecGeomNavigation-V11-01-01)
|
||||
- Coding guidelines: split long lines, added separators in
|
||||
VG01ActionInitialization.cc
|
||||
|
||||
@@ -44,9 +44,51 @@
|
||||
#include "G4UniformMagField.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
// NOTE: VecGeom versioning was introduced in 1.2.4, the minimum required to
|
||||
// build this file
|
||||
#include <VecGeom/base/Version.h>
|
||||
#include <VecGeom/management/GeoManager.h>
|
||||
#include <VecGeom/management/LoggerTypes.h>
|
||||
|
||||
#if VECGEOM_VERSION >= 0x010208
|
||||
// NOTE: Logger was introduced in 1.2.8; earlier version log messages will go
|
||||
// to stdout via printf/cout
|
||||
# include <VecGeom/management/Logger.h>
|
||||
# define VECGEOM_HAS_LOGGER 1
|
||||
#endif
|
||||
|
||||
#ifdef VECGEOM_HAS_LOGGER
|
||||
namespace
|
||||
{
|
||||
using vecgeom::LogLevel;
|
||||
using vecgeom::Provenance;
|
||||
|
||||
// This logger adapts VecGeom messages, warnings, and errors to Geant4 io/exceptions.
|
||||
void G4VecGeomLogger(Provenance prov, LogLevel lev, std::string str)
|
||||
{
|
||||
std::ostringstream where;
|
||||
if (!prov.file.empty()) {
|
||||
// Only print out the last path component of the originating file
|
||||
auto pos = prov.file.rfind('/') + 1;
|
||||
where << prov.file.substr(pos);
|
||||
}
|
||||
if (prov.line != 0) {
|
||||
where << ':' << prov.line;
|
||||
}
|
||||
|
||||
if (lev < LogLevel::warning) {
|
||||
G4cout << "VecGeom: " << where.str() << ": " << vecgeom::to_cstring(lev) << ": " << str << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
G4Exception(where.str().c_str(), "VecGeom",
|
||||
lev == LogLevel::warning ? JustWarning : FatalException, str.c_str());
|
||||
}
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
G4double VG01DetectorConstruction::fglobFieldValue = 0.0;
|
||||
|
||||
@@ -59,6 +101,13 @@ VG01DetectorConstruction::VG01DetectorConstruction()
|
||||
{
|
||||
fGDMLFileName = "TestNTST.gdml";
|
||||
fDetectorMessenger = new VG01DetectorMessenger(this);
|
||||
#ifdef VECGEOM_HAS_LOGGER
|
||||
// Have the global VecGeom logger redirect to G4cout rather than the default std:clog
|
||||
auto orig_level = vecgeom::logger().level();
|
||||
vecgeom::Logger new_logger(&G4VecGeomLogger);
|
||||
new_logger.level(orig_level);
|
||||
vecgeom::logger() = std::move(new_logger);
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -18,7 +18,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-03-patch-01 (21-March-2025)
|
||||
Geant4 version Name: geant4-11-03-patch-02 (25-April-2025)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -47,14 +47,13 @@ Enabled Check mode in G4Navigator G4ChordFinder: stepperDriverId: 2
|
||||
|
||||
*** SETTING MAGNETIC FIELD in Z direction : fieldValue = 2 tesla ***
|
||||
|
||||
*** Conversion of G4 -> VecGeom finished (0.010636 s) ***
|
||||
*** Closing VecGeom geometry finished (0.000672375 s) ***
|
||||
*** Setup of syncing lookup structure finished (2.4864e-05 s) ***
|
||||
*** Conversion of G4 -> VecGeom finished (0.00283541 s) ***
|
||||
*** Closing VecGeom geometry finished (0.00034433 s) ***
|
||||
*** Setup of syncing lookup structure finished (2.354e-05 s) ***
|
||||
TG4VecGeomNavigator created and registered to G4TransportationManager
|
||||
Uncontained capacity for Svt_log: 8.83002e+07 units
|
||||
Uncontained capacity for Dch_log: 8.26239e+08 units
|
||||
Uncontained capacity for Dch_log: 8.26239e+08 units
|
||||
*** Setup of VecGeom navigators finished (36.4627 s) ***
|
||||
*** Setup of VecGeom navigators finished (30.2389 s) ***
|
||||
3
|
||||
|
||||
hInelastic FTFP_BERT : threshold between BERT and FTFP is over the interval
|
||||
@@ -2748,7 +2747,7 @@ Step# X (mm) Y (mm) Z (mm) Ek (MeV) dE (MeV) Step(mm) Track(mm) S
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.010000s Real=0.014463s Sys=0.000000s
|
||||
User=0.000000s Real=0.015555s Sys=0.000000s
|
||||
/tracking/verbose 0
|
||||
/run/beamOn 10
|
||||
|
||||
@@ -2798,7 +2797,7 @@ Index : 1 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10
|
||||
User=0.060000s Real=0.054081s Sys=0.000000s
|
||||
User=0.030000s Real=0.031718s Sys=0.000000s
|
||||
|
||||
=================================================================
|
||||
Final random number = 0.56769521327478
|
||||
|
||||
Reference in New Issue
Block a user