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
=========================================================
TestEm8
-------
Example for investigation of ionisation in thin absorbers and gaseous
detectors
1- GEOMETRY DEFINITION
The target is a cylinder made of a given material placed inside
cylindrical container, which is placed inside the world volume.
Following parameters define the geometry:
- the material of the target,
- the thickness of the target,
- the radius of the target,
- the material of the container,
- the thickness of the container,
- the material of the world.
The list of materials used in gaseous detectors are built inside
the DetectorConstruction class, also NIST materials are available.
The default geometry is provided but all parameters can be changed via
UI commands defined in the DetectorMessenger class, for example,
/testem/setGasMat XeCH4C3H8
/testem/setWindowMat G4_MYLAR
/testem/setWorldMat G4_AIR
/testem/setGasThick 10 cm
/testem/setGasRad 20 cm
/testem/setWindowThick 50 um
2- AN EVENT : THE PRIMARY GENERATOR
The primary kinematic consists of a single particle which hits the
absorber perpendicular to the input face. The type of the particle
and its energy can be set via the G4 build-in commands of G4ParticleGun.
A RUN is a set of events.
3- DETECTOR RESPONSE
The TargetSD class sending information about each step inside the target
to the HistoManager class scoring of energy deposition in the detector.
Additionally at each step of a particle inside the target the number of
ionisation clusters is sampled using G4ElectronIonPair helper class. The
parameter of transformation of energy into ionisation clusters can be
set via UI command:
/testem/setPairEnergy 19 eV
4- PHYSICS
The particle's type and the physics processes which will be available
in this example are set in PhysicsList class, which uses Geant4
EM physics constructors provided in the physics_list library.
The messenger classes introduce interactive commands. In particular,
PAI ionisation model can be added using G4EmConfigurator helper class,
which is invoked by one following UI commands:
/testem/phys/addPhysics pai
/testem/phys/addPhysics pai_photon
/process/em/AddPAIRegion all GasDetector pai
/process/em/AddPAIRegion all GasDetector pai_photon
Cuts for all setup and/or for sensitive volume may changed via commands:
/run/setCut 0.5 mm
/run/setCutForRegion GasDetector 1.8 mm
5- HOW TO START ?
Execute TestEm8 in 'batch' mode from macro files e.g.
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm8 TestEm8.in N
here N means number of threads in multi-threaded mode, by
default 2 threads are used
- execute TestEm8 in 'interactive' mode with visualization e.g.
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm8
....
Idle> type your commands
....
@@ -1,13 +1,9 @@
///\file "electromagnetic/TestEm8/.README.txt"
///\brief Example TestEm8 README page
/*! \page ExampleTestEm8 Example TestEm8
\page ExampleTestEm8 Example TestEm8
Example for investigation of ionisation in thin absorbers and gaseous
detectors
\section TestEm8_s1 GEOMETRY DEFINITION
## GEOMETRY DEFINITION
The target is a cylinder made of a given material placed inside
cylindrical container, which is placed inside the world volume.
@@ -25,23 +21,23 @@
The default geometry is provided but all parameters can be changed via
UI commands defined in the DetectorMessenger class, for example,
\verbatim
```
/testem/setGasMat XeCH4C3H8
/testem/setWindowMat G4_MYLAR
/testem/setWorldMat G4_AIR
/testem/setGasThick 10 cm
/testem/setGasRad 20 cm
/testem/setWindowThick 50 um
\endverbatim
```
\section TestEm8_s2 AN EVENT : THE PRIMARY GENERATOR
## AN EVENT : THE PRIMARY GENERATOR
The primary kinematic consists of a single particle which hits the
absorber perpendicular to the input face. The type of the particle
and its energy can be set via the G4 build-in commands of G4ParticleGun .
A RUN is a set of events.
\section TestEm8_s3 DETECTOR RESPONSE
## DETECTOR RESPONSE
The TargetSD class sending information about each step inside the target
to the HistoManager class scoring of energy deposition in the detector.
@@ -50,11 +46,11 @@
parameter of transformation of energy into ionisation clusters can be
set via UI command:
\verbatim
```
/testem/setPairEnergy 19 eV
\endverbatim
```
\section TestEm8_s4 PHYSICS
## PHYSICS
The particle's type and the physics processes which will be available
in this example are set in PhysicsList class, which uses Geant4
@@ -64,25 +60,33 @@
PAI ionisation model can be added using G4EmConfigurator helper class,
which is invoked by the UI command
\verbatim
```
/testem/phys/addPhysics pai
\endverbatim
/testem/phys/addPhysics pai_photon
/process/em/AddPAIRegion all GasDetector pai
/process/em/AddPAIRegion all GasDetector pai_photon
```
\section TestEm8_s5- HOW TO START ?
Cuts for all setup and/or for sensitive volume may changed via commands:
```
/run/setCut 0.5 mm
/run/setCutForRegion GasDetector 1.8 mm
```
## HOW TO START ?
- Execute TestEm8 in 'batch' mode from macro files e.g.
\verbatim
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm8 TestEm8.in N
\endverbatim
```
% ./TestEm8 TestEm8.in N
```
here N means number of threads in multi-threaded mode, by
default 2 threads are used
- Execute TestEm8 in 'interactive' mode with visualization e.g.
\verbatim
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm8
```
% ./TestEm8
....
Idle> type your commands
....
\endverbatim
*/
```
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/TestEm8.cc
/// \file TestEm8.cc
/// \brief Main program of the electromagnetic/TestEm8 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
@@ -555,7 +555,7 @@ Index : 2 used in the geometry : Yes
Run terminated.
Run Summary
Number of events processed : 1000
User=0.010000s Real=0.015762s Sys=0.000000s
User=0.010000s Real=0.009889s Sys=0.000000s
RunAction: End of run actions are started 1 Nevt= 1000 Edep= 0.0166294
====================================================
Beam Particle: proton
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/// \file ActionInitialization.hh
/// \brief Definition of the ActionInitialization class
#ifndef ActionInitialization_h
#define ActionInitialization_h 1
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/include/DetectorConstruction.hh
/// \file DetectorConstruction.hh
/// \brief Definition of the DetectorConstruction class
//
//
/////////////////////////////////////////////////////////////////////////
//
// TestEm8: Gaseous detector
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/include/DetectorMessenger.hh
/// \file DetectorMessenger.hh
/// \brief Definition of the DetectorMessenger class
//
//
/////////////////////////////////////////////////////////////////////////
//
// TestEm8: Gaseous detector
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/include/EventAction.hh
/// \file EventAction.hh
/// \brief Definition of the EventAction class
//
//
//---------------------------------------------------------------------------
//
// ClassName: EventAction
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/include/PhysicsList.hh
/// \file PhysicsList.hh
/// \brief Definition of the PhysicsList class
//
//
//---------------------------------------------------------------------------
//
// ClassName: PhysicsList
@@ -23,11 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/include/PhysicsListMessenger.hh
/// \file PhysicsListMessenger.hh
/// \brief Definition of the PhysicsListMessenger class
//
//
//
//---------------------------------------------------------------------------
//
// ClassName: PhysicsListMessenger
@@ -23,11 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/include/PrimaryGeneratorAction.hh
/// \file PrimaryGeneratorAction.hh
/// \brief Definition of the PrimaryGeneratorAction class
//
//
//
/////////////////////////////////////////////////////////////////////////
//
// TestEm8: Gaseous detector
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/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,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/include/RunAction.hh
/// \file RunAction.hh
/// \brief Definition of the RunAction class
//
//
//---------------------------------------------------------------------------
//
// ClassName: RunAction
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/include/StackingAction.hh
/// \file StackingAction.hh
/// \brief Definition of the StackingAction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef StackingAction_h
#define StackingAction_h 1
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/include/StackingMessenger.hh
/// \file StackingMessenger.hh
/// \brief Definition of the StackingMessenger class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef StackingMessenger_h
#define StackingMessenger_h 1
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/// \file StepMax.hh
/// \brief Definition of the StepMax class
#ifndef StepMax_h
#define StepMax_h 1
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/include/TargetSD.hh
/// \file TargetSD.hh
/// \brief Definition of the TargetSD class
//
//
/////////////////////////////////////////////////////////////////////////
//
// TestEm8: Gaseous detector
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/include/TestParameters.hh
/// \file TestParameters.hh
/// \brief Definition of the TestParameters class
//
//
//---------------------------------------------------------------------------
//
// ClassName: HistoManager
@@ -23,10 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
/// \file ActionInitialization.cc
/// \brief Implementation of the ActionInitialization class
#include "ActionInitialization.hh"
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/DetectorConstruction.cc
/// \file DetectorConstruction.cc
/// \brief Implementation of the DetectorConstruction class
//
//
/////////////////////////////////////////////////////////////////////////
//
// TestEm8: Gaseous detector
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/DetectorMessenger.cc
/// \file DetectorMessenger.cc
/// \brief Implementation of the DetectorMessenger class
//
//
/////////////////////////////////////////////////////////////////////////
//
// TestEm8: Gaseous detector
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/EventAction.cc
/// \file EventAction.cc
/// \brief Implementation of the EventAction class
//
//
//---------------------------------------------------------------------------
//
// ClassName: EventAction
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/PhysicsList.cc
/// \file PhysicsList.cc
/// \brief Implementation of the PhysicsList class
//
//
//---------------------------------------------------------------------------
//
// ClassName: PhysicsList
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/PhysicsListMessenger.cc
/// \file PhysicsListMessenger.cc
/// \brief Implementation of the PhysicsListMessenger class
//
//
//---------------------------------------------------------------------------
//
// ClassName: PhysicsListMessenger
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/PrimaryGeneratorAction.cc
/// \file PrimaryGeneratorAction.cc
/// \brief Implementation of the PrimaryGeneratorAction class
//
//
/////////////////////////////////////////////////////////////////////////
//
// TestEm8: Gaseous detector
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/Run.cc
/// \file Run.cc
/// \brief Implementation of the Run class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Run.hh"
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/RunAction.cc
/// \file RunAction.cc
/// \brief Implementation of the RunAction class
//
//
//---------------------------------------------------------------------------
//
// ClassName: RunAction
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/StackingAction.cc
/// \file StackingAction.cc
/// \brief Implementation of the StackingAction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "StackingAction.hh"
@@ -23,12 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/StackingMessenger.cc
/// \file StackingMessenger.cc
/// \brief Implementation of the StackingMessenger class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "StackingMessenger.hh"
@@ -23,9 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
/// \file StepMax.cc
/// \brief Implementation of the StepMax class
#include "StepMax.hh"
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/TargetSD.cc
/// \file TargetSD.cc
/// \brief Implementation of the TargetSD class
//
//
/////////////////////////////////////////////////////////////////////////
//
// TestEm8: Gaseous detector
@@ -23,10 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm8/src/TestParameters.cc
/// \file TestParameters.cc
/// \brief Implementation of the TestParameters class
//
//
//---------------------------------------------------------------------------
//
// ClassName: TestParameters