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
File diff suppressed because it is too large Load Diff
-117
View File
@@ -1,117 +0,0 @@
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Example TextGeom
----------------
This example illustrates the use of the text geometry.
1.- GEOMETRY EXAMPLES
Several examples of text geometries are provided:
g4geom_simple.txt :
- Simple construction of materials and single placements
g4geom_matemixt.txt :
- Isotopes, elements and materials
g4geom_boolean.txt :
- Boolean solids
g4geom_reflections.txt :
- Reflections
g4geom_replicas.txt :
- Replicas
g4geom_divisions.txt :
- Divisions
g4geom_paramLinear.txt :
- Linear parameterisations
g4geom_paramSquare.txt :
- Square parameterisations
g4geom_assembly.txt :
- Assembly placements
2.- HOW TO START ?
- execute textGeom in 'batch' mode from macro file
% textGeom run.mac
It will read the geometry from a file named 'g4geom.txt', and it will create a
VRML2 file to visualise the geometry.
Therefore if you want to try any of the above-mentioned files, copy it to a
file with this name,
3.- DEFINING A SENSITIVE DETECTOR
The detector construction class ExTGDetectorConstructionWithSD shows how to
access a volume of the text geometry and assign to it a sensitive detector.
To use it, replace at exampleTextGeom.cc the line
runManager->SetUserInitialization(new ExTGDetectorConstruction);
by
runManager->SetUserInitialization(new ExTGDetectorConstructionWithSD);
and recompile.
It will use the geometry from the file 'g4geom_SD.txt'
4.- MIXING TEXT AND C++ GEOMETRIES
The detector construction class ExTGDetectorConstructionWithCpp shows how to
create a volume with C++ and place it in the world or inside a volume defined
in the text geometry.
To use it, replace at exampleTextGeom.cc the line
runManager->SetUserInitialization(new ExTGDetectorConstruction);
by
runManager->SetUserInitialization(new ExTGDetectorConstructionWithCpp);
and recompile.
It will use the geometry from the file 'g4geom_simple.txt'
5.- CREATING NEW TAGS IN THE TEXT GEOMETRY: DEFINING CUTS PER REGION
The detector construction class ExTGDetectorConstructionWithCuts, together with
ExTGRCLineProcessor, ExTGRCDetectorBuilder, ExTGRCRegionCutsMgr and
ExTGRCRegionData show how to add a couple of tags, ':REGION' and ':CUT', that
allow to define cuts per region in your input geometry text file.
To use it, replace at exampleTextGeom.cc the line
runManager->SetUserInitialization(new ExTGDetectorConstruction);
by
runManager->SetUserInitialization(new ExTGDetectorConstructionWithCuts);
and recompile.
It will use the geometry from the file 'g4geom_cutsPerRegion.txt'
6.- DUMP THE IN-MEMORY GEOMETRY TO TEXT FILE
The run action 'ExTGRunAction' triggers the writing of the in-memory Geant4
geometry to a text file.
To use it you just have to uncomment in exampleTextGeom.cc the line
runManager->SetUserAction(new ExTGRunAction);
and it will read the geometry from the file 'g4geom.txt' and will write the
geometry in a file named 'geom.txt'
@@ -1,12 +1,8 @@
///\file "persistency/P03/.README.txt"
///\brief ExampleP03 README page
/*! \page ExampleP03 Example P03
\page ExampleP03 Example P03
This example illustrates the use of the text geometry.
\section P03_s1 GEOMETRY EXAMPLES
## GEOMETRY EXAMPLES
Several examples of text geometries are provided:
@@ -38,12 +34,12 @@ g4geom_assembly.txt :
- Assembly placements
\section P03_s2 HOW TO START ?
## HOW TO START ?
Execute textGeom in 'batch' mode from macro file
\verbatim
% textGeom run.mac
\endverbatim
```
% ./textGeom run.mac
```
It will read the geometry from a file named 'g4geom.txt', and it will create a
VRML2 file to visualise the geometry.
@@ -51,50 +47,50 @@ Therefore if you want to try any of the above-mentioned files, copy it to a
file with this name,
\section P03_s3 DEFINING A SENSITIVE DETECTOR
## DEFINING A SENSITIVE DETECTOR
The detector construction class ExTGDetectorConstructionWithSD shows how to
access a volume of the text geometry and assign to it a sensitive detector.
To use it, replace at exampleTextGeom.cc the line
\verbatim
```cpp
runManager->SetUserInitialization(new ExTGDetectorConstruction);
\endverbatim
```
by
\verbatim
```cpp
runManager->SetUserInitialization(new ExTGDetectorConstructionWithSD);
\endverbatim
```
and recompile.
It will use the geometry from the file 'g4geom_SD.txt'
\section P03_s4 MIXING TEXT AND C++ GEOMETRIES
## MIXING TEXT AND C++ GEOMETRIES
The detector construction class ExTGDetectorConstructionWithCpp shows how to
create a volume with C++ and place it in the world or inside a volume defined
in the text geometry.
To use it, replace at exampleTextGeom.cc the line
\verbatim
```cpp
runManager->SetUserInitialization(new ExTGDetectorConstruction);
\endverbatim
```
by
\verbatim
```cpp
runManager->SetUserInitialization(new ExTGDetectorConstructionWithCpp);
\endverbatim
```
and recompile.
It will use the geometry from the file 'g4geom_simple.txt'
\section P03_s5 CREATING NEW TAGS IN THE TEXT GEOMETRY: DEFINING CUTS PER REGION
## CREATING NEW TAGS IN THE TEXT GEOMETRY: DEFINING CUTS PER REGION
The detector construction class ExTGDetectorConstructionWithCuts, together with
ExTGRCLineProcessor, ExTGRCDetectorBuilder, ExTGRCRegionCutsMgr and
@@ -102,32 +98,30 @@ ExTGRCRegionData show how to add a couple of tags, ':REGION' and ':CUT', that
allow to define cuts per region in your input geometry text file.
To use it, replace at exampleTextGeom.cc the line
\verbatim
```cpp
runManager->SetUserInitialization(new ExTGDetectorConstruction);
\endverbatim
```
by
\verbatim
```cpp
runManager->SetUserInitialization(new ExTGDetectorConstructionWithCuts);
\endverbatim
```
and recompile.
It will use the geometry from the file 'g4geom_cutsPerRegion.txt'
\section P03_s6 DUMP THE IN-MEMORY GEOMETRY TO TEXT FILE
## DUMP THE IN-MEMORY GEOMETRY TO TEXT FILE
The run action, ExTGRunAction, triggers the writing of the in-memory Geant4
geometry to a text file.
To use it you just have to uncomment in exampleTextGeom.cc the line
\verbatim
```cpp
runManager->SetUserAction(new ExTGRunAction);
\endverbatim
```
and it will read the geometry from the file 'g4geom.txt' and will write the
geometry in a file named 'geom.txt'
*/
+15 -15
View File
@@ -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
@@ -73,7 +73,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
@@ -210,7 +210,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
@@ -268,7 +268,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
@@ -300,7 +300,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
@@ -332,7 +332,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
@@ -364,7 +364,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
@@ -396,7 +396,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
@@ -428,7 +428,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
@@ -460,7 +460,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
@@ -510,7 +510,7 @@ Index : 2 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
@@ -520,12 +520,12 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Run terminated.
Run Summary
Number of events processed : 10
User=0.000000s Real=0.000429s Sys=0.000000s
User=0.000000s Real=0.000326s Sys=0.000000s
G4 kernel has come to Quit state.
Deleting G4Run (id:0)
UserDetectorConstruction deleted 0x1e45360
UserPhysicsList deleted 0x1e45e38
UserActionInitialization deleted 0x1eb6670
UserDetectorConstruction deleted 0xe15670
UserPhysicsList deleted 0xe16148
UserActionInitialization deleted 0xe86970
UserWorkerInitialization deleted 0
UserWorkerThreadInitialization deleted 0
UserRunAction deleted.
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/include/ExTGActionInitialization.hh
/// \brief Definition of the ActionInitialization class
/// \file ExTGActionInitialization.hh
/// \brief Definition of the ExTGActionInitialization class
#ifndef ExTGActionInitialization_h
#define ExTGActionInitialization_h 1
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGDetectorConstruction.hh
/// \file ExTGDetectorConstruction.hh
/// \brief Definition of the ExTGDetectorConstruction class
//
#ifndef ExTGDetectorConstruction_HH
#define ExTGDetectorConstruction_HH
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGDetectorConstructionWithCpp.hh
/// \file ExTGDetectorConstructionWithCpp.hh
/// \brief Definition of the ExTGDetectorConstructionWithCpp class
//
#ifndef ExTGDetectorConstructionWithCpp_HH
#define ExTGDetectorConstructionWithCpp_HH
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGDetectorConstructionWithCuts.hh
/// \file ExTGDetectorConstructionWithCuts.hh
/// \brief Definition of the ExTGDetectorConstructionWithCuts class
//
#ifndef ExTGDetectorConstructionWithCuts_HH
#define ExTGDetectorConstructionWithCuts_HH
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGDetectorConstructionWithSD.hh
/// \file ExTGDetectorConstructionWithSD.hh
/// \brief Definition of the ExTGDetectorConstructionWithSD class
//
#ifndef ExTGDetectorConstructionWithSD_h
#define ExTGDetectorConstructionWithSD_h 1
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGPrimaryGeneratorAction.hh
/// \file ExTGPrimaryGeneratorAction.hh
/// \brief Definition of the ExTGPrimaryGeneratorAction class
//
#ifndef ExTGPrimaryGeneratorAction_h
#define ExTGPrimaryGeneratorAction_h 1
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGRCDetectorBuilder.hh
/// \file ExTGRCDetectorBuilder.hh
/// \brief Definition of the ExTGRCDetectorBuilder class
//
#ifndef ExTGRCDetectorBuilder_h
#define ExTGRCDetectorBuilder_h
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGRCLineProcessor.hh
/// \file ExTGRCLineProcessor.hh
/// \brief Definition of the ExTGRCLineProcessor class
//
#ifndef ExTGRCLineProcessor_H
#define ExTGRCLineProcessor_H 1
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGRCRegionCutsMgr.hh
/// \file ExTGRCRegionCutsMgr.hh
/// \brief Definition of the ExTGRCRegionCutsMgr class
//
#ifndef ExTGRCRegionCutsMgr_h
#define ExTGRCRegionCutsMgr_h
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGRCRegionData.hh
/// \file ExTGRCRegionData.hh
/// \brief Definition of the ExTGRCRegionData class
//
#ifndef ExTGRCRegionData_h
#define ExTGRCRegionData_h
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGRunAction.hh
/// \file ExTGRunAction.hh
/// \brief Definition of the ExTGRunAction class
//
#ifndef ExTGRunAction_h
#define ExTGRunAction_h 1
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGTrackerHit.hh
/// \file ExTGTrackerHit.hh
/// \brief Definition of the ExTGTrackerHit class
//
#ifndef ExTGTrackerHit_h
#define ExTGTrackerHit_h 1
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file persistency/P03/include/ExTGTrackerSD.hh
/// \file ExTGTrackerSD.hh
/// \brief Definition of the ExTGTrackerSD class
//
#ifndef ExTGTrackerSD_h
#define ExTGTrackerSD_h 1
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/src/ExTGActionInitialization.cc
/// \file ExTGActionInitialization.cc
/// \brief Implementation of the ExTGActionInitialization class
#include "ExTGActionInitialization.hh"
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/src/ExTGDetectorConstruction.cc
/// \file ExTGDetectorConstruction.cc
/// \brief Implementation of the ExTGDetectorConstruction class
#include "ExTGDetectorConstruction.hh"
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/src/ExTGDetectorConstructionWithCpp.cc
/// \file ExTGDetectorConstructionWithCpp.cc
/// \brief Implementation of the ExTGDetectorConstructionWithCpp class
#include "ExTGDetectorConstructionWithCpp.hh"
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/src/ExTGDetectorConstructionWithCuts.cc
/// \file ExTGDetectorConstructionWithCuts.cc
/// \brief Implementation of the ExTGDetectorConstructionWithCuts class
#include "ExTGDetectorConstructionWithCuts.hh"
@@ -23,9 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
/// \file persistency/P03/src/ExTGDetectorConstructionWithSD.cc
/// \file ExTGDetectorConstructionWithSD.cc
/// \brief Implementation of the ExTGDetectorConstructionWithSD class
#include "ExTGDetectorConstructionWithSD.hh"
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/src/ExTGPrimaryGeneratorAction.cc
/// \file ExTGPrimaryGeneratorAction.cc
/// \brief Implementation of the ExTGPrimaryGeneratorAction class
#include "ExTGPrimaryGeneratorAction.hh"
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/src/ExTGRCDetectorBuilder.cc
/// \file ExTGRCDetectorBuilder.cc
/// \brief Implementation of the ExTGRCDetectorBuilder class
#include "ExTGRCDetectorBuilder.hh"
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/src/ExTGRCLineProcessor.cc
/// \file ExTGRCLineProcessor.cc
/// \brief Implementation of the ExTGRCLineProcessor class
#include "ExTGRCLineProcessor.hh"
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/src/ExTGRCRegionCutsMgr.cc
/// \file ExTGRCRegionCutsMgr.cc
/// \brief Implementation of the ExTGRCRegionCutsMgr class
#include "ExTGRCRegionCutsMgr.hh"
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/src/ExTGRCRegionData.cc
/// \file ExTGRCRegionData.cc
/// \brief Implementation of the ExTGRCRegionData class
#include "ExTGRCRegionData.hh"
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/src/ExTGRunAction.cc
/// \file ExTGRunAction.cc
/// \brief Implementation of the ExTGRunAction class
#include "ExTGRunAction.hh"
@@ -23,9 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
/// \file persistency/P03/src/ExTGTrackerHit.cc
/// \file ExTGTrackerHit.cc
/// \brief Implementation of the ExTGTrackerHit class
#include "ExTGTrackerHit.hh"
@@ -23,9 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
/// \file persistency/P03/src/ExTGTrackerSD.cc
/// \file ExTGTrackerSD.cc
/// \brief Implementation of the ExTGTrackerSD class
#include "ExTGTrackerSD.hh"
@@ -23,11 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file persistency/P03/textGeom.cc
/// \file textGeom.cc
/// \brief Main program of the persistency/P03 example
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "ExTGActionInitialization.hh"
#include "ExTGDetectorConstruction.hh"