Import Geant4 11.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2024-12-06 11:11:40 +01:00
parent e58e650b32
commit 32390e802b
1984 changed files with 98713 additions and 83996 deletions
+11
View File
@@ -171,6 +171,11 @@ The following paragraphs are common to all basic examples
(since they require no external libraries), but the OGL driver requires
that the Geant4 libraries have been built with the OpenGL option.
Since 11.1, the TSG visualization driver can also produce the "offscrean"
file output in png, jpeg, gl2ps formats without drawing on the screen.
It can be controlled via UI commands provided in '/vis/tsg' which are
demonstrated in the tsg_offscreen.mac macro in example B5.
For more information on visualization, including information on how to
install and run DAWN, OpenGL and HepRApp, see the visualization tutorials,
for example,\n
@@ -188,10 +193,16 @@ The following paragraphs are common to all basic examples
The user command interface is set via the G4UIExecutive class
in the main () function in exampleB3.cc
The selection of the user command interface is then done automatically
according to the Geant4 configuration or it can be done explicitly via
the third argument of the G4UIExecutive constructor (see exampleB4a.cc).
The gui.mac macros are provided in examples B2, B4 and B5. This macro
is automatically executed if Geant4 is built with any GUI session.
It is also possible to customise the icons menu bar which is
demonstrated in the icons.mac macro in example B5.
\section B3_C HOW TO RUN
- Execute exampleB3a in the 'interactive mode' with visualization
+5 -28
View File
@@ -6,22 +6,9 @@ project(B3a)
#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
# to build a batch mode only executable
# See the documentation for a guide on how to enable/disable specific components
#
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
if(WITH_GEANT4_UIVIS)
find_package(Geant4 REQUIRED ui_all vis_all)
else()
find_package(Geant4 REQUIRED)
endif()
#----------------------------------------------------------------------------
# Setup Geant4 include directories and compile definitions
# Setup include directory for this project
#
include(${Geant4_USE_FILE})
include_directories(${PROJECT_SOURCE_DIR}/include)
find_package(Geant4 REQUIRED ui_all vis_all)
#----------------------------------------------------------------------------
# Locate sources and headers for this project
@@ -31,10 +18,11 @@ file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
# Add the executable, use our local headers, and link it to the Geant4 libraries
#
add_executable(exampleB3a exampleB3a.cc ${sources} ${headers})
target_link_libraries(exampleB3a ${Geant4_LIBRARIES})
target_include_directories(exampleB3a PRIVATE include)
target_link_libraries(exampleB3a PRIVATE ${Geant4_LIBRARIES})
#----------------------------------------------------------------------------
# Copy all scripts to the build directory, i.e. the directory in which we
@@ -58,14 +46,3 @@ foreach(_script ${EXAMPLEB3_SCRIPTS})
COPYONLY
)
endforeach()
#----------------------------------------------------------------------------
# For internal Geant4 use - but has no effect if you build this
# example standalone
#
add_custom_target(B3a DEPENDS exampleB3a)
#----------------------------------------------------------------------------
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
#
install(TARGETS exampleB3a DESTINATION bin )
+9 -7
View File
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -19,6 +19,8 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
WWW : http://geant4.org/
**************************************************************
Accumulable registered as "accumulable_0"
Accumulable registered as "accumulable_1"
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
@@ -31,7 +33,6 @@ Registered graphics systems are:
RayTracer (RayTracer)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
@@ -260,10 +261,13 @@ Bremsstrahlung energy threshold above which
primary e+- is added to the list of secondary 100 TeV
Bremsstrahlung energy threshold above which primary
muon/hadron is added to the list of secondary 100 TeV
Positron annihilation at rest model SimplePositronium
Enable 3 gamma annihilation on fly 0
Lowest triplet kinetic energy 1 MeV
Enable sampling of gamma linear polarisation 0
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
Use Ricardo-Gerardo pair production model 0
Livermore data directory epics_2017
=======================================================================
====== Ionisation Parameters ========
@@ -449,7 +453,7 @@ ionIoni: for GenericIon XStype:3 SubType=2
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 3, fluct: 1, linLossLim= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 2 MeV
Bragg : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
======================================================================
====== Radioactive Decay Physics Parameters =======
@@ -711,8 +715,6 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
### Run 0 starts.
### Run 0 start.
@@ -740,8 +742,8 @@ Setting was ignored.
--> Event 9000 starts.
--------------------End of Global Run-----------------------
The run was 10000 events Nb of 'good' e+ annihilations: 1308
Total dose in patient : 305.937 picoGy
The run was 10000 events Nb of 'good' e+ annihilations: 1306
Total dose in patient : 306.658 picoGy
------------------------------------------------------------
... write file : scoring.root - done
+2 -2
View File
@@ -61,8 +61,8 @@ RunAction::RunAction()
// Register accumulable to the accumulable manager
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
accumulableManager->RegisterAccumulable(fGoodEvents);
accumulableManager->RegisterAccumulable(fSumDose);
accumulableManager->Register(fGoodEvents);
accumulableManager->Register(fSumDose);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+5 -28
View File
@@ -6,22 +6,9 @@ project(B3b)
#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
# to build a batch mode only executable
# See the documentation for a guide on how to enable/disable specific components
#
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
if(WITH_GEANT4_UIVIS)
find_package(Geant4 REQUIRED ui_all vis_all)
else()
find_package(Geant4 REQUIRED)
endif()
#----------------------------------------------------------------------------
# Setup Geant4 include directories and compile definitions
# Setup include directory for this project
#
include(${Geant4_USE_FILE})
include_directories(${PROJECT_SOURCE_DIR}/include)
find_package(Geant4 REQUIRED ui_all vis_all)
#----------------------------------------------------------------------------
# Locate sources and headers for this project
@@ -31,10 +18,11 @@ file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
# Add the executable, use our local headers, and link it to the Geant4 libraries
#
add_executable(exampleB3b exampleB3b.cc ${sources} ${headers})
target_link_libraries(exampleB3b ${Geant4_LIBRARIES})
target_include_directories(exampleB3b PRIVATE include)
target_link_libraries(exampleB3b PRIVATE ${Geant4_LIBRARIES})
#----------------------------------------------------------------------------
# Copy all scripts to the build directory, i.e. the directory in which we
@@ -58,14 +46,3 @@ foreach(_script ${EXAMPLEB3_SCRIPTS})
COPYONLY
)
endforeach()
#----------------------------------------------------------------------------
# For internal Geant4 use - but has no effect if you build this
# example standalone
#
add_custom_target(B3b DEPENDS exampleB3b)
#----------------------------------------------------------------------------
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
#
install(TARGETS exampleB3b DESTINATION bin )
+8 -8
View File
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -31,7 +31,6 @@ Registered graphics systems are:
RayTracer (RayTracer)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
@@ -260,10 +259,13 @@ Bremsstrahlung energy threshold above which
primary e+- is added to the list of secondary 100 TeV
Bremsstrahlung energy threshold above which primary
muon/hadron is added to the list of secondary 100 TeV
Positron annihilation at rest model SimplePositronium
Enable 3 gamma annihilation on fly 0
Lowest triplet kinetic energy 1 MeV
Enable sampling of gamma linear polarisation 0
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
Use Ricardo-Gerardo pair production model 0
Livermore data directory epics_2017
=======================================================================
====== Ionisation Parameters ========
@@ -449,7 +451,7 @@ ionIoni: for GenericIon XStype:3 SubType=2
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 3, fluct: 1, linLossLim= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 2 MeV
Bragg : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
======================================================================
====== Radioactive Decay Physics Parameters =======
@@ -711,8 +713,6 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
### Run 0 starts.
### Run 0 start.
@@ -742,9 +742,9 @@ Setting was ignored.
--> Event 9000 starts.
--------------------End of Global Run-----------------------
The run was 10000 events Nb of 'good' e+ annihilations: 1308
Total dose in patient : 305.937 picoGy
Total dose in patient : 3.05937e-10 [sigma: 1.73788e-14 | error: 0.0056805 | coeff: 0.0056805 | eff: 1 | fom: 30990.3 | r2int: 3.22649e-05 | r2eff: 0 | hits: 10000 ] Gy
The run was 10000 events Nb of 'good' e+ annihilations: 1306
Total dose in patient : 306.658 picoGy
Total dose in patient : 3.06658e-10 [sigma: 1.74008e-14 | error: 0.00567435 | coeff: 0.00567435 | eff: 1 | fom: 31057.6 | r2int: 3.2195e-05 | r2eff: 0 | hits: 10000 ] Gy
------------------------------------------------------------
... write file : scoring.root - done
+4
View File
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2024-08-12 I. Hrivnacova (exampleB3-V11-02-00)
- Updated for changes in accumulables:
use new "Register" method with shorter name
## 2024-05-07 I. Hrivnacova (exampleB3-V11-02-00)
- Looping over G4THitsMap via range for loop instead of iterators.
+11
View File
@@ -162,6 +162,11 @@
(since they require no external libraries), but the OGL driver requires
that the Geant4 libraries have been built with the OpenGL option.
Since 11.1, the TSG visualization driver can also produce the "offscrean"
file output in png, jpeg, gl2ps formats without drawing on the screen.
It can be controlled via UI commands provided in '/vis/tsg' which are
demonstrated in the tsg_offscreen.mac macro in example B5.
For more information on visualization, including information on how to
install and run DAWN, OpenGL and HepRApp, see the visualization tutorials,
for example,
@@ -175,10 +180,16 @@
The user command interface is set via the G4UIExecutive class
in the main() function in exampleB3.cc
The selection of the user command interface is then done automatically
according to the Geant4 configuration or it can be done explicitly via
the third argument of the G4UIExecutive constructor (see exampleB4a.cc).
The gui.mac macros are provided in examples B2, B4 and B5. This macro
is automatically executed if Geant4 is built with any GUI session.
It is also possible to customise the icons menu bar which is
demonstrated in the icons.mac macro in example B5.
C- HOW TO RUN
- Execute exampleB3a in the 'interactive mode' with visualization