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
@@ -1,87 +0,0 @@
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
TestEm13
--------
How to compute cross sections from the transmition coefficient
( see below, item Physics).
1- GEOMETRY DEFINITION
It is a single box representing a layer of finite thickness of
homogeneous material.
Two parameters define the geometry :
- the material of the box,
- the (full) size of the box.
The default geometry (1 cm of water) is constructed in
DetectorConstruction, but the above parameters can be changed
interactively via the commands defined in DetectorMessenger.
2- PHYSICS LIST
The physics list contains the standard electromagnetic processes.
In order not to introduce 'artificial' constraints on the step size, the
multiple scattering is not instanciated, and all processes are
registered as discrete : there is no continuous energy loss.
3- AN EVENT : THE PRIMARY GENERATOR
The primary kinematic consists of a single particle starting at the edge
of the box. The type of the particle and its energy are set in
PrimaryGeneratorAction (1 MeV gamma), and can be changed via the G4
build-in commands of ParticleGun class (see the macros provided with
this example).
4- PHYSICS
An event is killed at the first step of the incident paticle.
Either the particle has interacted or is transmitted through the layer.
The cross section, also called absorption coefficient, is computed from
the rate of unaltered transmitted incident particles.
The result is compared with the 'input' data, i.e. with the cross
sections stored in the PhysicsTables and used by Geant4.
A set of macros defining various run conditions are provided.
The processes are actived/inactived in order to survey the processes
individually.
6- VISUALIZATION
The Visualization Manager is set in the main().
The initialisation of the drawing is done via the commands
/vis/... in the macro vis.mac. To get visualisation:
> /control/execute vis.mac
The detector has a default view which is a longitudinal view of the
box.
The tracks are drawn at the end of event, and erased at the end of run.
7- HOW TO START ?
execute TestEm13 in 'batch' mode from macro files :
% TestEm13 compt.mac
execute TestEm13 in 'interactive mode' with visualization :
% TestEm13
Idle> control/execute vis.mac
....
Idle> type your commands
....
Idle> exit
Macros provided in this example:
- anni.mac: e+ (10 MeV) on 5 cm Aluminium
- compton.mac: gamma (300 keV) on 1 cm Aluminium
- conv.mac: gamma (20 MeV) on 5 mm Lead
- electron.mac: e- (100 MeV) on 1 cm Aluminium
- gamma.mac: gamma (100 keV) on 1 cm Water
- photoelec.mac: gamma (100 keV) on 1 cm Iron
- proton.mac: proton (1 GeV) on 1 cm Water
@@ -1,13 +1,8 @@
\page ExampleTestEm13 Example TestEm13
///\file "electromagnetic/TestEm13/.README.txt"
///\brief Example TestEm13 README page
/*! \page ExampleTestEm13 Example TestEm13
How to compute cross sections from the transmition coefficient
( see below, \ref TestEm13_s4).
How to compute cross sections from the transmition coefficient.
\section TestEm13_s1 GEOMETRY DEFINITION
## GEOMETRY DEFINITION
It is a single box representing a layer of finite thickness of
homogeneous material.
@@ -19,14 +14,14 @@
DetectorConstruction, but the above parameters can be changed
interactively via the commands defined in DetectorMessenger.
\section TestEm13_s2 PHYSICS LIST
## PHYSICS LIST
The physics list contains the standard electromagnetic processes.
In order not to introduce 'artificial' constraints on the step size, the
multiple scattering is not instanciated, and all processes are
registered as discrete : there is no continuous energy loss.
\section TestEm13_s3 AN EVENT : THE PRIMARY GENERATOR
## AN EVENT : THE PRIMARY GENERATOR
The primary kinematic consists of a single particle starting at the edge
of the box. The type of the particle and its energy are set in
@@ -34,7 +29,7 @@
build-in commands of G4ParticleGun class (see the macros provided with
this example).
\section TestEm13_s4 PHYSICS
## PHYSICS
An event is killed at the first step of the incident paticle.
Either the particle has interacted or is transmitted through the layer.
@@ -49,36 +44,36 @@
individually.
\section TestEm13_s6 VISUALIZATION
## VISUALIZATION
The Visualization Manager is set in the main () (see TestEm13.cc).
The Visualization Manager is set in the main().
The initialisation of the drawing is done via the commands
/vis/... in the macro vis.mac. To get visualisation:
\verbatim
```
> /control/execute vis.mac
\endverbatim
```
The detector has a default view which is a longitudinal view of the
box.
The tracks are drawn at the end of event, and erased at the end of run.
\section TestEm13_s7- HOW TO START ?
## HOW TO START ?
- Execute TestEm13 in 'batch' mode from macro files :
\verbatim
% TestEm13 compt.mac
\endverbatim
```
% ./TestEm13 compt.mac
```
- Execute TestEm13 in 'interactive mode' with visualization :
\verbatim
% TestEm13
```
% ./TestEm13
Idle> control/execute vis.mac
....
Idle> type your commands
....
Idle> exit
\endverbatim
```
Macros provided in this example:
- anni.mac: e+ (10 MeV) on 5 cm Aluminium
@@ -88,5 +83,4 @@ Idle> exit
- gamma.mac: gamma (100 keV) on 1 cm Water
- photoelec.mac: gamma (100 keV) on 1 cm Iron
- proton.mac: proton (1 GeV) on 1 cm Water
*/
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/TestEm13.cc
/// \file TestEm13.cc
/// \brief Main program of the electromagnetic/TestEm13 example
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "ActionInitialization.hh"
#include "DetectorConstruction.hh"
@@ -11,7 +11,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
@@ -60,7 +60,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 Universal
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
@@ -164,7 +164,7 @@ Index : 0 used in the geometry : Yes
Start closing geometry.
--------------------------------------------------------------------------------
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
G4VoxelisationHelper::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 0 kByte
Total CPU time elapsed for geometry optimisation: 0 seconds
@@ -189,7 +189,7 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Run terminated.
Run Summary
Number of events processed : 1000000
User=1.290000s Real=1.288257s Sys=0.000000s
User=1.200000s Real=1.198041s Sys=0.000000s
======================== run summary ======================
@@ -256,7 +256,7 @@ Index : 0 used in the geometry : Yes
Run terminated.
Run Summary
Number of events processed : 1000000
User=1.310000s Real=1.313090s Sys=0.000000s
User=1.200000s Real=1.195444s Sys=0.000000s
======================== run summary ======================
@@ -277,9 +277,9 @@ Run Summary
----------------------------------------
G4 kernel has come to Quit state.
Deleting G4Run (id:1)
UserDetectorConstruction deleted 0xf5ce50
UserPhysicsList deleted 0x1210630
UserActionInitialization deleted 0x1391ec0
UserDetectorConstruction deleted 0x10c4f10
UserPhysicsList deleted 0x1379940
UserActionInitialization deleted 0x14fb1e0
UserWorkerInitialization deleted 0
UserWorkerThreadInitialization deleted 0
UserRunAction deleted.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file ActionInitialization.hh
/// \brief Definition of the ActionInitialization class
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/include/DetectorConstruction.hh
/// \file DetectorConstruction.hh
/// \brief Definition of the DetectorConstruction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/include/DetectorMessenger.hh
/// \file DetectorMessenger.hh
/// \brief Definition of the DetectorMessenger class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef DetectorMessenger_h
#define DetectorMessenger_h 1
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/include/PhysListEmLivermore.hh
/// \file PhysListEmLivermore.hh
/// \brief Definition of the PhysListEmLivermore class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PhysListEmLivermore_h
#define PhysListEmLivermore_h 1
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/include/PhysListEmPenelope.hh
/// \file PhysListEmPenelope.hh
/// \brief Definition of the PhysListEmPenelope class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PhysListEmPenelope_h
#define PhysListEmPenelope_h 1
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/include/PhysListEmStandard.hh
/// \file PhysListEmStandard.hh
/// \brief Definition of the PhysListEmStandard class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PhysListEmStandard_h
#define PhysListEmStandard_h 1
@@ -23,12 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/include/PhysicsList.hh
/// \file PhysicsList.hh
/// \brief Definition of the PhysicsList class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
// 14.10.02 (V.Ivanchenko) provide modular list on base of old PhysicsList
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/include/PhysicsListMessenger.hh
/// \file PhysicsListMessenger.hh
/// \brief Definition of the PhysicsListMessenger class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PhysicsListMessenger_h
#define PhysicsListMessenger_h 1
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/include/PrimaryGeneratorAction.hh
/// \file PrimaryGeneratorAction.hh
/// \brief Definition of the PrimaryGeneratorAction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PrimaryGeneratorAction_h
#define PrimaryGeneratorAction_h 1
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/include/Run.hh
/// \file Run.hh
/// \brief Definition of the Run class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Run_h
#define Run_h 1
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/include/RunAction.hh
/// \file RunAction.hh
/// \brief Definition of the RunAction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef RunAction_h
#define RunAction_h 1
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/include/SteppingAction.hh
/// \file SteppingAction.hh
/// \brief Definition of the SteppingAction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef SteppingAction_h
#define SteppingAction_h 1
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file ActionInitialization.cc
/// \brief Implementation of the ActionInitialization class
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/DetectorConstruction.cc
/// \file DetectorConstruction.cc
/// \brief Implementation of the DetectorConstruction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "DetectorConstruction.hh"
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/DetectorMessenger.cc
/// \file DetectorMessenger.cc
/// \brief Implementation of the DetectorMessenger class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "DetectorMessenger.hh"
@@ -23,13 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/PhysListEmLivermore.cc
/// \file PhysListEmLivermore.cc
/// \brief Implementation of the PhysListEmLivermore class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListEmLivermore.hh"
@@ -23,13 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/PhysListEmPenelope.cc
/// \file PhysListEmPenelope.cc
/// \brief Implementation of the PhysListEmPenelope class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListEmPenelope.hh"
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/PhysListEmStandard.cc
/// \file PhysListEmStandard.cc
/// \brief Implementation of the PhysListEmStandard class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListEmStandard.hh"
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/PhysicsList.cc
/// \file PhysicsList.cc
/// \brief Implementation of the PhysicsList class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysicsList.hh"
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/PhysicsListMessenger.cc
/// \file PhysicsListMessenger.cc
/// \brief Implementation of the PhysicsListMessenger class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysicsListMessenger.hh"
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/PrimaryGeneratorAction.cc
/// \file PrimaryGeneratorAction.cc
/// \brief Implementation of the PrimaryGeneratorAction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PrimaryGeneratorAction.hh"
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/Run.cc
/// \file Run.cc
/// \brief Implementation of the Run class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Run.hh"
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/RunAction.cc
/// \file RunAction.cc
/// \brief Implementation of the RunAction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "RunAction.hh"
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/SteppingAction.cc
/// \file SteppingAction.cc
/// \brief Implementation of the SteppingAction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "SteppingAction.hh"