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
@@ -23,14 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file analysis/AnaEx02/AnaEx02.cc
/// \file AnaEx02.cc
/// \brief Main program of the analysis/AnaEx02 example
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "ActionInitialization.hh"
#include "DetectorConstruction.hh"
+31 -34
View File
@@ -10,7 +10,7 @@
**************************************************************
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
@@ -70,7 +70,6 @@ You have successfully registered the following graphics systems.
Registered graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRepFile (HepRepFile)
RayTracer (RT)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
@@ -83,13 +82,12 @@ Registered graphics systems are:
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, OGLSXm_FALLBACK)
RayTracerX (RTX)
RayTracerQt (RTQt)
Qt3D (Qt3D)
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
TOOLSSG_X11_ZB (TSG_X11_ZB, TSGX11ZB)
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG, OGL)
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB, TSGZB)
You may choose a graphics system (driver) with a parameter of
the command "/vis/open" or "/vis/sceneHandler/create",
or you may omit the driver parameter and choose at run time:
@@ -202,7 +200,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
@@ -339,7 +337,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
@@ -397,7 +395,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
@@ -429,7 +427,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
@@ -461,7 +459,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
@@ -493,7 +491,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
@@ -525,7 +523,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
@@ -557,7 +555,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
@@ -589,7 +587,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
@@ -844,8 +842,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
@@ -859,9 +857,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
@@ -880,20 +877,20 @@ Max 2J for sampling of angular correlations 10
--------------------End of Run------------------------------
mean Energy in Absorber : 245.231 MeV +- 0 eV
mean Energy in Gap : 64.6941 MeV +- 0 eV
mean Energy in Absorber : 224.093 MeV +- 0 eV
mean Energy in Gap : 50.0395 MeV +- 0 eV
mean trackLength in Absorber : 60.8807 cm +- 0 fm
mean trackLength in Gap : 32.6255 cm +- 0 fm
mean trackLength in Absorber : 55.2231 cm +- 0 fm
mean trackLength in Gap : 25.4593 cm +- 0 fm
------------------------------------------------------------
----> print histograms statistic
EAbs: mean = 245.231 MeV rms = 0 eV
EGap: mean = 64.6941 MeV rms = 0 eV
LAbs: mean = 60.8807 cm rms = 0 fm
LGap: mean = 32.6255 cm rms = 0 fm
EAbs: mean = 224.093 MeV rms = 0 eV
EGap: mean = 50.0395 MeV rms = 0 eV
LAbs: mean = 55.2231 cm rms = 0 fm
LGap: mean = 25.4593 cm rms = 0 fm
----> Histograms and ntuples are saved
@@ -927,20 +924,20 @@ LGap: mean = 32.6255 cm rms = 0 fm
--------------------End of Run------------------------------
mean Energy in Absorber : 188.669 MeV +- 48.7853 MeV
mean Energy in Gap : 46.259 MeV +- 13.3455 MeV
mean Energy in Absorber : 187.729 MeV +- 50.1943 MeV
mean Energy in Gap : 46.0401 MeV +- 13.1672 MeV
mean trackLength in Absorber : 46.5752 cm +- 12.122 cm
mean trackLength in Gap : 23.4524 cm +- 6.81929 cm
mean trackLength in Absorber : 46.3759 cm +- 12.4411 cm
mean trackLength in Gap : 23.3634 cm +- 6.72305 cm
------------------------------------------------------------
----> print histograms statistic
EAbs: mean = 188.669 MeV rms = 48.7853 MeV
EGap: mean = 46.259 MeV rms = 13.3455 MeV
LAbs: mean = 46.5752 cm rms = 12.122 cm
LGap: mean = 23.4524 cm rms = 6.81929 cm
EAbs: mean = 187.729 MeV rms = 50.1943 MeV
EGap: mean = 46.0401 MeV rms = 13.1672 MeV
LAbs: mean = 46.3759 cm rms = 12.4411 cm
LGap: mean = 23.3634 cm rms = 6.72305 cm
----> Histograms and ntuples are saved
-145
View File
@@ -1,145 +0,0 @@
--------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
AnaEx02
-------
Examples AnaEx01 and AnaEx02 show the usage of histogram and tuple
manipulations using G4Analysis and ROOT compliant systems on the same
scenario. All analysis manipulations (histo booking, filling, saving histos
in a file, etc...) are located in one class : HistoManager, implementation of
which is different in each example. All the other classes are same in all
three examples.
This example shows the usage of histogram and tuple manipulations using
ROOT system. Please install ROOT before building this example:
http://root.cern
The example is an adaptation of examples/novice/N03. It describes a simple
sampling calorimeter setup.
1- Detector description
-----------------------
The calorimeter is a box made of a given number of layers. A layer
consists of an absorber plate and of a detection gap. The layer is
replicated.
Six parameters define the calorimeter :
- the material of the absorber,
- the thickness of an absorber plate,
- the material of the detection gap,
- the thickness of a gap,
- the number of layers,
- the transverse size of the calorimeter (the input face is a square).
The default geometry is constructed in DetectorConstruction class,
but all of the above parameters can be modified interactively via
the commands defined in the DetectorMessenger class.
|<----layer 0---------->|<----layer 1---------->|<----layer 2---------->|
| | | |
==========================================================================
|| | || | || | ||
|| | || | || | ||
beam || absorber | gap || absorber | gap || absorber | gap ||
======> || | || | || | ||
|| | || | || | ||
==========================================================================
2- Physics list
---------------
The particle's type and the physic processes which will be available
in this example are set in the FTFP_BERT physics list.
3- Action Initialization
------------------------
A newly introduced class, ActionInitialization,
instantiates and registers to Geant4 kernel all user action classes
which are defined thread-local and a run action class
which is defined both thread-local and global.
The thread-local action classes are defined in
ActionInitialization::Build()
and the global run action class is defined in
ActionInitialization::BuildForMaster().
Note that ActionInitialization::Build() is also used to
instatiate user action clasess in sequential mode.
4- An event : PrimaryGeneratorAction
------------------------------------
The primary kinematic consists of a single particle which hits the
calorimeter perpendicular to the input face. The type of the particle
and its energy are set in the PrimaryGeneratorAction class, and can
be changed via the G4 build-in commands of ParticleGun class.
5- Histograms
-------------
To produce histograms, ROOT system must be installed
AnaEx02 can produce 4 histograms :
EAbs : total energy deposit in absorber per event
EGap : total energy deposit in gap per event
LAbs : total track length of charged particles in absorber per event
LGap : total track length of charged particles in gap per event
And 2 Ntuples :
- Ntuple1:
- one row per event : EnergyAbs EnergyGap
- Ntuple2:
- one row per event : TrackLAbs TrackLGap
These histos and ntuples are booked in HistoManager and filled from
EventAction.
One can control the name of the histograms file :
default name : AnaEx02
format : root
See HistoManager constructor
6- How to build
---------------
An additional step is needed when building the example with GNUmake
due to using the extra shared directory:
% cd path_to_AnaEx02/AnaEx02
% gmake setup
% gmake
This will copy the files from shared in the example include and src;
to remove these files:
% gmake clean_setup
7- How to run
--------------
- Execute AnaEx02 in the 'interactive mode' with visualization:
% ./AnaEx02
and type in the commands from run.mac line by line:
Idle> /control/verbose 2
Idle> /tracking/verbose 1
Idle> /run/beamOn 10
Idle> ...
Idle> exit
or
Idle> /control/execute run.mac
....
Idle> exit
- Execute AnaEx02 in the 'batch' mode from macro files
(without visualization)
% ./AnaEx02 run.mac
% ./AnaEx02 run.mac > run.out
The AnaEx02.in macro is used in Geant4 testing.
@@ -1,8 +1,4 @@
///\file "analysis/AnaEx02/.README.txt"
///\brief Example AnaEx02 README page
/*! \page ExampleAnaEx02 Example AnaEx02
\page ExampleAnaEx02 Example AnaEx02
Examples AnaEx01 and AnaEx02 show the usage of histogram and tuple
manipulations using G4Analysis and ROOT compliant systems on the same
@@ -18,7 +14,7 @@
The example is an adaptation of examples/novice/N03. It describes a simple
sampling calorimeter setup.
\section AnaEx02_s1 Detector description
## Detector description
The calorimeter is a box made of a given number of layers. A layer
consists of an absorber plate and of a detection gap. The layer is
@@ -49,12 +45,12 @@
</pre>
\section AnaEx02_s2 Physics list
## Physics list
The particle's type and the physic processes which will be available
in this example are set in the FTFP_BERT physics list.
\section AnaEx02_s3 Action Initialization
## Action Initialization
A newly introduced class, ActionInitialization,
instantiates and registers to Geant4 kernel all user action classes
@@ -68,7 +64,7 @@
Note that ActionInitialization::Build() is also used to
instatiate user action clasess in sequential mode.
\section AnaEx02_s4 An event : PrimaryGeneratorAction
## An event : PrimaryGeneratorAction
The primary kinematic consists of a single particle which hits the
calorimeter perpendicular to the input face. The type of the particle
@@ -76,7 +72,7 @@
be changed via the G4 build-in commands of ParticleGun class.
\section AnaEx02_s5 Histograms
## Histograms
To produce histograms, ROOT system must be installed
@@ -102,26 +98,26 @@
See HistoManager constructor
\section AnaEx02_s6 How to build
## How to build
An additional step is needed when building the example with GNUmake
due to using the extra shared directory:
\verbatim
```
% cd path_to_AnaEx02/AnaEx02
% gmake setup
% gmake
\endverbatim
```
This will copy the files from shared in the example include and src;
to remove these files:
\verbatim
```
% gmake clean_setup
\endverbatim
```
\section AnaEx02_s8 HOW TO RUN
## HOW TO RUN
- Execute AnaEx02 in the 'interactive mode' with visualization
\verbatim
```
% ./AnaEx02
and type in the commands from run.mac line by line:
Idle> /control/verbose 2
@@ -129,21 +125,19 @@ Idle> /tracking/verbose 1
Idle> /run/beamOn 10
Idle> ...
Idle> exit
\endverbatim
```
or
\verbatim
```
Idle> /control/execute run.mac
....
Idle> exit
\endverbatim
```
- Execute AnaEx02 in the 'batch' mode from macro files
(without visualization)
\verbatim
```
% ./AnaEx02 run.mac
% ./AnaEx02 run.mac > run.out
\endverbatim
```
The AnaEx02.in macro is used in Geant4 testing.
*/
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file analysis/AnaEx02/include/HistoManager.hh
/// \file HistoManager.hh
/// \brief Definition of the HistoManager class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef HistoManager_h
#define HistoManager_h 1
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file ActionInitialization.hh
/// \brief Definition of the ActionInitialization class
@@ -26,9 +26,6 @@
/// \file DetectorConstruction.hh
/// \brief Definition of the DetectorConstruction class
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
@@ -26,9 +26,6 @@
/// \file DetectorMessenger.hh
/// \brief Definition of the DetectorMessenger class
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef DetectorMessenger_h
#define DetectorMessenger_h 1
@@ -25,13 +25,6 @@
//
/// \file EventAction.hh
/// \brief Definition of the EventAction class
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef EventAction_h
#define EventAction_h 1
@@ -26,9 +26,6 @@
/// \file PrimaryGeneratorAction.hh
/// \brief Definition of the PrimaryGeneratorAction class
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PrimaryGeneratorAction_h
#define PrimaryGeneratorAction_h 1
@@ -25,13 +25,6 @@
//
/// \file RunAction.hh
/// \brief Definition of the RunAction class
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef RunAction_h
#define RunAction_h 1
@@ -26,9 +26,6 @@
/// \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
@@ -26,9 +26,6 @@
/// \file DetectorConstruction.cc
/// \brief Implementation of the DetectorConstruction class
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "DetectorConstruction.hh"
#include "DetectorMessenger.hh"
@@ -26,9 +26,6 @@
/// \file DetectorMessenger.cc
/// \brief Implementation of the DetectorMessenger class
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "DetectorMessenger.hh"
#include "DetectorConstruction.hh"
@@ -25,13 +25,6 @@
//
/// \file EventAction.cc
/// \brief Implementation of the EventAction class
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "EventAction.hh"
@@ -26,9 +26,6 @@
/// \file PrimaryGeneratorAction.cc
/// \brief Implementation of the PrimaryGeneratorAction class
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PrimaryGeneratorAction.hh"
#include "DetectorConstruction.hh"
@@ -25,11 +25,6 @@
//
/// \file RunAction.cc
/// \brief Implementation of the RunAction class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "RunAction.hh"
@@ -26,9 +26,6 @@
/// \file SteppingAction.cc
/// \brief Implementation of the SteppingAction class
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "SteppingAction.hh"
#include "DetectorConstruction.hh"
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file analysis/AnaEx02/src/HistoManager.cc
/// \file HistoManager.cc
/// \brief Implementation of the HistoManager class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "HistoManager.hh"