Import Geant4 11.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2025-12-05 08:54:02 +01:00
parent a499fb82e9
commit b4a16de652
6484 changed files with 232674 additions and 221097 deletions
@@ -6,10 +6,13 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-03-21 S. Johnson (VecGeomNavigation-V11-03-01)
## 2025-11-10 Gabriele Cosmo (VecGeomNavigation-V11-03-02)
- Fixed coding conventions for long lines in VG01DetectorConstruction source.
## 2025-03-21 Seth Johnson (VecGeomNavigation-V11-03-01)
- Use G4cout for VecGeom logger output
## 2023-11-10 I. Hrivnacova (VecGeomNavigation-V11-01-01)
## 2023-11-10 Ivana Hrivnacova (VecGeomNavigation-V11-01-01)
- Coding guidelines: split long lines, added separators in
VG01ActionInitialization.cc
- Remove run-ntst.mac
@@ -19,7 +22,7 @@ It must **not** be used as a substitute for writing good git commit messages!
scope version to ease use of Geant4 as a CMake subproject.
- Fixes [GitHub PR #52](https://github.com/Geant4/geant4/pull/52)
## 2022-11-04 I. Hrivnacova (VecGeomNavigation-V11-00-03)
## 2022-11-04 Ivana Hrivnacova (VecGeomNavigation-V11-00-03)
- Fixed Doxygen file descriptions
## 2022-04-07 Ben Morgan (VecGeomNavigation-V11-00-02)
@@ -1,32 +0,0 @@
This example demonstrates integration of the navigation elements of
[VecGeom](https://gitlab.cern.ch/VecGeom/VecGeom), to investigate the
performance benefits.
This integration is in development. Supporting Placement volumes -- other
volumes would be handled by existing Geant4 navigation.
The example loads a GDML file for the geometry, and can execute a batch
file (vecgeomNav.in) or run interactive commands or both.
# Installation / Configuration
## Dependencies
In addition to Geant4, two projects: are required VecGeom and G4VecGeomNav.
VecCore is also required, but can be found through VecGeom.
It is optionally possible to use Root in G4VecGeomNav to store voxel
information for safety computation. These can require significant computation
to calculate if at least one logical volume contains many daughter volume.
## Configuration
- To configure you must set:
setenv CMAKE_PREFIX_PATH "${VECCORE_DIR}:${VECGEOM_DIR}"
or if you are using Vc from Root
setenv CMAKE_PREFIX_PATH "${ROOTSYS}:${VECGEOM_DIR}"
where VecGeom has also been built with the same installation of Vc from Root.
@@ -1,7 +1,4 @@
///\file "geometry/vecGeomNavigation/.README.txt"
///\brief Extended example vecGeomNavigation README page
/*! \page ExamplevecGeomNavigation Example vecGeomNavigation
\page ExamplevecGeomNavigation Example vecGeomNavigation
This example demonstrates integration of the navigation elements of
[VecGeom](https://gitlab.cern.ch/VecGeom/VecGeom), to investigate the
@@ -35,5 +32,3 @@ or if you are using Vc from Root
setenv CMAKE_PREFIX_PATH "${ROOTSYS}:${VECGEOM_DIR}"
where VecGeom has also been built with the same installation of Vc from Root.
*/
@@ -23,6 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file exampleVecGeomNav.cc
/// \brief Main program of the geometry/vecGeomNavigation example
// Author: J. Apostolakis, S. Wenzel, 2018-2021
//
// Started from FullCMS Geant4 application by Mihaly Novak (2017)
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file VG01ActionInitialization.hh
/// \brief Definition of the VG01ActionInitialization class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file VG01DetectorConstruction.hh
/// \brief Definition of the VG01DetectorConstruction class
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file VG01DetectorMessenger.hh
/// \brief Implementation of the VG01DetectorMessenger class
/// \brief Definition of the VG01DetectorMessenger class
#ifndef VG01DetectorMessenger_hh
#define VG01DetectorMessenger_hh 1
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file VG01PrimaryGeneratorAction.hh
/// \brief Definition of the VG01PrimaryGeneratorAction class
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file VG01SteppingVerboseWithDir.hh
/// \brief Definition of the VG01SteppingVerboseWithDir class
//
// Alternative Stepping Verbose method that prints out:
// - momentum direction
// - safety ( distance to nearest boundary at pre-step point )
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file VG01ActionInitialization.cc
/// \brief Implementation of the VG01ActionInitialization class
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file VG01DetectorConstruction.cc
/// \brief Implementation of the VG01DetectorConstruction class
@@ -66,7 +65,8 @@ namespace
using vecgeom::LogLevel;
using vecgeom::Provenance;
// This logger adapts VecGeom messages, warnings, and errors to Geant4 io/exceptions.
// This logger adapts VecGeom messages, warnings, and errors to Geant4
// io/exceptions.
void G4VecGeomLogger(Provenance prov, LogLevel lev, std::string str)
{
std::ostringstream where;
@@ -80,12 +80,14 @@ void G4VecGeomLogger(Provenance prov, LogLevel lev, std::string str)
}
if (lev < LogLevel::warning) {
G4cout << "VecGeom: " << where.str() << ": " << vecgeom::to_cstring(lev) << ": " << str << std::endl;
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());
lev == LogLevel::warning ? JustWarning : FatalException,
str.c_str());
}
} // namespace
#endif
@@ -102,7 +104,8 @@ 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
// 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);
@@ -125,7 +128,8 @@ VG01DetectorConstruction::~VG01DetectorConstruction()
G4VPhysicalVolume* VG01DetectorConstruction::Construct()
{
// parser.SetOverlapCheck(true);
G4TransportationManager* trMgr = G4TransportationManager::GetTransportationManager();
G4TransportationManager* trMgr =
G4TransportationManager::GetTransportationManager();
assert(trMgr);
fParser.Read(fGDMLFileName, false);
@@ -147,8 +151,8 @@ G4VPhysicalVolume* VG01DetectorConstruction::Construct()
G4ExceptionDescription ed;
ed << "World volume not set properly check your setup selection criteria"
<< "or GDML input!" << G4endl;
G4Exception("VG01DetectorConstruction::Construct()", "G4VecGeomNavExtExample_0001",
FatalException, ed);
G4Exception("VG01DetectorConstruction::Construct()",
"G4VecGeomNavExtExample_0001", FatalException, ed);
}
CreateMagFieldAndIntegrator();
@@ -172,10 +176,12 @@ void VG01DetectorConstruction::CreateMagFieldAndIntegrator()
// Apply a global uniform magnetic field along the Z axis.
// Note: only when the magnetic field (pointer) is NOT zero,
// does the Geant4 transportion in field get activated.
fUniformMagField = new G4UniformMagField(G4ThreeVector(0.0, 0.0, fglobFieldValue));
fUniformMagField = new G4UniformMagField(G4ThreeVector(0.0, 0.0,
fglobFieldValue));
fFieldMgr->SetDetectorField(fUniformMagField);
fFieldMgr->CreateChordFinder(fUniformMagField);
G4cout << G4endl << " *** SETTING MAGNETIC FIELD in Z direction : fieldValue = "
G4cout << G4endl
<< " *** SETTING MAGNETIC FIELD in Z direction : fieldValue = "
<< fglobFieldValue / tesla << " tesla *** " << G4endl << G4endl;
}
else {
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file VG01DetectorMessenger.cc
/// \brief Implementation of the VG01DetectorMessenger class
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file VG01PrimaryGeneratorAction.cc
/// \brief Implementation of the VG01PrimaryGeneratorAction class
//
// Authors: J. Apostolakis & S. Wenzel (CERN) 2018-2021
//
// Started from FullCMS code by Mihaly Novak (CERN) 2017
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// s
/// \file VG01SteppingVerboseWithDir.cc
/// \brief Implementation of the VG01SteppingVerboseWithDir class
@@ -18,7 +18,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-03-ref-06 (30-June-2025)
Geant4 version Name: geant4-11-04-ref-00 (5-December-2025)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -47,14 +47,16 @@ Enabled Check mode in G4Navigator G4ChordFinder: stepperDriverId: 2
*** SETTING MAGNETIC FIELD in Z direction : fieldValue = 2 tesla ***
*** Conversion of G4 -> VecGeom finished (0.0020306 s) ***
*** Closing VecGeom geometry finished (0.000303452 s) ***
*** Setup of syncing lookup structure finished (2.3729e-05 s) ***
*** Conversion of G4 -> VecGeom finished (0.00168731 s) ***
VecGeom: GeoManager.cpp:294: info: VolumeTree size is 0.030388 MBytes
VecGeom: NavIndexTable.cpp:694: info: === creating navigation table with min_per_scene 1000
VecGeom: NavIndexTable.cpp:700: info: navigation table size is 0.046989 MBytes
*** Closing VecGeom geometry finished (0.000957164 s) ***
*** Setup of syncing lookup structure finished (1.6531e-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 (31.7823 s) ***
*** Setup of VecGeom navigators finished (33.2744 s) ***
3
hInelastic FTFP_BERT : threshold between BERT and FTFP is over the interval
@@ -109,7 +111,7 @@ Lowest muon/hadron kinetic energy 1 keV
Use ICRU90 data 0
Fluctuations of dE/dx are enabled 1
Type of fluctuation model for leptons and hadrons Urban
Use built-in Birks satuaration 0
Use built-in Birks saturation 0
Build CSDA range enabled 0
Use cut as a final range enabled 0
Enable angular generator interface 0
@@ -246,7 +248,7 @@ hBrems: for proton XStype:1 SubType=3
hPairProd: for proton XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
Sampling table 17x1001, from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
@@ -304,7 +306,7 @@ hBrems: for anti_proton XStype:1 SubType=3
hPairProd: for anti_proton XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
Sampling table 17x1001, from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
@@ -336,7 +338,7 @@ hBrems: for kaon+ XStype:1 SubType=3
hPairProd: for kaon+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
Sampling table 18x1001, from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
@@ -368,7 +370,7 @@ hBrems: for kaon- XStype:1 SubType=3
hPairProd: for kaon- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
Sampling table 18x1001, from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
@@ -400,7 +402,7 @@ muBrems: for mu+ XStype:1 SubType=3
muPairProd: for mu+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 21x1001 from 0.85 GeV to 100 TeV
Sampling table 21x1001, from 0.85 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
@@ -432,7 +434,7 @@ muBrems: for mu- XStype:1 SubType=3
muPairProd: for mu- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 21x1001 from 0.85 GeV to 100 TeV
Sampling table 21x1001, from 0.85 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
@@ -464,7 +466,7 @@ hBrems: for pi+ XStype:1 SubType=3
hPairProd: for pi+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
Sampling table 20x1001, from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
@@ -496,7 +498,7 @@ hBrems: for pi- XStype:1 SubType=3
hPairProd: for pi- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
Sampling table 20x1001, from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
@@ -751,8 +753,8 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
Type of pre-compound model 0
Type of pre-compound inverse x-section 1
Pre-compound model active 1
Pre-compound excitation low energy 100 keV
Pre-compound excitation high energy 30 MeV
Pre-compound excitation low energy 0.1 MeV
Pre-compound excitation high energy 15 MeV
Angular generator for pre-compound model 1
Use NeverGoBack option for pre-compound model 0
Use SoftCutOff option for pre-compound model 0
@@ -766,9 +768,8 @@ Type of de-excitation inverse x-section 3
Type of de-excitation factory Evaporation+GEM
Number of de-excitation channels 68
Type of Fermi BreakUp model ModelVI
Min excitation energy 10 eV
Min energy per nucleon for multifragmentation 200 GeV
Limit excitation energy for Fermi BreakUp 20 MeV
Min excitation energy 0.01 keV
Min energy per nucleon for multifragmentation 2e+05 MeV
Level density (1/MeV) 0.075
Use simple level density model 1
Use discrete excitation energy of the residual 0
@@ -2750,7 +2751,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.000000s Real=0.008561s Sys=0.000000s
User=0.000000s Real=0.022344s Sys=0.000000s
/tracking/verbose 0
/run/beamOn 10
@@ -2800,7 +2801,7 @@ Index : 1 used in the geometry : Yes
Run terminated.
Run Summary
Number of events processed : 10
User=0.040000s Real=0.032823s Sys=0.000000s
User=0.040000s Real=0.035225s Sys=0.000000s
=================================================================
Final random number = 0.56769521327478