Import Geant4 11.0.0 source tree
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
|
||||
///\file "hadronic/.README.txt"
|
||||
///\brief Examples hadronic README page
|
||||
|
||||
/*! \page Examples_hadronic Category "hadronic"
|
||||
|
||||
Examples in this directory demonstrate specific hadronic physics simulation
|
||||
with histogramming.
|
||||
|
||||
\link ExampleHadr00 Hadr00 \endlink
|
||||
|
||||
This example demonstrates a usage of G4PhysListFactory to build
|
||||
Physics List and G4HadronicProcessStore to access cross sections.
|
||||
|
||||
\link ExampleHadr01 Hadr01 \endlink
|
||||
|
||||
This example application is based on the application IION developed for
|
||||
simulation of proton or ion beam interaction with a water target. Different
|
||||
aspects of beam target interaction are demonstrating in the example including
|
||||
longitudinal profile of energy deposition, spectra of secondary particles,
|
||||
spectra of particles leaving the target.
|
||||
|
||||
\link ExampleHadr02 Hadr02 \endlink
|
||||
|
||||
This example application is providing simulation of ion beam interaction with different
|
||||
targets. Hadronic aspects of beam target interaction are demonstrated in the example
|
||||
including longitudinal profile of energy deposition, spectra of secondary particles,
|
||||
isotope production spectra.
|
||||
|
||||
\link ExampleHadr03 Hadr03 \endlink
|
||||
|
||||
This example demonstrates how to compute total cross section from the direct evaluation of the
|
||||
mean free path ( see below, item Physics), how to identify nuclear reactions, how to plot
|
||||
energy spectrum of secondary particles.
|
||||
|
||||
\link ExampleHadr04 Hadr04 \endlink
|
||||
|
||||
This example is focused on neutronHP physics, especially neutron transport,
|
||||
including thermal scattering.
|
||||
|
||||
\link ExampleHadr05 Hadr05 \endlink
|
||||
|
||||
Examples of hadronic calorimeters
|
||||
|
||||
\link ExampleHadr06 Hadr06 \endlink
|
||||
|
||||
This example demonstrates survey of energy deposition and particle's flux from
|
||||
a hadronic cascade.
|
||||
|
||||
\link ExampleHadr07 Hadr07 \endlink
|
||||
|
||||
Survey energy deposition and particle's flux from an hadronic cascade.
|
||||
Use PhysicsConstructor objects rather than predefined G4 PhysicsLists.
|
||||
Show how to plot a depth dose profile in a rectangular box.
|
||||
|
||||
\link ExampleHadr08 Hadr08 \endlink
|
||||
|
||||
This example shows how to get "hadronic model per region" using generic
|
||||
biasing: in particular, it is shown how to use "FTFP+INCLXX" in one region,
|
||||
while using the default "FTFP+BERT" in all other regions.
|
||||
Notice that we use the generic biasing machinery, but the actual weights
|
||||
of all tracks remain to the usual value (1.0) as in the normal (unbiased)
|
||||
case.
|
||||
|
||||
\link ExampleHadr09 Hadr09 \endlink
|
||||
|
||||
This example shows how to use Geant4 as a generator for simulating
|
||||
inelastic hadron-nuclear interactions.
|
||||
Notice that the Geant4 run-manager is not used.
|
||||
|
||||
\link ExampleHadr10 Hadr10 \endlink
|
||||
|
||||
This example aims to test the treatment of decays in Geant4.
|
||||
In particular, we want to test the decays of the tau lepton, charmed and
|
||||
bottom hadrons, and the use of pre-assigned decays.
|
||||
|
||||
\link ExampleFissionFragment FissionFragment \endlink
|
||||
|
||||
This example demonstrates the Fission Fragment model as used within the
|
||||
neutron_hp model. It will demostrate the capability for fission product
|
||||
containmentby the cladding in a water moderated sub-critical assembly. It could
|
||||
also be further extended to calculate the effective multiplication factor of
|
||||
the subcritical assembly for various loading schemes.
|
||||
|
||||
\link ExampleNeutronSource NeutronSource \endlink
|
||||
|
||||
NeutronSource is an example of neutrons production. It illustrates the cooperative work
|
||||
of nuclear reactions and radioactive decay processes.
|
||||
It survey energy deposition and particle's flux.
|
||||
It uses PhysicsConstructor objects.
|
||||
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
|
||||
//! \file "hadronic/FissionFragment/.README.txt"
|
||||
//!
|
||||
//! \brief Example FissionFragment README page
|
||||
|
||||
/*! \page ExampleFissionFragment Example FissionFragment
|
||||
|
||||
This example demonstrates an application of the fission fragment model in the
|
||||
NeutronHP model. This example is capable of using both models, but is designed
|
||||
around the Wendt Fission Model. A warning will be shown if the environment
|
||||
variable that enables the Wendt fission model is not set.
|
||||
|
||||
\tableofcontents
|
||||
|
||||
<HR>
|
||||
|
||||
\section FissionFragment_s1 EXECUTION
|
||||
|
||||
\subsection FissionFragment_sub1_s1 ENVIRONMENT
|
||||
- <CODE> G4NEUTRONHP_PRODUCE_FISSION_FRAGMENTS </CODE>
|
||||
- Required
|
||||
- The example requires this enviroment variable to be set. An error will be
|
||||
displayed and the example will terminate if this environment variable is
|
||||
not set.
|
||||
|
||||
- <CODE> G4NEUTRON_HP_USE_WENDT_FISSION_MODEL </CODE>
|
||||
- Optional
|
||||
- This environment variable enables the Wendt fission model contained within
|
||||
the NeutronHP model for simulating fission events. The default model will
|
||||
be used otherwise. A warning will be displayed if this environment
|
||||
variable is not set.
|
||||
|
||||
\subsection FissionFragment_sub2_s1 COMMAND LINE ARGUMENTS
|
||||
The example can be run without any input arguments. However, a few options
|
||||
are available:
|
||||
\verbatim
|
||||
-i ARG : run in batch mode from script file ARG
|
||||
-o ARG : write output to file ARG
|
||||
(defaults to FF_Neutron_HP.out)
|
||||
-n ARG : multithreading with ARG number of threads
|
||||
(only works if Geant4 was compiled with multithreading enabled)
|
||||
\endverbatim
|
||||
No output is currently generated, although the argument is provided. It is
|
||||
anticipated that future versions will provide some form of output
|
||||
summarizing the results of the simulation.
|
||||
|
||||
\subsection FissionFragment_sub3_s1 INTERACTIVE
|
||||
No specialized UI commands are currently provided.
|
||||
|
||||
To run the simulation, use the standard UI command:
|
||||
\verbatim
|
||||
/run/beamOn
|
||||
\endverbatim
|
||||
|
||||
|
||||
\section FissionFragment_s2 GEOMETRY
|
||||
|
||||
The geometry is constructed in the FFDetectorConstruction class. The setup is
|
||||
based on a subcritical assembly design.
|
||||
|
||||
\subsection FissionFragment_sub1_s2 MATERIALS
|
||||
This example requires a number of materials. They are loaded or constructed
|
||||
in the "DefineMaterials" function. A few of the materials are obtained from
|
||||
the NIST database. These materials are:
|
||||
- Air
|
||||
- Aluminum
|
||||
- Graphite
|
||||
- Polyethylene
|
||||
- Stainless steel
|
||||
- Water
|
||||
|
||||
For more information, visit: <A HREF="http://bit.ly/1rEHjhW"> Geant4 User's
|
||||
Guide for Application Developers, Appendix: Geant4 Materials Database </A>
|
||||
|
||||
Not all of the necessary materials were available from the NIST database,
|
||||
and were constructed manually from the estimated isotopics. These materials
|
||||
are:
|
||||
- 20% U235 enriched uranium
|
||||
- 93% B10 enriched BF3
|
||||
|
||||
\subsection FissionFragment_sub2_s2 VOLUMES
|
||||
The world is composed of air instead of a vacuum to provide room return.
|
||||
|
||||
The subcritical assembly is a water-filled aluminum tank.
|
||||
|
||||
The fuel plates are composed of aluminum-clad uranium meat, and are
|
||||
completely submersed in the water of the subcritical assembly.
|
||||
|
||||
An AmBe neutron source is placed in the exact center of the fuel plate
|
||||
loading configuration. The material is currently modeled as steel until
|
||||
more exact specifics of the AmBe isotopics can be obtained.
|
||||
|
||||
The subcritical assembly rests on top of a graphite pile for moderation and
|
||||
shielding.
|
||||
|
||||
|
||||
\section FissionFragment_s3 PHYSICS LIST
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in the QGSP_BIC_HP physics list.
|
||||
|
||||
|
||||
\section FissionFragment_s4 PRIMARY GENERATOR
|
||||
|
||||
The primary generator is defined in the FFPrimaryGeneratorAction class.
|
||||
The default particle is a 4.5 MeV neutron originating from the
|
||||
"NeutronSource" volume. The particles initial direction is isotropically
|
||||
sampled.
|
||||
|
||||
|
||||
\section FissionFragment_s5 DETECTOR RESPONSE
|
||||
|
||||
The scoring method is yet to be implemented, although the BF3 detector is
|
||||
already included in the detector construction.
|
||||
|
||||
|
||||
\section FissionFragment_s6 VISUALISATION
|
||||
An example "vis.mac" will be included in a future release. For now, please
|
||||
refer to other examples for a few suggestions.
|
||||
|
||||
<HR>
|
||||
|
||||
\author B. Wendt (brycen.linn.wendt@cern.ch)
|
||||
\date June 26, 2014
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,114 @@
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
-------------------------
|
||||
FissionFragment Example
|
||||
|
||||
B.Wendt
|
||||
brycen.linn.wendt@cern.ch
|
||||
-------------------------
|
||||
|
||||
This example demonstrates an application of the fission fragment model in the
|
||||
NeutronHP model. This example is capable of using both models, but is designed
|
||||
around the Wendt Fission Model. A warning will be shown if the environment
|
||||
variable that enables the Wendt fission model is not set.
|
||||
|
||||
|
||||
1 - EXECUTION
|
||||
|
||||
A - Enable the following UI command :
|
||||
|
||||
/process/had/particle_hp/use_Wendt_fission_model true
|
||||
|
||||
to use the alternative Wendt fission model contained within the
|
||||
NeutronHP model for simulating fission events
|
||||
(else, the default fission model will be used).
|
||||
|
||||
B - COMMAND LINE ARGUMENTS
|
||||
The example can be run without any input arguments. However, a few options
|
||||
are available:
|
||||
-i ARG : run in batch mode from script file ARG
|
||||
-o ARG : write output to file ARG
|
||||
(defaults to FF_Neutron_HP.out)
|
||||
-n ARG : multithreading with ARG number of threads
|
||||
(only works if Geant4 was compiled with multithreading
|
||||
enabled)
|
||||
|
||||
No output is currently generated, although the argument is provided. It is
|
||||
anticipated that future versions will provide some form of output
|
||||
summarizing the results of the simulation.
|
||||
|
||||
C - INTERACTIVE
|
||||
No specialized UI commands are currently provided.
|
||||
|
||||
To run the simulation, use the standard UI command (after eventually
|
||||
the above UI command to use the alternative Wendt fission model):
|
||||
|
||||
/run/beamOn
|
||||
|
||||
|
||||
2 - GEOMETRY
|
||||
|
||||
The geometry is constructed in the FFDetectorConstruction class. The setup is
|
||||
based on a subcritical assembly design.
|
||||
|
||||
A - MATERIALS
|
||||
This example requires a number of materials. They are loaded or constructed
|
||||
in the "DefineMaterials" function. A few of the materials are obtained from
|
||||
the NIST database (ref. Geant4 User's Guide for Application Developers,
|
||||
Appendix: Geant4 Materials Database). These materials are:
|
||||
- Air
|
||||
- Aluminum
|
||||
- Graphite
|
||||
- Polyethylene
|
||||
- Stainless steel
|
||||
- Water
|
||||
|
||||
Not all of the necessary materials were available from the NIST database,
|
||||
and were constructed manually from the estimated isotopics. These materials
|
||||
are:
|
||||
- 20% U235 enriched uranium
|
||||
- 93% B10 enriched BF3
|
||||
|
||||
B - Volumes
|
||||
The world is composed of air instead of a vacuum to provide room return.
|
||||
|
||||
The subcritical assembly is a water-filled aluminum tank.
|
||||
|
||||
The fuel plates are composed of aluminum-clad uranium meat, and are
|
||||
completely submersed in the water of the subcritical assembly.
|
||||
|
||||
An AmBe neutron source is placed in the exact center of the fuel plate
|
||||
loading configuration. The material is currently modeled as steel until
|
||||
more exact specifics of the AmBe isotopics can be obtained.
|
||||
|
||||
The subcritical assembly rests on top of a graphite pile for moderation and
|
||||
shielding.
|
||||
|
||||
|
||||
3 - PHYSICS LIST
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in the QGSP_BIC_HP physics list.
|
||||
|
||||
|
||||
4 - PRIMARY GENERATOR
|
||||
|
||||
The primary generator is defined in the FFPrimaryGeneratorAction class.
|
||||
The default particle is a 4.5 MeV neutron originating from the
|
||||
"NeutronSource" volume. The particles initial direction is isotropically
|
||||
sampled.
|
||||
|
||||
|
||||
5 - DETECTOR RESPONSE
|
||||
|
||||
The scoring method is yet to be implemented, although the BF3 detector is
|
||||
already included in the detector construction.
|
||||
|
||||
|
||||
6 - VISUALISATION
|
||||
An example "vis.mac" will be included in a future release. For now, please
|
||||
refer to other examples for a few suggestions.
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
|
||||
///\file "hadronic/Hadr00/.README.txt"
|
||||
///\brief Example Hadr00 README page
|
||||
|
||||
/*! \page ExampleHadr00 Example Hadr00
|
||||
|
||||
\author V.Ivanchenko \n
|
||||
CERN, Geneva, Switzerland
|
||||
|
||||
This example demonstrates a usage of G4PhysListFactory to build
|
||||
Physics List and G4HadronicProcessStore to access cross sections.
|
||||
|
||||
\section Hadr00_s1 GEOMETRY
|
||||
|
||||
The Target volume is a cylinder placed inside the World volume. Following
|
||||
UI commands are available to modify the geometry:
|
||||
|
||||
\verbatim
|
||||
/testhadr/TargetMat G4_Pb
|
||||
/testhadr/WorldMat G4_AIR
|
||||
/testhadr/TargetRadius 10 mm
|
||||
/testhadr/TargetLength 20 cm
|
||||
\endverbatim
|
||||
|
||||
If geometry was changed between two runs, then the following command need to
|
||||
be executed:
|
||||
|
||||
\verbatim
|
||||
/testhadr/update
|
||||
\endverbatim
|
||||
|
||||
By default beam direction coincides with the target axis and is Z axis
|
||||
in the global coordinate system. The beam starts in the middle of the target.
|
||||
G4ParticleGun is used as a primary generator. The energy and the type of
|
||||
the beam can be defined via standard UI commands
|
||||
|
||||
\verbatim
|
||||
/gun/energy 15 GeV
|
||||
/gun/particle proton
|
||||
\endverbatim
|
||||
|
||||
\section Hadr00_s2 PHYSICS
|
||||
|
||||
Physics List is defined by its name given in the 3d argument of the of the
|
||||
run command.
|
||||
|
||||
\verbatim
|
||||
Hadr00 my.macro QGSP_BERT
|
||||
\endverbatim
|
||||
|
||||
If 3d argument is not set then by the PHYSLIST environment variable.
|
||||
By default FTFP_BERT Physics List will be instantiated.
|
||||
|
||||
\section Hadr00_s3 CROSS SECTION
|
||||
|
||||
At the end of any run the set of cross sections is built and can be printed
|
||||
out for a given projectile particle and a target element, which can be
|
||||
defined via UI commands:
|
||||
|
||||
\verbatim
|
||||
/testhadr/particle pi+
|
||||
/testhadr/targetElm Pb
|
||||
/testhadr/verbose 1
|
||||
\endverbatim
|
||||
|
||||
The level verbosity above zero provides printout of the cross section table.
|
||||
The energy/momentum limits and number of bins can be set via UI commands:
|
||||
|
||||
\verbatim
|
||||
/testhadr/nBinsE 900
|
||||
/testhadr/nBinsP 700
|
||||
/testhadr/minEnergy 1 keV
|
||||
/testhadr/maxEnergy 1 TeV
|
||||
/testhadr/minMomentum 1 MeV
|
||||
/testhadr/maxMOmentum 10 TeV
|
||||
\endverbatim
|
||||
|
||||
\section Hadr00_s4 VISUALIZATION
|
||||
|
||||
For interactive mode G4 visualization options and variables should be
|
||||
defined, then the example should be recompiled:
|
||||
|
||||
\verbatim
|
||||
gmake visclean
|
||||
gmake
|
||||
\endverbatim
|
||||
|
||||
The vis.mac file can be used an example of visualization. The following
|
||||
command can be used:
|
||||
|
||||
\verbatim
|
||||
/testhadr/DrawTracks charged
|
||||
/testhadr/DrawTracks neutral
|
||||
/testhadr/DrawTracks all
|
||||
\endverbatim
|
||||
|
||||
\section Hadr00_s5 HISTOGRAMS
|
||||
|
||||
All histograms are provided in decimal logarithmic scale (log10(E/MeV)
|
||||
and log10(p/GeV)) for one projectile particle and one target element.
|
||||
The element is taken from the Geant4 NIST database, natural isotope
|
||||
composition is assumed.
|
||||
|
||||
It is possible to change scale and output file name using UI commands:
|
||||
|
||||
\verbatim
|
||||
/testhadr/histo/fileName name
|
||||
/testhadr/histo/setHisto idx nbins vmin vmax unit
|
||||
\endverbatim
|
||||
|
||||
Only ROOT histograms are available.
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,91 @@
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
|
||||
HADR00
|
||||
|
||||
V.Ivanchenko
|
||||
CERN, Geneva, Switzerland
|
||||
|
||||
|
||||
This example demonstrates a usage of G4PhysListFactory to build
|
||||
Physics List and G4HadronicProcessStore to access cross sections.
|
||||
|
||||
GEOMETRY
|
||||
|
||||
The Target volume is a cylinder placed inside the World volume. Following
|
||||
UI commands are available to modify the geometry:
|
||||
|
||||
/testhadr/TargetMat G4_Pb
|
||||
/testhadr/WorldMat G4_AIR
|
||||
/testhadr/TargetRadius 10 mm
|
||||
/testhadr/TargetLength 20 cm
|
||||
|
||||
By default beam direction coincides with the target axis and is Z axis
|
||||
in the global coordinate system. The beam starts in the middle of the target.
|
||||
G4ParticleGun is used as a primary generator. The energy and the type of
|
||||
the beam can be defined via standard UI commands
|
||||
|
||||
/gun/energy 15 GeV
|
||||
/gun/particle proton
|
||||
|
||||
PHYSICS
|
||||
|
||||
Physics List is defined by its name given in the 3d argument of the of the
|
||||
run command.
|
||||
|
||||
Hadr00 my.macro QGSP_BERT
|
||||
|
||||
If 3d argument is not set then by the PHYSLIST environment variable.
|
||||
By default FTFP_BERT Physics List will be instantiated.
|
||||
|
||||
|
||||
CROSS SECTION
|
||||
|
||||
At the end of any run the set of cross sections is built and can be printed
|
||||
out for a given projectile particle and a target element, which can be
|
||||
defined via UI commands:
|
||||
|
||||
/testhadr/particle pi+
|
||||
/testhadr/targetElm Pb
|
||||
/testhadr/verbose 1
|
||||
|
||||
The level verbosity above zero provides printout of the cross section table.
|
||||
The energy/momentum limits and number of bins can be set via UI commands:
|
||||
|
||||
/testhadr/nBinsE 900
|
||||
/testhadr/nBinsP 700
|
||||
/testhadr/minEnergy 1 keV
|
||||
/testhadr/maxEnergy 1 TeV
|
||||
/testhadr/minMomentum 1 MeV
|
||||
/testhadr/maxMOmentum 10 TeV
|
||||
|
||||
VISUALIZATION
|
||||
|
||||
For interactive mode G4 visualization options and variables should be
|
||||
defined, then the example should be recompiled:
|
||||
|
||||
gmake visclean
|
||||
gmake
|
||||
|
||||
The vis.mac file can be used an example of visualization. The following
|
||||
command can be used:
|
||||
|
||||
/testhadr/DrawTracks charged
|
||||
/testhadr/DrawTracks neutral
|
||||
/testhadr/DrawTracks all
|
||||
|
||||
HISTOGRAMS
|
||||
|
||||
All histograms are provided in decimal logarithmic scale (log10(E/MeV)
|
||||
and log10(p/GeV)) for one projectile particle and one target element.
|
||||
The element is taken from the Geant4 NIST database, natural isotope
|
||||
composition is assumed.
|
||||
|
||||
It is possible to change scale and output file name using UI commands:
|
||||
|
||||
/testhadr/histo/fileName name
|
||||
/testhadr/histo/setHisto idx nbins vmin vmax unit
|
||||
|
||||
Only ROOT histograms are available.
|
||||
@@ -0,0 +1,160 @@
|
||||
|
||||
///\file "hadronic/Hadr01/.README.txt"
|
||||
///\brief Example Hadr01 README page
|
||||
|
||||
/*! \page ExampleHadr01 Example Hadr01
|
||||
|
||||
\author A.Bagulya, I.Gudowska, V.Ivanchenko, N.Starkov \n
|
||||
CERN, Geneva, Switzerland \n
|
||||
Karolinska Institute & Hospital, Stockholm, Sweden \n
|
||||
Lebedev Physical Institute, Moscow, Russia
|
||||
|
||||
This example application is based on the application IION developed for
|
||||
simulation of proton or ion beam interaction with a water target. Different
|
||||
aspects of beam target interaction are demonstrating in the example including
|
||||
longitudinal profile of energy deposition, spectra of secondary particles,
|
||||
spectra of particles leaving the target. The results are presenting in a form
|
||||
of average numbers and histograms.
|
||||
|
||||
|
||||
\section Hadr01_s1 GEOMETRY
|
||||
|
||||
The Target volume is a cylinder placed inside Check cylindrical volume. The
|
||||
Check volume is placed inside the World volume. The radius and the length of
|
||||
the Check volume are 1 mm larger than the radius and the length of the Target.
|
||||
The material of the Check volume is the same as the World material. The World
|
||||
volume has the sizes 10 mm larger than that of the Target volume. Any material
|
||||
from the Geant4 database can be defined. The default World material is
|
||||
G4Galactic and the default Target material is aluminum. The Target is
|
||||
subdivided on number of equal slices. Following UI commands are available to
|
||||
modify the geometry:
|
||||
|
||||
\verbatim
|
||||
/testhadr/TargetMat G4_Pb
|
||||
/testhadr/WorldMat G4_AIR
|
||||
/testhadr/TargetRadius 10 mm
|
||||
/testhadr/TargetLength 20 cm
|
||||
/testhadr/NumberDivZ 200
|
||||
\endverbatim
|
||||
|
||||
Beam direction coincides with the target axis and is Z axis in the global
|
||||
coordinate system. The beam starts 5 mm in front of the target. G4ParticleGun
|
||||
is used as a primary generator. The energy and the type of the beam can be
|
||||
defined via standard UI commands
|
||||
|
||||
\verbatim
|
||||
/gun/energy 15 GeV
|
||||
/gun/particle proton
|
||||
\endverbatim
|
||||
|
||||
Default beam position is -(targetHalfLength + 5*mm) and direction along Z axis.
|
||||
Beam position and direction can be changed by gun UI commands:
|
||||
|
||||
\verbatim
|
||||
/gun/position 1 10 3 mm
|
||||
/gun/direction 1 0 0
|
||||
\endverbatim
|
||||
|
||||
however, position command is active only if before it the flag is set
|
||||
|
||||
\verbatim
|
||||
/testhadr/DefaultBeamPosition false
|
||||
\endverbatim
|
||||
|
||||
\section Hadr01_s2 SCORING
|
||||
|
||||
The scoring is performed with the help of UserStackingAction class and two
|
||||
sensitive detector classes: one associated with a target slice, another with
|
||||
the Check volume. Each secondary particle is scored by the StackingAction. In
|
||||
the StackingAction it is also possible to kill all or one type of secondary
|
||||
particles
|
||||
|
||||
\verbatim
|
||||
/testhadr/Kill neutron
|
||||
/testhadr/KillAllSecondaries
|
||||
\endverbatim
|
||||
|
||||
To control running the following options are available:
|
||||
|
||||
\verbatim
|
||||
/testhadr/PrintModulo 100
|
||||
/testhadr/DebugEvent 977
|
||||
\endverbatim
|
||||
|
||||
The last command selects an events, for which "/tracking/verbose 2" level
|
||||
of printout is established.
|
||||
|
||||
|
||||
\section Hadr01_s3 PHYSICS
|
||||
|
||||
PhysicsList of the application uses reference Phsyics Lists or its components,
|
||||
which are distributed with Geant4 in /geant4/physics_lists subdirectory.
|
||||
|
||||
The reference Physics List name may be defined in the 3d argument of the
|
||||
run command:
|
||||
|
||||
\verbatim
|
||||
Hadr01 my.macro QGSP_BERT
|
||||
\endverbatim
|
||||
|
||||
If 3d argument is not set then the PHYSLIST environment variable is checked.
|
||||
If both are not defined then reference Phsyics Lists is not instantiated,
|
||||
instead the local Physics List is used which is built from components using
|
||||
UI interface. The choice of the physics is provided by the UI command:
|
||||
|
||||
\verbatim
|
||||
/testhadr/Physics QGSP_BIC
|
||||
\endverbatim
|
||||
|
||||
To see the list of available configurations with UI one can use
|
||||
|
||||
\verbatim
|
||||
/testhadr/ListPhysics
|
||||
\endverbatim
|
||||
|
||||
The cuts for electromagnetic physics can be established via
|
||||
|
||||
\verbatim
|
||||
/testhadr/CutsAll 1 mm
|
||||
/testhadr/CutsGamma 0.1 mm
|
||||
/testhadr/CutsEl 0.2 mm
|
||||
/testhadr/CutsPos 0.3 mm
|
||||
/testhadr/CutsProt 0.6 mm
|
||||
\endverbatim
|
||||
|
||||
Note that testhadr UI commands are not available in the case when PHYSLIST
|
||||
environment variable is defined.
|
||||
|
||||
|
||||
\section Hadr01_s4 VISUALIZATION
|
||||
|
||||
For interactive mode G4 visualization options and variables should be
|
||||
defined, then the example should be recompiled:
|
||||
|
||||
\verbatim
|
||||
gmake visclean
|
||||
gmake
|
||||
\endverbatim
|
||||
|
||||
|
||||
\section Hadr01_s5 HISTOGRAMS
|
||||
|
||||
There are built in histograms. The 1st one (idx=0, id="1") scores energy
|
||||
deposition along the target. Histograms "22", "23", "24", "25" scores
|
||||
energy deposition per particle type.
|
||||
|
||||
All other histograms are provided in decimal logarithmic scale (log10(E/MeV),
|
||||
where E is secondary particle energy at production
|
||||
|
||||
It is possible to change scale and output file name using UI commands:
|
||||
|
||||
\verbatim
|
||||
/testhadr/histo/fileName name
|
||||
/testhadr/histo/setHisto idx nbins vmin vmax unit
|
||||
\endverbatim
|
||||
|
||||
Only ROOT histograms are available.
|
||||
|
||||
All histograms are normalized to the number of events.
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,136 @@
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
|
||||
HADR01
|
||||
|
||||
A.Bagulya, I.Gudowska, V.Ivanchenko, N.Starkov
|
||||
CERN, Geneva, Switzerland
|
||||
Karolinska Institute & Hospital, Stockholm, Sweden
|
||||
Lebedev Physical Institute, Moscow, Russia
|
||||
|
||||
|
||||
This example application is based on the application IION developed for
|
||||
simulation of proton or ion beam interaction with a water target. Different
|
||||
aspects of beam target interaction are demonstrating in the example including
|
||||
longitudinal profile of energy deposition, spectra of secondary particles,
|
||||
spectra of particles leaving the target. The results are presenting in a form
|
||||
of average numbers and histograms.
|
||||
|
||||
|
||||
GEOMETRY
|
||||
|
||||
The Target volume is a cylinder placed inside Check cylindrical volume. The
|
||||
Check volume is placed inside the World volume. The radius and the length of
|
||||
the Check volume are 1 mm larger than the radius and the length of the Target.
|
||||
The material of the Check volume is the same as the World material. The World
|
||||
volume has the sizes 10 mm larger than that of the Target volume. Any material
|
||||
from the Geant4 database can be defined. The default World material is
|
||||
G4Galactic and the default Target material is aluminum. The Target is
|
||||
subdivided on number of equal slices. Following UI commands are available to
|
||||
modify the geometry:
|
||||
|
||||
/testhadr/TargetMat G4_Pb
|
||||
/testhadr/WorldMat G4_AIR
|
||||
/testhadr/TargetRadius 10 mm
|
||||
/testhadr/TargetLength 20 cm
|
||||
/testhadr/NumberDivZ 200
|
||||
|
||||
Beam direction coincides with the target axis and is Z axis in the global
|
||||
coordinate system. The beam starts 5 mm in front of the target. G4ParticleGun
|
||||
is used as a primary generator. The energy and the type of the beam can be
|
||||
defined via standard UI commands
|
||||
|
||||
/gun/energy 15 GeV
|
||||
/gun/particle proton
|
||||
|
||||
Default beam position is -(targetHalfLength + 5*mm) and direction along Z axis.
|
||||
Beam position and direction can be changed by gun UI commands:
|
||||
|
||||
/gun/position 1 10 3 mm
|
||||
/gun/direction 1 0 0
|
||||
|
||||
however, position command is active only if before it the flag is set
|
||||
|
||||
/testhadr/DefaultBeamPosition false
|
||||
|
||||
SCORING
|
||||
|
||||
The scoring is performed with the help of UserStackingAction class and two
|
||||
sensitive detector classes: one associated with a target slice, another with
|
||||
the Check volume. Each secondary particle is scored by the StackingAction. In
|
||||
the StackingAction it is also possible to kill all or one type of secondary
|
||||
particles
|
||||
|
||||
/testhadr/Kill neutron
|
||||
/testhadr/KillAllSecondaries
|
||||
|
||||
To control running the following options are available:
|
||||
|
||||
/testhadr/PrintModulo 100
|
||||
/testhadr/DebugEvent 977
|
||||
|
||||
The last command selects an events, for which "/tracking/verbose 2" level
|
||||
of printout is established.
|
||||
|
||||
|
||||
PHYSICS
|
||||
|
||||
PhysicsList of the application uses reference Phsyics Lists or its components,
|
||||
which are distributed with Geant4 in /geant4/physics_lists subdirectory.
|
||||
|
||||
The reference Physics List name may be defined in the 3d argument of the
|
||||
run command:
|
||||
|
||||
Hadr01 my.macro QGSP_BERT
|
||||
|
||||
If 3d argument is not set then the PHYSLIST environment variable is checked.
|
||||
If both are not defined then reference Phsyics Lists is not instantiated,
|
||||
instead the local Physics List is used which is built from components using
|
||||
UI interface. The choice of the physics is provided by the UI command:
|
||||
|
||||
/testhadr/Physics QGSP_BIC
|
||||
|
||||
To see the list of available configurations with UI one can use
|
||||
|
||||
/testhadr/ListPhysics
|
||||
|
||||
The cuts for electromagnetic physics can be established via
|
||||
|
||||
/testhadr/CutsAll 1 mm
|
||||
/testhadr/CutsGamma 0.1 mm
|
||||
/testhadr/CutsEl 0.2 mm
|
||||
/testhadr/CutsPos 0.3 mm
|
||||
/testhadr/CutsProt 0.6 mm
|
||||
|
||||
Note that testhadr UI commands are not available in the case when PHYSLIST
|
||||
environment variable is defined.
|
||||
|
||||
|
||||
VISUALIZATION
|
||||
|
||||
For interactive mode G4 visualization options and variables should be
|
||||
defined, then the example should be recompiled:
|
||||
|
||||
gmake visclean
|
||||
gmake
|
||||
|
||||
|
||||
HISTOGRAMS
|
||||
|
||||
There are built in histograms. The 1st one (idx=0, id="1") scores energy
|
||||
deposition along the target. Histograms "22", "23", "24", "25" scores
|
||||
energy deposition per particle type.
|
||||
|
||||
All other histograms are provided in decimal logarithmic scale (log10(E/MeV),
|
||||
where E is secondary particle energy at production
|
||||
|
||||
It is possible to change scale and output file name using UI commands:
|
||||
|
||||
/testhadr/histo/fileName name
|
||||
/testhadr/histo/setHisto idx nbins vmin vmax unit
|
||||
|
||||
Only ROOT histograms are available.
|
||||
|
||||
All histograms are normalized to the number of events.
|
||||
@@ -0,0 +1,231 @@
|
||||
|
||||
///\file "hadronic/Hadr02/.README.txt"
|
||||
///\brief Example Hadr02 README page
|
||||
|
||||
/*! \page ExampleHadr02 Example Hadr02
|
||||
|
||||
Example and DMJET:
|
||||
\author V.Ivanchenko, A.Ivanchenko, \n
|
||||
UrQMD: Kh Abdel-Waged et al, A. Dotti \n
|
||||
CERN, Geneva, Switzerland \n
|
||||
Geant4 Associate International \n
|
||||
University of Bordeaux, CENBG/IN2P3/CNRS \n
|
||||
(ESA contract 22712/09/NL/AT)
|
||||
|
||||
This example application is providing simulation of ion beam interaction with different
|
||||
targets. Hadronic aspects of beam target interaction are demonstrated in the example
|
||||
including longitudinal profile of energy deposition, spectra of secondary particles,
|
||||
isotope production spectra. The results are presenting in a form of average numbers
|
||||
and histograms. All ion/ion models of Geant4 are available and also the interface to
|
||||
the FORTRAN code DPMJET-2.5 developed by J.Ranft for FLUKA. The interface was developed
|
||||
by P.Truscott (QinetiQ, UK) under European Space Agency (ESA) contract 19770/06/NL/JD.
|
||||
In addition an interface to the FORTRAN code UrQMD-1.3rc developed by Kh, Abdel-Waged et al
|
||||
for the KACST/NCMP. UrQMD model by S.A.Bass et al. Prog.Part.Nucl.Phys. 41 (1998) 225
|
||||
and M.Bleicher et al. J.Phys. G25 (1999) 1859.
|
||||
UrQMD can be used only for ion-ion physics or for all hadronic inelastic interactions.
|
||||
|
||||
|
||||
\section Hadr02_s1 INSTALLATION
|
||||
|
||||
For simulation with Geant4 native models installation procedure is the same as for
|
||||
other examples.
|
||||
|
||||
\subsection Hadr02_sub_s11 ACTIVATION OF DPMJET INTERFACE
|
||||
|
||||
In order to use DPMJET additional installation steps are required.
|
||||
It is recommended to use DPMJET with SLC5 64 bit PC with gcc4.3.2 or newer compiler.
|
||||
|
||||
Two environment variables should be defined:
|
||||
|
||||
\verbatim
|
||||
G4DPMJET2_5DATA - path to Glauber data
|
||||
CERNLIB - path to cernlib library
|
||||
G4_USE_DPMJET - flag of DPMJET activation
|
||||
\endverbatim
|
||||
|
||||
To run the example with DPMJET:
|
||||
|
||||
\verbatim
|
||||
Hadr02 dpmjet.in QGSP_BIC
|
||||
\endverbatim
|
||||
|
||||
The last parameter is optional. It is the name of Geant4 reference Physics List on
|
||||
top of which a new ion physics is added. Alternatively Physics List can be defined via
|
||||
environment variable
|
||||
|
||||
\verbatim
|
||||
setenv PHYSLIST QGSP_BIC
|
||||
\endverbatim
|
||||
|
||||
\subsection Hadr02__sub_s12 ACTIVATION OF URQMD INTERFACE
|
||||
|
||||
UrQMD 1.3 FORTRAN code is NOT provided with Geant4 code-base.
|
||||
You can get UrQMD code from UrQMD code website: http://urqmd.org
|
||||
The Geant4 interface has been developed and tested against urqmd-1.3cr
|
||||
Once the tarball urqmd-1.3cr.tar.gz has been downloaded copy it in the
|
||||
urqmd1_3 directory of this example.
|
||||
To compile support for UrQMD interface in the example define the environment
|
||||
variable G4_USE_URQMD. i.e. by typing:
|
||||
|
||||
\verbatim
|
||||
setenv G4_USE_URQMD 1
|
||||
\endverbatim
|
||||
|
||||
Two possible uses of UrQMD interface are possible: use UrQMD code only for
|
||||
ion-ion interactions or use the provided UrQMD physics list (all hadron inelastic interactions
|
||||
use UrQMD).
|
||||
To run the example with UrQMD only for ion-ion physics:
|
||||
|
||||
\verbatim
|
||||
Hadr02 urqmd.in QGSP_BIC
|
||||
\endverbatim
|
||||
|
||||
The last parameter is optional. It is the name of Geant4 reference Physics List on
|
||||
top of which a new ion physics is added. Alternatively Physics List can be defined via
|
||||
environment variable
|
||||
|
||||
\verbatim
|
||||
setenv PHYSLIST QGSP_BIC
|
||||
\endverbatim
|
||||
|
||||
To run the example with the full UrQMD physics:
|
||||
|
||||
\verbatim
|
||||
Hadr02 default.in UrQMD
|
||||
\endverbatim
|
||||
or:
|
||||
\verbatim
|
||||
setenv PHYSLIST UrQMD
|
||||
Hadr02 default.in
|
||||
\endverbatim
|
||||
|
||||
UrQMD physics list can be used in any application, releavant headers and source files (*UrQDM*)
|
||||
should be copied in your application source tree, together with the urqmd1_3 sub-directory.
|
||||
Your application makefile should also be modified following the example of the makefile for this
|
||||
example.
|
||||
|
||||
\section Hadr02_s2 GEOMETRY
|
||||
|
||||
The Target volume is a cylinder placed inside Check cylindrical volume. The
|
||||
Check volume is placed inside the World volume. The radius and the length of
|
||||
the Check volume are 1 mm larger than the radius and the length of the Target.
|
||||
The material of the Check volume is the same as the World material. The World
|
||||
volume has the sizes 10 mm larger than that of the Target volume. Any material
|
||||
from the Geant4 database can be defined. The default World material is
|
||||
G4Galactic and the default Target material is aluminum. The Target is
|
||||
subdivided on number of equal slices. Following UI commands are available to
|
||||
modify the geometry:
|
||||
|
||||
\verbatim
|
||||
/testhadr/TargetMat G4_Pb
|
||||
/testhadr/WorldMat G4_AIR
|
||||
/testhadr/TargetRadius 10 mm
|
||||
/testhadr/TargetLength 20 cm
|
||||
/testhadr/NumberDivZ 200
|
||||
\endverbatim
|
||||
|
||||
Beam direction coincides with the target axis and is Z axis in the global
|
||||
coordinate system. G4ParticleGun is used as a primary generator. The energy
|
||||
and the type of the beam can be defined via standard UI commands
|
||||
|
||||
\verbatim
|
||||
/gun/energy 150 GeV
|
||||
/gun/particle ion
|
||||
/gun/ion 6 12
|
||||
\endverbatim
|
||||
|
||||
Default beam position is -(targetHalfLength + 5*mm) and direction along Z axis.
|
||||
Beam position and direction can be changed by gun UI commands:
|
||||
|
||||
\verbatim
|
||||
/gun/position 1 10 3 mm
|
||||
/gun/direction 1 0 0
|
||||
\endverbatim
|
||||
|
||||
however, position command is active only if before it the flag is set
|
||||
|
||||
\verbatim
|
||||
/testhadr/DefaultBeamPosition false
|
||||
\endverbatim
|
||||
|
||||
\section Hadr02_s3 SCORING
|
||||
|
||||
The scoring is performed with the help of UserStackingAction class and a
|
||||
sensitive detector class associated with a target slice.
|
||||
Each secondary particle is scored by the StackingAction. In
|
||||
the StackingAction it is also possible to kill all or only EM (e+, e-, gamma)
|
||||
secondary particles
|
||||
|
||||
\verbatim
|
||||
/testhadr/killAll
|
||||
/testhadr/KillEM
|
||||
\endverbatim
|
||||
|
||||
To control running the following options are available:
|
||||
|
||||
\verbatim
|
||||
/run/printProgress 10
|
||||
\endverbatim
|
||||
|
||||
|
||||
\section Hadr02_s4 PHYSICS
|
||||
|
||||
PhysicsList of the application uses components, which are distributed with
|
||||
Geant4 in /geant4/physics_lists subdirectory.
|
||||
|
||||
Reference Physics Lists are used and the environment variable PHYSLIST should
|
||||
be defined.
|
||||
|
||||
Additionally it is possible to add ion-ion interactions using UI command
|
||||
|
||||
\verbatim
|
||||
/testhadr/ionPhysics DPMJET
|
||||
/testhadr/ionPhysics FTF
|
||||
\endverbatim
|
||||
|
||||
|
||||
\section Hadr02_s5 VISUALIZATION
|
||||
|
||||
For interactive mode G4 visualization options and variables should be
|
||||
defined, then the example should be recompiled:
|
||||
|
||||
\verbatim
|
||||
gmake visclean
|
||||
gmake
|
||||
\endverbatim
|
||||
|
||||
The vis.mac file can be used an example of visualization. The following command can
|
||||
be used:
|
||||
|
||||
\verbatim
|
||||
/testhadr/DrawTracks charged
|
||||
/testhadr/DrawTracks charged+n
|
||||
/testhadr/DrawTracks neutral
|
||||
/testhadr/DrawTracks all
|
||||
\endverbatim
|
||||
|
||||
|
||||
\section Hadr02_s6 HISTOGRAMS
|
||||
|
||||
It is possible to choose the format of the output file with
|
||||
histograms using UI command:
|
||||
|
||||
\verbatim
|
||||
/testhadr/HistoName name
|
||||
/testhadr/HistoType type
|
||||
\endverbatim
|
||||
|
||||
The following types are available: root, xml(aida). They will be
|
||||
stored in the file "name.root", or "name.xml".
|
||||
If the environment variable HISTODIR is defined, files are stored in this
|
||||
subdirectory.
|
||||
|
||||
To show the content of a histogram ID=i the commands may be applied:
|
||||
|
||||
\verbatim
|
||||
/testhadr/HistoPrint i
|
||||
\endverbatim
|
||||
|
||||
All histograms are normalized to the number of events.
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,238 @@
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
|
||||
HADR02
|
||||
|
||||
Example and DMJET: V.Ivanchenko, A.Ivanchenko,
|
||||
UrQMD: Kh Abdel-Waged et al, A. Dotti
|
||||
CRMC: A. Ribon (with contributions by T. Pierog and A. Tykhonov)
|
||||
CERN, Geneva, Switzerland
|
||||
Geant4 Associate International
|
||||
University of Bordeaux, CENBG/IN2P3/CNRS
|
||||
(ESA contract 22712/09/NL/AT)
|
||||
|
||||
|
||||
This example application is providing simulation of ion beam interaction with different
|
||||
targets. Hadronic aspects of beam target interaction are demonstrated in the example
|
||||
including longitudinal profile of energy deposition, spectra of secondary particles,
|
||||
isotope production spectra. The results are presenting in a form of average numbers
|
||||
and histograms. All ion/ion models of Geant4 are available.
|
||||
|
||||
In addition an interface to the FORTRAN code UrQMD-1.3rc developed by Kh, Abdel-Waged et al
|
||||
for the KACST/NCMP. UrQMD model by S.A.Bass et al. Prog.Part.Nucl.Phys. 41 (1998) 225
|
||||
and M.Bleicher et al. J.Phys. G25 (1999) 1859.
|
||||
UrQMD can be used only for ion-ion physics or for all hadronic inelastic interactions.
|
||||
|
||||
The interface to the Cosmic Ray Monte Carlo (CRMC) allows to use generators -
|
||||
such as EPOS, DPMJET, SIBYLL etc. - for hadron-nucleus and nucleus-nucleus collisions
|
||||
at very high energies.
|
||||
|
||||
INSTALLATION
|
||||
|
||||
For simulation with Geant4 native models installation procedure is the same as for
|
||||
other examples.
|
||||
|
||||
HOW TO RUN
|
||||
|
||||
To run the example:
|
||||
|
||||
Hadr02 <yourmacro> QGSP_BIC
|
||||
|
||||
The last parameter is optional. It is the name of Geant4 reference Physics List,
|
||||
alternatively Physics List can be defined via environment variable
|
||||
|
||||
setenv PHYSLIST QGSP_BIC
|
||||
|
||||
ACTIVATION OF URQMD INTERFACE
|
||||
|
||||
UrQMD 1.3 FORTRAN code is NOT provided with Geant4 code-base.
|
||||
You can get UrQMD code from UrQMD code website: http://urqmd.org
|
||||
The Geant4 interface has been developed and tested against urqmd-1.3cr
|
||||
Once the tarball urqmd-1.3cr.tar.gz has been downloaded copy it in the
|
||||
urqmd1_3 directory of this example.
|
||||
To compile support for UrQMD interface in the example define the environment
|
||||
variable G4_USE_URQMD. i.e. by typing:
|
||||
|
||||
setenv G4_USE_URQMD 1
|
||||
|
||||
Two possible uses of UrQMD interface are possible: use UrQMD code only for
|
||||
ion-ion interactions or use the provided UrQMD physics list (all hadron inelastic interactions
|
||||
use UrQMD).
|
||||
To run the example with UrQMD only for ion-ion physics:
|
||||
|
||||
Hadr02 urqmd.in QGSP_BIC
|
||||
|
||||
The last parameter is optional. It is the name of Geant4 reference Physics List on
|
||||
top of which a new ion physics is added. Alternatively Physics List can be defined via
|
||||
environment variable
|
||||
|
||||
setenv PHYSLIST QGSP_BIC
|
||||
|
||||
To run the example with the full UrQMD physics:
|
||||
|
||||
Hadr02 default.in UrQMD
|
||||
or:
|
||||
setenv PHYSLIST UrQMD
|
||||
Hadr02 default.in
|
||||
|
||||
UrQMD physics list can be used in any application, releavant headers and source files (*UrQDM*)
|
||||
should be copied in your application source tree, together with the urqmd1_3 sub-directory.
|
||||
Your application makefile should also be modified following the example of the makefile for this
|
||||
example.
|
||||
|
||||
ACTIVATION OF CRMC INTERFACE
|
||||
|
||||
The CRMC (Cosmic Ray Monte Carlo) interface is NOT provided with Geant4 code-base.
|
||||
A modified version of the CRMC interface for Geant4 applications has been kindly
|
||||
prepared by Tanguy Pierog (IKP) and Andrii Tykhonov (Universite' de Geneve)
|
||||
and can be obtained here:
|
||||
https://gitlab.ikp.kit.edu/AirShowerPhysics/crmc/-/tree/svn/geant4
|
||||
|
||||
Assuming that this special version of CRMC is installed in the subdirectory
|
||||
crmc-svn-geant4/ , you need first to build it : please look at the README and
|
||||
README_GEANT4_CRMC_INTERFACE files for detailed instructions on how to build it.
|
||||
In short:
|
||||
|
||||
1. Install BOOST
|
||||
2. Install HepMC (and define the corresponding environmental variable HEP_ROOT)
|
||||
3. Install FASTJET (and define the corresponding environmental variable
|
||||
FASTJET_ROOT_DIR)
|
||||
4. Set the LD_LIBRARY_PATH as follows:
|
||||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HEP_ROOT}/lib:${FASTJET_ROOT_DIR}/lib
|
||||
5. Source the Geant4 script geant4make.sh , e.g.
|
||||
source /your-geant4-installation-dir/share/Geant4-10.7.1/geant4make/geant4make.sh
|
||||
6. cd crmc-svn-geant4/
|
||||
7. mkdir Build/ ; cd Build/ # Subdirectory where to build and install CRMC
|
||||
8. cmake ../
|
||||
9. make
|
||||
10. make install # Yes, you need also to install it (in the same directory)!
|
||||
|
||||
After you have built CRMC you can build the Hadr02 application that uses it as follows:
|
||||
|
||||
1. Define the following environmental variable (in addition to the environmental
|
||||
variables defined above, needed to build CRMC):
|
||||
export G4_USE_CRMC=1
|
||||
export CRMCROOT=/your-crmc-installation-dir/crmc-svn-geant4/
|
||||
export CPATH=${CPATH}:${CRMCROOT}/Build/src:${CRMCROOT}/src
|
||||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CRMCROOT}/Build/lib
|
||||
export CRMC_CONFIG_FILE=${CRMCROOT}/Build/crmc.param
|
||||
2. cd /your-geant4/examples/extended/hadronic/Hadr02
|
||||
3. mkdir Build/ ; cd Build/ # Subdirectory where to build Hadr02
|
||||
4. cmake -DG4_USE_CRMC=ON -DGeant4_DIR=/your-geant4-installation-dir/ ../
|
||||
5. make
|
||||
|
||||
To run the application:
|
||||
|
||||
1. Define the following environmental variable (besides the previous ones):
|
||||
export PHYSLIST=CRMC_FTFP_BERT
|
||||
2. cd /your-geant4/examples/extended/hadronic/Hadr02/Build
|
||||
3. ./Hadr02 crmc.in
|
||||
|
||||
which runs the special "CRMC_FTFP_BERT" physics list, defined in this example,
|
||||
which consists of using the standard FTFP_BERT physics list for hadrons of
|
||||
kinetic energies below 100 GeV, while using CRMC above 110 GeV : in the interval
|
||||
between 100 and 110 GeV, there is the transition between FTFP and CRMC (which
|
||||
means that one of these two models is randomly chosen for each interaction,
|
||||
with a probability which is 100% (0%) for FTFP (CRMC) at 100 GeV, and
|
||||
decreases (grows) linearly to 0% (100%) for FTFP (CRMC) at 110 GeV.
|
||||
Which of the MC generators of CRMC is actually used is specified in the file:
|
||||
include/G4CRMCModel.hh
|
||||
(search for string "***LOOKHERE***" : these are the available choices:
|
||||
EPOS LHC (0) - the default - , EPOS 1.99 (1), SIBYLL 2.3c (6), and
|
||||
DPMJET 3 (12) ).
|
||||
|
||||
Notice that we use CRMC only for inelastic final-state of pion- , kaon- ,
|
||||
proton- , neutron- and ion-nuclear interactions, whereas for the rest
|
||||
(i.e. elastic and inelastic cross sections, elastic final-state interactions,
|
||||
hyperon- , antihyperon- , antinucleon- and light anti-ion nuclear interactions)
|
||||
we use Geant4 FTFP_BERT.
|
||||
|
||||
GEOMETRY
|
||||
|
||||
The Target volume is a cylinder placed inside Check cylindrical volume. The
|
||||
Check volume is placed inside the World volume. The radius and the length of
|
||||
the Check volume are 1 mm larger than the radius and the length of the Target.
|
||||
The material of the Check volume is the same as the World material. The World
|
||||
volume has the sizes 10 mm larger than that of the Target volume. Any material
|
||||
from the Geant4 database can be defined. The default World material is
|
||||
G4Galactic and the default Target material is aluminum. The Target is
|
||||
subdivided on number of equal slices. Following UI commands are available to
|
||||
modify the geometry:
|
||||
|
||||
/testhadr/TargetMat G4_Pb
|
||||
/testhadr/WorldMat G4_AIR
|
||||
/testhadr/TargetRadius 10 mm
|
||||
/testhadr/TargetLength 20 cm
|
||||
/testhadr/NumberDivZ 200
|
||||
|
||||
Beam direction coincides with the target axis and is Z axis in the global
|
||||
coordinate system. G4ParticleGun is used as a primary generator. The energy
|
||||
and the type of the beam can be defined via standard UI commands
|
||||
|
||||
/gun/energy 150 GeV
|
||||
/gun/particle ion
|
||||
/gun/ion 6 12
|
||||
|
||||
Default beam position is -(targetHalfLength + 5*mm) and direction along Z axis.
|
||||
Beam position and direction can be changed by gun UI commands:
|
||||
|
||||
/gun/position 1 10 3 mm
|
||||
/gun/direction 1 0 0
|
||||
|
||||
however, position command is active only if before it the flag is set
|
||||
|
||||
/testhadr/DefaultBeamPosition false
|
||||
|
||||
SCORING
|
||||
|
||||
The scoring is performed with the help of UserStackingAction class and a
|
||||
sensitive detector class associated with a target slice.
|
||||
Each secondary particle is scored by the StackingAction. In
|
||||
the StackingAction it is also possible to kill all or only EM (e+, e-, gamma)
|
||||
secondary particles
|
||||
|
||||
/testhadr/killAll
|
||||
/testhadr/KillEM
|
||||
|
||||
To control running the following options are available:
|
||||
|
||||
/run/printProgress 10
|
||||
|
||||
|
||||
PHYSICS
|
||||
|
||||
PhysicsList of the application uses components, which are distributed with
|
||||
Geant4 in /geant4/physics_lists subdirectory.
|
||||
|
||||
Reference Physics Lists are used and the environment variable PHYSLIST should
|
||||
be defined.
|
||||
|
||||
Additionally it is possible to add ion-ion interactions using UI command
|
||||
|
||||
/testhadr/ionPhysics HIJING
|
||||
/testhadr/ionPhysics QrQMD
|
||||
|
||||
|
||||
VISUALIZATION
|
||||
|
||||
For interactive mode G4 visualization options and variables should be
|
||||
defined, then the example should be recompiled:
|
||||
|
||||
gmake visclean
|
||||
gmake
|
||||
|
||||
The vis.mac file can be used an example of visualization. The following command can
|
||||
be used:
|
||||
|
||||
/testhadr/DrawTracks charged
|
||||
/testhadr/DrawTracks charged+n
|
||||
/testhadr/DrawTracks neutral
|
||||
/testhadr/DrawTracks all
|
||||
|
||||
|
||||
HISTOGRAMS
|
||||
|
||||
All histograms are normalized to the number of events.
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
HIJING interface
|
||||
----------------
|
||||
|
||||
Khaled Abdel-Waged
|
||||
--------------------
|
||||
|
||||
version 0.0, 1-11-2012
|
||||
----------------------
|
||||
|
||||
>Installation requirements
|
||||
--------------------------
|
||||
|
||||
The Geant4 interface to HIJING uses the following software tools and packages:
|
||||
|
||||
1. HIJING (available at fttp://nta0.lbl.gov/pub/xnwang/hijing)
|
||||
2. The following Geant4 versions:
|
||||
− ver.9.5 or above
|
||||
|
||||
The interface and original HIJING code have been compiled and tested using:
|
||||
• gcc 4.1.2 with gfortran (FORTRAN95) and GNUmake)
|
||||
|
||||
Operating systems used for this test is:
|
||||
Red Hat Linux 4.1.2-64
|
||||
|
||||
|
||||
>Changes in the Fortran code
|
||||
----------------------------
|
||||
|
||||
1) The main subroutines
|
||||
SUBROUTINE HIJSET(EFRM, FRAME, PROJ, TARG, IAP, IZP, IAT, IZT)
|
||||
is replaced with
|
||||
SUBROUTINE HIJSET(EFRM)
|
||||
|
||||
SUBROUTINE HIJING (FRAME, BMIN, BMAX)
|
||||
is replaced with
|
||||
SUBROUTINE HIJING (BMIN, BMAX)
|
||||
|
||||
|
||||
The input variables are directly inserted into the following common block:
|
||||
|
||||
COMMON/HIPARNT/HIPR1(100),IHPR2(50),HINT1(100),IHNT2(50)
|
||||
Projectile:
|
||||
IHNT2(1)=IAP // Nucleus mass number
|
||||
or IHNT2(1)=1 //Hadron
|
||||
IHNT2(2)=IZP //charge
|
||||
IHNT2(5)=0 //id code
|
||||
Target:
|
||||
IHNT2(3)=IAT
|
||||
IHNT2(4)=IZT
|
||||
IHNT2(6)=0 //id Target (Fixed)
|
||||
Rest Mass:
|
||||
HINT1(8)= //projectile
|
||||
HINT1(9)= //Target
|
||||
|
||||
2) In subroutines HIJSET and HIJING,
|
||||
|
||||
Since Geant4 hadronic cascade models always works in the LABoratory frame
|
||||
|
||||
the statement Frame=”LAB” is inserted.
|
||||
|
||||
|
||||
3)Random number generator
|
||||
|
||||
The two random generator functions become one!
|
||||
|
||||
This is done by replacing
|
||||
RAN(NSEED) with RLU(0) in hijing1.383.f
|
||||
|
||||
|
||||
>Consequences of conversion from f77 (g77) to gfortran
|
||||
------------------------------------------------------
|
||||
|
||||
When running HIJING code in gfortran directly, the execution is blocked.
|
||||
This problem is solved by the following changes
|
||||
|
||||
1) You have to add in the GNUmake file, the line
|
||||
|
||||
FFLAGS=-fno-automatic
|
||||
|
||||
This treats each program unit as if the SAVE statement were specified
|
||||
for every local variable and array referenced in it.
|
||||
|
||||
|
||||
2) Problem related to the function ROMG(x) in hijing1.383.f:
|
||||
|
||||
FUNCTION ROMG(X)
|
||||
C This gives the eikonal function from a table
|
||||
C calculated in the first call
|
||||
DIMENSION FR(0:1000)
|
||||
DATA I0/0/
|
||||
|
||||
COMMON/EIKONAL/FR !New->Khaled
|
||||
|
||||
IF(I0.NE.0) GO TO 100
|
||||
DO 50 I=1,1001
|
||||
XR=(I-1)*0.01
|
||||
FR(I-1)=OMG0(XR)
|
||||
50 CONTINUE
|
||||
100 I0=1
|
||||
IF(X.GE.10.0) THEN
|
||||
ROMG=0.0
|
||||
RETURN
|
||||
ENDIF
|
||||
IX=INT(X*100)
|
||||
ROMG=(FR(IX)*((IX+1)*0.01-X)+FR(IX+1)*(X-IX*0.01))/0.01
|
||||
RETURN
|
||||
END
|
||||
|
||||
Our analysis shows that the array FR() is not saved in the subsequent calls of the function ROMG().
|
||||
Therefore, the statement “COMMON/EIKONAL/FR” is inserted, as shown above.
|
||||
|
||||
|
||||
>Interface design
|
||||
-----------------
|
||||
|
||||
The use of HIJING physics in Geant4 has resulted in the introduction of a new event model (G4HIJING_Model).
|
||||
The G4HIJING_Model class is derived from G4HadronicInteraction, and is defined within the Geant4 user physics
|
||||
list if access to HIJING physics is required. It controls initialisation of HIJING through common block variables.
|
||||
@@ -0,0 +1,158 @@
|
||||
|
||||
///\file "hadronic/Hadr03/.README.txt"
|
||||
///\brief Example Hadr03 README page
|
||||
|
||||
/*! \page ExampleHadr03 Example Hadr03
|
||||
|
||||
- How to compute total cross section from the direct evaluation of the
|
||||
mean free path ( see below, item Physics).
|
||||
- How to identify nuclear reactions.
|
||||
- How to plot energy spectrum of secondary particles.
|
||||
|
||||
\section Hadr03_s1 GEOMETRY DEFINITION
|
||||
|
||||
It is a single box representing a 'semi infinite' homogeneous medium.
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
|
||||
The default geometry (10 m of molybdenum) is built in DetectorConstruction,
|
||||
but the above parameters can be changed interactively via commands defined
|
||||
in DetectorMessenger.
|
||||
|
||||
\section Hadr03_s2 PHYSICS LIST
|
||||
|
||||
The PhysicsList contains builders for hadronic interactions.
|
||||
Predefined G4 PhysicsConstructors or 'local' PhysicsConstructors can be used
|
||||
(see geant4/source/physics_lists or example runAndEvent/RE04).
|
||||
|
||||
In order not to introduce 'artificial' constraints on the step size,
|
||||
electromagnetic processes are not registered: there is no continuous energy
|
||||
loss.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To select them, see Hadr03.cc
|
||||
|
||||
\section Hadr03_s3 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 (neutron 1 MeV), and can be changed via the G4
|
||||
build-in commands of ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
\section Hadr03_s4 PHYSICS
|
||||
|
||||
An event is killed at the first interaction of the incident paticle.
|
||||
The absorption length, also called mean free path, is computed as
|
||||
the mean value of the track length of the incident particle.
|
||||
This is why the medium must be 'infinite' : to be sure that interaction
|
||||
occurs at any events.
|
||||
|
||||
The result is compared with the 'input' value, i.e. with the cross sections
|
||||
given by G4HadronicProcessStore and used by Geant4.
|
||||
|
||||
The list of nuclear reactions that occured is printed.
|
||||
(the number of gamma of deexcitation is not printed).
|
||||
|
||||
Then, comes the total list of generated particles and ions.
|
||||
The energy spectrum of the scattered particle (if any) and of the created
|
||||
secondaries are plotted (see SteppingAction).
|
||||
|
||||
Momentum conservation is checked as :
|
||||
\verbatim
|
||||
momentum balance = modulus(P_out - P_in)
|
||||
\endverbatim
|
||||
|
||||
A set of macros defining various run conditions are provided.
|
||||
The processes can be actived/inactived in order to survey the processes
|
||||
individually.
|
||||
|
||||
\section Hadr03_s5 HISTOGRAMS
|
||||
|
||||
The test contains 13 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its Messenger. The histos can be individually
|
||||
activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
- 1 : "kinetic energy of scattered primary particle"
|
||||
- 2 : "kinetic energy of gamma"
|
||||
- 3 : "kinetic energy of e-"
|
||||
- 4 : "kinetic energy of neutrons"
|
||||
- 5 : "kinetic energy of protons"
|
||||
- 6 : "kinetic energy of deuterons"
|
||||
- 7 : "kinetic energy of alphas"
|
||||
- 8 : "kinetic energy of nuclei"
|
||||
- 9 : "kinetic energy of mesons"
|
||||
- 10 : "kinetic energy of baryons"
|
||||
- 11 : "Q = Ekin out - Ekin in"
|
||||
- 12 : "Pbalance = mag(P_out - P_in)"
|
||||
- 13 : "atomic mass of nuclei"
|
||||
|
||||
The histograms are managed by the HistoManager class and its Messenger.
|
||||
The histos can be individually activated with the command :
|
||||
\verbatim
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
\endverbatim
|
||||
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default Hadr03)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
/analysis/h1/setAscii id
|
||||
\endverbatim
|
||||
All selected histos will be written on a file name.ascii (default Hadr03)
|
||||
|
||||
\section Hadr03_s6 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:
|
||||
\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 Hadr03_s7 HOW TO START ?
|
||||
|
||||
Execute Hadr03 in 'batch' mode from macro files :
|
||||
\verbatim
|
||||
% Hadr03 inelastic.mac
|
||||
\endverbatim
|
||||
|
||||
Execute Hadr03 in 'interactive mode' with visualization :
|
||||
\verbatim
|
||||
% Hadr03
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- Au196.mac: neutron (1 MeV) on Au195
|
||||
- elastic.mac: proton (10 MeV) on Mo100. Elastic collisions alone
|
||||
- fusion.mac: deuteron (400 keV) on tritium
|
||||
- gamma.mac: gamma (10 MeV) on Au196
|
||||
- inelastic.mac: proton (10 MaV) on Mo98. Inelastic interactions alone
|
||||
- ion.mac: Li7 (140 MeV) on Be9
|
||||
- nCapture.mac: neutron (1 eV) on Boron. Capture process alone
|
||||
- nFission.mac: neutron (1 eV) on U235. Fission process alone
|
||||
- neutron.mac: neutron (1 MeV) on Boron
|
||||
|
||||
Macros to be run interactively:
|
||||
- debug.mac: proton (10 MeV) on Boron
|
||||
- vis.mac: To activate visualization
|
||||
*/
|
||||
@@ -0,0 +1,145 @@
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Hadr03
|
||||
------
|
||||
|
||||
How to compute total cross section from the direct evaluation of the
|
||||
mean free path ( see below, item Physics).
|
||||
How to identify nuclear reactions.
|
||||
How to plot energy spectrum of secondary particles.
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
It is a single box representing a 'semi infinite' homogeneous medium.
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
|
||||
The default geometry (10 m of molybdenum) is built in DetectorConstruction,
|
||||
but the above parameters can be changed interactively via commands defined
|
||||
in DetectorMessenger.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The PhysicsList contains builders for hadronic interactions.
|
||||
Predefined G4 PhysicsConstructors or 'local' PhysicsConstructors can be used
|
||||
(see geant4/source/physics_lists or example runAndEvent/RE04).
|
||||
|
||||
In order not to introduce 'artificial' constraints on the step size,
|
||||
electromagnetic processes are not registered: there is no continuous energy
|
||||
loss.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To select them, see Hadr03.cc.
|
||||
|
||||
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 (neutron 1 MeV), 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 interaction of the incident paticle.
|
||||
The absorption length, also called mean free path, is computed as
|
||||
the mean value of the track length of the incident particle.
|
||||
This is why the medium must be 'infinite' : to be sure that interaction
|
||||
occurs at any events.
|
||||
|
||||
The result is compared with the 'input' value, i.e. with the cross sections
|
||||
given by G4HadronicProcessStore and used by Geant4.
|
||||
|
||||
The list of nuclear reactions that occured is printed.
|
||||
(the number of gamma of deexcitation is not printed).
|
||||
|
||||
Then, comes the total list of generated particles and ions.
|
||||
The energy spectrum of the scattered particle (if any) and of the created
|
||||
secondaries are plotted (see SteppingAction).
|
||||
|
||||
Momentum conservation is checked as :
|
||||
momentum balance = modulus(P_out - P_in)
|
||||
|
||||
A set of macros defining various run conditions are provided.
|
||||
The processes can be actived/inactived in order to survey the processes
|
||||
individually.
|
||||
|
||||
5- HISTOGRAMS
|
||||
|
||||
The test contains 12 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its Messenger. The histos can be individually
|
||||
activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
1 "kinetic energy of scattered primary particle"
|
||||
2 "kinetic energy of gamma"
|
||||
3 "kinetic energy of e-"
|
||||
4 "kinetic energy of neutrons"
|
||||
5 "kinetic energy of protons"
|
||||
6 "kinetic energy of deuterons"
|
||||
7 "kinetic energy of alphas"
|
||||
8 "kinetic energy of nuclei"
|
||||
9 "kinetic energy of mesons"
|
||||
10 "kinetic energy of baryons"
|
||||
11 "Q = Ekin out - Ekin in"
|
||||
12 "Pbalance = mag(P_out - P_in)"
|
||||
13 "atomic mass of nuclei"
|
||||
|
||||
The histograms are managed by the HistoManager class and its Messenger.
|
||||
The histos can be individually activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default Hadr03)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
All selected histos will be written on a file name.ascii (default Hadr03)
|
||||
|
||||
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 Hadr03 in 'batch' mode from macro files :
|
||||
% Hadr03 inelastic.mac
|
||||
|
||||
Execute Hadr03 in 'interactive mode' with visualization :
|
||||
% Hadr03
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros provided in this example:
|
||||
- Au196.mac: neutron (1 MeV) on Au195
|
||||
- elastic.mac: proton (10 MeV) on Mo100. Elastic collisions alone
|
||||
- fusion.mac: deuteron (400 keV) on tritium
|
||||
- gamma.mac: gamma (10 MeV) on Au196
|
||||
- inelastic.mac: proton (10 MaV) on Mo98. Inelastic interactions alone
|
||||
- ion.mac: Li7 (140 MeV) on Be9
|
||||
- nCapture.mac: neutron (1 eV) on Boron. Capture process alone
|
||||
- nFission.mac: neutron (1 eV) on U235. Fission process alone
|
||||
- neutron.mac: neutron (1 MeV) on Boron
|
||||
|
||||
Macros to be run interactively:
|
||||
- debug.mac: proton (10 MeV) on Boron
|
||||
- vis.mac: To activate visualization
|
||||
@@ -0,0 +1,132 @@
|
||||
|
||||
///\file "hadronic/Hadr04/.README.txt"
|
||||
///\brief Example Hadr04 README page
|
||||
|
||||
/*! \page ExampleHadr04 Example Hadr04
|
||||
|
||||
This example is focused on neutronHP physics, especially neutron transport,
|
||||
including thermal scattering.
|
||||
See A.R. Garcia, E. Mendoza, D. Cano-Ott presentation at G4 Hadronic group
|
||||
meeting (04/2013) and note on G4NeutronHP package
|
||||
|
||||
\section Hadr04_s1 MATERIALS AND GEOMETRY DEFINITION
|
||||
|
||||
It is a single box representing a 'quasi infinite' homogeneous medium.
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
|
||||
The default geometry (1 m3 of pressurized water) is built in
|
||||
DetectorConstruction, but the above parameters can be changed interactively
|
||||
via commands defined in DetectorMessenger.
|
||||
|
||||
A function, and its associated UI command, allows to build a material
|
||||
directly from a single isotope.
|
||||
|
||||
To be identified by the ThermalScattering module, the elements composing a
|
||||
material must have a specific name (see G4NeutronHPThermalScatteringNames.cc)
|
||||
Examples of such materials are build in DetectorConstruction.
|
||||
|
||||
\section Hadr04_s2 PHYSICS LIST
|
||||
|
||||
Only processes of neutronHP package are registered : neutronElastic
|
||||
(including thermalScattering), neutronInelastic, nCapture; nFission.
|
||||
See class NeutronHPphysics. No other hadronic nor electromagnetic processes.
|
||||
|
||||
A command allows to select or not ThermalScattering model.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To select them, see Hadr04.cc
|
||||
|
||||
NB. class NeutronHPphysics can be reused with other physicsConstructors,
|
||||
as neutron processes are deleted before to be re-created.
|
||||
|
||||
\section Hadr04_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic is a single particle randomly shooted at the
|
||||
centre of the box. The type of the particle and its energy are set in
|
||||
PrimaryGeneratorAction (neutron 2 MeV), and can be changed via the G4
|
||||
build-in commands of ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
\section Hadr04_s4 PHYSICS
|
||||
|
||||
All secondaries are killed in StackingAction. Therefore an event consists of
|
||||
the transport of the primary neutron. Then one survey the thermal and non
|
||||
thermal part of this parcours.
|
||||
|
||||
|
||||
\section Hadr04_s5 HISTOGRAMS
|
||||
|
||||
The test contains 7 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its Messenger. The histos can be individually
|
||||
activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
- 1 "incident neutron: nb of collisions above 1 eV"
|
||||
- 2 "incident neutron: total track length above 1 eV"
|
||||
- 3 "incident neutron: time of flight above 1 eV"
|
||||
- 4 "incident neutron: nb of collisions below 1 eV"
|
||||
- 5 "incident neutron: total track length below 1*eV"
|
||||
- 6 "incident neutron: time of flight below 1 eV"
|
||||
- 7 "incident neutron: energy distribution below 1*eV"
|
||||
|
||||
The histograms are managed by the HistoManager class and its Messenger.
|
||||
The histos can be individually activated with the command :
|
||||
\verbatim
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
\endverbatim
|
||||
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default Hadr04)
|
||||
\endverbatim
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
/analysis/h1/setAscii id
|
||||
\endverbatim
|
||||
All selected histos will be written on a file name.ascii (default Hadr04)
|
||||
|
||||
\section Hadr04_s6 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:
|
||||
\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 Hadr04_s7 HOW TO START ?
|
||||
|
||||
Execute Hadr04 in 'batch' mode from macro files :
|
||||
\verbatim
|
||||
% Hadr04 run01.mac
|
||||
\endverbatim
|
||||
|
||||
Execute Hadr04 in 'interactive mode' with visualization :
|
||||
\verbatim
|
||||
% Hadr04
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- graphite.mac: neutron (2 MeV) in graphite
|
||||
- run01.mac: neutron (2 MeV) in Water_ts
|
||||
|
||||
Macros to be run interactively:
|
||||
- debug.mac: neutron (2 MeV) in Water_ts
|
||||
- vis.mac: To activate visualization
|
||||
*/
|
||||
@@ -0,0 +1,124 @@
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Hadr04
|
||||
------
|
||||
|
||||
This example is focused on neutronHP physics, especially neutron transport,
|
||||
including thermal scattering.
|
||||
See A.R. Garcia, E. Mendoza, D. Cano-Ott presentation at G4 Hadronic group
|
||||
meeting (04/2013) and note on G4NeutronHP package
|
||||
|
||||
1- MATERIALS AND GEOMETRY DEFINITION
|
||||
|
||||
It is a single box representing a 'quasi infinite' homogeneous medium.
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
|
||||
The default geometry (1 m3 of pressurized water) is built in
|
||||
DetectorConstruction, but the above parameters can be changed interactively
|
||||
via commands defined in DetectorMessenger.
|
||||
|
||||
A function, and its associated UI command, allows to build a material
|
||||
directly from a single isotope.
|
||||
|
||||
To be identified by the ThermalScattering module, the elements composing a
|
||||
material must have a specific name (see G4NeutronHPThermalScatteringNames.cc)
|
||||
Examples of such materials are build in DetectorConstruction.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
Only processes of neutronHP package are registered : neutronElastic
|
||||
(including thermalScattering), neutronInelastic, nCapture; nFission.
|
||||
See class NeutronHPphysics.
|
||||
No other hadronic nor electromagnetic processes are registered.
|
||||
|
||||
A command allows to select or not ThermalScattering model.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To select them, see Hadr04.cc
|
||||
|
||||
NB. class NeutronHPphysics can be reused with other physicsConstructors,
|
||||
as neutron processes are deleted before to be re-created.
|
||||
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic is a single particle randomly shooted at the
|
||||
centre of the box. The type of the particle and its energy are set in
|
||||
PrimaryGeneratorAction (neutron 2 MeV), and can be changed via the G4
|
||||
build-in commands of ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
4- PHYSICS
|
||||
|
||||
All secondaries are killed in StackingAction. Therefore an event consists of
|
||||
the transport of the primary neutron. Then one survey the thermal and non
|
||||
thermal part of this parcours.
|
||||
|
||||
|
||||
5- HISTOGRAMS
|
||||
|
||||
The test contains 7 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its Messenger. The histos can be individually
|
||||
activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
1 "incident neutron: nb of collisions above 1 eV"
|
||||
2 "incident neutron: total track length above 1 eV"
|
||||
3 "incident neutron: time of flight above 1 eV"
|
||||
4 "incident neutron: nb of collisions below 1 eV"
|
||||
5 "incident neutron: total track length below 1*eV"
|
||||
6 "incident neutron: time of flight below 1 eV"
|
||||
7 "incident neutron: energy distribution below 1*eV"
|
||||
|
||||
The histograms are managed by the HistoManager class and its Messenger.
|
||||
The histos can be individually activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default Hadr04)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
All selected histos will be written on a file name.ascii (default Hadr04)
|
||||
|
||||
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 Hadr04 in 'batch' mode from macro files :
|
||||
% Hadr04 run01.mac
|
||||
|
||||
Execute Hadr04 in 'interactive mode' with visualization :
|
||||
% Hadr04
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros provided in this example:
|
||||
- graphite.mac: neutron (2 MeV) in graphite
|
||||
- run01.mac: neutron (2 MeV) in Water_ts
|
||||
|
||||
Macros to be run interactively:
|
||||
- debug.mac: neutron (2 MeV) in Water_ts
|
||||
- vis.mac: To activate visualization
|
||||
@@ -0,0 +1,188 @@
|
||||
|
||||
///\file "hadronic/Hadr05/.README.txt"
|
||||
///\brief Example Hadr05 README page
|
||||
|
||||
/*! \page ExampleHadr05 Example Hadr05
|
||||
|
||||
How to collect energy deposition in a sampling calorimeter.
|
||||
How to survey energy flow.
|
||||
Hadr05 is the hadronic equivalent of TestEm3.
|
||||
|
||||
|
||||
\section Hadr05_s1 GEOMETRY DEFINITION
|
||||
|
||||
The calorimeter is a box made of a given number of layers.
|
||||
A layer consists of a sequence of various absorbers (maximum MaxAbsor=9).
|
||||
The layer is replicated.
|
||||
|
||||
Parameters defining the calorimeter :
|
||||
- the number of layers,
|
||||
- the number of absorbers within a layer,
|
||||
- the material of the absorbers,
|
||||
- the thickness of the absorbers,
|
||||
- the transverse size of the calorimeter (the input face is a square).
|
||||
|
||||
In addition a transverse uniform magnetic field can be applied.
|
||||
|
||||
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.
|
||||
|
||||
\verbatim
|
||||
|<----layer 0---------->|<----layer 1---------->|<----layer 2---------->|
|
||||
| | | | |
|
||||
==========================================================================
|
||||
|| | || | || | ||
|
||||
|| | || | || | ||
|
||||
|| abs 1 | abs 2 || abs 1 | abs 2 || abs 1 | abs 2 ||
|
||||
|| | || | || | ||
|
||||
|| | || | || | ||
|
||||
beam || | || | || | ||
|
||||
======> || | || | || | ||
|
||||
|| | || | || | ||
|
||||
|| | || | || | ||
|
||||
|| | || | || | ||
|
||||
|| | || | || | ||
|
||||
|| cell 1 | cell 2 || cell 3 | cell 4 || cell 5 | cell 6 ||
|
||||
==========================================================================
|
||||
^ ^ ^ ^ ^ ^ ^
|
||||
pln1 pln2 pln3 pln4 pln5 pln6 pln7
|
||||
\endverbatim
|
||||
|
||||
NB. The number of absorbers and the number of layers can be set to 1.
|
||||
In this case we have a unique homogeneous block of matter, which looks like
|
||||
a bubble chamber rather than a calorimeter ...
|
||||
(see the macro emtutor.mac)
|
||||
|
||||
A function, and its associated UI command, allows to build a material
|
||||
directly from a single isotope.
|
||||
|
||||
To be identified by the ThermalScattering module, the elements composing a
|
||||
material must have a specific name (see G4ParticleHPThermalScatteringNames.cc)
|
||||
Examples of such materials are build in Hadr06/src/DetectorConstruction.cc
|
||||
|
||||
\section Hadr05_s2 PHYSICS LISTS
|
||||
|
||||
"Full" set of physics processes are registered, but via PhysicsConstructor
|
||||
objects rather than complete pre-defined G4 physics lists. This alternative
|
||||
way gives more freedom to register physics.
|
||||
|
||||
Physics constructors are either constructors provided in Geant4 (with G4 prefix)
|
||||
or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic,
|
||||
GammaNuclear, RadioactiveDecay and Electomagnetic.
|
||||
(see geant4/source/physics_lists/constructors)
|
||||
|
||||
HadronElasticPhysicsHP include a model for thermalized neutrons,
|
||||
under the control of the command /testhadr/phys/thermalScattering
|
||||
|
||||
GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
|
||||
|
||||
ElectromagneticPhysics is a readable version of G4EmStandardPhysics_opt3.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To select them, see Hadr07.cc
|
||||
|
||||
\section Hadr05_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
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 G4ParticleGun class (see the macros provided with this
|
||||
example).
|
||||
|
||||
In addition one can choose randomly the impact point of the incident particle.
|
||||
The corresponding interactive command is built in PrimaryGeneratorAction.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
Hadr05 computes the energy deposited per absorber and the energy flow through
|
||||
the calorimeter.
|
||||
|
||||
\section Hadr05_s4 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main() (see Hadr05.cc).
|
||||
The initialisation of the drawing is done via the commands :
|
||||
/vis/... in the macro vis.mac. In interactive session:
|
||||
\verbatim
|
||||
PreInit or Idle > /control/execute vis.mac
|
||||
\endverbatim
|
||||
|
||||
The default view is a longitudinal view of the calorimeter.
|
||||
|
||||
\section Hadr05_s5 PHYSICS DEMO
|
||||
|
||||
The particle's type and the physics processes which will be available
|
||||
in this example are set in PhysicsList class.
|
||||
|
||||
In addition a built-in interactive command (/process/inactivate processName)
|
||||
allows to activate/inactivate the processes one by one.
|
||||
Then one can well visualize the processes one by one, especially
|
||||
in the bubble chamber setup with a transverse magnetic field.
|
||||
|
||||
\section Hadr05_s6 HOW TO START ?
|
||||
|
||||
- Execute Hadr05 in 'batch' mode from macro files
|
||||
\verbatim
|
||||
% Hadr05 Cu-lAr.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute Hadr05 in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% Hadr05
|
||||
....
|
||||
Idle> type your commands. For instance:
|
||||
Idle> /control/execute vis.mac
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- Fe-Sci.mac, Cu-lAr.mac, Pb-lAr.mac, W-lAr.mac : names are self explanatory
|
||||
- emtest.mac, emtutor.mac : to be run interactively
|
||||
- vis.mac: to activate visualization
|
||||
|
||||
\section Hadr05_s7 HISTOGRAMS
|
||||
|
||||
Hadr05 can produce histograms :
|
||||
|
||||
\verbatim
|
||||
histo 1 : energy deposit in absorber 1
|
||||
histo 2 : energy deposit in absorber 2
|
||||
...etc...........
|
||||
|
||||
histo 11 : longitudinal profile of energy deposit in absorber 1 (MeV/event)
|
||||
histo 12 : longitudinal profile of energy deposit in absorber 2 (MeV/event)
|
||||
...etc...........
|
||||
|
||||
histo 21 : energy flow (MeV/event)
|
||||
histo 22 : lateral energy leak (MeV/event)
|
||||
|
||||
NB. Numbering scheme for histograms:
|
||||
layer : from 1 to NbOfLayers (included)
|
||||
absorbers : from 1 to NbOfAbsor (included)
|
||||
planes : from 1 to NbOfLayers*NbOfAbsor + 1 (included)
|
||||
\endverbatim
|
||||
|
||||
One can control the binning of the histo with the command:
|
||||
\verbatim
|
||||
/analysis/h1/set idAbsor nbin Emin Emax unit
|
||||
\endverbatim
|
||||
etc.,
|
||||
where unit is the desired energy unit for that histo (see Hadr05.in).
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default hadr05)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
/analysis/h1/setAscii id
|
||||
\endverbatim
|
||||
All selected histos will be written on a file name.ascii (default hadr05)
|
||||
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Hadr05
|
||||
------
|
||||
|
||||
How to collect energy deposition in a sampling calorimeter.
|
||||
How to survey energy flow.
|
||||
Hadr05 is the hadronic equivalent of TestEm3.
|
||||
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The calorimeter is a box made of a given number of layers.
|
||||
A layer consists of a sequence of various absorbers (maximum MaxAbsor=9).
|
||||
The layer is replicated.
|
||||
|
||||
Parameters defining the calorimeter :
|
||||
- the number of layers,
|
||||
- the number of absorbers within a layer,
|
||||
- the material of the absorbers,
|
||||
- the thickness of the absorbers,
|
||||
- the transverse size of the calorimeter (the input face is a square).
|
||||
|
||||
In addition a transverse uniform magnetic field can be applied.
|
||||
|
||||
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---------->|
|
||||
| | | | |
|
||||
==========================================================================
|
||||
|| | || | || | ||
|
||||
|| | || | || | ||
|
||||
|| abs 1 | abs 2 || abs 1 | abs 2 || abs 1 | abs 2 ||
|
||||
|| | || | || | ||
|
||||
|| | || | || | ||
|
||||
beam || | || | || | ||
|
||||
======> || | || | || | ||
|
||||
|| | || | || | ||
|
||||
|| | || | || | ||
|
||||
|| | || | || | ||
|
||||
|| | || | || | ||
|
||||
|| cell 1 | cell 2 || cell 3 | cell 4 || cell 5 | cell 6 ||
|
||||
==========================================================================
|
||||
^ ^ ^ ^ ^ ^ ^
|
||||
pln1 pln2 pln3 pln4 pln5 pln6 pln7
|
||||
|
||||
NB. The number of absorbers and the number of layers can be set to 1.
|
||||
In this case we have a unique homogeneous block of matter, which looks like
|
||||
a bubble chamber rather than a calorimeter ...
|
||||
(see the macro emtutor.mac)
|
||||
|
||||
A function, and its associated UI command, allows to build a material
|
||||
directly from a single isotope.
|
||||
|
||||
To be identified by the ThermalScattering module, the elements composing a
|
||||
material must have a specific name (see G4ParticleHPThermalScatteringNames.cc)
|
||||
Examples of such materials are build in Hadr06/src/DetectorConstruction.cc
|
||||
|
||||
2- PHYSICS LISTS
|
||||
|
||||
"Full" set of physics processes are registered, but via PhysicsConstructor
|
||||
objects rather than complete pre-defined G4 physics lists. This alternative
|
||||
way gives more freedom to register physics.
|
||||
|
||||
Physics constructors are either constructors provided in Geant4 (with G4 prefix)
|
||||
or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic,
|
||||
GammaNuclear, RadioactiveDecay and Electomagnetic.
|
||||
(see geant4/source/physics_lists/constructors)
|
||||
|
||||
HadronElasticPhysicsHP include a model for thermalized neutrons,
|
||||
under the control of the command /testhadr/phys/thermalScattering
|
||||
|
||||
GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
|
||||
|
||||
ElectromagneticPhysics is a readable version of G4EmStandardPhysics_opt3.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To select them, see Hadr07.cc
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
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 G4ParticleGun class (see the macros provided with this
|
||||
example).
|
||||
|
||||
In addition one can choose randomly the impact point of the incident particle.
|
||||
The corresponding interactive command is built in PrimaryGeneratorAction.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
Hadr05 computes the energy deposited per absorber and the energy flow through
|
||||
the calorimeter.
|
||||
|
||||
4- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main() (see Hadr05.cc).
|
||||
The initialisation of the drawing is done via the commands :
|
||||
/vis/... in the macro vis.mac. In interactive session:
|
||||
PreInit or Idle > /control/execute vis.mac
|
||||
|
||||
The default view is a longitudinal view of the calorimeter.
|
||||
|
||||
5- PHYSICS DEMO
|
||||
|
||||
The particle's type and the physics processes which will be available
|
||||
in this example are set in PhysicsList class.
|
||||
|
||||
In addition a built-in interactive command (/process/inactivate processName)
|
||||
allows to activate/inactivate the processes one by one.
|
||||
Then one can well visualize the processes one by one, especially
|
||||
in the bubble chamber setup with a transverse magnetic field.
|
||||
|
||||
6- HOW TO START ?
|
||||
|
||||
- Execute Hadr05 in 'batch' mode from macro files
|
||||
% Hadr05 Cu-lAr.mac
|
||||
|
||||
- Execute Hadr05 in 'interactive mode' with visualization
|
||||
% Hadr05
|
||||
....
|
||||
Idle> type your commands. For instance:
|
||||
Idle> /control/execute vis.mac
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros provided in this example:
|
||||
- Fe-Sci.mac, Cu-lAr.mac, Pb-lAr.mac, W-lAr.mac : names are self explanatory
|
||||
- emtest.mac, emtutor.mac : to be run interactively
|
||||
- vis.mac: to activate visualization
|
||||
|
||||
7- HISTOGRAMS
|
||||
|
||||
Hadr05 can produce histograms :
|
||||
histo 1 : energy deposit in absorber 1
|
||||
histo 2 : energy deposit in absorber 2
|
||||
...etc...........
|
||||
|
||||
histo 11 : longitudinal profile of energy deposit in absorber 1 (MeV/event)
|
||||
histo 12 : longitudinal profile of energy deposit in absorber 2 (MeV/event)
|
||||
...etc...........
|
||||
|
||||
histo 21 : energy flow (MeV/event)
|
||||
histo 22 : lateral energy leak (MeV/event)
|
||||
|
||||
NB. Numbering scheme for histograms:
|
||||
layer : from 1 to NbOfLayers (included)
|
||||
absorbers : from 1 to NbOfAbsor (included)
|
||||
planes : from 1 to NbOfLayers*NbOfAbsor + 1 (included)
|
||||
|
||||
One can control the binning of the histo with the command:
|
||||
/analysis/h1/set idAbsor nbin Emin Emax unit
|
||||
where unit is the desired energy unit for that histo
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default hadr05)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
All selected histos will be written on a file name.ascii (default hadr05)
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
|
||||
///\file "hadronic/Hadr06/.README.txt"
|
||||
///\brief Example Hadr06 README page
|
||||
|
||||
/*! \page ExampleHadr06 Example Hadr06
|
||||
|
||||
Survey energy deposition and particle's flux from an hadronic cascade.
|
||||
Use PhysicsConstructor objects rather than predefined G4 PhysicsLists.
|
||||
|
||||
\section Hadr06_s1 MATERIALS AND GEOMETRY DEFINITION
|
||||
|
||||
The geometry is a single sphere (absorber) of an homogenous material.
|
||||
|
||||
Two parameters define the geometry :
|
||||
- the radius of the sphere
|
||||
- the material of the sphere
|
||||
|
||||
The default geometry (R=30 cm of water) is built in
|
||||
DetectorConstruction, but the above parameters can be changed interactively
|
||||
via commands defined in DetectorMessenger.
|
||||
|
||||
The absorber is surrounded by a World volume (vacuum)
|
||||
|
||||
A function, and its associated UI command, allows to build a material
|
||||
directly from a single isotope.
|
||||
|
||||
To be identified by the ThermalScattering module, the elements composing a
|
||||
material must have a specific name (see G4NeutronHPThermalScatteringNames.cc)
|
||||
Examples of such materials are build in DetectorConstruction.
|
||||
|
||||
\section Hadr06_s2 PHYSICS LIST
|
||||
|
||||
"Full" set of physics processes are registered, but via PhysicsConstructor
|
||||
objects rather than complete pre-defined G4 physics lists. This alternative
|
||||
way gives more freedom to register physics.
|
||||
|
||||
Physics constructors are either constructors provided in Geant4 (with G4 prefix)
|
||||
or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic, GammaNuclear,
|
||||
RadioactiveDecay and Electomagnetic.
|
||||
(see geant4/source/physics_lists/constructors)
|
||||
|
||||
HadronElasticPhysicsHP include a model for thermalized neutrons, under the control of a command
|
||||
defined in NeutronHPMesseger.
|
||||
|
||||
GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
|
||||
|
||||
ElectromagneticPhysics is a simplified version of G4EmStandardPhysics.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To trigger them, see Hadr06.cc
|
||||
|
||||
\section Hadr06_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic is a single particle randomly shooted at the
|
||||
centre of the sphere. The type of the particle and its energy are set in
|
||||
PrimaryGeneratorAction (neutron 14 MeV), and can be changed via the G4
|
||||
build-in commands of ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
\section Hadr06_s4 PHYSICS
|
||||
|
||||
The program computes and plots energy deposited in the interaction volume
|
||||
(absorber) and the flux of particles leaving this volume.
|
||||
Processes invoked and particles generated during hadronic cascade are listed.
|
||||
|
||||
|
||||
|
||||
\section Hadr06_s5 HISTOGRAMS
|
||||
|
||||
The test contains 23 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its Messenger. The histos can be individually
|
||||
activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
1 "total energy deposit"
|
||||
2 "Edep (MeV/mm) profile along radius"
|
||||
3 "total kinetic energy flow"
|
||||
4 "energy spectrum of gamma at creation"
|
||||
5 "energy spectrum of e+- at creation"
|
||||
6 "energy spectrum of neutrons at creation"
|
||||
7 "energy spectrum of protons at creation"
|
||||
8 "energy spectrum of deuterons at creation"
|
||||
9 "energy spectrum of alphas at creation"
|
||||
10 "energy spectrum of all others ions at creation"
|
||||
11 "energy spectrum of all others baryons at creation"
|
||||
12 "energy spectrum of all others mesons at creation"
|
||||
13 "energy spectrum of all others leptons (neutrinos) at creation"
|
||||
14 "energy spectrum of emerging gamma"
|
||||
15 "energy spectrum of emerging e+-"
|
||||
16 "energy spectrum of emerging neutrons"
|
||||
17 "energy spectrum of emerging protons"
|
||||
18 "energy spectrum of emerging deuterons"
|
||||
19 "energy spectrum of emerging alphas"
|
||||
20 "energy spectrum of all others emerging ions"
|
||||
21 "energy spectrum of all others emerging baryons"
|
||||
22 "energy spectrum of all others emerging mesons"
|
||||
23 "energy spectrum of all others emerging leptons (neutrinos)"
|
||||
|
||||
The histograms are managed by the HistoManager class and its Messenger.
|
||||
The histos can be individually activated with the command :
|
||||
\verbatim
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
\endverbatim
|
||||
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default Hadr06)
|
||||
\endverbatim
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
/analysis/h1/setAscii id
|
||||
\endverbatim
|
||||
All selected histos will be written on a file name.ascii (default Hadr06)
|
||||
|
||||
\section Hadr06_s6 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:
|
||||
\verbatim
|
||||
> /control/execute vis.mac
|
||||
\endverbatim
|
||||
|
||||
The tracks are drawn at the end of event, and erased at the end of run.
|
||||
gamma green
|
||||
neutron yellow
|
||||
negative particles (e-, ...) red
|
||||
positive particles (e+, ions, ...) blue
|
||||
|
||||
\section Hadr06_s7 HOW TO START ?
|
||||
|
||||
Execute Hadr06 in 'batch' mode from macro files :
|
||||
\verbatim
|
||||
% Hadr06 run1.mac
|
||||
\endverbatim
|
||||
|
||||
Execute Hadr06 in 'interactive mode' with visualization :
|
||||
\verbatim
|
||||
% Hadr06
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- graphite.mac: neutron,14 MeV, in graphite
|
||||
- run1.mac: neutron,14 MeV, in Li7
|
||||
- singleFission.mac: single fission in U235
|
||||
|
||||
Macros to be run interactively:
|
||||
- debug.mac: water with thermal scattering
|
||||
- fission.mac: U235
|
||||
- vis.mac: To activate visualization
|
||||
*/
|
||||
@@ -0,0 +1,152 @@
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Hadr06
|
||||
------
|
||||
|
||||
Survey energy deposition and particle's flux from an hadronic cascade.
|
||||
Use PhysicsConstructor objects rather than predefined G4 PhysicsLists.
|
||||
|
||||
|
||||
1- MATERIALS AND GEOMETRY DEFINITION
|
||||
|
||||
The geometry is a single sphere (absorber) of an homogenous material.
|
||||
|
||||
Two parameters define the geometry :
|
||||
- the radius of the sphere
|
||||
- the material of the sphere
|
||||
|
||||
The default geometry (R=30 cm of water) is built in
|
||||
DetectorConstruction, but the above parameters can be changed interactively
|
||||
via commands defined in DetectorMessenger.
|
||||
|
||||
The absorber is surrounded by a World volume (vacuum)
|
||||
|
||||
A function, and its associated UI command, allows to build a material
|
||||
directly from a single isotope.
|
||||
|
||||
To be identified by the ThermalScattering module, the elements composing a
|
||||
material must have a specific name (see G4ParticleHPThermalScatteringNames.cc)
|
||||
Examples of such materials are build in DetectorConstruction.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
"Full" set of physics processes are registered, but via PhysicsConstructor
|
||||
objects rather than complete pre-defined G4 physics lists. This alternative
|
||||
way gives more freedom to register physics.
|
||||
|
||||
Physics constructors are either constructors provided in Geant4 (with G4 prefix)
|
||||
or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic, GammaNuclear,
|
||||
RadioactiveDecay and Electomagnetic.
|
||||
(see geant4/source/physics_lists/constructors)
|
||||
|
||||
HadronElasticPhysicsHP include a model for thermalized neutrons, under the control of a command
|
||||
defined in NeutronHPMesseger.
|
||||
|
||||
GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
|
||||
|
||||
ElectromagneticPhysics is a simplified version of G4EmStandardPhysics.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To trigger them, see Hadr06.cc
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic is a single particle randomly shooted at the
|
||||
centre of the sphere. The type of the particle and its energy are set in
|
||||
PrimaryGeneratorAction (neutron 14 MeV), and can be changed via the G4
|
||||
build-in commands of ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
4- PHYSICS
|
||||
|
||||
The program computes and plots energy deposited in the interaction volume
|
||||
(absorber) and the flux of particles leaving this volume.
|
||||
Processes invoked and particles generated during hadronic cascade are listed.
|
||||
|
||||
5- HISTOGRAMS
|
||||
|
||||
The test contains 23 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its Messenger. The histos can be individually
|
||||
activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
1 "total energy deposit"
|
||||
2 "Edep (MeV/mm) profile along radius"
|
||||
3 "total kinetic energy flow"
|
||||
4 "energy spectrum of gamma at creation"
|
||||
5 "energy spectrum of e+- at creation"
|
||||
6 "energy spectrum of neutrons at creation"
|
||||
7 "energy spectrum of protons at creation"
|
||||
8 "energy spectrum of deuterons at creation"
|
||||
9 "energy spectrum of alphas at creation"
|
||||
10 "energy spectrum of all others ions at creation"
|
||||
11 "energy spectrum of all others baryons at creation"
|
||||
12 "energy spectrum of all others mesons at creation"
|
||||
13 "energy spectrum of all others leptons (neutrinos) at creation"
|
||||
14 "energy spectrum of emerging gamma"
|
||||
15 "energy spectrum of emerging e+-"
|
||||
16 "energy spectrum of emerging neutrons"
|
||||
17 "energy spectrum of emerging protons"
|
||||
18 "energy spectrum of emerging deuterons"
|
||||
19 "energy spectrum of emerging alphas"
|
||||
20 "energy spectrum of all others emerging ions"
|
||||
21 "energy spectrum of all others emerging baryons"
|
||||
22 "energy spectrum of all others emerging mesons"
|
||||
23 "energy spectrum of all others emerging leptons (neutrinos)"
|
||||
|
||||
The histograms are managed by the HistoManager class and its Messenger.
|
||||
The histos can be individually activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default Hadr06)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
All selected histos will be written on a file name.ascii (default Hadr04)
|
||||
|
||||
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 tracks are drawn at the end of event, and erased at the end of run.
|
||||
gamma green
|
||||
neutron yellow
|
||||
negative particles (e-, ...) red
|
||||
positive particles (e+, ions, ...) blue
|
||||
|
||||
7- HOW TO START ?
|
||||
|
||||
Execute Hadr06 in 'batch' mode from macro files :
|
||||
% Hadr06 run1.mac
|
||||
|
||||
Execute Hadr06 in 'interactive mode' with visualization :
|
||||
% Hadr06
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros provided in this example:
|
||||
- graphite.mac: neutron,14 MeV, in graphite
|
||||
- run1.mac: neutron,14 MeV, in Li7
|
||||
- singleFission.mac: single fission in U235
|
||||
|
||||
Macros to be run interactively:
|
||||
- debug.mac: water with thermal scattering
|
||||
- fission.mac: U235
|
||||
- vis.mac: To activate visualization
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
|
||||
///\file "hadronic/Hadr07/.README.txt"
|
||||
///\brief Example Hadr07 README page
|
||||
|
||||
/*! \page ExampleHadr07 Example Hadr07
|
||||
|
||||
Survey energy deposition and particle's flux from an hadronic cascade.
|
||||
Use PhysicsConstructor objects rather than predefined G4 PhysicsLists.
|
||||
How to plot a depth dose profile in a rectangular box.
|
||||
|
||||
\section Hadr07_s1 MATERIALS AND GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a stack of one or several blocks of homogenous
|
||||
material, called absorbers.
|
||||
|
||||
A minimum of 4 parameters define the geometry :
|
||||
- the number of absorbers (NbOfAbsor)
|
||||
- the material of each absorber,
|
||||
- the thickness of each absorber,
|
||||
- the tranverse dimension of the stack (sizeYZ)
|
||||
|
||||
In addition a transverse uniform magnetic field can be applied.
|
||||
eg: /globalField/setValue 0 0 5 tesla
|
||||
|
||||
The absorber is surrounded by a World volume (vacuum)
|
||||
|
||||
A function, and its associated UI command, allows to build a material
|
||||
directly from a single isotope.
|
||||
|
||||
The default geometry is built in DetectorConstruction, but the above parameters
|
||||
can be changed interactively via commands defined in DetectorMessenger.
|
||||
|
||||
To be identified by the ThermalScattering module, the elements composing a
|
||||
material must have a specific name (see G4ParticleHPThermalScatteringNames.cc)
|
||||
Examples of such materials are build in Hadr06/src/DetectorConstruction.
|
||||
|
||||
\section Hadr07_s2 PHYSICS LIST
|
||||
|
||||
"Full" set of physics processes are registered, but via PhysicsConstructor
|
||||
objects rather than complete pre-defined G4 physics lists. This alternative
|
||||
way gives more freedom to register physics.
|
||||
|
||||
Physics constructors are either constructors provided in Geant4 (with G4 prefix)
|
||||
or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic, GammaNuclear,
|
||||
RadioactiveDecay and Electomagnetic.
|
||||
(see geant4/source/physics_lists/constructors)
|
||||
|
||||
HadronElasticPhysicsHP include a model for thermalized neutrons, under the control of a command
|
||||
defined in NeutronHPMesseger.
|
||||
|
||||
GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
|
||||
|
||||
ElectromagneticPhysics is a simplified version of G4EmStandardPhysics.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To select them, see Hadr07.cc
|
||||
|
||||
\section Hadr07_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle starting at the
|
||||
left face of the box. 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 G4ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
In addition one can choose randomly the impact point of the incident
|
||||
particle. The corresponding interactive command is built in
|
||||
PrimaryGeneratorMessenger class.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
\section Hadr07_s4 PHYSICS
|
||||
|
||||
The program computes the energy deposited in each absorber,
|
||||
and the flux of particles emerging in the world.
|
||||
Processes invoked and particles generated are listed.
|
||||
|
||||
\section Hadr07_s5 HISTOGRAMS
|
||||
|
||||
The test has several built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its Messenger. The histos can be individually
|
||||
activated with the command :
|
||||
\verbatim
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
\endverbatim
|
||||
where unit is the desired unit for the histo (MeV or keV, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
1 "total energy deposited in absorber 1
|
||||
2 "total energy deposited in absorber 2
|
||||
...........................................
|
||||
9 "total energy deposited in absorber 9
|
||||
10 "Edep (MeV/mm) profile along absorbers"
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default Hadr07)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
/analysis/h1/setAscii id
|
||||
\endverbatim
|
||||
All selected histos will be written on a file name.ascii (default Hadr07)
|
||||
|
||||
\section Hadr07_s6 TRACKING and STEP MAX
|
||||
|
||||
Hadr07 computes the distribution of energy deposited along the trajectory of
|
||||
the incident particle : the so-called longitudinal energy profile,
|
||||
or depth dose distribution (histogram 10).
|
||||
The energy deposited (edep) is randomly distribued along the step (see
|
||||
SteppingAction).
|
||||
|
||||
In order to control the accuracy of the deposition, the maximum step size
|
||||
of charged particles is computed automatically from the binning of
|
||||
histogram 10.
|
||||
|
||||
As an example, this limitation is implemented as a 'full' process :
|
||||
see StepMax class and its Messenger. The 'StepMax process' is registered
|
||||
in the Physics List, via a physicsConstructor object (a builder).
|
||||
|
||||
StepMax is evaluated in the StepMax process.
|
||||
A boolean UI command allows to deactivate this mechanism.
|
||||
Another UI command allows to define directly a stepMax value.
|
||||
|
||||
\section Hadr07_s7 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:
|
||||
\verbatim
|
||||
> /control/execute vis.mac
|
||||
\endverbatim
|
||||
|
||||
The tracks are drawn at the end of event, and erased at the end of run.
|
||||
gamma green
|
||||
neutron yellow
|
||||
negative particles (e-, ...) red
|
||||
positive particles (e+, ions, ...) blue
|
||||
|
||||
\section Hadr07_s8 HOW TO START ?
|
||||
|
||||
Execute Hadr07 in 'batch' mode from macro files :
|
||||
\verbatim
|
||||
% Hadr07 run1.mac
|
||||
\endverbatim
|
||||
|
||||
Execute Hadr07 in 'interactive mode' with visualization :
|
||||
\verbatim
|
||||
% Hadr07
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- Na22.mac: multilayers. Radioactive source
|
||||
- alpha.mac: alpha (400 MeV). Limit the step size from histo 10
|
||||
- ionC12.mac: C12 (2.4 GeV). Limit the step size from histo 10
|
||||
- water.mac: e- (4 MeV) in Water
|
||||
|
||||
Macros to be run interactively:
|
||||
- proton.mac: proton (1 GeV). Multilayers
|
||||
- vis.mac: To activate visualization
|
||||
*/
|
||||
@@ -0,0 +1,161 @@
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Hadr07
|
||||
------
|
||||
|
||||
Survey energy deposition and particle's flux from an hadronic cascade.
|
||||
Use PhysicsConstructor objects rather than predefined G4 PhysicsLists.
|
||||
Show how to plot a depth dose profile in a rectangular box.
|
||||
|
||||
|
||||
1- MATERIALS AND GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a stack of one or several blocks of homogenous
|
||||
material, called absorbers.
|
||||
|
||||
A minimum of 4 parameters define the geometry :
|
||||
- the number of absorbers (NbOfAbsor)
|
||||
- the material of each absorber,
|
||||
- the thickness of each absorber,
|
||||
- the tranverse dimension of the stack (sizeYZ)
|
||||
|
||||
In addition a transverse uniform magnetic field can be applied.
|
||||
eg: /globalField/setValue 0 0 5 tesla
|
||||
|
||||
The absorber is surrounded by a World volume (vacuum)
|
||||
|
||||
A function, and its associated UI command, allows to build a material
|
||||
directly from a single isotope.
|
||||
|
||||
The default geometry is built in DetectorConstruction, but the above parameters
|
||||
can be changed interactively via commands defined in DetectorMessenger.
|
||||
|
||||
To be identified by the ThermalScattering module, the elements composing a
|
||||
material must have a specific name (see G4ParticleHPThermalScatteringNames.cc)
|
||||
Examples of such materials are build in Hadr06/src/DetectorConstruction.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
"Full" set of physics processes are registered, but via PhysicsConstructor
|
||||
objects rather than complete pre-defined G4 physics lists. This alternative
|
||||
way gives more freedom to register physics.
|
||||
|
||||
Physics constructors are either constructors provided in Geant4 (with G4 prefix)
|
||||
or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic, GammaNuclear,
|
||||
RadioactiveDecay and Electomagnetic.
|
||||
(see geant4/source/physics_lists/constructors)
|
||||
|
||||
HadronElasticPhysicsHP include a model for thermalized neutrons, under the control of a command
|
||||
defined in NeutronHPMesseger.
|
||||
|
||||
GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
|
||||
|
||||
ElectromagneticPhysics is a simplified version of G4EmStandardPhysics.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To select them, see Hadr07.cc
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle starting at the
|
||||
left face of the box. 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 G4ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
In addition one can choose randomly the impact point of the incident
|
||||
particle. The corresponding interactive command is built in
|
||||
PrimaryGeneratorMessenger class.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
4- PHYSICS
|
||||
|
||||
The program computes the energy deposited in each absorber,
|
||||
and the flux of particles emerging in the world.
|
||||
Processes invoked and particles generated are listed.
|
||||
|
||||
5- HISTOGRAMS
|
||||
|
||||
The test has several built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its Messenger. The histos can be individually
|
||||
activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
1 "total energy deposited in absorber 1
|
||||
2 "total energy deposited in absorber 2
|
||||
...........................................
|
||||
9 "total energy deposited in absorber 9
|
||||
10 "Edep (MeV/mm) profile along absorbers"
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default Hadr07)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
All selected histos will be written on a file name.ascii (default Hadr07)
|
||||
|
||||
6- TRACKING and STEP MAX
|
||||
|
||||
Hadr07 computes the distribution of energy deposited along the trajectory of
|
||||
the incident particle : the so-called longitudinal energy profile,
|
||||
or depth dose distribution (histogram 10).
|
||||
The energy deposited (edep) is randomly distribued along the step (see
|
||||
SteppingAction).
|
||||
|
||||
In order to control the accuracy of the deposition, the maximum step size
|
||||
of charged particles is computed automatically from the binning of
|
||||
histogram 10.
|
||||
|
||||
As an example, this limitation is implemented as a 'full' process :
|
||||
see StepMax class and its Messenger. The 'StepMax process' is registered
|
||||
in the Physics List, via a physicsConstructor object (a builder).
|
||||
|
||||
StepMax is evaluated in the StepMax process.
|
||||
A boolean UI command allows to deactivate this mechanism.
|
||||
Another UI command allows to define directly a stepMax value.
|
||||
|
||||
|
||||
7- 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 tracks are drawn at the end of event, and erased at the end of run.
|
||||
gamma green
|
||||
neutron yellow
|
||||
negative particles (e-, ...) red
|
||||
positive particles (e+, ions, ...) blue
|
||||
|
||||
8- HOW TO START ?
|
||||
|
||||
Execute Hadr07 in 'batch' mode from macro files :
|
||||
% Hadr07 run1.mac
|
||||
|
||||
Execute Hadr07 in 'interactive mode' with visualization :
|
||||
% Hadr07
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros provided in this example:
|
||||
- Na22.mac: multilayers. Radioactive source
|
||||
- alpha.mac: alpha (400 MeV). Limit the step size from histo 10
|
||||
- ionC12.mac: C12 (2.4 GeV). Limit the step size from histo 10
|
||||
- water.mac: e- (4 MeV) in Water
|
||||
|
||||
Macros to be run interactively:
|
||||
- proton.mac: proton (1 GeV). Multilayers
|
||||
- vis.mac: To activate visualization
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
///\file "hadronic/Hadr08/.README.txt"
|
||||
///\brief Example Hadr08 README page
|
||||
|
||||
/*! \page ExampleHadr08 Example Hadr08
|
||||
|
||||
This is an example of how to use "generic biasing" to get the following
|
||||
functionality which is currently not available directly in the Geant4
|
||||
hadronic framework.
|
||||
|
||||
\section Hadr08_s1 PHYSICS LIST
|
||||
|
||||
We want to use the physics list FTFP_BERT everywhere in our detector,
|
||||
except that in one (or more) logical volume(s) we want to use a
|
||||
different combination of hadronic models, e.g. FTFP + INCLXX
|
||||
(instead of the default FTFP + BERT), for the final-state generation.
|
||||
|
||||
Notice that we use the powerful "generic biasing" machinery available
|
||||
in Geant4, but the actual weights of all tracks remain to the usual
|
||||
value (1.0) as in the normal (unbiased) case.
|
||||
|
||||
\section Hadr08_s2 MATERIALS AND GEOMETRY DEFINITION
|
||||
|
||||
In this example, the detector is very simple:
|
||||
- a homogeneous block of silicon, as a proxy of a tracker sub-detector;
|
||||
- followed by a crystal, as a proxy of an electromagnetic calorimeter;
|
||||
- followed by a homogeneous block of iron, as a proxy of a hadron
|
||||
calorimeter.
|
||||
We assume that the block of silicon is where we want to replace FTFP+BERT
|
||||
with FTFP+INCLXX for the final-state modeling of proton, neutron, pion-
|
||||
and pion+-inelastic interactions (of any energy).
|
||||
This silicon layer is made artificially thick (20 cm) in order to have
|
||||
more hadron inelastic interactions for testing.
|
||||
|
||||
This example has been tested only for G4 10.5.p01 and 10.6, but it should
|
||||
work also for previous recent releases (i.e. 10.4 and 10.3).
|
||||
The example works in both sequential and multi-threaded modes, and the
|
||||
CPU overhead due to "generic biasing" for this application seems to be
|
||||
very small (at the per-cent level).
|
||||
|
||||
\section Hadr08_s3 HOW TO START ?
|
||||
|
||||
To build it:
|
||||
\verbatim
|
||||
mkdir Build; cd Build
|
||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DGeant4_DIR=/path-to-geant4-libraries ../.
|
||||
make
|
||||
\endverbatim
|
||||
|
||||
To run it:
|
||||
\verbatim
|
||||
./Hadr08 hadr08.in
|
||||
\endverbatim
|
||||
which shoot 100 pion+ of 5 GeV kinetic energy.
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,40 @@
|
||||
This is an example of how to use "generic biasing" to get the following
|
||||
functionality which is currently not available directly in the Geant4
|
||||
hadronic framework.
|
||||
|
||||
We want to use the physics list FTFP_BERT everywhere in our detector,
|
||||
except that in one (or more) logical volume(s) we want to use a
|
||||
different combination of hadronic models, e.g. FTFP + INCLXX
|
||||
(instead of the default FTFP + BERT), for the final-state generation.
|
||||
|
||||
Notice that we use the powerful "generic biasing" machinery available
|
||||
in Geant4, but the actual weights of all tracks remain to the usual
|
||||
value (1.0) as in the normal (unbiased) case.
|
||||
|
||||
In this example, the detector is very simple:
|
||||
- a homogeneous block of silicon, as a proxy of a tracker sub-detector;
|
||||
- followed by a crystal, as a proxy of an electromagnetic calorimeter;
|
||||
- followed by a homogeneous block of iron, as a proxy of a hadron
|
||||
calorimeter.
|
||||
We assume that the block of silicon is where we want to replace FTFP+BERT
|
||||
with FTFP+INCLXX for the final-state modeling of proton, neutron, pion-
|
||||
and pion+-inelastic interactions (of any energy).
|
||||
This silicon layer is made artificially thick (20 cm) in order to have
|
||||
more hadron inelastic interactions for testing.
|
||||
|
||||
This example has been tested only for G4 10.5.p01 and 10.6, but it should
|
||||
work also for previous recent releases (i.e. 10.4 and 10.3).
|
||||
The example works in both sequential and multi-threaded modes, and the
|
||||
CPU overhead due to "generic biasing" for this application seems to be
|
||||
very small (at the per-cent level).
|
||||
|
||||
To build it:
|
||||
mkdir Build; cd Build
|
||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DGeant4_DIR=/path-to-geant4-libraries ../.
|
||||
make
|
||||
|
||||
To run it:
|
||||
./Hadr08 hadr08.in
|
||||
which shoot 100 pion+ of 5 GeV kinetic energy.
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
///\file "hadronic/Hadr09/.README.txt"
|
||||
///\brief Example Hadr09 README page
|
||||
|
||||
/*! \page ExampleHadr09 Example Hadr09
|
||||
|
||||
This example shows how to use Geant4 as a generator for simulating
|
||||
inelastic hadron-nuclear interactions.
|
||||
|
||||
The class HadronicGenerator is the "generator".
|
||||
The main hadronic models (FTFP, QGSP, BERT, BIC, IonBIC, INCL)
|
||||
and some combinations of two of them - in a transition energy region,
|
||||
similarly to what happens in physics lists - are available.
|
||||
See include/HadronicGenerator.hh for more detailed information.
|
||||
|
||||
The main, Hadr09.cc, shows an example of how to use it.
|
||||
It samples randomly the projectile hadron, its energy, its direction
|
||||
and the target material, and then it calls the generator.
|
||||
Some information regarding the secondaries which are produced can be
|
||||
printed out.
|
||||
See the comments in Hadr09.cc for more information and how eventually
|
||||
to change some of its configurations.
|
||||
Notice that Hadr09.cc does nothing really useful: users should consider
|
||||
to use eventually only the class HadronicGenerator.
|
||||
|
||||
Notice that the Geant4 run-manager is not used.
|
||||
|
||||
\section Hadr09_s1 HOW TO START ?
|
||||
|
||||
To build it:
|
||||
\verbatim
|
||||
mkdir Build; cd Build
|
||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DGeant4_DIR=/path-to-geant4-libraries ../.
|
||||
make
|
||||
\endverbatim
|
||||
|
||||
To run it:
|
||||
\verbatim
|
||||
./Hadr09 [Hadr09.in]
|
||||
\endverbatim
|
||||
|
||||
which simulates 1000 hadron-nucleus collisions, randomnly selected, and
|
||||
prints out some information about the secondaries produced in these
|
||||
interactions. It takes only a few seconds to run.
|
||||
Notice that the input file, Hadr09.in, which is empty, is not needed
|
||||
by Hadr09, and can be omitted; however, it has been created because
|
||||
is expected by system testing.
|
||||
|
||||
Note: this example has been included in Geant4 10.7, but it should work
|
||||
also for early versions of Geant4, in particular 10.6, 10.5 and 10.4.
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,46 @@
|
||||
This example shows how to use Geant4 as a generator for simulating
|
||||
inelastic hadron-nuclear interactions.
|
||||
|
||||
The class HadronicGenerator is the "generator".
|
||||
The main hadronic models (FTFP, QGSP, BERT, BIC, IonBIC, INCL)
|
||||
and some combinations of two of them - in a transition energy region,
|
||||
similarly to what happens in physics lists - are available.
|
||||
See include/HadronicGenerator.hh for more detailed information.
|
||||
|
||||
The main, Hadr09.cc, shows an example of how to use it.
|
||||
It samples randomly the projectile hadron, its energy, its direction
|
||||
and the target material, and then it calls the generator.
|
||||
Some information regarding the secondaries which are produced can be
|
||||
printed out.
|
||||
See the comments in Hadr09.cc for more information and how eventually
|
||||
to change some of its configurations.
|
||||
Notice that Hadr09.cc does nothing really useful: users should consider
|
||||
to use eventually only the class HadronicGenerator.
|
||||
|
||||
(
|
||||
The file Hadr09.cc-ION_PROJECTILE shows an example of a ion-ion
|
||||
collision, for fixed type of projectile ion, target ion, projectile
|
||||
kinetic energy, and projectile direction.
|
||||
This file is obtained from Hadr09.cc with minimal changes.
|
||||
)
|
||||
|
||||
Notice that the Geant4 run-manager is not used.
|
||||
|
||||
To build this example:
|
||||
mkdir Build; cd Build
|
||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DGeant4_DIR=/path-to-geant4-libraries ../.
|
||||
make
|
||||
|
||||
To run it:
|
||||
./Hadr09 [Hadr09.in]
|
||||
|
||||
which simulates 1000 hadron-nucleus collisions, randomnly selected, and
|
||||
prints out some information about the secondaries produced in these
|
||||
interactions. It takes only a few seconds to run.
|
||||
Notice that the input file, Hadr09.in, which is empty, is not needed
|
||||
by Hadr09, and can be omitted; however, it has been created because
|
||||
is expected by system testing.
|
||||
|
||||
Note: this example has been included in Geant4 10.7, but it should work
|
||||
also for early versions of Geant4, in particular 10.6, 10.5 and 10.4.
|
||||
@@ -0,0 +1,78 @@
|
||||
///\file "hadronic/Hadr10/.README.txt"
|
||||
///\brief Example Hadr10 README page
|
||||
|
||||
/*! \page ExampleHadr10 Example Hadr10
|
||||
|
||||
This is an example that aims to test the treatment of decays in Geant4.
|
||||
In particular, we want to test the decays of the tau lepton, charmed and
|
||||
bottom hadrons, and the use of pre-assigned decays.
|
||||
|
||||
Note that pre-assigned decays are decays that are usually specified by
|
||||
Monte Carlo event generators. For simplicity, and to avoid dependencies
|
||||
on external code, in this test we don't use any MC generator, and we
|
||||
pre-assign decays by hand (using the Geant4 decay table: this is done
|
||||
in the method SteppingAction::UserSteppingAction). But this does not
|
||||
change anything regarding the testing of the pre-assignment mechanism
|
||||
of Geant4.
|
||||
|
||||
The set-up is very simple: a cylindrical layer, 2 meter long, whose radii
|
||||
(inner and outer) and material can be specified via UI commands. By default,
|
||||
the material is Beryllium, with inner radius of 9 mm and outer radius of
|
||||
11 mm (i.e. the default thickness is 2 mm). In the rest of the world volume,
|
||||
is filled with G4_Galactic material (i.e. very low density gas).
|
||||
There is an uniform and constant magnetic field along the z-axis, whose
|
||||
value is set via UI command.
|
||||
|
||||
The primary particle, tau- by default, is shot along the x-axis, starting
|
||||
from the center (0, 0, 0).
|
||||
Its kinetic energy, by default 500 GeV, can be set via UI command.
|
||||
|
||||
All secondaries are killed immediately, so only the primary particle
|
||||
is studied.
|
||||
|
||||
The only interesting part of this example is the SteppingAction.
|
||||
The decay of the primary particle is pre-assigned there.
|
||||
When the primary particle decays, the properties of the decay -
|
||||
position, momentum, energy, etc. of the particle at the moment
|
||||
of the decay - are collected and then used to:
|
||||
- compute the difference between the "MC-truth" decay radius
|
||||
(defined as the radius at which the primary would have decayed
|
||||
if there were no magnetic field and interactions with matter,
|
||||
i.e. no energy loss and no multiple scattering) and the real
|
||||
decay radius
|
||||
- compute the angular deflection (in degrees) between the initial
|
||||
direction of the primary and its final direction at the moment
|
||||
it decays
|
||||
- the energy loss (i.e. the difference between the initial kinetic energy
|
||||
of the primary and the its kinetic energy at the moment of the decay)
|
||||
- the energy-momentum violation of the decay (i.e. the difference between
|
||||
the sum of the 4-momenta of the decay products and the 4-momentum of
|
||||
primary particle at the moment of its decay).
|
||||
Some of these information are printed out for each decay, and a summary
|
||||
statistics is printed out at the end of the application.
|
||||
|
||||
Look for the string "***LOOKHERE***" for those parameters/options that
|
||||
are hardwired in the code (i.e. not available via UI command).
|
||||
|
||||
This example uses the physics list factory, therefore you can specify
|
||||
the reference physics list you want to use via the PHYSLIST
|
||||
environmental variable (by default, if you don't set it, the FTFP_BERT
|
||||
physics list is used).
|
||||
|
||||
To build this example:
|
||||
|
||||
mkdir Build; cd Build
|
||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DGeant4_DIR=/path-to-geant4-libraries ../.
|
||||
make
|
||||
|
||||
To run it:
|
||||
|
||||
./Hadr10 hadr10.in
|
||||
|
||||
which shoots 500 GeV TeV particles - one run of 10'000 events for each
|
||||
type of particle - along the x-axis, and print out some information
|
||||
regarding their decays, as well as some summary information at the end
|
||||
of each run.
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,71 @@
|
||||
This is an example that aims to test the treatment of decays in Geant4.
|
||||
In particular, we want to test the decays of the tau lepton, charmed and
|
||||
bottom hadrons, and the use of pre-assigned decays.
|
||||
|
||||
Note that pre-assigned decays are decays that are usually specified by
|
||||
Monte Carlo event generators. For simplicity, and to avoid dependencies
|
||||
on external code, in this test we don't use any MC generator, and we
|
||||
pre-assign decays by hand (using the Geant4 decay table: this is done
|
||||
in the method SteppingAction::UserSteppingAction). But this does not
|
||||
change anything regarding the testing of the pre-assignment mechanism
|
||||
of Geant4.
|
||||
|
||||
The set-up is very simple: a cylindrical layer, 2 meter long, whose radii
|
||||
(inner and outer) and material can be specified via UI commands. By default,
|
||||
the material is Beryllium, with inner radius of 9 mm and outer radius of
|
||||
11 mm (i.e. the default thickness is 2 mm). In the rest of the world volume,
|
||||
is filled with G4_Galactic material (i.e. very low density gas).
|
||||
There is an uniform and constant magnetic field along the z-axis, whose
|
||||
value is set via UI command.
|
||||
|
||||
The primary particle, tau- by default, is shot along the x-axis, starting
|
||||
from the center (0, 0, 0).
|
||||
Its kinetic energy, by default 500 GeV, can be set via UI command.
|
||||
|
||||
All secondaries are killed immediately, so only the primary particle
|
||||
is studied.
|
||||
|
||||
The only interesting part of this example is the SteppingAction.
|
||||
The decay of the primary particle is pre-assigned there.
|
||||
When the primary particle decays, the properties of the decay -
|
||||
position, momentum, energy, etc. of the particle at the moment
|
||||
of the decay - are collected and then used to:
|
||||
- compute the difference between the "MC-truth" decay radius
|
||||
(defined as the radius at which the primary would have decayed
|
||||
if there were no magnetic field and interactions with matter,
|
||||
i.e. no energy loss and no multiple scattering) and the real
|
||||
decay radius
|
||||
- compute the angular deflection (in degrees) between the initial
|
||||
direction of the primary and its final direction at the moment
|
||||
it decays
|
||||
- the energy loss (i.e. the difference between the initial kinetic energy
|
||||
of the primary and the its kinetic energy at the moment of the decay)
|
||||
- the energy-momentum violation of the decay (i.e. the difference between
|
||||
the sum of the 4-momenta of the decay products and the 4-momentum of
|
||||
primary particle at the moment of its decay).
|
||||
Some of these information are printed out for each decay, and a summary
|
||||
statistics is printed out at the end of the application.
|
||||
|
||||
Look for the string "***LOOKHERE***" for those parameters/options that
|
||||
are hardwired in the code (i.e. not available via UI command).
|
||||
|
||||
This example uses the physics list factory, therefore you can specify
|
||||
the reference physics list you want to use via the PHYSLIST
|
||||
environmental variable (by default, if you don't set it, the FTFP_BERT
|
||||
physics list is used).
|
||||
|
||||
To build this example:
|
||||
|
||||
mkdir Build; cd Build
|
||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DGeant4_DIR=/path-to-geant4-libraries ../.
|
||||
make
|
||||
|
||||
To run it:
|
||||
|
||||
./Hadr10 hadr10.in
|
||||
|
||||
which shoots 500 GeV TeV particles - one run of 10'000 events for each
|
||||
type of particle - along the x-axis, and print out some information
|
||||
regarding their decays, as well as some summary information at the end
|
||||
of each run.
|
||||
@@ -0,0 +1,154 @@
|
||||
|
||||
///\file "hadronic/NeutronSource/.README.txt"
|
||||
///\brief Example NeutronSource README page
|
||||
|
||||
/*! \page ExampleNeutronSource Example NeutronSource
|
||||
|
||||
|
||||
NeutronSource is an example of neutrons production. It illustrates the cooperative work
|
||||
of nuclear reactions and radioactive decay processes.
|
||||
It survey energy deposition and particle's flux.
|
||||
It uses PhysicsConstructor objects.
|
||||
|
||||
\section NeutronSource_s1 MATERIALS AND GEOMETRY DEFINITION
|
||||
|
||||
The geometry is a cylinder (absorber) of an homogenous material (default : Beryllium oxide).
|
||||
This absorber is within a container (default : stainless-steel).
|
||||
|
||||
Five parameters define the geometry :
|
||||
- the material of the absorber
|
||||
- the radius and length of the absorber
|
||||
- the material of the container
|
||||
- the thickness of the container
|
||||
|
||||
The default geometry is built in DetectorConstruction, but the above
|
||||
parameters can be changed interactively via commands defined in DetectorMessenger.
|
||||
|
||||
The container is surrounded by a World volume (air)
|
||||
|
||||
A function, and its associated UI command, allows to build a material
|
||||
directly from a single isotope.
|
||||
|
||||
To be identified by the ThermalScattering module, the elements composing a
|
||||
material must have a specific name (see G4ParticleHPThermalScatteringNames.cc)
|
||||
Examples of such materials are build in DetectorConstruction of Hadr04,06,07.
|
||||
|
||||
\section NeutronSource_s2 PHYSICS LIST
|
||||
|
||||
"Full" set of physics processes are registered, but via PhysicsConstructor
|
||||
objects rather than complete pre-defined G4 physics lists. This alternative
|
||||
way may give more freedom to register physics.
|
||||
|
||||
Physics constructors are either constructors provided in Geant4 (with G4 prefix)
|
||||
or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic, GammaNuclear,
|
||||
RadioactiveDecay and Electomagnetic.
|
||||
(see geant4/source/physics_lists/constructors)
|
||||
|
||||
HadronElasticPhysicsHP include a model for thermalized neutrons, under the control of a command
|
||||
defined in NeutronHPMesseger.
|
||||
|
||||
GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
|
||||
|
||||
ElectromagneticPhysics is a simplified version of G4EmStandardPhysics.
|
||||
|
||||
In PhysicsList::ConstructProcess() we give an example of how to access hadronic models.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To select them, see NeutronSource.cc
|
||||
|
||||
\section NeutronSource_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic is a single particle uniformly shooted within the absorber.
|
||||
The type of the particle and its energy are set in PrimaryGeneratorAction (Am241, at rest),
|
||||
and can be changed via the G4 build-in commands of ParticleGun class
|
||||
(see the macros provided with this example).
|
||||
|
||||
\section NeutronSource_s4 PHYSICS
|
||||
|
||||
The program computes and plots energy deposited in the interaction volume
|
||||
(absorber + container) and the flux of particles leaving this volume.
|
||||
Processes invoked and particles generated during hadronic cascade are listed.
|
||||
|
||||
\section NeutronSource_s5 HISTOGRAMS
|
||||
|
||||
The test contains 13 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its Messenger. The histos can be individually
|
||||
activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
1 "total energy deposit"
|
||||
2 "dummy"
|
||||
3 "total kinetic energy flow"
|
||||
4 "gamma flux (dN/dE) at exit"
|
||||
5 "e+- flux (dN/dE) at exit"
|
||||
6 "neutrons flux (dN/dE) at exit"
|
||||
7 "protons flux (dN/dE) at exit"
|
||||
8 "deuterons flux (dN/dE) at exit"
|
||||
9 "alphas flux (dN/dE) at exit"
|
||||
10 "all others ions flux (dN/dE) at exit"
|
||||
11 "all others baryons flux (dN/dE) at exit"
|
||||
12 "all others mesons flux (dN/dE) at exit"
|
||||
13 "all others leptons flux (dN/dE) at exit"
|
||||
|
||||
The histograms are managed by the HistoManager class and its Messenger.
|
||||
The histos can be individually activated with the command :
|
||||
\verbatim
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
\endverbatim
|
||||
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default NeutronSource)
|
||||
\endverbatim
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
/analysis/h1/setAscii id
|
||||
\endverbatim
|
||||
All selected histos will be written on a file name.ascii (default NeutronSource)
|
||||
|
||||
\section NeutronSource_s6 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:
|
||||
\verbatim
|
||||
> /control/execute vis.mac
|
||||
\endverbatim
|
||||
|
||||
The tracks are drawn at the end of event, and erased at the end of run.
|
||||
gamma green
|
||||
neutron yellow
|
||||
negative particles (e-, ...) red
|
||||
positive particles (e+, ions, ...) blue
|
||||
|
||||
\section NeutronSource_s7 HOW TO START ?
|
||||
|
||||
Execute NeutronSource in 'batch' mode from macro files :
|
||||
\verbatim
|
||||
% NeutronSource run1.mac
|
||||
\endverbatim
|
||||
|
||||
Execute NeutronSource in 'interactive mode' with visualization :
|
||||
\verbatim
|
||||
% NeutronSource
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- run1.mac: Am-Be system (default configuration)
|
||||
|
||||
Macros to be run interactively:
|
||||
- debug.mac: Am-Be
|
||||
- vis.mac: To activate visualization
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,143 @@
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
NeutronSource
|
||||
-------------
|
||||
|
||||
NeutronSource is an example of neutrons production. It illustrates the cooperative work
|
||||
of nuclear reactions and radioactive decay processes.
|
||||
It survey energy deposition and particle's flux.
|
||||
It uses PhysicsConstructor objects.
|
||||
|
||||
|
||||
1- MATERIALS AND GEOMETRY DEFINITION
|
||||
|
||||
The geometry is a cylinder (absorber) of an homogenous material (default : Beryllium oxide).
|
||||
This absorber is within a container (default : stainless-steel).
|
||||
|
||||
Five parameters define the geometry :
|
||||
- the material of the absorber
|
||||
- the radius and length of the absorber
|
||||
- the material of the container
|
||||
- the thickness of the container
|
||||
|
||||
The default geometry is built in DetectorConstruction, but the above
|
||||
parameters can be changed interactively via commands defined in DetectorMessenger.
|
||||
|
||||
The container is surrounded by a World volume (air)
|
||||
|
||||
A function, and its associated UI command, allows to build a material
|
||||
directly from a single isotope.
|
||||
|
||||
To be identified by the ThermalScattering module, the elements composing a
|
||||
material must have a specific name (see G4ParticleHPThermalScatteringNames.cc)
|
||||
Examples of such materials are build in DetectorConstruction of Hadr04,06,07.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
"Full" set of physics processes are registered, but via PhysicsConstructor
|
||||
objects rather than complete pre-defined G4 physics lists. This alternative
|
||||
way may give more freedom to register physics.
|
||||
|
||||
Physics constructors are either constructors provided in Geant4 (with G4 prefix)
|
||||
or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic, GammaNuclear,
|
||||
RadioactiveDecay and Electomagnetic.
|
||||
(see geant4/source/physics_lists/constructors)
|
||||
|
||||
HadronElasticPhysicsHP include a model for thermalized neutrons, under the control of a command
|
||||
defined in NeutronHPMesseger.
|
||||
|
||||
GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
|
||||
|
||||
ElectromagneticPhysics is a simplified version of G4EmStandardPhysics.
|
||||
|
||||
In PhysicsList::ConstructProcess() we give an example of how to access hadronic models.
|
||||
|
||||
Several hadronic physics options are controlled by environment variables.
|
||||
To select them, see NeutronSource.cc
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic is a single particle uniformly shooted within the absorber.
|
||||
The type of the particle and its energy are set in PrimaryGeneratorAction (Am241, at rest),
|
||||
and can be changed via the G4 build-in commands of ParticleGun class
|
||||
(see the macros provided with this example).
|
||||
|
||||
4- PHYSICS
|
||||
|
||||
The program computes and plots energy deposited in the interaction volume
|
||||
(absorber + container) and the flux of particles leaving this volume.
|
||||
Processes invoked and particles generated during hadronic cascade are listed.
|
||||
|
||||
5- HISTOGRAMS
|
||||
|
||||
The test contains 13 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its Messenger. The histos can be individually
|
||||
activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
1 "total energy deposit"
|
||||
2 "dummy"
|
||||
3 "total kinetic energy flow"
|
||||
4 "energy spectrum of emerging gamma"
|
||||
5 "energy spectrum of emerging e+-"
|
||||
6 "energy spectrum of emerging neutrons"
|
||||
7 "energy spectrum of emerging protons"
|
||||
8 "energy spectrum of emerging deuterons"
|
||||
9 "energy spectrum of emerging alphas"
|
||||
10 "energy spectrum of all others emerging ions"
|
||||
11 "energy spectrum of all others emerging baryons"
|
||||
12 "energy spectrum of all others emerging mesons"
|
||||
13 "energy spectrum of all others emerging leptons (neutrinos)"
|
||||
|
||||
The histograms are managed by the HistoManager class and its Messenger.
|
||||
The histos can be individually activated with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default NeutronSource)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
All selected histos will be written on a file name.ascii (default NeutronSource)
|
||||
|
||||
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 tracks are drawn at the end of event, and erased at the end of run.
|
||||
gamma green
|
||||
neutron yellow
|
||||
negative particles (e-, ...) red
|
||||
positive particles (e+, ions, ...) blue
|
||||
|
||||
7- HOW TO START ?
|
||||
|
||||
Execute NeutronSource in 'batch' mode from macro files :
|
||||
% NeutronSource run1.mac
|
||||
|
||||
Execute NeutronSource in 'interactive mode' with visualization :
|
||||
% NeutronSource
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros provided in this example:
|
||||
- run1.mac: Am-Be system (default configuration)
|
||||
|
||||
Macros to be run interactively:
|
||||
- debug.mac: Am-Be
|
||||
- vis.mac: To activate visualization
|
||||
@@ -0,0 +1,101 @@
|
||||
|
||||
Geant4 extended examples - Hadronic processes
|
||||
----------------------------------------------
|
||||
|
||||
Examples in this directory demonstrate specific hadronic physics simulation
|
||||
with histogramming.
|
||||
|
||||
Hadr00
|
||||
------
|
||||
|
||||
This example demonstrates a usage of G4PhysListFactory to build
|
||||
Physics List and G4HadronicProcessStore to access cross sections.
|
||||
|
||||
Hadr01
|
||||
------
|
||||
|
||||
This example application is based on the application IION developed for
|
||||
simulation of proton or ion beam interaction with a water target. Different
|
||||
aspects of beam target interaction are demonstrating in the example including
|
||||
longitudinal profile of energy deposition, spectra of secondary particles,
|
||||
spectra of particles leaving the target.
|
||||
|
||||
Hadr02
|
||||
------
|
||||
|
||||
This example application is providing simulation of ion beam interaction with different
|
||||
targets. Hadronic aspects of beam target interaction are demonstrated in the example
|
||||
including longitudinal profile of energy deposition, spectra of secondary particles,
|
||||
isotope production spectra.
|
||||
|
||||
Hadr03
|
||||
------
|
||||
|
||||
This example demonstrates how to compute total cross section from the direct evaluation of the
|
||||
mean free path ( see below, item Physics), how to identify nuclear reactions, how to plot
|
||||
energy spectrum of secondary particles.
|
||||
|
||||
Hadr04
|
||||
------
|
||||
|
||||
This example is focused on neutronHP physics, especially neutron transport,
|
||||
including thermal scattering.
|
||||
See A.R. Garcia, E. Mendoza, D. Cano-Ott presentation at G4 Hadronic group
|
||||
meeting (04/2013) and note on G4NeutronHP package
|
||||
|
||||
Hadr05
|
||||
------
|
||||
|
||||
Examples of hadronic calorimeters
|
||||
|
||||
Hadr06
|
||||
------
|
||||
|
||||
This example demonstrates survey of energy deposition and particle's flux from
|
||||
a hadronic cascade.
|
||||
|
||||
Hadr07
|
||||
------
|
||||
|
||||
Survey energy deposition and particle's flux from an hadronic cascade.
|
||||
Use PhysicsConstructor objects rather than predefined G4 PhysicsLists.
|
||||
Show how to plot a depth dose profile in a rectangular box.
|
||||
|
||||
Hadr08
|
||||
------
|
||||
|
||||
This example shows how to get "hadronic model per region" using generic
|
||||
biasing: in particular, it is shown how to use "FTFP+INCLXX" in one region,
|
||||
while using the default "FTFP+BERT" in all other regions.
|
||||
Notice that we use the generic biasing machinery, but the actual weights
|
||||
of all tracks remain to the usual value (1.0) as in the normal (unbiased)
|
||||
case.
|
||||
|
||||
Hadr09
|
||||
------
|
||||
|
||||
This example shows how to use Geant4 as a generator for simulating
|
||||
inelastic hadron-nuclear interactions.
|
||||
Notice that the Geant4 run-manager is not used.
|
||||
|
||||
Hadr10
|
||||
------
|
||||
|
||||
This example aims to test the treatment of decays in Geant4.
|
||||
In particular, we want to test the decays of the tau lepton, charmed and
|
||||
bottom hadrons, and the use of pre-assigned decays.
|
||||
|
||||
FissionFragment
|
||||
---------------
|
||||
This example demonstrates the Fission Fragment model as used within the
|
||||
neutron_hp model. It will demostrate the capability for fission product
|
||||
containmentby the cladding in a water moderated sub-critical assembly. It could
|
||||
also be further extended to calculate the effective multiplication factor of
|
||||
the subcritical assembly for various loading schemes.
|
||||
|
||||
NeutronSource
|
||||
-------------
|
||||
NeutronSource is an example of neutrons production. It illustrates the cooperative work
|
||||
of nuclear reactions and radioactive decay processes.
|
||||
It survey energy deposition and particle's flux.
|
||||
It uses PhysicsConstructor objects.
|
||||
Reference in New Issue
Block a user