Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-12 17:16:06 +01:00
parent 80e2389dd8
commit 84f33a068c
593 changed files with 68589 additions and 1 deletions
@@ -0,0 +1,26 @@
///\file "physicslists/.README.txt"
///\brief Examples physicslists README page
/*! \page Examples_physicslists Category "physicslists"
Examples in this directory demonstrate usage of Geant4 reference physics lists
and physics builders.
\link Examplefactory factory \endlink
Demonstrates the usage of G4PhysListFactory to build the concrete physics list
\link ExampleextensibleFactory extensibleFactory \endlink
Demonstrates the usage of extensible g4alt::G4PhysListFactory to build a
concrete physics list. It also demonstrates the setting of an alternative
"default" physics list; extending existing lists by adding/replacing physics
constructors; and extending the factory with user supplied physics lists.
\link ExamplegenericPL genericPL \endlink
Demonstrates the usage of G4GenericPhysicsList to build the concrete physics
list at the run time.
*/
+26
View File
@@ -0,0 +1,26 @@
Geant4 extended examples - physicslists
----------------------------------------
Examples in this directory demonstrate usage of Geant4 reference physics lists
and physics builders.
factory
--------
Demonstrates the usage of G4PhysListFactory to build the concrete physics list
extensibleFactory
-----------------
Demonstrates the usage of extensible g4alt::G4PhysListFactory to build a
concrete physics list. It also demonstrates the setting of an alternative
"default" physics list; extending existing lists by adding/replacing physics
constructors; and extending the factory with user supplied physics lists.
genericPL
---------
Demonstrates the usage of G4GenericPhysicsList to build the concrete physics
list at the run time.
@@ -0,0 +1,95 @@
///\file "physicslists/extensibleFactory/.README.txt"
///\brief Example extensibleFactory README page
/*! \page ExampleextensibleFactory Example extensibleFactory
\author R. Hatcher \n
Fermilab \n
(based on Hadr00 by V. Ivantchenko, CERN)
Examples in the physicslist category show the possible ways how to define
a physics list from Geant4 physics constructors. This example demonstrates
the usage of g4alt::G4PhysListFactory to build a concrete physics list.
Physics List can be defined by its name given by the -p argument of the of the
run command or by the PHYSLIST environment variable.
\verbatim
./extensibleFactory -m my.macro [ -p QGSP_BERT ] \
[ -v | --verbose ] [ -h | --help ]
\endverbatim
By default, FTFP_BERT Physics List will be instantiated if
-p argument is not set and the PHYSLIST environment variable is not defined.
This is the system default, but can be overridden using the
SetDefaultReferencePhysList() method on the factory (see the code).
The extensible factory allows users to define and register their own physics
lists. This example shows the addtional a new list "MySpecialPhysList".
\verbatim
./extensibleFactory -m run.mac -p MySpecialPhysList
\endverbatim
The extensible factory also allows for the extension of lists by adding
(using "+" as a separator) or replacing (using "_" as a separator)
specific physics constructors. These can be specified by
pre-defining a short name (e.g. RADIO for G4RadioactiveDecayPhysics) or
providing the full class name.
\verbatim
./extensibleFactory -m run.mac -p FTFP_BERT_EMX+G4OpticalPhysics+RADIO
\endverbatim
uses the FTFP_BERT physics list as a base
- replaces the list's standard EM portion with
G4EmStandardPhysics_option2 ( standard EMX extension )
- adds G4OpticalPhysics
- adds G4RadioactiveDecayPhysics (RADIO defined in code to map to this)
The same experimental setup is used for all examples in the physicslist category:
\section extensibleFactory_s1 Detector description
The geometry (defined in the DetectorConstruction class) consists in a box of scintillator material (CsI) followed by a thin box of air (screen) which is used to simplify scoring.
\section extensibleFactory_s2 Primary generator
The primary generator is defined with usage of G4ParticleGun.
The default particle is proton which hits the box 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 built-in commands of the G4ParticleGun class.
\section extensibleFactory_s3 Scoring (ntuples)
The screen volume is associated with a sensitive detector, ScreenSD,
which accounts the following particle properties:
- trackID
- particle PDG encoding
- particle kinetic energy
- particle X,Y position
- particle time
The scored quantities are filled in the Screen ntuple, which is defined using G4AnalysisManager
in RunAction class. The ntuple is saved in a Root file, which name is set to be equal to the
example name in main () function.
\section extensibleFactory_s4 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_example/example
% 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
*/
@@ -0,0 +1,93 @@
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Example extensibleFactory
R. Hatcher
Fermilab
(based on Hadr00 by V. Ivantchenko, CERN)
Examples in the physicslist category show the possible ways how to define
a physics list from Geant4 physics constructors. This example demonstrates
the usage of g4alt::G4PhysListFactory to build the concrete physics list.
Physics List can be defined by its name given by the -p argument of the of the
run command or by the PHYSLIST environment variable.
./extensibleFactory -m my.macro [ -p QGSP_BERT ] \
[ -v | --verbose ] [ -h | --help ]
By default, FTFP_BERT Physics List will be instantiated if
-p argument is not set and the PHYSLIST environment variable is not defined.
This is the system default, but can be overridden using the
SetDefaultReferencePhysList() method on the factory (see the code).
The extensible factory allows users to define and register their own physics
lists. This example shows the addtional a new list "MySpecialPhysList".
./extensibleFactory -m run.mac -p MySpecialPhysList
The extensible factory also allows for the extension of lists by adding
(using "+" as a separator) or replacing (using "_" as a separator)
specific physics constructors. These can be specified by
pre-defining a short name (e.g. RADIO for G4RadioactiveDecayPhysics) or
providing the full class name.
./extensibleFactory -m run.mac -p FTFP_BERT_EMX+G4OpticalPhysics+RADIO
uses the FTFP_BERT physics list as a base
* replaces the list's standard EM portion with
G4EmStandardPhysics_option2 ( standard EMX extension )
* adds G4OpticalPhysics
* adds G4RadioactiveDecayPhysics (RADIO defined in code to map to this)
The same experimental setup is used for all examples in the physicslist
category:
1- Detector description
-----------------------
The geometry (defined in the DetectorConstruction class) consists in a box of
scintillator material (CsI) followed by a thin box of air (screen) which is used
to simplify scoring.
2- Primary generator
--------------------
The primary generator is defined with usage of G4ParticleGun.
The default particle is proton which hits the box 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 built-in commands of the G4ParticleGun class.
3- Scoring (ntuples)
--------------------
The screen volume is associated with a sensitive detector, ScreenSD,
which accounts the following particle properties:
- trackID
- particle PDG encoding
- particle kinetic energy
- particle X,Y position
- particle time
The scored quantities are filled in the Screen ntuple, which is defined using G4AnalysisManager
in RunAction class. The ntuple is saved in a Root file, which name is set to be equal to the
example name in main () function.
4- How to build
----------------
An additional step is needed when building the example with GNUmake
due to using the extra shared directory:
% cd path_to_example/example
% gmake setup
% gmake
This will copy the files from shared in the example include and src;
to remove these files:
% gmake clean_setup
@@ -0,0 +1,69 @@
///\file "physicslists/factory/.README.txt"
///\brief Example factory README page
/*! \page Examplefactory Example factory
\author I. Hrivnacova \n
Institut de Physique Nucléaire (IPNO), Université Paris-Sud, CNRS-IN2P3 \n
(Based on Hadr00 by V. Ivantchenko, CERN)
Examples in the physicslist category show the possible ways how to define
a physics list from Geant4 physics constructors. This example demonstrates
the usage of G4PhysListFactory to build the concrete physics list.
Physics List can be defined by its name given by the -p argument of the of the
run command or by the PHYSLIST environment variable.
\verbatim
./factory -m my.macro [ -p QGSP_BERT ]
\endverbatim
By default, FTFP_BERT Physics List will be instantiated if
-p argument is not set and the PHYSLIST environment variable is not defined.
The same experimental setup is used for all examples in the physicslist category:
\section factory_s1 Detector description
The geometry (defined in the DetectorConstruction class) consists in a box of scintillator material (CsI) followed by a thin box of air (screen) which is used to simplify scoring.
\section factory_s2 Primary generator
The primary generator is defined with usage of G4ParticleGun.
The default particle is proton which hits the box 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 built-in commands of the G4ParticleGun class.
\section factory_s3 Scoring (ntuples)
The screen volume is associated with a sensitive detector, ScreenSD,
which accounts the following particle properties:
- trackID
- particle PDG encoding
- particle kinetic energy
- particle X,Y position
- particle time
The scored quantities are filled in the Screen ntuple, which is defined using G4AnalysisManager
in RunAction class. The ntuple is saved in a Root file, which name is set to be equal to the
example name in main () function.
\section factory_s4 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_example/example
% 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
*/
@@ -0,0 +1,69 @@
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Example factory
I. Hrivnacova,
Institut de Physique Nucléaire (IPNO), Université Paris-Sud, CNRS-IN2P3
Based on Hadr00 by V. Ivantchenko, CERN
Examples in the physicslist category show the possible ways how to define
a physics list from Geant4 physics constructors. This example demonstrates
the usage of G4PhysListFactory to build the concrete physics list.
Physics List can be defined by its name given by the -p argument of the of the
run command or by the PHYSLIST environment variable.
./factory -m my.macro [ -p QGSP_BERT ]
By default, FTFP_BERT Physics List will be instantiated if
-p argument is not set and the PHYSLIST environment variable is not defined.
The same experimental setup is used for all examples in the physicslist category:
1- Detector description
-----------------------
The geometry (defined in the DetectorConstruction class) consists in a box of scintillator material (CsI) followed by a thin box of air (screen) which is used to simplify scoring.
2- Primary generator
--------------------
The primary generator is defined with usage of G4ParticleGun.
The default particle is proton which hits the box 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 built-in commands of the G4ParticleGun class.
3- Scoring (ntuples)
--------------------
The screen volume is associated with a sensitive detector, ScreenSD,
which accounts the following particle properties:
- trackID
- particle PDG encoding
- particle kinetic energy
- particle X,Y position
- particle time
The scored quantities are filled in the Screen ntuple, which is defined using G4AnalysisManager
in RunAction class. The ntuple is saved in a Root file, which name is set to be equal to the
example name in main () function.
4- How to build
----------------
An additional step is needed when building the example with GNUmake
due to using the extra shared directory:
% cd path_to_example/example
% gmake setup
% gmake
This will copy the files from shared in the example include and src;
to remove these files:
% gmake clean_setup
@@ -0,0 +1,86 @@
///\file "physicslists/genericPL/.README.txt"
///\brief Example genericPL README page
/*! \page ExamplegenericPL Example genericPL
\author W. Pokorski(1), I. Hrivnacova(2) \n
(1) CERN \n
(2) Institut de Physique Nucléaire (IPNO), Université Paris-Sud, CNRS-IN2P3 \n
Examples in the physicslist category show the possible ways how to define
a physics list from Geant4 physics constructors. This example demonstrates
the usage of G4GenericPhysicsList to build the concrete physics list at
the run time.
In Geant4 versions < 10.4, the generic physics list was demonstrated in the
extended/hadronic/Hadr05 example.
The G4GenericPhysicsList class allows to build the physics list at the run
time in two possible ways, either by processing a macro file
containing the 'physics list' or by passing a vector of 'physics
constructors' names to the constructor of the class.
To run the example you can call
\verbatim
./genericPL -m run.mac [ -p FTFP_BERT.mac ]
\endverbatim
where FTFP_BERT.mac is the macro file containing the 'physics list'.
If you run this example by calling
\verbatim
./genericPL -m run.mac
\endverbatim
the physics list will be constructed by using a vector of the names of
the different physics constructor defined in the genericPL.cc file.
The same experimental setup is used for all examples in the physicslist category:
\section genericPL_s1 Detector description
The geometry (defined in the DetectorConstruction class) consists in a box of scintillator material (CsI) followed by a thin box of air (screen) which is used to simplify scoring.
\section genericPL_s2 Primary generator
The primary generator is defined with usage of G4ParticleGun.
The default particle is proton which hits the box 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 built-in commands of the G4ParticleGun class.
\section genericPL_s3 Scoring (ntuples)
The screen volume is associated with a sensitive detector, ScreenSD,
which accounts the following particle properties:
- trackID
- particle PDG encoding
- particle kinetic energy
- particle X,Y position
- particle time
The scored quantities are filled in the Screen ntuple, which is defined using G4AnalysisManager
in RunAction class. The ntuple is saved in a Root file, which name is set to be equal to the
example name in main () function.
\section genericPL_s4 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_example/example
% 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
*/
@@ -0,0 +1,85 @@
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Example genericPL
W. Pokorski (1)
I. Hrivnacova (2)
(1) CERN
(2) Institut de Physique Nucléaire (IPNO), Université Paris-Su
Examples in the physicslist category show the possible ways how to define
a physics list from Geant4 physics constructors. This example demonstrates
the usage of G4GenericPhysicsList to build the concrete physics list at
the run time.
In Geant4 versions < 10.4, the generic physics list was demonstrated in the
extended/hadronic/Hadr05 example.
The G4GenericPhysicsList class allows to build the physics list at the run
time in two possible ways, either by processing a macro file
containing the 'physics list' or by passing a vector of 'physics
constructors' names to the constructor of the class.
To run the example you can call
./genericPL -m run.mac [ -p FTFP_BERT.mac ]
where FTFP_BERT.mac is the macro file containing the 'physics list'.
If you run this example by calling
./genericPL -m run.mac
the physics list will be constructed by using a vector of the names of
the different physics constructor defined in the genericPL.cc file.
The same experimental setup is used for all examples in the physicslist category:
1- Detector description
-----------------------
The geometry (defined in the DetectorConstruction class) consists in a box of scintillator material (CsI) followed by a thin box of air (screen) which is used to simplify scoring.
2- Primary generator
--------------------
The primary generator is defined with usage of G4ParticleGun.
The default particle is proton which hits the box 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 built-in commands of the G4ParticleGun class.
3- Scoring (ntuples)
--------------------
The screen volume is associated with a sensitive detector, ScreenSD,
which accounts the following particle properties:
- trackID
- particle PDG encoding
- particle kinetic energy
- particle X,Y position
- particle time
The scored quantities are filled in the Screen ntuple, which is defined using G4AnalysisManager
in RunAction class. The ntuple is saved in a Root file, which name is set to be equal to the
example name in main () function.
4- How to build
----------------
An additional step is needed when building the example with GNUmake
due to using the extra shared directory:
% cd path_to_example/example
% gmake setup
% gmake
This will copy the files from shared in the example include and src;
to remove these files:
% gmake clean_setup