Import Geant4 11.0.0 source tree
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
|
||||
///\file "electromagnetic/.README.txt"
|
||||
///\brief Examples electromagnetic README page
|
||||
|
||||
/*! \page Examples_electromagnetic Category "electromagnetic"
|
||||
|
||||
\section electromagnetic_s1 TestEm by theme
|
||||
\verbatim
|
||||
--------------------------------------------------------------------------
|
||||
| Check basic quantities |
|
||||
|------------------------------------------------------------------------|
|
||||
| Total cross-sections, mean free paths ... | Em0 Em13 Em14 |
|
||||
|------------------------------------------------------------------------|
|
||||
| Stopping power, particle range ... | Em0 Em1 Em5 Em11 Em12 |
|
||||
|------------------------------------------------------------------------|
|
||||
| Final state : | |
|
||||
| energy spectra, angular distributions ... | Em14 |
|
||||
|------------------------------------------------------------------------|
|
||||
| Energy loss fluctuations | Em18 |
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
| Multiple Coulomb scattering |
|
||||
|-----------------------------------------------------------------------|
|
||||
| as an isolated mechanism | Em15 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| as a result of particle transport | Em5 |
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
| More global verifications |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Single layer : | |
|
||||
| transmission, absoption, reflexion ... | Em5 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Bragg curve, tallies | Em7 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Depth dose distribution | Em11 Em12 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Shower shapes, Moliere radius | Em2 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Sampling calorimeters, energy flow | Em3 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Crystal calorimeters | Em9 |
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
| Other specialized programs |
|
||||
|-----------------------------------------------------------------------|
|
||||
| High energy muon physics | Em17 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Other rare, high energy processes | Em6 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Synchrotron radiation | Em16 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Transition radiation | Em8 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Photo-absorption-ionization model | Em10 |
|
||||
-------------------------------------------------------------------------
|
||||
\endverbatim
|
||||
|
||||
|
||||
- \link ExampleTestEm0 TestEm0 \endlink - how to print cross-sections and stopping power used in input by
|
||||
the standard EM package
|
||||
|
||||
- \link ExampleTestEm1 TestEm1 \endlink - how to count processes, activate/inactivate them and survey
|
||||
the range of charged particles. How to define a maximum step size
|
||||
|
||||
- \link ExampleTestEm2 TestEm2 \endlink - shower development in an homogeneous material :
|
||||
longitudinal and lateral profiles
|
||||
|
||||
- \link ExampleTestEm3 TestEm3 \endlink - shower development in a sampling calorimeter : collect energy
|
||||
deposited, survey energy flow and print stopping power
|
||||
|
||||
- \link ExampleTestEm4 TestEm4 \endlink - 9 MeV point like photon source: plot spectrum of energy
|
||||
deposited in a single media
|
||||
|
||||
- \link ExampleTestEm5 TestEm5 \endlink - how to study transmission, absorption and reflection of particles
|
||||
through a single, thin or thick, layer.
|
||||
|
||||
- \link ExampleTestEm6 TestEm6 \endlink - physics list for rare, high energy, electromagnetic processes :
|
||||
gamma conversion and e+ annihilation into pair of muons
|
||||
|
||||
- \link ExampleTestEm7 TestEm7 \endlink - how to produce a Bragg curve in water phantom.
|
||||
How to compute dose in tallies
|
||||
|
||||
- \link ExampleTestEm8 TestEm8 \endlink - test of photo-absorption-ionisation model in thin absorbers,
|
||||
and transition radiation
|
||||
|
||||
- \link ExampleTestEm9 TestEm9 \endlink - shower development in a crystal calorimeter; cut-per-region
|
||||
|
||||
- \link ExampleTestEm10 TestEm10 \endlink - XTR transition radiation model, investigation of ionisation
|
||||
in thin absorbers
|
||||
|
||||
- \link ExampleTestEm11 TestEm11 \endlink - how to plot a depth dose profile in a rectangular box
|
||||
|
||||
- \link ExampleTestEm12 TestEm12 \endlink - how to plot a depth dose profile in spherical geometry :
|
||||
point like source
|
||||
|
||||
- \link ExampleTestEm13 TestEm13 \endlink - how to compute cross sections of EM processes from rate of
|
||||
transmission coefficient
|
||||
|
||||
- \link ExampleTestEm14 TestEm14 \endlink - how to compute cross sections of EM processes from direct
|
||||
evaluation of the mean-free path. How to plot final state
|
||||
|
||||
- \link ExampleTestEm15 TestEm15 \endlink - compute and plot final state of Multiple Scattering as an
|
||||
isolated process
|
||||
|
||||
- \link ExampleTestEm16 TestEm16 \endlink - simulation of synchrotron radiation
|
||||
|
||||
- \link ExampleTestEm17 TestEm17 \endlink - check the cross sections of high energy muon processes
|
||||
|
||||
- \link ExampleTestEm18 TestEm18 \endlink - energy lost by a charged particle in a single layer,
|
||||
due to ionization and bremsstrahlung
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,118 @@
|
||||
--------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm by theme
|
||||
---------------
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
| Check basic quantities |
|
||||
|------------------------------------------------------------------------|
|
||||
| Total cross-sections, mean free paths ... | Em0 Em13 Em14 |
|
||||
|------------------------------------------------------------------------|
|
||||
| Stopping power, particle range ... | Em0 Em1 Em5 Em11 Em12 |
|
||||
|------------------------------------------------------------------------|
|
||||
| Final state : | |
|
||||
| energy spectra, angular distributions ... | Em14 |
|
||||
|------------------------------------------------------------------------|
|
||||
| Energy loss fluctuations | Em18 |
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
| Multiple Coulomb scattering |
|
||||
|-----------------------------------------------------------------------|
|
||||
| as an isolated mechanism | Em15 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| as a result of particle transport | Em5 |
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
| More global verifications |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Single layer : | |
|
||||
| transmission, absoption, reflexion ... | Em5 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Bragg curve, tallies | Em7 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Depth dose distribution | Em11 Em12 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Shower shapes, Moliere radius | Em2 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Sampling calorimeters, energy flow | Em3 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Crystal calorimeters | Em9 |
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
| Other specialized programs |
|
||||
|-----------------------------------------------------------------------|
|
||||
| High energy muon physics | Em17 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Other rare, high energy processes | Em6 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Synchrotron radiation | Em16 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Transition radiation | Em8 |
|
||||
|-----------------------------------------------------------------------|
|
||||
| Photo-absorption-ionization model | Em10 |
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
TestEm0 - how to print cross-sections and stopping power used in input by
|
||||
the standard EM package
|
||||
|
||||
TestEm1 - how to count processes, activate/inactivate them and survey
|
||||
the range of charged particles. How to define a maximum step size
|
||||
|
||||
TestEm2 - shower development in an homogeneous material :
|
||||
longitudinal and lateral profiles
|
||||
|
||||
TestEm3 - shower development in a sampling calorimeter : collect energy
|
||||
deposited, survey energy flow and print stopping power
|
||||
|
||||
TestEm4 - 9 MeV point like photon source: plot spectrum of energy
|
||||
deposited in a single media
|
||||
|
||||
TestEm5 - how to study transmission, absorption and reflection of particles
|
||||
through a single, thin or thick, layer.
|
||||
|
||||
TestEm6 - physics list for rare, high energy, electromagnetic processes :
|
||||
gamma conversion and e+ annihilation into pair of muons
|
||||
|
||||
TestEm7 - how to produce a Bragg curve in water phantom.
|
||||
How to compute dose in tallies
|
||||
|
||||
TestEm8 - test of photo-absorption-ionisation model in thin absorbers,
|
||||
and transition radiation
|
||||
|
||||
TestEm9 - shower development in a crystal calorimeter; cut-per-region
|
||||
|
||||
TestEm10 - XTR transition radiation model, investigation of ionisation
|
||||
in thin absorbers
|
||||
|
||||
TestEm11 - how to plot a depth dose profile in a rectangular box
|
||||
|
||||
TestEm12 - how to plot a depth dose profile in spherical geometry :
|
||||
point like source
|
||||
|
||||
TestEm13 - how to compute cross sections of EM processes from rate of
|
||||
transmission coefficient
|
||||
|
||||
TestEm14 - how to compute cross sections of EM processes from direct
|
||||
evaluation of the mean-free path. How to plot final state
|
||||
|
||||
TestEm15 - compute and plot final state of Multiple Scattering as an
|
||||
isolated process
|
||||
|
||||
TestEm16 - simulation of synchrotron radiation
|
||||
|
||||
TestEm17 - check the cross sections of high energy muon processes
|
||||
|
||||
TestEm18 - energy lost by a charged particle in a single layer,
|
||||
due to ionization and bremsstrahlung
|
||||
@@ -0,0 +1,41 @@
|
||||
|
||||
///\file "electromagnetic/TestEm0/.README.txt"
|
||||
///\brief Example TestEm0 README page
|
||||
|
||||
/*! \page ExampleTestEm0 Example TestEm0
|
||||
|
||||
This program is not a simulation. It prints the cross sections and stopping
|
||||
power used by the standard electromagnetic package, via G4EmCalculator
|
||||
which extracts these data from the PhysicsTables.
|
||||
|
||||
The program can be used in batch or interactively.
|
||||
|
||||
- execute TestEm0 in 'batch' mode from macro files :
|
||||
\verbatim
|
||||
% TestEm0 TestEm0.in
|
||||
\endverbatim
|
||||
|
||||
- Interactively, a typical sequence will be :
|
||||
\verbatim
|
||||
% TestEm0
|
||||
....
|
||||
Idle> /run/initialize
|
||||
....
|
||||
Idle> /testem/det/setMat Silicon
|
||||
Idle> /run/setCut 100 um
|
||||
Idle> /gun/particle e-
|
||||
Idle> /gun/energy 10 MeV
|
||||
Idle> /run/beamOn
|
||||
\endverbatim
|
||||
|
||||
The last command triggers BuildPhysicsTable() and executes the program.
|
||||
|
||||
|
||||
\section TestEm0_s1 DirectAccess
|
||||
|
||||
DirectAccess.cc is a small batch program which shows how to compute the same
|
||||
basic data directly from the processes (indeed the models).
|
||||
|
||||
To run it, change name in the first line on GNUmakefile before to compile.
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,39 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm0
|
||||
-------
|
||||
|
||||
This program is not a simulation. It prints the cross sections and stopping
|
||||
power used by the standard electromagnetic package, via G4EmCalculator
|
||||
which extracts these data from the PhysicsTables.
|
||||
|
||||
The program can be used in batch or interactively.
|
||||
|
||||
- execute TestEm0 in 'batch' mode from macro files :
|
||||
% TestEm0 TestEm0.in
|
||||
|
||||
- Interactively, a typical sequence will be :
|
||||
% TestEm0
|
||||
....
|
||||
Idle> /run/initialize
|
||||
....
|
||||
Idle> /testem/det/setMat Silicon
|
||||
Idle> /run/setCut 100 um
|
||||
Idle> /gun/particle e-
|
||||
Idle> /gun/energy 10 MeV
|
||||
Idle> /run/beamOn
|
||||
|
||||
The last command triggers BuildPhysicsTable() and executes the program.
|
||||
|
||||
|
||||
DirectAccess
|
||||
------------
|
||||
|
||||
DirectAccess is a small batch program which shows how to compute the same
|
||||
basic data directly from the processes (indeed the models).
|
||||
|
||||
To run it, change name in the first line on GNUmakefile before to compile.
|
||||
@@ -0,0 +1,164 @@
|
||||
|
||||
///\file "electromagnetic/TestEm1/.README.txt"
|
||||
///\brief Example TestEm1 README page
|
||||
|
||||
/*! \page ExampleTestEm1 Example TestEm1
|
||||
|
||||
- How to count processes.
|
||||
- How to activate/inactivate processes.
|
||||
- How to survey the tracking, in particular the range of charged particles.
|
||||
- How to define a maximum step size.
|
||||
|
||||
\section TestEm1_s1 GEOMETRY DEFINITION
|
||||
|
||||
It is a simple box which represents a 'semi infinite' homogeneous medium.
|
||||
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the full size of the box.
|
||||
|
||||
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 changed interactively via the commands defined in
|
||||
the DetectorMessenger class.
|
||||
|
||||
\section TestEm1_s2 PHYSICS LIST
|
||||
|
||||
Physics lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
EM physics builders can be local (eg. in this example) or from G4 kernel
|
||||
physics_lists subdirectory.
|
||||
|
||||
Local physics builder:
|
||||
- "local" standard EM physics with current 'best' options setting.
|
||||
these options are explicited in PhysListEmStandard
|
||||
|
||||
From geant4/source/physics_lists/builders:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
A few commands have been added to PhysicsList, in order to set the production
|
||||
threshold for secondaries for gamma and e-/e+.
|
||||
|
||||
\section TestEm1_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.
|
||||
|
||||
\section TestEm1_s4 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm1.cc).
|
||||
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 TestEm1_s5 PHYSICS SURVEY
|
||||
|
||||
The particle's type and the physics processes which will be available in this
|
||||
example are set in PhysicsList class.
|
||||
|
||||
A set of macros defining various run conditions are provided. The processes
|
||||
are actived/inactivated together with differents cuts, in order to survey the
|
||||
processes one by one.
|
||||
|
||||
The number of produced secondaries are counted, the number of steps, and the
|
||||
number of process calls responsible of the step.
|
||||
|
||||
\section TestEm1_s6 HOW TO START ?
|
||||
|
||||
- Execute TestEm1 in 'batch' mode from macro files
|
||||
\verbatim
|
||||
% TestEm1 runs.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm1 in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% TestEm1
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- brems.mac: Bremsstrahlung only
|
||||
- erange.mac: compute the csda range of primary particle
|
||||
- geantino.mac: geantino as primary particle
|
||||
- ionis.mac: Ionisation only
|
||||
- photoelec.mac: 100 keV photon photoelectric effect
|
||||
- radioactive.mac: use radioactive ion as primary particle
|
||||
- range.mac: compute the csda range of the primary particle
|
||||
with or without fluctuations
|
||||
- runs.mac: electron 100 MeV; all processes
|
||||
|
||||
Macros to be run interactively:
|
||||
- annihil.mac: To visualise 100 MeV e+ annihilation
|
||||
- decayinfly.mac: To visualise decay in fly of N16
|
||||
- gammaconversion.mac: To visualise gamma conversion and e+ annihilation
|
||||
- photon.mac: To visualiza p300 keV photon beam
|
||||
- stepMax.mac: to test command /testem/stepMax
|
||||
- vis.mac: To activate visualization
|
||||
|
||||
\section TestEm1_s7 TRACKING : StepMax
|
||||
|
||||
In order to control the accuracy of the deposition, the user can limit
|
||||
'by hand' the maximum step size of charged particles.
|
||||
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.
|
||||
|
||||
\section TestEm1_s8 HISTOGRAMS
|
||||
|
||||
Testem1 produces several histo which are saved as testem1.root by default.
|
||||
Content of these histo:
|
||||
- 1 : track length of primary particle
|
||||
- 2 : number of steps primary particle
|
||||
- 3 : step size of primary particle
|
||||
- 4 : total energy deposit
|
||||
- 5 : energy of charged secondaries at creation
|
||||
- 6 : energy of neutral secondaries at creation
|
||||
|
||||
The histograms are managed by G4AnalysisManager 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:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default testem1)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem1)
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,157 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm1
|
||||
-------
|
||||
How to count processes.
|
||||
How to activate/inactivate processes.
|
||||
How to survey the tracking, in particular the range of charged particles.
|
||||
How to define a maximum step size.
|
||||
|
||||
1 - GEOMETRY DEFINITION
|
||||
|
||||
It is a simple box which represents a 'semi infinite' homogeneous medium.
|
||||
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the full size of the box.
|
||||
|
||||
In addition a transverse uniform magnetic field can be applied.
|
||||
e.g. /globalField/setValue 0 0 5 tesla
|
||||
|
||||
The default geometry is constructed in DetectorConstruction class, but all of
|
||||
the above parameters can be changed interactively via the commands defined in
|
||||
the DetectorMessenger class.
|
||||
|
||||
2 - PHYSICS LIST
|
||||
|
||||
Physics lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
EM physics builders can be local (eg. in this example) or from G4 kernel
|
||||
physics_lists subdirectory.
|
||||
|
||||
Local physics builder:
|
||||
- "local" standard EM physics with current 'best' options setting.
|
||||
these options are explicited in PhysListEmStandard
|
||||
|
||||
From geant4/source/physics_lists/builders:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
A few commands have been added to PhysicsList, in order to set the production
|
||||
threshold for secondaries for gamma and e-/e+.
|
||||
|
||||
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.
|
||||
|
||||
4 - VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm1.cc).
|
||||
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.
|
||||
|
||||
5 - PHYSICS SURVEY
|
||||
|
||||
The particle's type and the physics processes which will be available in this
|
||||
example are set in PhysicsList class.
|
||||
|
||||
A set of macros defining various run conditions are provided. The processes
|
||||
are actived/inactivated together with differents cuts, in order to survey the
|
||||
processes one by one.
|
||||
|
||||
The number of produced secondaries are counted, the number of steps, and the
|
||||
number of process calls responsible of the step.
|
||||
|
||||
6 - HOW TO START ?
|
||||
|
||||
- execute TestEm1 in 'batch' mode from macro files
|
||||
% TestEm1 runs.mac
|
||||
|
||||
- execute TestEm1 in 'interactive mode' with visualization
|
||||
% TestEm1
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros provided in this example:
|
||||
- brems.mac: Bremsstrahlung only
|
||||
- erange.mac: compute the csda range of primary particle
|
||||
- geantino.mac: geantino as primary particle
|
||||
- ionis.mac: Ionisation only
|
||||
- photoelec.mac: 100 keV photon photoelectric effect
|
||||
- radioactive.mac: use radioactive ion as primary particle
|
||||
- range.mac: compute the csda range of the primary particle
|
||||
with or without fluctuations
|
||||
- runs.mac: electron 100 MeV; all processes
|
||||
|
||||
Macros to be run interactively:
|
||||
- annihil.mac: To visualise 100 MeV e+ annihilation
|
||||
- decayinfly.mac: To visualise decay in fly of N16
|
||||
- gammaconversion.mac: To visualise gamma conversion and e+ annihilation
|
||||
- photon.mac: To visualiza p300 keV photon beam
|
||||
- stepMax.mac: to test command /testem/stepMax
|
||||
- vis.mac: To activate visualization
|
||||
|
||||
7 - TRACKING : StepMax
|
||||
|
||||
In order to control the accuracy of the deposition, the user can limit
|
||||
'by hand' the maximum step size of charged particles.
|
||||
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.
|
||||
|
||||
8 - HISTOGRAMS
|
||||
|
||||
Testem1 produces several histo which are saved as testem1.root by default.
|
||||
Content of these histo:
|
||||
1 : track length of primary particle
|
||||
2 : number of steps primary particle
|
||||
3 : step size of primary particle
|
||||
4 : total energy deposit
|
||||
5 : energy of charged secondaries at creation
|
||||
6 : energy of neutral secondaries at creation
|
||||
|
||||
The histograms are managed by G4AnalysisManager 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 testem1)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem1)
|
||||
@@ -0,0 +1,103 @@
|
||||
|
||||
///\file "electromagnetic/TestEm10/.README.txt"
|
||||
///\brief Example TestEm10 README page
|
||||
|
||||
/*! \page ExampleTestEm10 Example TestEm10
|
||||
|
||||
Test for investigation of transition radiation.
|
||||
Default setup for "TestEm10.in" and "TestEm10.large_N.in" is the simplified
|
||||
setup for ALICE XTR test beam (~2004), defined in DetectorSimpleALICE class.
|
||||
|
||||
\section TestEm10_s0 GEOMETRY DEFINITION
|
||||
|
||||
The geometry setup includes "radiator" and "absorber" volumes
|
||||
of a box shape.
|
||||
|
||||
The "radiator" material is defined as a mixture of a gas and foil material
|
||||
and the "absorber" contains a gas material.
|
||||
|
||||
Several geometry setups are defined in the classes
|
||||
DetectorSetupX,
|
||||
where SetupX = ALICE06, Bari05, Barr90, Construction, Harris73, Messenger, SimpleALICE, Watase86
|
||||
|
||||
The default setup, SimpleALICE, can be changed via UI command:
|
||||
\verbatim
|
||||
/XTRdetector/setup setup
|
||||
where setup = simpleALICE, alice06, bari05, harris73, watase86, barr90
|
||||
\endverbatim
|
||||
|
||||
|
||||
\section TestEm10_s1 PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
absorber perpendicular to the input face. The type of the particle
|
||||
and its energy 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).
|
||||
|
||||
\section TestEm10_s2 DETECTOR RESPONSE
|
||||
|
||||
In this example the total energy deposited in the "absorber" volume
|
||||
is accounted in SensitevDetector class, and a spectrum of XTR gamma
|
||||
particles, all secondary gamma particles and all secondary e-
|
||||
particleas is accounted in StackingAction class.
|
||||
|
||||
\section TestEm10_s3 PHYSICS
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in PhysicsList class.
|
||||
The trasition radiation process is defined in the
|
||||
TransitionRadiationPhysics builder.
|
||||
|
||||
The transition radiator models can be changed simply with:
|
||||
\verbatim
|
||||
Idle> /emphyslist/setXTRModel modelName
|
||||
\endverbatim
|
||||
See macro files "*.mac" for different setups providede with the example.
|
||||
|
||||
\section TestEm10_s4 HISTOGRAMS
|
||||
|
||||
Testem10 produces several histo which are saved as testem10.root by default.
|
||||
Content of these histo:
|
||||
- 1. Energy deposit in absorber
|
||||
- 2. XTR Gamma spectrum
|
||||
- 3. Secondary Gamma spectrum
|
||||
- 4. Secondary e- spectrum
|
||||
- 5. Energy deposit in absorber with the same histogram parameters
|
||||
as in the previous version of this example (Geant4 version <=10.2)
|
||||
|
||||
The histograms are managed by G4AnalysisManager 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:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default testem1)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem1)
|
||||
|
||||
\section TestEm10_s5 HOW TO START ?
|
||||
|
||||
- Execute TestEm10 in 'batch' mode from macro files e.g.
|
||||
\verbatim
|
||||
% TestEm10 run11.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm10 in 'interactive' mode with visualization e.g.
|
||||
\verbatim
|
||||
% TestEm10
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
\endverbatim
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,94 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm10
|
||||
--------
|
||||
|
||||
Test for investigation of transition radiation.
|
||||
Default setup for "TestEm10.in" and "TestEm10.large_N.in" is the simplified
|
||||
setup for ALICE XTR test beam (~2004), defined in DetectorSimpleALICE class.
|
||||
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry setup includes "radiator" and "absorber" volumes
|
||||
of a box shape.
|
||||
|
||||
The "radiator" material is defined as a mixture of a gas and foil material
|
||||
and the "absorber" contains a gas material.
|
||||
|
||||
Several geometry setups are defined in the classes
|
||||
DetectorSetupX,
|
||||
where SetupX = ALICE06, Bari05, Barr90, Construction, Harris73, Messenger, SimpleALICE, Watase86
|
||||
|
||||
The default setup, SimpleALICE, can be changed via UI command:
|
||||
/XTRdetector/setup setup
|
||||
where setup = simpleALICE, alice06, bari05, harris73, watase86, barr90
|
||||
|
||||
2- PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
absorber perpendicular to the input face. The type of the particle
|
||||
and its energy 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).
|
||||
|
||||
3- DETECTOR RESPONSE
|
||||
|
||||
In this example the total energy deposited in the "absorber" volume
|
||||
is accounted in SensitevDetector class, and a spectrum of XTR gamma
|
||||
particles, all secondary gamma particles and all secondary e-
|
||||
particleas is accounted in StackingAction class.
|
||||
|
||||
4- PHYSICS
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in PhysicsList class.
|
||||
The trasition radiation process is defined in the
|
||||
TransitionRadiationPhysics builder.
|
||||
|
||||
The transition radiator models can be changed simply with:
|
||||
|
||||
Idle> /emphyslist/setXTRModel modelName
|
||||
|
||||
See macro files "*.mac" for different setups providede with the example.
|
||||
|
||||
5 - HISTOGRAMS
|
||||
|
||||
Testem10 produces several histo which are saved as testem10.root by default.
|
||||
Content of these histo:
|
||||
1: Energy deposit in absorber
|
||||
2: XTR Gamma spectrum
|
||||
3: Secondary Gamma spectrum
|
||||
4: Secondary e- spectrum
|
||||
5: Energy deposit in absorber with the same histogram parameters
|
||||
as in the previous version of this example (Geant4 version <=10.2)
|
||||
|
||||
The histograms are managed by G4AnalysisManager 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 testem1)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem1)
|
||||
|
||||
6- HOW TO START ?
|
||||
|
||||
- execute TestEm10 in 'batch' mode from macro files e.g.
|
||||
% TestEm10 run11.mac
|
||||
|
||||
- execute TestEm10 in 'interactive' mode with visualization e.g.
|
||||
% TestEm10
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
@@ -0,0 +1,192 @@
|
||||
|
||||
///\file "electromagnetic/TestEm11/.README.txt"
|
||||
///\brief Example TestEm11 README page
|
||||
|
||||
/*! \page ExampleTestEm11 Example TestEm11
|
||||
|
||||
How to plot a depth dose profile in a rectangular box.
|
||||
|
||||
|
||||
\section TestEm11_s1 GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a stack of one or several blocks of homogenous
|
||||
material, called absorbers.
|
||||
Optionally, each absorber can be divided in thinner layers (replica)
|
||||
|
||||
A minimum of 5 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),
|
||||
- the number of divisions of each absorber (NbOfDivisions)
|
||||
|
||||
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 changed interactively via
|
||||
the commands defined in the DetectorMessenger class.
|
||||
|
||||
\section TestEm11_s2 PHYSICS LIST
|
||||
|
||||
Physics Lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
The following options for EM physics using builders from physics_lists
|
||||
sub-package are available:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
A local builder, PhysListEmStandard "local" (similar to opt3) is also
|
||||
available.
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
\section TestEm11_s3 ACTION INITIALIZATION
|
||||
|
||||
A newly introduced class, ActionInitialization, instantiates and registers
|
||||
to Geant4 kernel all user action classes.
|
||||
|
||||
While in sequential mode the action classes are instantiated just once,
|
||||
via invoking the method:
|
||||
ActionInitialization::Build()
|
||||
in multi-threading mode the same method is invoked for each thread worker
|
||||
and so all user action classes are defined thread-local.
|
||||
|
||||
A run action class (if present) has to be instantiated both thread-local
|
||||
and global, which is why its instance has to be created also in the method
|
||||
ActionInitialization::BuildForMaster()
|
||||
which is invoked only in multi-threading mode.
|
||||
|
||||
\section TestEm11_s4 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 TestEm11_s5 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm11.cc).
|
||||
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.
|
||||
Optionally one can choose to draw all particles, only the charged one,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
\section TestEm11_s6 HOW TO START ?
|
||||
|
||||
- Execute TestEm11 in 'batch' mode from macro files
|
||||
\verbatim
|
||||
% TestEm11 run01.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm11 in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% TestEm11
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- alpha.mac: alpha (400 MeV) on water
|
||||
- ionC12.mac: ion C12 (2.4 GeV) on water
|
||||
- multiLayers.mac: gamma (6 MeV) on multi layers
|
||||
- radioactive.mac: radioactive ion on multi layers
|
||||
- range.mac: compute csda range of primary particle
|
||||
- run01.mac: e- (500 keV) on silicon. Step max from histo 1
|
||||
- run02.mac: e- (500 keV) on silicon. Step max from geometry
|
||||
- sandia.mac: to compare with Sandia data
|
||||
- water.mac: e- (4 MeV) on water. No constraint on tracking step
|
||||
|
||||
Macros to be run interactively:
|
||||
- vis.mac: To activate visualization
|
||||
|
||||
\section TestEm11_s7 TRACKING and STEP MAX
|
||||
|
||||
TestEm11 computes the distribution of energy deposited along the trajectory of
|
||||
the incident particle : the so-called longitudinal energy profile,
|
||||
or depth dose distribution.
|
||||
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
|
||||
histograms 1 and 8 (see RunAction).
|
||||
|
||||
As an example, this limitation is implemented as a 'full' process :
|
||||
see StepMax class and its messenger, StepMaxMessenger. The 'StepMax process' is registered
|
||||
in the Physics List.
|
||||
|
||||
StepMax is evaluated at RunAction::BeginOfRunAction(),
|
||||
and passed to the StepMax process.
|
||||
A boolean UI command allows to deactivate this mechanism.
|
||||
Another UI command allows to define directly a stepMax value.
|
||||
|
||||
\section TestEm11_s8 HISTOGRAMS
|
||||
|
||||
TestEm11 has several predefined 1D histograms :
|
||||
|
||||
- 1 : longitudinal energy profile (in MeV/mm and per event)
|
||||
- 2 : total energy deposited in the absorber
|
||||
- 3 : total track length of the primary track
|
||||
- 4 : step size of the primary track
|
||||
- 5 : projected range of the primary track
|
||||
- 6 : total track length of charged secondary tracks
|
||||
- 7 : step size of charged secondary tracks
|
||||
- 8 : longitudinal energy profile (in MeV.cm2/g), as a function of x/r0
|
||||
where r0 is the range of the primary particle
|
||||
|
||||
- 11 : energy deposited in absorber 1
|
||||
- 12 : energy deposited in absorber 2
|
||||
...etc........
|
||||
|
||||
The histograms are managed by G4Analysis classes;
|
||||
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 testem11)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem11)
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,185 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm11
|
||||
--------
|
||||
|
||||
How to plot a depth dose profile in a rectangular box.
|
||||
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a stack of one or several blocks of homogenous
|
||||
material, called absorbers.
|
||||
Optionally, each absorber can be divided in thinner layers (replica)
|
||||
|
||||
A minimum of 5 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),
|
||||
- the number of divisions of each absorber (NbOfDivisions)
|
||||
|
||||
In addition a transverse uniform magnetic field can be applied.
|
||||
eg: /globalField/setValue 0 0 5 tesla
|
||||
|
||||
The default geometry is constructed in DetectorConstruction class,
|
||||
but all of the above parameters can be changed interactively via
|
||||
the commands defined in the DetectorMessenger class.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
Physics Lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
The following options for EM physics using builders from physics_lists
|
||||
sub-package are available:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
- "emstandardMP" standard EM physics where for e- a new model
|
||||
G4DiscreteScatteringModel is applied; for this model
|
||||
a data set G4GBFPDATA should be requested from EM group
|
||||
|
||||
A local builder, PhysListEmStandard "local" (similar to opt3) is also
|
||||
available.
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
3- ACTION INITIALIZATION
|
||||
|
||||
A newly introduced class, ActionInitialization, instantiates and registers
|
||||
to Geant4 kernel all user action classes.
|
||||
|
||||
While in sequential mode the action classes are instantiated just once,
|
||||
via invoking the method:
|
||||
ActionInitialization::Build()
|
||||
in multi-threading mode the same method is invoked for each thread worker
|
||||
and so all user action classes are defined thread-local.
|
||||
|
||||
A run action class (if present) has to be instantiated both thread-local
|
||||
and global, which is why its instance has to be created also in the method
|
||||
ActionInitialization::BuildForMaster()
|
||||
which is invoked only in multi-threading mode.
|
||||
|
||||
4- 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.
|
||||
|
||||
5- 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.
|
||||
Optionally one can choose to draw all particles, only the charged one,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
6- HOW TO START ?
|
||||
|
||||
- Execute TestEm11 in 'batch' mode from macro files
|
||||
% TestEm11 run01.mac
|
||||
|
||||
- Execute TestEm11 in 'interactive mode' with visualization
|
||||
% TestEm11
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros provided in this example:
|
||||
- alpha.mac: alpha (400 MeV) on water
|
||||
- ionC12.mac: ion C12 (2.4 GeV) on water
|
||||
- multiLayers.mac: gamma (6 MeV) on multi layers
|
||||
- radioactive.mac: radioactive ion on multi layers
|
||||
- range.mac: compute csda range of primary particle
|
||||
- run01.mac: e- (500 keV) on silicon. Step max from histo 1
|
||||
- run02.mac: e- (500 keV) on silicon. Step max from geometry
|
||||
- sandia.mac: to compare with Sandia data
|
||||
- water.mac: e- (4 MeV) on water. No constraint on tracking step
|
||||
|
||||
Macros to be run interactively:
|
||||
- vis.mac: To activate visualization
|
||||
|
||||
7- TRACKING and STEP MAX
|
||||
|
||||
TestEm11 computes the distribution of energy deposited along the trajectory of
|
||||
the incident particle : the so-called longitudinal energy profile,
|
||||
or depth dose distribution.
|
||||
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
|
||||
histograms 1 and 8 (see RunAction).
|
||||
|
||||
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.
|
||||
|
||||
StepMax is evaluated at RunAction::BeginOfRun(),
|
||||
and passed to the StepMax process.
|
||||
A boolean UI command allows to deactivate this mechanism.
|
||||
Another UI command allows to define directly a stepMax value.
|
||||
|
||||
8- HISTOGRAMS
|
||||
|
||||
TestEm11 has several predefined 1D histograms :
|
||||
|
||||
1 : longitudinal energy profile (in MeV/mm and per event)
|
||||
2 : total energy deposited in all absorbers
|
||||
3 : total track length of the primary track
|
||||
4 : step size of the primary track
|
||||
5 : projected range of the primary track
|
||||
6 : total track length of charged secondary tracks
|
||||
7 : step size of charged secondary tracks
|
||||
8 : longitudinal energy profile (in MeV.cm2/g), as a function of x/r0
|
||||
where r0 is the range of the primary particle
|
||||
|
||||
11 : energy deposited in absorber 1
|
||||
12 : energy deposited in absorber 2
|
||||
...etc........
|
||||
|
||||
The histograms are managed by G4Analysis classes.
|
||||
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 testem11)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem11)
|
||||
@@ -0,0 +1,26 @@
|
||||
------------------
|
||||
EGSnrc Simulations
|
||||
------------------
|
||||
|
||||
These results were computed with the EGSnrc user code DOSRZnrc.
|
||||
Yann Perrot (perrot@clermont.in2p3.fr) December 2010
|
||||
|
||||
Simulation parameters:
|
||||
----------------------
|
||||
|
||||
Electron Stepping Algorithm : PRESTA-II
|
||||
Boundary Crossing Algoritm : EXACT with skin parameter=3
|
||||
Maximum Energy Loss per Step : ESTEPE = 1%
|
||||
Electron tracking cut : 10keV for E>=1MeV
|
||||
1keV for E<1MeV
|
||||
|
||||
References:
|
||||
----------
|
||||
|
||||
Rogers and Bielajew 1986
|
||||
Med. Phys. 13, 687-694
|
||||
|
||||
Rogers et al 2003
|
||||
NRC User Codes for EGSnrc
|
||||
Technical Report PIRS-702(RevB)
|
||||
National Research Council of Canada
|
||||
@@ -0,0 +1,174 @@
|
||||
|
||||
///\file "electromagnetic/TestEm12/.README.txt"
|
||||
///\brief Example TestEm12 README page
|
||||
|
||||
/*! \page ExampleTestEm12 Example TestEm12
|
||||
|
||||
|
||||
How to plot a depth dose profile in spherical geometry.
|
||||
|
||||
|
||||
\section TestEm12_s1 GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single sphere of an homogenous material.
|
||||
Optionally, the sphere can be divided in thin shells.
|
||||
|
||||
3 parameters define the geometry :
|
||||
- the material of the sphere,
|
||||
- the radius of the sphere (absorRadius),
|
||||
- the number of shells (nbOfLayers)
|
||||
|
||||
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 changed interactively via
|
||||
the commands defined in the DetectorMessenger class.
|
||||
|
||||
\section TestEm12_s2 PHYSICS LIST
|
||||
|
||||
Physics Lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
The following options for EM physics using builders from physics_lists
|
||||
sub-package are available:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
- "dna" process and models for Geant4-DNA
|
||||
- "dna_opt1" process and models for Geant4-DNA
|
||||
- "dna_opt2" process and models for Geant4-DNA
|
||||
- "dna_opt3" process and models for Geant4-DNA
|
||||
- "dna_opt4" process and models for Geant4-DNA
|
||||
- "dna_opt5" process and models for Geant4-DNA
|
||||
- "dna_opt6" process and models for Geant4-DNA
|
||||
- "dna_opt7" process and models for Geant4-DNA
|
||||
|
||||
A local builder, PhysListEmStandard "local" (similar to opt0) is also
|
||||
available.
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
\section TestEm12_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle randomly shot at
|
||||
the centre of the sphere. The type of the particle and its energy are set
|
||||
in the PrimaryGeneratorAction class, and can be changed via the G4
|
||||
built-in commands of G4ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
In addition one can deactivate the randomness of the direction of the
|
||||
incident particle. The corresponding interactive command is built in
|
||||
PrimaryGeneratorMessenger class.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
\section TestEm12_s4 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm12.cc).
|
||||
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.
|
||||
Optionally one can choose to draw all particles, only the charged ones,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
\section TestEm12_s5 HOW TO START ?
|
||||
|
||||
- Execute TestEm12 in 'batch' mode from macro files
|
||||
\verbatim
|
||||
% TestEm12 run01.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm12 in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% TestEm12
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- berger.mac: e- (100 keV) on water
|
||||
- dna.mac: e- (1 keV) on water. DNA physics list
|
||||
- run01.mac: e- (4 MeV) on water. Step max from histos 1 and 8
|
||||
- run02.mac: e- (4 MeV) on water. Step max from geometry
|
||||
|
||||
Macros to be run interactively:
|
||||
- vis.mac: To activate visualization
|
||||
|
||||
\section TestEm12_s6 TRACKING and STEP MAX
|
||||
|
||||
TestDm12 computes the total energy deposited along the trajectory of
|
||||
the incident particle : the so-called longitudinal energy profile,
|
||||
or depth dose distribution.
|
||||
The energy deposited (edep) is randomly distributed 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
|
||||
histograms 1 and 8 (see RunAction).
|
||||
|
||||
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.
|
||||
|
||||
StepMax is evaluated in RunAction::BeginOfRun() and passed
|
||||
to the StepMax process.
|
||||
A boolean UI command allows to deactivate this mechanism.
|
||||
Another UI command allows to define directly a stepMax value.
|
||||
|
||||
\section TestEm12_s7 HISTOGRAMS
|
||||
|
||||
Testem12 has several predefined 1D histograms :
|
||||
|
||||
- 1 : energy profile dE/dr (in MeV/mm per event)
|
||||
- 2 : total energy deposited in the absorber
|
||||
- 3 : total track length of the primary track
|
||||
- 4 : step size of the primary track
|
||||
- 5 : projected range of the primary track
|
||||
- 6 : total track length of charged secondary tracks
|
||||
- 7 : step size of charged secondary tracks
|
||||
- 8 : normalized energy profile d(E/E0)/d(r/r0), where r0 is the range of
|
||||
the primary particle of energy E0
|
||||
|
||||
The histograms are managed by G4AnalysisManager 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 testem12)
|
||||
\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 testem12)
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,163 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm12
|
||||
--------
|
||||
|
||||
|
||||
How to plot a depth dose profile in spherical geometry.
|
||||
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single sphere of an homogenous material.
|
||||
Optionally, the sphere can be divided in thin shells.
|
||||
|
||||
3 parameters define the geometry :
|
||||
- the material of the sphere,
|
||||
- the radius of the sphere (absorRadius),
|
||||
- the number of shells (nbOfLayers)
|
||||
|
||||
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 changed interactively via
|
||||
the commands defined in the DetectorMessenger class.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
Physics Lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
The following options for EM physics using builders from physics_lists
|
||||
sub-package are available:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
- "dna" process and models for Geant4-DNA
|
||||
- "dna_opt1" process and models for Geant4-DNA
|
||||
- "dna_opt2" process and models for Geant4-DNA
|
||||
- "dna_opt3" process and models for Geant4-DNA
|
||||
- "dna_opt4" process and models for Geant4-DNA
|
||||
- "dna_opt5" process and models for Geant4-DNA
|
||||
- "dna_opt6" process and models for Geant4-DNA
|
||||
- "dna_opt7" process and models for Geant4-DNA
|
||||
|
||||
A local builder, PhysListEmStandard "local" (similar to opt0) is also
|
||||
available.
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle randomly shot at
|
||||
the centre of the sphere. The type of the particle and its energy are set
|
||||
in the PrimaryGeneratorAction class, and can be changed via the G4
|
||||
built-in commands of ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
In addition one can deactivate the randomness of the direction of the
|
||||
incident particle. The corresponding interactive command is built in
|
||||
PrimaryGeneratorMessenger class.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
4- 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.
|
||||
Optionally one can choose to draw all particles, only the charged ones,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
5- HOW TO START ?
|
||||
|
||||
- execute TestEm12 in 'batch' mode from macro files
|
||||
% TestEm12 run01.mac
|
||||
|
||||
- execute TestEm12 in 'interactive mode' with visualization
|
||||
% TestEm12
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros provided in this example:
|
||||
- berger.mac: e- (100 keV) on water
|
||||
- dna.mac: e- (1 keV) on water. DNA physics list
|
||||
- run01.mac: e- (4 MeV) on water. Step max from histos 1 and 8
|
||||
- run02.mac: e- (4 MeV) on water. Step max from geometry
|
||||
|
||||
Macros to be run interactively:
|
||||
- vis.mac: To activate visualization
|
||||
|
||||
6- TRACKING and STEP MAX
|
||||
|
||||
TestDm12 computes the total energy deposited along the trajectory of
|
||||
the incident particle : the so-called longitudinal energy profile,
|
||||
or depth dose distribution.
|
||||
The energy deposited (edep) is randomly distributed 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
|
||||
histograms 1 and 8 (see RunAction).
|
||||
|
||||
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.
|
||||
|
||||
StepMax is evaluated in RunAction::BeginOfRun() and passed
|
||||
to the StepMax process.
|
||||
A boolean UI command allows to deactivate this mechanism.
|
||||
Another UI command allows to define directly a stepMax value.
|
||||
|
||||
7- HISTOGRAMS
|
||||
|
||||
Testem12 has several predefined 1D histograms :
|
||||
|
||||
1 : energy profile dE/dr (in MeV/mm per event)
|
||||
2 : total energy deposited in the absorber
|
||||
3 : total track length of the primary track
|
||||
4 : step size of the primary track
|
||||
5 : projected range of the primary track
|
||||
6 : total track length of charged secondary tracks
|
||||
7 : step size of charged secondary tracks
|
||||
8 : normalized energy profile d(E/E0)/d(r/r0), where r0 is the range of
|
||||
the primary particle of energy E0
|
||||
|
||||
The histograms are managed by G4AnalysisManager 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 testem12)
|
||||
|
||||
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 testem12)
|
||||
@@ -0,0 +1,27 @@
|
||||
------------------
|
||||
EGSnrc Simulations
|
||||
------------------
|
||||
|
||||
These results were computed with the EGSnrc user code EDKnrc,
|
||||
developed by E. Mainegra et al.
|
||||
Yann Perrot (perrot@clermont.in2p3.fr) December 2010
|
||||
|
||||
Simulation parameters:
|
||||
----------------------
|
||||
|
||||
Electron Stepping Algorithm : PRESTA-II
|
||||
Boundary Crossing Algoritm : EXACT with skin parameter=3
|
||||
Maximum Energy Loss per Step : ESTEPE = 1%
|
||||
Electron tracking cut : 10keV for E>=1MeV
|
||||
1keV for E<1MeV
|
||||
|
||||
References:
|
||||
----------
|
||||
|
||||
Mainegra et al 2005
|
||||
Med. Phys. 32, 685-99
|
||||
|
||||
Rogers et al 2003
|
||||
NRC User Codes for EGSnrc
|
||||
Technical Report PIRS-702(RevB)
|
||||
National Research Council of Canada
|
||||
@@ -0,0 +1,84 @@
|
||||
|
||||
///\file "electromagnetic/TestEm13/.README.txt"
|
||||
///\brief Example TestEm13 README page
|
||||
|
||||
/*! \page ExampleTestEm13 Example TestEm13
|
||||
|
||||
How to compute cross sections from the transmition coefficient
|
||||
( see below, \ref TestEm13_s4).
|
||||
|
||||
\section TestEm13_s1 GEOMETRY DEFINITION
|
||||
|
||||
It is a single box representing a layer of finite thickness of
|
||||
homogeneous material.
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
|
||||
The default geometry (1 cm of water) is constructed in
|
||||
DetectorConstruction, but the above parameters can be changed
|
||||
interactively via the commands defined in DetectorMessenger.
|
||||
|
||||
\section TestEm13_s2 PHYSICS LIST
|
||||
|
||||
The physics list contains the standard electromagnetic processes.
|
||||
In order not to introduce 'artificial' constraints on the step size, the
|
||||
multiple scattering is not instanciated, and all processes are
|
||||
registered as discrete : there is no continuous energy loss.
|
||||
|
||||
\section TestEm13_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 (1 MeV gamma), and can be changed via the G4
|
||||
build-in commands of G4ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
\section TestEm13_s4 PHYSICS
|
||||
|
||||
An event is killed at the first step of the incident paticle.
|
||||
Either the particle has interacted or is transmitted through the layer.
|
||||
The cross section, also called absorption coefficient, is computed from
|
||||
the rate of unaltered transmitted incident particles.
|
||||
|
||||
The result is compared with the 'input' data, i.e. with the cross
|
||||
sections stored in the PhysicsTables and used by Geant4.
|
||||
|
||||
A set of macros defining various run conditions are provided.
|
||||
The processes are actived/inactived in order to survey the processes
|
||||
individually.
|
||||
|
||||
|
||||
\section TestEm13_s6 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm13.cc).
|
||||
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 TestEm13_s7- HOW TO START ?
|
||||
|
||||
- Execute TestEm13 in 'batch' mode from macro files :
|
||||
\verbatim
|
||||
% TestEm13 compt.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm13 in 'interactive mode' with visualization :
|
||||
\verbatim
|
||||
% TestEm13
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,79 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm13
|
||||
--------
|
||||
|
||||
How to compute cross sections from the transmition coefficient
|
||||
( see below, item Physics).
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
It is a single box representing a layer of finite thickness of
|
||||
homogeneous material.
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
|
||||
The default geometry (1 cm of water) is constructed in
|
||||
DetectorConstruction, but the above parameters can be changed
|
||||
interactively via the commands defined in DetectorMessenger.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The physics list contains the standard electromagnetic processes.
|
||||
In order not to introduce 'artificial' constraints on the step size, the
|
||||
multiple scattering is not instanciated, and all processes are
|
||||
registered as discrete : there is no continuous energy loss.
|
||||
|
||||
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 (1 MeV gamma), 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 step of the incident paticle.
|
||||
Either the particle has interacted or is transmitted through the layer.
|
||||
The cross section, also called absorption coefficient, is computed from
|
||||
the rate of unaltered transmitted incident particles.
|
||||
|
||||
The result is compared with the 'input' data, i.e. with the cross
|
||||
sections stored in the PhysicsTables and used by Geant4.
|
||||
|
||||
A set of macros defining various run conditions are provided.
|
||||
The processes are actived/inactived in order to survey the processes
|
||||
individually.
|
||||
|
||||
|
||||
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 TestEm13 in 'batch' mode from macro files :
|
||||
% TestEm13 compt.mac
|
||||
|
||||
execute TestEm13 in 'interactive mode' with visualization :
|
||||
% TestEm13
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
|
||||
///\file "electromagnetic/TestEm14/.README.txt"
|
||||
///\brief Example TestEm14 README page
|
||||
|
||||
/*! \page ExampleTestEm14 Example TestEm14
|
||||
|
||||
- How to compute cross sections from the direct evaluation of the mean
|
||||
free path ( see below, \ref TestEm14_s4).
|
||||
- How to plot final state of a process.
|
||||
|
||||
\section TestEm14_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 (100 m of water) is constructed in
|
||||
DetectorConstruction, but the above parameters can be changed
|
||||
interactively via the commands defined in DetectorMessenger.
|
||||
|
||||
\section TestEm14_s2 PHYSICS LIST
|
||||
|
||||
The physics list contains the standard electromagnetic processes.
|
||||
In order not to introduce 'artificial' constraints on the step size, the
|
||||
multiple scattering is not instanciated, and all processes are
|
||||
registered as discrete : there is no continuous energy loss.
|
||||
|
||||
\section TestEm14_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 (1 MeV gamma), and can be changed via the G4
|
||||
build-in commands of G4ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
\section TestEm14_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' data, i.e. with the cross
|
||||
sections stored in the PhysicsTables and used by Geant4.
|
||||
|
||||
The energy spectrum and the angular distribution of the scattered
|
||||
particle (if any) and of the created secondaries are plotted (see
|
||||
SteppingAction).
|
||||
|
||||
A set of macros defining various run conditions are provided.
|
||||
The processes are actived/inactived in order to survey the processes
|
||||
individually.
|
||||
|
||||
\section TestEm14_s5 HISTOGRAMS
|
||||
|
||||
The test contains 6 built-in 1D histograms, which are managed by the
|
||||
HistoManager class and its messenger, HistoMessenger. 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 : "scattered primary particle: energy spectrum"
|
||||
- 2 : "scattered primary particle: costheta distribution"
|
||||
- 3 : "charged secondaries: energy spectrum"
|
||||
- 4 : "charged secondaries: costheta distribution"
|
||||
- 5 : "neutral secondaries: energy spectrum"
|
||||
- 6 : "neutral secondaries: costheta distribution"
|
||||
|
||||
The histograms are managed by the HistoManager class and its messenger,
|
||||
HistoMessenger
|
||||
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 testem14)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem14)
|
||||
|
||||
\subsection TestEm14_sub_s51 Using hbook format
|
||||
|
||||
Need a special treatement : the Cern Library must be installed and the
|
||||
environment variable CERNLIB correctly set. Then, *before* compiling,
|
||||
activate G4_USE_HBOOK in GNUmakefile and g4hbook.hh in HistoManager.hh
|
||||
|
||||
\section TestEm14_s6- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm14.cc).
|
||||
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 TestEm14_s7- HOW TO START ?
|
||||
|
||||
- Execute TestEm14 in 'batch' mode from macro files :
|
||||
\verbatim
|
||||
% TestEm14 compt.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm14 in 'interactive mode' with visualization :
|
||||
\verbatim
|
||||
% TestEm14
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm14
|
||||
--------
|
||||
|
||||
How to compute cross sections from the direct evaluation of the mean
|
||||
free path ( see below, item Physics).
|
||||
How to plot final state of a process.
|
||||
|
||||
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 (100 m of water) is constructed in
|
||||
DetectorConstruction, but the above parameters can be changed
|
||||
interactively via the commands defined in DetectorMessenger.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The physics list contains the standard electromagnetic processes.
|
||||
In order not to introduce 'artificial' constraints on the step size, the
|
||||
multiple scattering is not instanciated, and all processes are
|
||||
registered as discrete : there is no continuous energy loss.
|
||||
|
||||
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 (1 MeV gamma), 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' data, i.e. with the cross
|
||||
sections stored in the PhysicsTables and used by Geant4.
|
||||
|
||||
The energy spectrum and the angular distribution of the scattered
|
||||
particle (if any) and of the created secondaries are plotted (see
|
||||
SteppingAction).
|
||||
|
||||
A set of macros defining various run conditions are provided.
|
||||
The processes are actived/inactived in order to survey the processes
|
||||
individually.
|
||||
|
||||
5- HISTOGRAMS
|
||||
|
||||
The test contains 6 built-in 1D histograms, which 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, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
1 "scattered primary particle: energy spectrum"
|
||||
2 "scattered primary particle: costheta distribution"
|
||||
3 "charged secondaries: energy spectrum"
|
||||
4 "charged secondaries: costheta distribution"
|
||||
5 "neutral secondaries: energy spectrum"
|
||||
6 "neutral secondaries: costheta distribution"
|
||||
|
||||
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 testem14)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem14)
|
||||
|
||||
Using hbook format
|
||||
------------------
|
||||
|
||||
Need a special treatement : the Cern Library must be installed and the
|
||||
environment variable CERNLIB correctly set. Then, *before* compiling,
|
||||
activate G4_USE_HBOOK in GNUmakefile and g4hbook.hh in HistoManager.hh
|
||||
|
||||
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 TestEm14 in 'batch' mode from macro files :
|
||||
% TestEm14 compt.mac
|
||||
|
||||
execute TestEm14 in 'interactive mode' with visualization :
|
||||
% TestEm14
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
|
||||
///\file "electromagnetic/TestEm15/.README.txt"
|
||||
///\brief Example TestEm15 README page
|
||||
|
||||
/*! \page ExampleTestEm15 Example TestEm15
|
||||
|
||||
How to compute and plot the final state of Multiple Scattering
|
||||
considered as an isolated process.
|
||||
The method is exposed below : see \ref TestEm15_s4.
|
||||
|
||||
\section TestEm15_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 (100 m of water) is constructed in
|
||||
DetectorConstruction, but the above parameters can be changed
|
||||
interactively via the commands defined in DetectorMessenger.
|
||||
|
||||
\section TestEm15_s2 PHYSICS LIST
|
||||
|
||||
The physics list contains the standard electromagnetic processes.
|
||||
In order not to introduce 'articicial' constraints on the step size,
|
||||
there is no limitation from the maximum energy lost per step.
|
||||
|
||||
\section TestEm15_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 (1 MeV electron), and can be changed via the G4
|
||||
build-in commands of G4ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
\section TestEm15_s4 PHYSICS
|
||||
|
||||
All discrete processes are inactivated (see provided macros),
|
||||
so that Multiple Scattering is 'forced' to determine the first step of
|
||||
the primary particle. The step size and the final state are computed
|
||||
and plotted. Then the event is immediately killed.
|
||||
|
||||
The result is compared with the 'input' data, i.e. with the cross
|
||||
sections stored in the PhysicsTables and used by Geant4.
|
||||
|
||||
The stepMax command provides an additionnal control of the step size of
|
||||
the multiple scattering.
|
||||
|
||||
|
||||
\section TestEm15_s5 HISTOGRAMS
|
||||
|
||||
The test contains 9 built-in 1D histograms, which 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, etc..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
- 1 : Multiple Scattering. True step length
|
||||
- 2 : Multiple Scattering. Geom step length
|
||||
- 3 : Multiple Scattering. Ratio geomSl/trueSl
|
||||
- 4 : Multiple Scattering. Lateral displacement: radius
|
||||
- 5 : Multiple Scattering. Lateral displac: psi_space
|
||||
- 6 : Multiple Scattering. Angular distrib: theta_plane
|
||||
- 7 : Multiple Scattering. Phi-position angle
|
||||
- 8 : Multiple Scattering. Phi-direction angle
|
||||
- 9 : Multiple Scattering. Correlation: cos(phiPos-phiDir)
|
||||
|
||||
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 testem15)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem15)
|
||||
|
||||
\section TestEm15_s6 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm15.cc).
|
||||
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 TestEm15_s7- HOW TO START ?
|
||||
|
||||
- Execute TestEm15 in 'batch' mode from macro files :
|
||||
\verbatim
|
||||
% TestEm15 compt.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm15 in 'interactive mode' with visualization :
|
||||
\verbatim
|
||||
% TestEm15
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm15
|
||||
--------
|
||||
|
||||
How to compute and plot the final state of Multiple Scattering
|
||||
or Gamma Conversion considered as an isolated processes.
|
||||
The method is exposed below : see item Physics.
|
||||
|
||||
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 (100 m of water) is constructed in
|
||||
DetectorConstruction, but the above parameters can be changed
|
||||
interactively via the commands defined in DetectorMessenger.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The physics list contains the standard electromagnetic processes.
|
||||
In order not to introduce 'artificial' constraints on the step size,
|
||||
there is no limitation from the maximum energy lost per step.
|
||||
|
||||
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 (1 MeV electron), and can be changed via the G4
|
||||
build-in commands of ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
4- PHYSICS
|
||||
|
||||
All discrete processes are inactivated (see provided macros),
|
||||
so that Multiple Scattering or Gamma Conversion is 'forced' to
|
||||
determine the first step of the primary particle.
|
||||
The step size and the final state are computed and plotted.
|
||||
Then the event is immediately killed.
|
||||
|
||||
The result is compared with the 'input' data, i.e. with the cross
|
||||
sections stored in the PhysicsTables and used by Geant4.
|
||||
|
||||
The stepMax command provides an additional control of the step size of
|
||||
the multiple scattering.
|
||||
|
||||
|
||||
5- HISTOGRAMS
|
||||
|
||||
The test contains 16 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 Multiple Scattering. True step length
|
||||
2 Multiple Scattering. Geom step length
|
||||
3 Multiple Scattering. Ratio geomSl/trueSl
|
||||
4 Multiple Scattering. Lateral displacement: radius
|
||||
5 Multiple Scattering. Lateral displac: psi_space
|
||||
6 Multiple Scattering. Angular distrib: theta_plane
|
||||
7 Multiple Scattering. Phi-position angle
|
||||
8 Multiple Scattering. Phi-direction angle
|
||||
9 Multiple Scattering. Correlation: cos(phiPos-phiDir)
|
||||
|
||||
10 Gamma Conversion. Open Angle * Egamma
|
||||
11 Gamma Conversion. Log10(P recoil)
|
||||
12 Gamma Conversion. Phi P recoil angle
|
||||
13 Gamma Conversion. Phi P plus angle
|
||||
14 Gamma Conversion. 2 * cos(phiplus + phiminus) Asymmetry
|
||||
15 Gamma Conversion. E plus / E gamma
|
||||
16 Gamma Conversion. Phi of Gamma Polarization
|
||||
|
||||
|
||||
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 testem15)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem15)
|
||||
|
||||
6- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main().
|
||||
The initialization of the drawing is done via the commands
|
||||
/vis/... in the macro vis.mac. To get visualization:
|
||||
> /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 TestEm15 in 'batch' mode from macro files :
|
||||
% TestEm15 compt.mac
|
||||
|
||||
execute TestEm15 in 'interactive mode' with visualization :
|
||||
% TestEm15
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
8 - MACROS
|
||||
The examples of macros for Multiple Scattering:
|
||||
electron.mac muon.mac proton.mac
|
||||
|
||||
The example of Gamma Conversion macro :
|
||||
gamma.mac - gamma to e+ e-
|
||||
gamma2mumu.mac gamma to mu+ mu-
|
||||
@@ -0,0 +1,48 @@
|
||||
TestEm15 : gamma.mac
|
||||
|
||||
-- tests of the 5D gamma -> e+e- conversion model G4BetheHeitler5DModel
|
||||
|
||||
All discrete processes are inactivated (see macro),
|
||||
so Gamma Conversion is 'forced'.
|
||||
|
||||
Histograms :
|
||||
|
||||
10 # Open Angle (rad)* E gamma (MeV)
|
||||
The most probable value of the pair opening angle multiplied by the
|
||||
photon energy is 1.6 rad*MeV.
|
||||
Olsen, Phys. Rev. 131 (1963) 406. See also Fig. 7 of arXiv:1802.08253
|
||||
|
||||
11 # Log10 ( recoil momentum)
|
||||
The distribution of the recoil momentum is described by
|
||||
Jost, Phys. Rev. 80 (1950) 189 (no form factor).
|
||||
See also Fig. 2 of Astroparticle Physics 88 (2017) 60.
|
||||
|
||||
12 # Phi recoil
|
||||
13 # Phi positron
|
||||
|
||||
14 # Asymmetry 2 * cos(phi_+ + phi_-)
|
||||
For a photon propagating along x, polarized along y, the average value of
|
||||
2 * cos(phi_+ + phi_-),
|
||||
provides a measurement of the polarization asymmetry, A.
|
||||
Eq. (12) of Nucl. Instrum. Meth. A 729 (2013) 765
|
||||
The azimuthal angle of the event defined as the bisector angle
|
||||
of the azimuthal angles of the positron and of the electron,
|
||||
(phi_+ + phi_-)/2,
|
||||
provides the optimal measurement of the asymmetry
|
||||
Astroparticle Physics 88 (2017) 30.
|
||||
|
||||
For high-energy photons (E >> 20 MeV), the asymptotic expression for A
|
||||
can be used for comparison.
|
||||
Boldyshev, Yad. Fiz. 14 (1971) 1027, Sov.J.Nucl.Phys. 14 (1972) 576.
|
||||
See also eq. (13) of arXiv:1802.08253
|
||||
Example : A ~ 0.17 at 100 GeV.
|
||||
|
||||
15 # E plus / E gamma
|
||||
x_+ = E plus / E gamma has a more-or-less flat spectrum that extends
|
||||
almost from 0. to 1.
|
||||
See Fig. 16 page 261 of "The Quantum Theory of Radiation", W. Heitler,
|
||||
3rd edition, 1954.
|
||||
|
||||
16 # Phi of Gamma Polarization
|
||||
The phi of polarization vector after transformation into reference system
|
||||
defined by gamma direction (z) , gamma polarization (x).
|
||||
@@ -0,0 +1,143 @@
|
||||
|
||||
///\file "electromagnetic/TestEm16/.README.txt"
|
||||
///\brief Example TestEm16 README page
|
||||
|
||||
/*! \page ExampleTestEm16 Example TestEm16
|
||||
|
||||
Simulate synchrotron radiation
|
||||
|
||||
\section TestEm16_s1 GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single block of a homogenous material.
|
||||
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
The default is 500 m of vacuum.
|
||||
|
||||
A transverse uniform magnetic field can be applied.
|
||||
|
||||
The default geometry is constructed in DetectorConstruction class,
|
||||
but all of the above parameters can be changed interactively via
|
||||
the commands defined in the DetectorMessenger class.
|
||||
|
||||
\section TestEm16_s2 PHYSICS LIST
|
||||
|
||||
The particle list is the one of novice/exampleN03 and
|
||||
<a href="../../html_TestEm6/html/ExampleTestEm6.html"> TestEm6 </a>
|
||||
with in addition synchrotron radiation.
|
||||
To make the synchrotron radiation easily visible, a very low
|
||||
pressure "vaccuum" and a magnetic field of by default 1 Tesla
|
||||
in z-direction is used.
|
||||
|
||||
\section TestEm16_s3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
block perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the PrimaryGeneratorAction class, and can
|
||||
changed via the G4 build-in commands of G4ParticleGun class (see
|
||||
the macros provided with this example).
|
||||
The default is an positron of 10 GeV.
|
||||
|
||||
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 TestEm16_s4 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm16.cc).
|
||||
The initialisation of the drawing is done via the command
|
||||
\verbatim
|
||||
> /control/execute vis.mac
|
||||
> /run/beamOn 1
|
||||
\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.
|
||||
Optionaly one can choose to draw all particles, only the charged one,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
\section TestEm16_s5 PHYSICS DEMO
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in PhysicsList class.
|
||||
|
||||
In addition a build-in interactive command (/process/inactivate proname)
|
||||
allows to activate/inactivate the processes one by one.
|
||||
|
||||
The threshold for producing secondaries can be changed.
|
||||
eg:
|
||||
\verbatim
|
||||
/run/particle/setCut 100 micrometer
|
||||
/run/initialize
|
||||
\endverbatim
|
||||
|
||||
To visualize the Synchrotron radiation :
|
||||
\verbatim
|
||||
/control/execute vis.mac
|
||||
\endverbatim
|
||||
|
||||
\section TestEm16_s6- HOW TO START ?
|
||||
|
||||
- Execute Test in 'batch' mode from macro files
|
||||
\verbatim
|
||||
% TestEm16 run01.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute Test in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% TestEm16
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
\section TestEm16_s7 TRACKING : stepMax and setMaxStepLength
|
||||
|
||||
In order to control the accuracy of the deposition, the user can limit
|
||||
'by hand' the maximum step size stepMax of charged particles.
|
||||
|
||||
The maximum tracking step length for computing of magnetic field lines
|
||||
is by default set to 1 km.
|
||||
Synchrotron radiation in very weak magnetic fields of the order of 1 Gauss
|
||||
may require longer pathlength.
|
||||
This can be achieved with using setMaxStepLength like
|
||||
\verbatim
|
||||
/testem/tracking/setMaxStepLength 100 km
|
||||
\endverbatim
|
||||
|
||||
\section TestEm16_s8 HISTOGRAMS
|
||||
|
||||
TestEm16 produces 3 histograms which illustrate synchrotron radiation.
|
||||
The photon energy spectrum (photons / energy bin) and the power spectrum
|
||||
(photon spectrum weighted with the photon energy) and a histogram
|
||||
of the path length between photon radiation is produced.
|
||||
|
||||
The histograms are managed by G4AnalysisManager and its messenger,
|
||||
HistoMessenger.
|
||||
|
||||
The histos can be activated individually 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, cm or mm, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default testem16)
|
||||
\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 testem16)
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,124 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm16
|
||||
--------
|
||||
Simulate synchrotron radiation
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single block of a homogenous material.
|
||||
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
The default is 500 m of vacuum.
|
||||
|
||||
A transverse uniform magnetic field can be applied.
|
||||
|
||||
The default geometry is constructed in DetectorConstruction class,
|
||||
but all of the above parameters can be changed interactively via
|
||||
the commands defined in the DetectorMessenger class.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The particle list include EM processes for gamma, e+, e-, mu+, mu-,
|
||||
and protons, for the rest of particles only transportation.
|
||||
Synchrotron radiation is added to all charged particles.
|
||||
To make the synchrotron radiation easily visible, a very low
|
||||
pressure "vaccuum" and a magnetic field of by default 1 Tesla
|
||||
in z-direction is used.
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
block perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the PrimaryGeneratorAction class, and can
|
||||
changed via the G4 build-in commands of ParticleGun class (see
|
||||
the macros provided with this example).
|
||||
The default is an positron of 10 GeV.
|
||||
|
||||
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- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main().
|
||||
The initialisation of the drawing is done via the command
|
||||
> /control/execute vis.mac
|
||||
> /run/beamOn 1
|
||||
|
||||
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.
|
||||
Optionaly one can choose to draw all particles, only the charged one,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
5- PHYSICS DEMO
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in PhysicsList class.
|
||||
|
||||
In addition a build-in interactive command (/process/inactivate proname)
|
||||
allows to activate/inactivate the processes one by one.
|
||||
|
||||
The threshold for producing secondaries can be changed.
|
||||
eg: /run/setCut 100 micrometer
|
||||
/run/initialize
|
||||
|
||||
To visualize the Synchrotron radiation :
|
||||
/control/execute vis.mac
|
||||
|
||||
6- HOW TO START ?
|
||||
|
||||
- execute Test in 'batch' mode from macro files
|
||||
% TestEm16 run01.mac
|
||||
|
||||
- execute Test in 'interactive mode' with visualization
|
||||
% TestEm16
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
7 - TRACKING : stepMax and setMaxStepLength
|
||||
|
||||
In order to control the accuracy of the deposition, the user can limit
|
||||
'by hand' the maximum step size stepMax of charged particles.
|
||||
|
||||
The maximum tracking step length for computing of magnetic field lines
|
||||
is by default set to 1 km.
|
||||
Synchrotron radiation in very weak magnetic fields of the order of 1 Gauss
|
||||
may require longer pathlength.
|
||||
This can be achieved with using setMaxStepLength like
|
||||
/testem/tracking/setMaxStepLength 100 km
|
||||
|
||||
8- HISTOGRAMS
|
||||
|
||||
TestEm16 produces 3 histograms which illustrate synchrotron radiation.
|
||||
The photon energy spectrum (photons / energy bin) and the power spectrum
|
||||
(photon spectrum weighted with the photon energy) and a histogram
|
||||
of the path length between photon radiation is produced.
|
||||
|
||||
The histograms are managed by G4AnalysisManager and its Messenger.
|
||||
|
||||
The histos can be activated individually with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where 'unit' is the desired unit for the histo (MeV or KeV, cm or mm, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default testem16)
|
||||
|
||||
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 testem16)
|
||||
@@ -0,0 +1,118 @@
|
||||
|
||||
///\file "electromagnetic/TestEm17/.README.txt"
|
||||
///\brief Example TestEm17 README page
|
||||
|
||||
/*! \page ExampleTestEm17 Example TestEm17
|
||||
|
||||
This example is intended to check implementation of the processes
|
||||
of muon interactions: ionization, direct (e+,e-) production,
|
||||
bremsstrahlung, mu-nuclear interaction.
|
||||
It allows to compute differential cross sections (as function of the
|
||||
energy transfered to secondaries), total cross sections and to compare
|
||||
with analytic calculations.
|
||||
|
||||
\section TestEm17_s1 GEOMETRY DEFINITION
|
||||
|
||||
It is a single box of homogeneous medium.
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
|
||||
The default geometry (1 m of Iron) is constructed in
|
||||
DetectorConstruction, but the above parameters can be changed
|
||||
interactively via the commands defined in DetectorMessenger.
|
||||
|
||||
\section TestEm17_s2 PHYSICS LIST
|
||||
|
||||
The Physics List of the example uses the main local physics constructor
|
||||
(builder) which called "standard". In this builder a limited set
|
||||
of physics processes are defined for muons, pions and proton:
|
||||
ionisation, bremsstrahlung and e+e- pair production. Energy range
|
||||
for these processes is from 100*eV to 1000*PeV.
|
||||
|
||||
Optionally "muNucl" builder, MuNuclearBuilder, may be added activating muon-nuclear
|
||||
inelastic interaction.
|
||||
|
||||
\section TestEm17_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 (mu+ 10 TeV), and can be changed via the G4
|
||||
build-in commands of ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
\section TestEm17_s4 PHYSICS
|
||||
|
||||
The incident particle is a muon. During the tracking, secondary
|
||||
particles are killed.
|
||||
|
||||
The number of interactions are plotted as a function of the energy
|
||||
transfered to the secondaries.
|
||||
The total number of interactions is recorded, and the total cross section
|
||||
computed from this.
|
||||
|
||||
At RunAction::EndOfRunAction(), the above results are compared with analytic calculations.
|
||||
The functions which compute the theoretical cross sections have been
|
||||
provided by the G4 MEPhI group, and grouped in MuCrossSections class.
|
||||
|
||||
\section TestEm17_s5 HISTOGRAMS
|
||||
|
||||
The test contains 4 built-in 1D histograms, which are managed by the
|
||||
HistoManager class and its Messenger, HistoMessenger.
|
||||
|
||||
- 1 Monte-Carlo relative transferred energy distribution histo
|
||||
(log10(eps/Emu kin) for knock-on electrons (ionization)
|
||||
- 2 ... direct (e+,e-) pair production
|
||||
- 3 ... bremsstrahlung
|
||||
- 4 ... nuclear interaction
|
||||
|
||||
The histos can be activated individually with the command :
|
||||
\verbatim
|
||||
/testem/histo/setHisto id nbBins valMin valMax
|
||||
\endverbatim
|
||||
min and max values of log10(eps/Emu kin).
|
||||
|
||||
At RunAction::EndOfRunAction() the corresponding histos for analytic calculations are
|
||||
automatically created and filled (histo 11 to 14).
|
||||
|
||||
One can control the name and the type of the histograms file with
|
||||
the command:
|
||||
\verbatim
|
||||
/testem/histo/setFileName name (default testem17)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file :
|
||||
root (default), xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
\section TestEm17_s6- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm17.cc).
|
||||
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 TestEm17_s7- HOW TO START ?
|
||||
|
||||
- Execute TestEm17 in 'batch' mode from macro files :
|
||||
\verbatim
|
||||
% TestEm17 allproc.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm17 in 'interactive mode' with visualization :
|
||||
\verbatim
|
||||
% TestEm17
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,112 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm17
|
||||
--------
|
||||
This example is intended to check implementation of the processes
|
||||
of muon interactions: ionization, direct (e+,e-) production,
|
||||
bremsstrahlung, mu-nuclear interaction.
|
||||
It allows to compute differential cross sections (as function of the
|
||||
energy transfered to secondaries), total cross sections and to compare
|
||||
with analytic calculations.
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
It is a single box of homogeneous medium.
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
|
||||
The default geometry (1 m of Iron) is constructed in
|
||||
DetectorConstruction, but the above parameters can be changed
|
||||
interactively via the commands defined in DetectorMessenger.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The Physics List of the example uses the main physics constructor
|
||||
(builder) called "emstandard_opt0". As an alternative "local"
|
||||
constructor is provided in which only a limited set
|
||||
of physics processes are defined for muons, pions and proton:
|
||||
ionisation, bremsstrahlung and e+e- pair production.
|
||||
|
||||
Default energy range for EM processes in this example
|
||||
is from 100*eV to 1000*PeV.
|
||||
|
||||
Optionally "muNucl" builder may be added activating muon-nuclear
|
||||
inelastic interaction.
|
||||
|
||||
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 (mu+ 10 TeV), and can be changed via the G4
|
||||
build-in commands of ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
4- PHYSICS
|
||||
|
||||
The incident particle is a muon. During the tracking, secondary
|
||||
particles are killed.
|
||||
|
||||
The number of interactions are plotted as a function of the energy
|
||||
transfered to the secondaries.
|
||||
The total number of interactions is recorded, and the total cross
|
||||
section computed from this.
|
||||
|
||||
At EndOfRun, the above results are compared with analytic calculations.
|
||||
The functions which compute the theoretical cross sections have been
|
||||
provided by the G4 MEPhI group, and grouped in MuCrossSections class.
|
||||
|
||||
5- HISTOGRAMS
|
||||
|
||||
The test contains built-in 1D histograms for muons filled during
|
||||
Monte Carlo simulation, which are managed by the HistoManager class
|
||||
and its Messenger:
|
||||
|
||||
1 Relative muon transferred energy distribution
|
||||
(log10(eps/Emu kin) for knock-on electrons (ionization)
|
||||
2 -"- direct (e+,e-) pair production by muons
|
||||
3 -"- bremsstrahlung by muons
|
||||
4 -"- nuclear interaction by muons
|
||||
5 ionistion for hadrons
|
||||
6 (e+,e-) pair production by hadrons
|
||||
7 bremsstrahlung by hadrons
|
||||
|
||||
The histos can be activated individually with the command :
|
||||
/testem/histo/setHisto id nbBins valMin valMax :
|
||||
min and max values of log10(eps/Emu kin).
|
||||
|
||||
At EndOfRun the corresponding histos for analytic calculations are
|
||||
automatically created and filled (histo 11 to 14).
|
||||
|
||||
One can control the name and the type of the histograms file with
|
||||
the command:
|
||||
/testem/histo/setFileName name (default testem17)
|
||||
|
||||
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 TestEm17 in 'batch' mode from macro files :
|
||||
% TestEm17 allproc.mac
|
||||
|
||||
execute TestEm17 in 'interactive mode' with visualization :
|
||||
% TestEm17
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
@@ -0,0 +1,135 @@
|
||||
|
||||
///\file "electromagnetic/TestEm18/.README.txt"
|
||||
///\brief Example TestEm18 README page
|
||||
|
||||
/*! \page ExampleTestEm18 Example TestEm18
|
||||
|
||||
This example allows to study the various contributions of the energy lost
|
||||
by a charged particle in a single layer of an homogeneous material.
|
||||
See any textbook of interactions of charged particles with matter, in particular :
|
||||
1- geant4.web.cern.ch --> UserSupport --> Physics Reference Manual
|
||||
2- lappweb.in2p3.fr/~maire/tutorials/index.html
|
||||
|
||||
\section TestEm18_s1 GEOMETRY DEFINITION
|
||||
|
||||
It is a simple cubic box of homogeneous material.
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the thickness of the box.
|
||||
|
||||
The default geometry (1 cm of water) is constructed in DetectorConstruction,
|
||||
but the above parameters can be changed interactively via the commands
|
||||
defined in DetectorMessenger.
|
||||
|
||||
\section TestEm18_s2 PHYSICS
|
||||
|
||||
The physics list, PhysicsList, contains the 'standard' electromagnetic processes.
|
||||
However the MultipleScattering is not registered, in order to focuse on
|
||||
fluctuations of to energy loss alone.
|
||||
|
||||
\section TestEm18_s3 BEAM
|
||||
|
||||
The primary kinematic is a single particle starting at the edge
|
||||
of the box. The type of the particle and its energy are set in
|
||||
PrimaryGeneratorAction (e- 10 MeV), and can be changed via the G4
|
||||
build-in commands of G4ParticleGun class.
|
||||
|
||||
\section TestEm18_s4 RUN
|
||||
|
||||
During the tracking of the incident particle, by default, the secondary
|
||||
particles are immediately killed, after that their energy has been registered
|
||||
(see SteppingAction and StackingAction).
|
||||
Therefore, we study here the various components of the total energy lost
|
||||
by the incident particle, not the energy deposited in a layer of finite
|
||||
thickness.
|
||||
With the option /testEm/trackSecondaries one can compute and plot the energy
|
||||
deposited in the layer. See edep.mac
|
||||
|
||||
At EndOfRun, the above results are compared with 'reference' values,
|
||||
i.e. the input data read from EnergyLoss and Range tables.
|
||||
See reference 2 : Energy-Range relation, slide 4.
|
||||
|
||||
\section TestEm18_s5 HISTOGRAMS
|
||||
|
||||
The test contains 13 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its messenger.
|
||||
|
||||
1 step size of primary track
|
||||
2 energy locally deposited along primary track
|
||||
3 energy transfered to secondaries by ionisation
|
||||
4 energy transfered to secondaries by Bremsstrahlung
|
||||
5 energy transfered to secondaries by (e+,e-) production
|
||||
6 total energy transfered to secondaries
|
||||
7 total energy lost by primary track
|
||||
8 total energy lost by primary track from energy balance
|
||||
9 energy continuously deposited along secondary tracks
|
||||
10 total energy deposited
|
||||
11 energy spectrum of gamma
|
||||
12 energy spectrum of e-
|
||||
13 energy spectrum of e+
|
||||
|
||||
The histograms are defined in HistoManager.
|
||||
|
||||
The histos can be activated individually 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, cm or mm, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default testem18)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
For convenience, few simple Root macros are provided : plotHisto.C pixe.C
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
/analysis/h1/sweAscii id
|
||||
\endverbatim
|
||||
All selected histos will be written on a file name.ascii (default testem18)
|
||||
|
||||
\section TestEm18_s6 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm18.cc).
|
||||
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 TestEm18_s7 HOW TO START ?
|
||||
|
||||
- Execute TestEm18 in 'batch' mode from macro files :
|
||||
\verbatim
|
||||
% TestEm18 electron.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm18 in 'interactive mode' with visualization :
|
||||
\verbatim
|
||||
% TestEm18
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- csda.mac: test independance of user step max
|
||||
- edep.mac: track secondary particles and plot energy deposited
|
||||
- electron.mac: e- (10 MeV) on 1 cm of water
|
||||
- ion.mac: ion C12 (4 GeV) on 1 cm of water
|
||||
- muon.mac: mu+ (1 TeV) on 1 m of water
|
||||
- pixe.mac: proton (20 MeV) on 50 um of gold. Plot gamma pixe
|
||||
- proton.mac: proton (1 GeV) on 10 cm of water
|
||||
- plotHisto.C, pixe.C: Root macros
|
||||
|
||||
Macros to be run interactively:
|
||||
- vis.mac: To activate visualization
|
||||
*/
|
||||
@@ -0,0 +1,123 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm18
|
||||
--------
|
||||
This example allows to study the various contributions of the energy lost
|
||||
by a charged particle in a single layer of an homogeneous material.
|
||||
See any textbook of interactions of charged particles with matter, in particular :
|
||||
1- geant4.web.cern.ch --> UserSupport --> Physics Reference Manual
|
||||
2- lappweb.in2p3.fr/~maire/tutorials/index.html
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
It is a simple cubic box of homogeneous material.
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the thickness of the box.
|
||||
|
||||
The default geometry (1 cm of water) is constructed in DetectorConstruction,
|
||||
but the above parameters can be changed interactively via the commands
|
||||
defined in DetectorMessenger.
|
||||
|
||||
2- PHYSICS
|
||||
|
||||
The physics list contains the 'standard' electromagnetic processes.
|
||||
However the MultipleScattering is not registered, in order to focuse on
|
||||
fluctuations of to energy loss alone.
|
||||
|
||||
3- BEAM
|
||||
|
||||
The primary kinematic is a single particle starting at the edge
|
||||
of the box. The type of the particle and its energy are set in
|
||||
PrimaryGeneratorAction (e- 10 MeV), and can be changed via the G4
|
||||
build-in commands of ParticleGun class.
|
||||
|
||||
4- RUN
|
||||
|
||||
During the tracking of the incident particle, by default, the secondary
|
||||
particles are immediately killed, after that their energy has been registered
|
||||
(see SteppingAction and StackingAction).
|
||||
Therefore, we study here the various components of the total energy lost
|
||||
by the incident particle, not the energy deposited in a layer of finite
|
||||
thickness.
|
||||
With the option /testEm/trackSecondaries one can compute and plot the energy
|
||||
deposited in the layer. See edep.mac
|
||||
|
||||
At EndOfRun, the above results are compared with 'reference' values,
|
||||
i.e. the input data read from EnergyLoss and Range tables.
|
||||
See reference 2 : Energy-Range relation, slide 4.
|
||||
|
||||
5- HISTOGRAMS
|
||||
|
||||
The test contains 13 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager and its Messenger.
|
||||
|
||||
1 step size of primary track
|
||||
2 energy continuously deposited along primary track
|
||||
3 energy transfered to secondaries by ionisation
|
||||
4 energy transfered to secondaries by Bremsstrahlung
|
||||
5 energy transfered to secondaries by (e+,e-) production
|
||||
6 total energy transfered to secondaries
|
||||
7 total energy lost by primary track
|
||||
8 total energy lost by primary track from energy balance
|
||||
9 energy continuously deposited along secondary tracks
|
||||
10 total energy deposited
|
||||
11 energy spectrum of gamma
|
||||
12 energy spectrum of e-
|
||||
13 energy spectrum of e+
|
||||
|
||||
The histograms are defined in HistoManager.
|
||||
|
||||
The histos can be activated individually with the command :
|
||||
/analysis/h1/set id nbBins valMin valMax unit
|
||||
where 'unit' is the desired unit for the histo (MeV or KeV, cm or mm, etc..)
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default testem18)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
xml, csv, by using namespace in HistoManager.hh
|
||||
For convenience, few simple Root macros are provided : plotHisto.C pixe.C
|
||||
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 testem18)
|
||||
|
||||
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 TestEm18 in 'batch' mode from macro files :
|
||||
% TestEm18 electron.mac
|
||||
|
||||
execute TestEm18 in 'interactive mode' with visualization :
|
||||
% TestEm18
|
||||
Idle> control/execute vis.mac
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros provided in this example:
|
||||
- csda.mac: test independance of user step max
|
||||
- edep.mac: track secondary particles and plot energy deposited
|
||||
- electron.mac: e- (10 MeV) on 1 cm of water
|
||||
- ion.mac: ion C12 (4 GeV) on 1 cm of water
|
||||
- muon.mac: mu+ (1 TeV) on 1 m of water
|
||||
- pixe.mac: proton (20 MeV) on 50 um of gold. Plot gamma pixe
|
||||
- proton.mac: proton (1 GeV) on 10 cm of water
|
||||
- plotHisto.C, pixe.C: Root macros
|
||||
|
||||
Macros to be run interactively:
|
||||
- vis.mac: To activate visualization
|
||||
@@ -0,0 +1,171 @@
|
||||
|
||||
///\file "electromagnetic/TestEm2/.README.txt"
|
||||
///\brief Example TestEm2 README page
|
||||
|
||||
/*! \page ExampleTestEm2 Example TestEm2
|
||||
|
||||
How to do shower profiles in an homogenous medium, with virtual
|
||||
voxelisation.
|
||||
|
||||
\section TestEm2_s1 GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a cylinder of homogenous material.
|
||||
|
||||
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.
|
||||
|
||||
Material can be choosen: Air Water lAr Al Fe BGO PbWO4 Pb.
|
||||
eg:
|
||||
\verbatim
|
||||
/testem/det/setMat PbWO4
|
||||
\endverbatim
|
||||
|
||||
The cylinder is virtually sliced longitudinally (slice) and radially
|
||||
(ring). The size of the slices and rings are expressed in radiation
|
||||
length units and can be changed.
|
||||
eg:
|
||||
\verbatim
|
||||
/testem/det/setLbin 20 1. ---> 20 slices of 1. radl
|
||||
/testem/det/setRbin 5 0.25 ---> 5 rings of 0.25 radl
|
||||
/testem/det/update ---> rebuild the geometry
|
||||
\endverbatim
|
||||
(MaxBin = 500 in both directions)
|
||||
|
||||
An uniform magnetic field along the cylinder axis can be set.
|
||||
eg:
|
||||
\verbatim
|
||||
/testem/det/setField 5 tesla
|
||||
\endverbatim
|
||||
|
||||
\section TestEm2_s2 PHYSICS LISTS
|
||||
|
||||
Physics lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
EM physics builders can be local (eg. in this example) or from G4 kernel
|
||||
physics_lists subdirectory.
|
||||
|
||||
Local physics builders:
|
||||
- "local" standard EM physics with current 'best' options setting.
|
||||
these options are explicited in PhysListEmStandard
|
||||
|
||||
From geant4/source/physics_lists/builders:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
\section TestEm2_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
cylinder perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the PrimaryGeneratorAction class, and can
|
||||
changed via the G4 build-in commands of G4ParticleGun class (see
|
||||
the macros provided with this example).
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
\section TestEm2_s4 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main() (see TestEm2.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 detector has a default view which is a longitudinal view of the
|
||||
cylinder.
|
||||
|
||||
The tracks are drawn at the end of event, and erased at the end of run.
|
||||
Optionally one can choose to draw all particles, only the charged one,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
\section TestEm2_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 build-in interactive command (/process/inactivate procname)
|
||||
allows to activate/inactivate the processes one by one.
|
||||
|
||||
The threshold for producing secondaries can be changed.
|
||||
eg:
|
||||
\verbatim
|
||||
/testem/phys/setCuts 100 microm
|
||||
/run/initialize
|
||||
\endverbatim
|
||||
|
||||
The shower profiles are histogramed, if histograming is activated.
|
||||
They can be also printed with the command /testem/run/verbose 1
|
||||
|
||||
\section TestEm2_s6 HOW TO START ?
|
||||
|
||||
- Execute TestEm2 in 'batch' mode from macro files
|
||||
\verbatim
|
||||
% TestEm2 run01.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm2 in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% TestEm2
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- egs4.mac:
|
||||
Fe; L = 20 radl; R = 5 radl; electron 30 GeV
|
||||
(EGS4 simulation: Particle Data Group - Phys.Rev.D 50-3 - August94)
|
||||
- run01.mac: PbWO4; L = 20 radl; R = 5 radl; electron 5 GeV
|
||||
- run02.mac: Al; L = 13.5 radl; R = 1.35 radl; electron 1 GeV
|
||||
(Electron-induced cascade showers: J&H Crannel - Phys. Rev. 184-2 - August69)
|
||||
- run03.mac: H2O; L = 9.97 radl; R = 0.665 radl; electron 1 GeV
|
||||
(Electron-induced cascade showers: J&H Crannel - Phys. Rev. 184-2 - August69)
|
||||
- test.mac: PbWO4; L = 20 radl; R = 5 radl; electron 5 GeV
|
||||
- vis.mac: to activate visualization
|
||||
|
||||
\section TestEm2_s7 HISTOGRAMS
|
||||
|
||||
TestEm2 produces several histograms:
|
||||
|
||||
Content of these histo:
|
||||
|
||||
- 1 : energy deposit per event
|
||||
- 2 : charged track length per event
|
||||
- 3 : neutral track length per event
|
||||
|
||||
- 4 : longitudinal energy profile
|
||||
- 5 : rms of longitudinal energy profile
|
||||
- 6 : cumulated longitudinal energy profile
|
||||
- 7 : rms of cumulated longitudinal energy profile
|
||||
|
||||
- 8 : radial energy profile
|
||||
- 9 : rms of radial energy profile
|
||||
- 10 : cumulated radial energy profile
|
||||
- 11 : rms of cumulated radial energy profile
|
||||
|
||||
To define the output file name with histograms, use the UI command :
|
||||
\verbatim
|
||||
/analysis/setFileName name
|
||||
\endverbatim
|
||||
|
||||
The format of the histogram file can be : root (default),
|
||||
xml, csv, by selecting g4nnn.hh in RunAction.hh
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,161 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm2
|
||||
-------
|
||||
|
||||
How to do shower profiles in an homogenous medium, with virtual
|
||||
voxelisation.
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a cylinder of homogenous material.
|
||||
|
||||
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.
|
||||
|
||||
Material can be choosen: Air Water lAr Al Fe BGO PbWO4 Pb.
|
||||
eg: /testem/det/setMat PbWO4
|
||||
|
||||
The cylinder is virtually sliced longitudinally (slice) and radially
|
||||
(ring). The size of the slices and rings are expressed in radiation
|
||||
length units and can be changed.
|
||||
eg: /testem/det/setLbin 20 1. ---> 20 slices of 1. radl
|
||||
/testem/det/setRbin 5 0.25 ---> 5 rings of 0.25 radl
|
||||
/testem/det/update ---> rebuild the geometry
|
||||
|
||||
(MaxBin = 500 in both directions)
|
||||
|
||||
An uniform magnetic field along the cylinder axis can be set.
|
||||
eg: /globalField/setValue 0 0 5 tesla
|
||||
|
||||
2- PHYSICS LISTS
|
||||
|
||||
Physics lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
EM physics builders can be local (eg. in this example) or from G4 kernel
|
||||
physics_lists subdirectory.
|
||||
|
||||
Local physics builders:
|
||||
- "local" standard EM physics with current 'best' options setting.
|
||||
these options are explicited in PhysListEmStandard
|
||||
|
||||
From geant4/source/physics_lists/builders:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
cylinder perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the PrimaryGeneratorAction class, and can
|
||||
changed via the G4 build-in commands of G4ParticleGun class (see
|
||||
the macros provided with this example).
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
4- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main() (see TestEm2.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 detector has a default view which is a longitudinal view of the
|
||||
cylinder.
|
||||
|
||||
The tracks are drawn at the end of event, and erased at the end of run.
|
||||
Optionally one can choose to draw all particles, only the charged one,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
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 build-in interactive command (/process/inactivate procname)
|
||||
allows to activate/inactivate the processes one by one.
|
||||
|
||||
The threshold for producing secondaries can be changed.
|
||||
eg: /testem/phys/setCuts 100 microm
|
||||
/run/initialize
|
||||
|
||||
The shower profiles are histogramed, if histograming is activated.
|
||||
They can be also printed with the command /testem/run/verbose 1
|
||||
|
||||
6- HOW TO START ?
|
||||
|
||||
- Execute TestEm2 in 'batch' mode from macro files
|
||||
% TestEm2 run01.mac
|
||||
|
||||
- Execute TestEm2 in 'batch' mode using multi-threading
|
||||
% TestEm2 run01.mac 4
|
||||
here 4 is number of threads, it should be user defined,
|
||||
optimal value depends on hardware
|
||||
|
||||
- Execute TestEm2 in 'interactive mode' with visualization
|
||||
% TestEm2
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
|
||||
Macros provided in this example:
|
||||
- egs4.mac:
|
||||
Fe; L = 20 radl; R = 5 radl; electron 30 GeV
|
||||
(EGS4 simulation: Particle Data Group - Phys.Rev.D 50-3 - August94)
|
||||
- run01.mac: PbWO4; L = 20 radl; R = 5 radl; electron 5 GeV
|
||||
- run02.mac: Al; L = 13.5 radl; R = 1.35 radl; electron 1 GeV
|
||||
(Electron-induced cascade showers: J&H Crannel - Phys. Rev. 184-2 - August69)
|
||||
- run03.mac: H2O; L = 9.97 radl; R = 0.665 radl; electron 1 GeV
|
||||
(Electron-induced cascade showers: J&H Crannel - Phys. Rev. 184-2 - August69)
|
||||
- test.mac: PbWO4; L = 20 radl; R = 5 radl; electron 5 GeV
|
||||
- vis.mac: to activate visualization
|
||||
|
||||
7- HISTOGRAMS
|
||||
|
||||
TestEm2 produces several histograms:
|
||||
|
||||
Content of these histo:
|
||||
|
||||
1 : energy deposit per event
|
||||
2 : charged track length per event
|
||||
3 : neutral track length per event
|
||||
|
||||
4 : longitudinal energy profile
|
||||
5 : rms of longitudinal energy profile
|
||||
6 : cumulated longitudinal energy profile
|
||||
7 : rms of cumulated longitudinal energy profile
|
||||
|
||||
8 : radial energy profile
|
||||
9 : rms of radial energy profile
|
||||
10 : cumulated radial energy profile
|
||||
11 : rms of cumulated radial energy profile
|
||||
|
||||
To define the output file name with histograms, use the UI command :
|
||||
|
||||
"/analysis/setFileName name"
|
||||
|
||||
The format of the histogram file can be : root (default),
|
||||
xml, csv, by selecting g4nnn.hh in RunAction.hh
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
|
||||
///\file "electromagnetic/TestEm3/.README.txt"
|
||||
///\brief Example TestEm3 README page
|
||||
|
||||
/*! \page ExampleTestEm3 Example TestEm3
|
||||
|
||||
- How to collect energy deposition in a sampling calorimeter.
|
||||
- How to survey energy flow.
|
||||
- How to print stopping power.
|
||||
|
||||
\section TestEm3_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.
|
||||
|
||||
<pre>
|
||||
|<----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
|
||||
</pre>
|
||||
|
||||
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)
|
||||
|
||||
\section TestEm3_s2 PHYSICS LISTS
|
||||
|
||||
Physics lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
EM physics builders can be local (eg. in this example) or from G4 kernel
|
||||
physics_lists subdirectory.
|
||||
|
||||
Local physics builders:
|
||||
- "local" standard EM physics with current 'best' options setting.
|
||||
these options are explicited in PhysListEmStandard
|
||||
|
||||
From geant4/source/physics_lists/builders:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands.
|
||||
|
||||
\section TestEm3_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 PrimaryGeneratorMessenger.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
TestEm3 computes the energy deposited per absorber and the energy flow through
|
||||
the calorimeter.
|
||||
|
||||
\section TestEm3_s4 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main() (see TestEm3.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.
|
||||
|
||||
The tracks are drawn at the end of event, and erased at the end of run.
|
||||
Optionally one can choose to draw all particles, only the charged ones, or
|
||||
none. This command is defined in EventActionMessenger class.
|
||||
|
||||
\section TestEm3_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.
|
||||
|
||||
As a homework try to visualize a gamma conversion alone,
|
||||
or the effect of the multiple scattering.
|
||||
|
||||
Notice that one can control the maximum step size, via the
|
||||
StepMax process and the command /testem/stepMax
|
||||
\verbatim
|
||||
/testem/stepMax/absorber
|
||||
\endverbatim
|
||||
(see StepMax and PhysicsList classes)
|
||||
|
||||
\section TestEm3_s6 HOW TO START ?
|
||||
|
||||
- Execute TestEm3 in 'batch' mode from macro files
|
||||
\verbatim
|
||||
% TestEm3 run01.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm3 in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% TestEm3
|
||||
....
|
||||
Idle> type your commands. For instance:
|
||||
Idle> /control/execute run01.mac
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- atlashec.mac: ATLAS HEC model
|
||||
- dedx.mac: to control dE/dx calculation: 1 layer; minimum ionizing particle
|
||||
- emtutor.mac: for tutorial; interactivity + visualisation
|
||||
- geom.mac: to play with geometry
|
||||
- ionC12.mac: ion C12, 1 layer
|
||||
- lhcb.mac: LHCB ECAL model
|
||||
- linac.mac: Linac/Ecal from Graham Wilson
|
||||
- lockwood.mac: Al-Au-Al 1 layer (G.L.Lockwood et al. SAND79-0414 (1980))
|
||||
- run01.mac: Lead-liquidArgon 50 layers; electron 1 GeV
|
||||
- run02.mac: Tungsten-Silicon 50 layers; electron 1 GeV
|
||||
- storeTables.mac: show how to store and retrieve physics tables
|
||||
- tileCal.mac: ATLAS tileCal
|
||||
- vis.mac: to activate visualization
|
||||
|
||||
\section TestEm3_s7 HISTOGRAMS
|
||||
|
||||
Testem3 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:
|
||||
\verbatim
|
||||
/analysis/h1/set idAbsor nbin Emin Emax unit
|
||||
\endverbatim
|
||||
etc.,
|
||||
where unit is the desired energy unit for that histo (see TestEm3.in).
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default testem3)
|
||||
\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 testem3)
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,195 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm3
|
||||
-------
|
||||
|
||||
How to collect energy deposition in a sampling calorimeter.
|
||||
How to survey energy flow.
|
||||
how to print stopping power.
|
||||
|
||||
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)
|
||||
|
||||
2- PHYSICS LISTS
|
||||
|
||||
Physics lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
EM physics builders can be local (eg. in this example) or from G4 kernel
|
||||
physics_lists subdirectory.
|
||||
|
||||
Local physics builders:
|
||||
- "local" standard EM physics with current 'best' options setting.
|
||||
these options are explicited in PhysListEmStandard
|
||||
|
||||
From geant4/source/physics_lists/builders:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands.
|
||||
|
||||
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 PrimaryGeneratorMessenger.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
TestEm3 computes the energy deposited per absorber and the energy flow through
|
||||
the calorimeter.
|
||||
|
||||
4- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main() (see TestEm3.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.
|
||||
|
||||
The tracks are drawn at the end of event, and erased at the end of run.
|
||||
Optionally one can choose to draw all particles, only the charged ones, or
|
||||
none. This command is defined in EventActionMessenger class.
|
||||
|
||||
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.
|
||||
|
||||
As a homework try to visualize a gamma conversion alone,
|
||||
or the effect of the multiple scattering.
|
||||
|
||||
Notice that one can control the maximum step size, via the
|
||||
StepMax process and the command /testem/stepMax
|
||||
(see StepMax and PhysicsList classes)
|
||||
|
||||
6- HOW TO START ?
|
||||
|
||||
- Execute TestEm3 in 'batch' mode from macro files
|
||||
% TestEm3 run01.mac
|
||||
|
||||
- Execute TestEm3 in 'interactive mode' with visualization
|
||||
% TestEm3
|
||||
....
|
||||
Idle> type your commands. For instance:
|
||||
Idle> /control/execute run01.mac
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros provided in this example:
|
||||
- atlashec.mac: ATLAS HEC model
|
||||
- dedx.mac: to control dE/dx calculation: 1 layer; minimum ionizing particle
|
||||
- emtutor.mac: for tutorial; interactivity + visualisation
|
||||
- geom.mac: to play with geometry
|
||||
- ionC12.mac: ion C12, 1 layer
|
||||
- lhcb.mac: LHCB ECAL model
|
||||
- linac.mac: Linac/Ecal from Graham Wilson
|
||||
- lockwood.mac: Al-Au-Al 1 layer (G.L.Lockwood et al. SAND79-0414 (1980))
|
||||
- run01.mac: Lead-liquidArgon 50 layers; electron 1 GeV
|
||||
- run02.mac: Tungsten-Silicon 50 layers; electron 1 GeV
|
||||
- storeTables.mac: show how to store and retrieve physics tables
|
||||
- tileCal.mac: ATLAS tileCal
|
||||
- vis.mac: to activate visualization
|
||||
|
||||
7- HISTOGRAMS
|
||||
|
||||
Testem3 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)
|
||||
...etc...........
|
||||
|
||||
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 (see TestEm3.in).
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default testem3)
|
||||
|
||||
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 testem3)
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
|
||||
testem3/src is the geant3 equivalent of TestEm3
|
||||
|
||||
% cd geant3
|
||||
% gmakeB to make an executable (Batch version)
|
||||
% gmakeT to make an executable (inTeractive version)
|
||||
|
||||
To execute:
|
||||
|
||||
% cd geant3
|
||||
% $G4SYSTEM/testem3.xb (for batch) or testem1.xt (for interactive)
|
||||
|
||||
The program will ask:
|
||||
G3 > gives the filename of the data cards to be read:
|
||||
|
||||
run01.dat (runNN.dat is the equivalent of the G4 runNN.mac)
|
||||
|
||||
It is possible to set the production cuts BCUTE, DCUTE and PPCUTM
|
||||
medium by medium, via the data cards:
|
||||
CUTPR imed1 bcute/m dcute/m ppcutm
|
||||
CUTPR imed2 bcute/m dcute/m ppcutm
|
||||
...etc............
|
||||
|
||||
testem3 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 leakage (MeV/event)
|
||||
|
||||
One can control the binning of the histograms with the data card:
|
||||
*HISTO id1 nbBins valMin valMax valUnit
|
||||
*HISTO id2 nbBins valMin valMax valUnit
|
||||
... etc ...........
|
||||
|
||||
valMin and ValMax are given in the desired unit, whose numerical value must
|
||||
be specified in valUnit. Remember that Geant3 defaults are: GeV, cm, rad.
|
||||
|
||||
The name of de histograms file must be defined with the data card:
|
||||
FILE fileName (character) This data card is mandatory; it must be the first,
|
||||
with the format A4,A2,A25
|
||||
|
||||
It is possible to set the max allowed step size STEMAX,
|
||||
via the data card:
|
||||
STEPMX stepmax (in cm)
|
||||
(However this value will be taken into account only if auto=0)
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
This program compare the Geant3 and Geant4 dE/dx tables.
|
||||
The Geant4 values are read as ffread data cards, as they are printed out
|
||||
by TestEm3, according the standard Geant3 binning.
|
||||
One must complete by hand the data cards KINE and MATE; see the file lead.dat
|
||||
as an example.
|
||||
The Geant3 values are computed within this program.
|
||||
The g4-g3 differences are ploted in the file plmat.paw
|
||||
|
||||
% cd geant3/g4mat
|
||||
% gmakeB to make an executable (Batch version)
|
||||
% gmakeT to make an executable (inTeractive version)
|
||||
|
||||
To execute:
|
||||
|
||||
% cd geant3/g4mat
|
||||
% $G4SYSTEM/g4mat.xb (for batch) or g4mat.xt (for interactive)
|
||||
|
||||
The program will ask:
|
||||
G3 > gives the filename of the data cards to be read:
|
||||
|
||||
lead.dat (XXX.dat)
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
|
||||
///\file "electromagnetic/TestEm4/.README.txt"
|
||||
///\brief Example TestEm4 README page
|
||||
|
||||
/*! \page ExampleTestEm4 Example TestEm4
|
||||
|
||||
Plot energy deposited by 9 MeV photon beam in an homogeneous medium.
|
||||
|
||||
\section TestEm4_s1 GEOMETRY DEFINITION
|
||||
|
||||
It is a cylinder of 5 cm radius filled with C6F6.
|
||||
|
||||
\section TestEm4_s2 PHYSICS LIST
|
||||
|
||||
The particle list contains only gamma, electron,positron.
|
||||
The physics list contains the 'standard' electromagnetic processes.
|
||||
|
||||
\section TestEm4_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic is a single 9 MeV gamma randomly shooted at the
|
||||
middle of the cylinder.
|
||||
|
||||
\section TestEm4_s4 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm4.cc).
|
||||
The initialisation of the drawing is done via the commands
|
||||
/vis/.. in the macro vis.mac. This macro is
|
||||
automatically read from the main in case of interactive running mode.
|
||||
|
||||
The detector has a default view which is a transversal view of the
|
||||
cylinder.
|
||||
|
||||
The tracks are drawn at the end of event, and erased at the end of run.
|
||||
Optionaly one can choose to draw all particles, only the charged one,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
\section TestEm4_s5 PHYSICS SURVEY
|
||||
|
||||
The energy deposited in C6F6 is histogramed.
|
||||
|
||||
\section TestEm4_s6 HOW TO START ?
|
||||
|
||||
- Execute TestEm4 in 'batch' mode from macro files
|
||||
\verbatim
|
||||
% TestEm4 TestEm4.in
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm4 in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% TestEm4
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
\section TestEm4_s7 USING HISTOGRAMS
|
||||
|
||||
The format of the histogram file can be : root (default),
|
||||
xml, csv, by selecting g4nnn.hh in RunAction.hh
|
||||
|
||||
\section TestEm4_s8- RANDOM NUMBERS HANDLING
|
||||
|
||||
CLHEP provides several random number engines. In this example the Ranecu
|
||||
engine is choosen at beginning of the main (TestEm4.cc).
|
||||
|
||||
By default, G4RunManager does not save the rndm seed.
|
||||
To do so the user must set in BeginOfRunAction:
|
||||
G4RunManager::GetRunManager()->SetRandomNumberStore(true);
|
||||
|
||||
Then the rndm seed is systematically saved at beginning of run
|
||||
(currentRun.rndm) and beginning of event (currentEvent.rndm)
|
||||
Therefore, in case of abnormal end, the seed of the last event processed
|
||||
is available in currentEvent.rndm
|
||||
|
||||
Even in case of normal run processing, the user may wish to preserve the
|
||||
rndm seed of selected events. At any time in the event, put the
|
||||
following statement:
|
||||
\verbatim
|
||||
if (condition) G4RunManager::GetRunManager()->rndmSaveThisEvent();
|
||||
\endverbatim
|
||||
currentEvent.rndm will be copied to runXXevntYY.rndm
|
||||
(see SteppingAction::UserSteppingAction() )
|
||||
|
||||
To restart a run from a given rndm seed, use the UI command :
|
||||
\verbatim
|
||||
/random/resetEngineFrom fileName
|
||||
\endverbatim
|
||||
|
||||
The macro rndmSeed.mac shows how to save and reset the random number
|
||||
seed between runs, from UI commands.
|
||||
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm4
|
||||
-------
|
||||
|
||||
Plot energy deposited by 9 MeV photon beam in an homogeneous medium.
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
It is a cylinder of 5 cm radius filled with C6F6.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The particle list contains only gamma, electron,positron.
|
||||
The physics list contains the 'standard' electromagnetic processes.
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic is a single 9 MeV gamma randomly shooted at the
|
||||
middle of the cylinder.
|
||||
|
||||
4- 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. This macro is
|
||||
automatically read from the main in case of interactive running mode.
|
||||
|
||||
The detector has a default view which is a transversal view of the
|
||||
cylinder.
|
||||
|
||||
The tracks are drawn at the end of event, and erased at the end of run.
|
||||
Optionaly one can choose to draw all particles, only the charged one,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
5- PHYSICS SURVEY
|
||||
|
||||
The energy deposited in C6F6 is histogramed.
|
||||
|
||||
6- HOW TO START ?
|
||||
|
||||
- execute TestEm4 in 'batch' mode from macro files
|
||||
% TestEm4 TestEm4.in
|
||||
|
||||
- execute TestEm4 in 'interactive mode' with visualization
|
||||
% TestEm4
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
7- USING HISTOGRAMS
|
||||
|
||||
The format of the histogram file can be : root (default),
|
||||
xml, csv, by selecting g4nnn.hh in RunAction.hh
|
||||
|
||||
8- RANDOM NUMBERS HANDLING
|
||||
|
||||
CLHEP provides several random number engines. In this example the Ranecu
|
||||
engine is choosen at beginning of the main (TestEm4.cc).
|
||||
|
||||
By default, G4RunManager does not save the rndm seed.
|
||||
To do so the user must set in BeginOfRunAction:
|
||||
G4RunManager::GetRunManager()->SetRandomNumberStore(true);
|
||||
|
||||
Then the rndm seed is systematically saved at beginning of run
|
||||
(currentRun.rndm) and beginning of event (currentEvent.rndm)
|
||||
Therefore, in case of abnormal end, the seed of the last event processed
|
||||
is available in currentEvent.rndm
|
||||
|
||||
Even in case of normal run processing, the user may wish to preserve the
|
||||
rndm seed of selected events. At any time in the event, put the
|
||||
following statement:
|
||||
if (condition) G4RunManager::GetRunManager()->rndmSaveThisEvent();
|
||||
currentEvent.rndm will be copied to runXXevntYY.rndm
|
||||
(see SteppingAction::UserSteppingAction() )
|
||||
|
||||
To restart a run from a given rndm seed, use the UI command :
|
||||
/random/resetEngineFrom fileName
|
||||
|
||||
The macro rndmSeed.mac shows how to save and reset the random number
|
||||
seed between runs, from UI commands.
|
||||
@@ -0,0 +1,271 @@
|
||||
|
||||
///\file "electromagnetic/TestEm5/.README.txt"
|
||||
///\brief Example TestEm5 README page
|
||||
|
||||
/*! \page ExampleTestEm5 Example TestEm5
|
||||
|
||||
How to study the transmission, absorption and reflection of particles through
|
||||
a single, thin or thick, layer of material.
|
||||
In particular, the effects of the multiple scattering can be plotted.
|
||||
|
||||
\section TestEm5_s1 GEOMETRY DEFINITION
|
||||
|
||||
The "absorber" is a box made of a given material.
|
||||
|
||||
Three parameters define the absorber :
|
||||
- the material of the absorber,
|
||||
- the thickness of an absorber,
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
A volume "World" contains the "absorber".
|
||||
|
||||
In addition a transverse uniform magnetic field can be applied.
|
||||
|
||||
The default geometry is constructed in DetectorConstruction class, but all the
|
||||
parameters can be changed via commands defined in the DetectorMessenger class.
|
||||
The parameters of the "World" can be changed, too. However, if World material
|
||||
is not set to vacuum, the plots 10->43 below may be not pertinent.
|
||||
|
||||
\section TestEm5_s2 PHYSICS LIST
|
||||
|
||||
Physics lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
EM physics builders can be local (eg. in this example) or from G4 kernel
|
||||
physics_lists subdirectory.
|
||||
|
||||
Local physics builders:
|
||||
- "local" standard EM physics with current 'best' options setting
|
||||
these options are explicited in PhysListEmStandard
|
||||
- "standardSSM" standard EM physics with alternative single Coulomb
|
||||
scattering model instead of multiple scattering.
|
||||
|
||||
From geant4/source/physics_lists/builders:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
Please, notice that options set through G4EmProcessOptions are global, eg
|
||||
for all particle types. In G4 builders, it is shown how to set options per
|
||||
particle type.
|
||||
|
||||
\section TestEm5_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the absorber
|
||||
perpendicular to the input face. The type of the particle and its energy 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 interactive command is built in PrimaryGeneratorMessenger class.
|
||||
|
||||
\section TestEm5_s4 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm5.cc).
|
||||
The initialisation of the drawing is done via the commands in vis.mac
|
||||
In interactive session:
|
||||
\verbatim
|
||||
PreInit or Idle > /control/execute vis.mac
|
||||
\endverbatim
|
||||
|
||||
The example has a default view which is a longitudinal view of the detector.
|
||||
|
||||
The tracks are drawn at the end of event, and erased at the end of run.
|
||||
Optionally one can choose to draw all particles, only the charged, or none.
|
||||
This command is defined in EventActionMessenger class.
|
||||
|
||||
\section TestEm5_s5 TRACKING
|
||||
|
||||
During the tracking, one can keep or not the secondaries : see StackingAction
|
||||
class and its Messenger (StackingMessenger).
|
||||
One can also limit 'by hand' the step lenght of the particle. 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.
|
||||
|
||||
\section TestEm5_s6 DETECTOR RESPONSE
|
||||
|
||||
At the end of a run, from the histogram(s), one can study different
|
||||
physics quantities such as :
|
||||
- energy deposit in the absorber,
|
||||
- energy spectrum of secondaries at creation,
|
||||
- energy spectrum and angle distribution of particles at exit,
|
||||
- transmission and backscattering coefficients,
|
||||
- ...
|
||||
|
||||
\section TestEm5_s7 List of the built-in histograms
|
||||
|
||||
The test contains more than 60 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager 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..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
- 1 : "energy deposit in absorber"
|
||||
- 2 : "energy of charged secondaries at creation"
|
||||
- 3 : "energy of neutral secondaries at creation"
|
||||
- 4 : "energy of charged at creation (log10(Ekin))"
|
||||
- 5 : "energy of neutral at creation (log10(Ekin))"
|
||||
- 6 : "x_vertex of charged secondaries (all)"
|
||||
- 7 : "x_vertex of charged secondaries (not absorbed)"
|
||||
- 10 : "(transmit, charged) : kinetic energy at exit of world"
|
||||
- 11 : "(transmit, charged) : ener fluence: dE(MeV)/dOmega"
|
||||
- 12 : "(transmit, charged) : space angle dN/dOmega"
|
||||
- 13 : "(transmit, charged) : projected angle at exit of world"
|
||||
- 14 : "(transmit, charged) : projected position at exit of world"
|
||||
- 15 : "(transmit, charged) : radius at exit of world"
|
||||
- 20 : "(transmit, neutral) : kinetic energy at exit of world"
|
||||
- 21 : "(transmit, neutral) : ener fluence: dE(MeV)/dOmega"
|
||||
- 22 : "(transmit, neutral) : space angle dN/dOmega"
|
||||
- 23 : "(transmit, neutral) : projected angle at exit of world"
|
||||
- 30 : "(reflect , charged) : kinetic energy at exit of world"
|
||||
- 31 : "(reflect , charged) : ener fluence: dE(MeV)/dOmega"
|
||||
- 32 : "(reflect , charged) : space angle dN/dOmega"
|
||||
- 33 : "(reflect , charged) : projected angle at exit of world"
|
||||
- 40 : "(reflect , neutral) : kinetic energy at exit of world"
|
||||
- 41 : "(reflect , neutral) : ener fluence: dE(MeV)/dOmega"
|
||||
- 42 : "(reflect , neutral) : space angle dN/dOmega"
|
||||
- 43 : "(reflect , neutral) : projected angle at exit of world"
|
||||
- 50 : "energy of Auger e- at creation"
|
||||
- 51 : "energy of fluorescence gamma at creation"
|
||||
- 52 : "energy of Auger e- at creation (log scale)"
|
||||
- 53 : "energy of fluorescence gamma at creation (log scale)"
|
||||
- 54 : "energy of PIXE Auger e- at creation"
|
||||
- 55 : "energy of PIXE gamma at creation"
|
||||
- 56 : "energy of PIXE Auger e- at creation (log scale)"
|
||||
- 57 : "energy of PIXE gamma at creation (log scale)"
|
||||
- 58 : "energy of G4DNA Auger e- at creation"
|
||||
- 59 : "energy of G4DNA gamma at creation"
|
||||
- 60 : "energy of G4DNA Auger e- at creation (log scale)"
|
||||
- 61 : "energy of G4DNA gamma at creation (log scale)"
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default testem5)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem5)
|
||||
|
||||
\subsection TestEm5_subs1 Using hbook format
|
||||
|
||||
Need a special treatement : the Cern Library must be installed and the
|
||||
environment variable CERNLIB correctly set. Then, *before* compiling,
|
||||
activate G4_USE_HBOOK in GNUmakefile and g4hbook.hh in HistoManager.hh
|
||||
|
||||
\section TestEm5_s8 GEANT4/GEANT3/DATA COMPARISON
|
||||
|
||||
A Geant4/Geant3/exp. data comparison is given here for a few cases.
|
||||
These cases can be classified as follow:
|
||||
- e-/e+ incident particles versus protons and others.
|
||||
- 3 energy regimes: low: < 1MeV; medium: 1MeV -> few 10MeV; high: > 100MeV
|
||||
|
||||
We indicate here the corresponding macros.
|
||||
<pre>
|
||||
| low energy | medium energy | high energy
|
||||
--------------------------------------------------------
|
||||
| acosta.mac | |
|
||||
e-+ | berger.mac | hanson.mac |
|
||||
| hunger.mac | kulchi.mac |
|
||||
| tavola.mac | |
|
||||
--------------------------------------------------------
|
||||
others| bichsel.mac | vincour.mac | shen1.mac shen2.mac
|
||||
| | gottsch.mac | tramu.mac
|
||||
--------------------------------------------------------
|
||||
</pre>
|
||||
|
||||
\section TestEm5_s9 HOW TO START ?
|
||||
|
||||
- Execute TestEm5 in 'batch' mode from macro files e.g.
|
||||
\verbatim
|
||||
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm5 myMacro.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm5 in 'interactive' mode with visualization e.g.
|
||||
\verbatim
|
||||
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm5
|
||||
\endverbatim
|
||||
Then type your commands, for instance :
|
||||
\verbatim
|
||||
Idle> control/execute vis.mac
|
||||
Idle> run/beamOn 5
|
||||
....
|
||||
\endverbatim
|
||||
|
||||
Macros provided in this example:
|
||||
- acosta.mac: Back x-ray emission by 20 keV electrons in Silver.
|
||||
(E. Acosta et al. Journal of Applied Physics 83(11) 1998 page 6038,
|
||||
Fig. 4-5-6)
|
||||
- anthony.mac: LPM and dielectric effect measurement: 25 GeV electrons
|
||||
through thin foils.
|
||||
(P.L. Anthony et al. Phys.Rev. D 56 (1997) page 1373.)
|
||||
- atima.mac: to test PhysListEm19DStandard for ions
|
||||
- berger.mac: Energy deposit by 1 MeV electrons in silicon counters.
|
||||
(M.J.Berger et al. NIM 69 (1969) page 181.)
|
||||
- bichsel.mac: 0.766 MeV protons, transmitted through 1.37 mg/cm2 Al
|
||||
(H.Bichsel Phys.Rev. 112 (1958) page 182.)
|
||||
- dedx1.mac: to control dE/dx calculation.
|
||||
- dedx2.mac: to control dE/dx calculation. High statistic and plot
|
||||
- dna.mac: to illustrate DNA physics
|
||||
- fluo.mac: to illustrate atomic deexcitation options
|
||||
- gammaSpectrum.mac: to plot gamma spectrum with/without atomic deexcitation.
|
||||
- geom.mac: to play with geometry (can be run interactively with visualization)
|
||||
- gottsch.mac: 158.6 MeV protons, transmitted through 0.2160 g/cm2 Al
|
||||
(B.Gottschalk et al. NIM B74 (1993) page 467.)
|
||||
- hanson.mac: Angle distribution of 15.7 MeV electrons transmitted through
|
||||
thin gold foils.
|
||||
(A.O.Hanson et al. Phys.Rev.84 (1951) page 634.)
|
||||
- hunger.mac: Back scattering of 41 keV electrons.
|
||||
(H.J. Hunger and L. Kuchler Phys. Stat. Sol.(a) 56, K45 (1979))
|
||||
- ion.mac: ion C12 in 1m Iron
|
||||
- kulchi.mac: 2.25 MeV e-, transmitted through 26.60 mg/cm2 Al
|
||||
(L.Kulchitsky Phys.Rev. 61 (1941) page 254.)
|
||||
- mumsc.mac: 100 GeV mu+, transmitted through 1 m of iron
|
||||
- mutev.mac: 1 TeV mu+, transmitted through 1 m of iron
|
||||
- pixe.mac: to illustrate atomic deexcitation options
|
||||
- pixe_ANSTO.mac: to illustrate how to activate the ANSTO PIXE data libraries.
|
||||
for both cross sections and fluorescence radiation yields (for materials with Z < 93).
|
||||
The cross sections are available for protons with energy < 5 MeV
|
||||
and alpha particles with energy < 10 MeV/nucleon.
|
||||
(S. Bakr et al. (2021) NIM B, 507:1119)
|
||||
(S. Bakr et al (2018), NIMB B, 436: 285-291)
|
||||
- posi.mac: to test PhysListEm19DStandard for positron
|
||||
- shen1.mac: Angle distribution of high energy (50-200 GeV/c) protons
|
||||
transmitted through different targets.
|
||||
(G. Shen et al. Phys.Rev. D20 (1979) page 1584.)
|
||||
- shen2.mac: proton 175 GeV/c, transmitted through 8.004 mm Al
|
||||
(G. Shen et al. Phys.Rev. D20 (1979) page 1584.)
|
||||
- stepMax.cc: to test the command /testem/stepMax
|
||||
- tavora.mac: Back scattering of 35 keV electrons in Silver.
|
||||
(L.M. Tavora et al. J.Phys.D: Appl. Phys. 33 (2000) page 2497,
|
||||
Fig. 7)
|
||||
- tramu.mac: 1 TeV mu+, transmitted through 3 m of iron
|
||||
(Rev. of Particle Physics Eur. Phys. Jour. C (2000) page 172.
|
||||
Rev. of Particle Physics Letters B 592 (2004) page 251.)
|
||||
- vincour.mac: Angle distribution of 6.56 MeV protons transmitted through
|
||||
thin silicon targets.
|
||||
(J.Vincour,P.Bem NIM 148 (1978) page 396.)
|
||||
- vis.mac - to activate visualization
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,252 @@
|
||||
-----------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm5
|
||||
-------
|
||||
How to study the transmission, absorption and reflection of particles through
|
||||
a single, thin or thick, layer of material.
|
||||
In particular, the effects of the multiple scattering can be plotted.
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The "absorber" is a box made of a given material.
|
||||
|
||||
Three parameters define the absorber :
|
||||
- the material of the absorber,
|
||||
- the thickness of an absorber,
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
A volume "World" contains the "absorber".
|
||||
|
||||
In addition a transverse uniform magnetic field can be applied.
|
||||
|
||||
The default geometry is constructed in DetectorConstruction class, but all the
|
||||
parameters can be changed via commands defined in the DetectorMessenger class.
|
||||
The parameters of the "World" can be changed, too. However, if World material
|
||||
is not set to vacuum, the plots 10->43 below may be not pertinent.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
Physics lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
EM physics builders can be local (eg. in this example) or from G4 kernel
|
||||
physics_lists subdirectory.
|
||||
|
||||
Local physics builders:
|
||||
- "local" standard EM physics with current 'best' options setting
|
||||
these options are explicited in PhysListEmStandard
|
||||
- "standardSSM" standard EM physics with alternative single Coulomb
|
||||
scattering model instead of multiple scattering.
|
||||
|
||||
From geant4/source/physics_lists/builders:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
Please, notice that options set through G4EmProcessOptions are global, eg
|
||||
for all particle types. In G4 builders, it is shown how to set options per
|
||||
particle type.
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the absorber
|
||||
perpendicular to the input face. The type of the particle and its energy 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 interactive command is built in PrimaryGeneratorMessenger class.
|
||||
|
||||
4- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main().
|
||||
The initialisation of the drawing is done via the commands in vis.mac
|
||||
In interactive session:
|
||||
PreInit or Idle > /control/execute vis.mac
|
||||
|
||||
The example has a default view which is a longitudinal view of the detector.
|
||||
|
||||
The tracks are drawn at the end of event, and erased at the end of run.
|
||||
Optionally one can choose to draw all particles, only the charged, or none.
|
||||
This command is defined in EventActionMessenger class.
|
||||
|
||||
5- TRACKING
|
||||
|
||||
During the tracking, one can keep or not the secondaries : see StackingAction
|
||||
class and its Messenger (StackingMessenger).
|
||||
One can also limit 'by hand' the step lenght of the particle. 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.
|
||||
|
||||
6- DETECTOR RESPONSE
|
||||
|
||||
At the end of a run, from the histogram(s), one can study different
|
||||
physics quantities such as :
|
||||
- energy deposit in the absorber,
|
||||
- energy spectrum of secondaries at creation,
|
||||
- energy spectrum and angle distribution of particles at exit,
|
||||
- transmission and backscattering coefficients,
|
||||
- ...
|
||||
|
||||
7- List of the built-in histograms
|
||||
----------------------------------
|
||||
|
||||
The test contains more than 60 built-in 1D histograms, which are managed by
|
||||
G4AnalysisManager 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..)
|
||||
(see the macros xxxx.mac).
|
||||
|
||||
1 "energy deposit in absorber"
|
||||
2 "energy of charged secondaries at creation"
|
||||
3 "energy of neutral secondaries at creation"
|
||||
4 "energy of charged at creation (log10(Ekin))"
|
||||
5 "energy of neutral at creation (log10(Ekin))"
|
||||
6 "x_vertex of charged secondaries (all)"
|
||||
7 "x_vertex of charged secondaries (not absorbed)"
|
||||
10 "(transmit, charged) : kinetic energy at exit of world"
|
||||
11 "(transmit, charged) : ener fluence: dE(MeV)/dOmega"
|
||||
12 "(transmit, charged) : space angle dN/dOmega"
|
||||
13 "(transmit, charged) : projected angle at exit of world"
|
||||
14 "(transmit, charged) : projected position at exit of world"
|
||||
15 "(transmit, charged) : radius at exit of world"
|
||||
20 "(transmit, neutral) : kinetic energy at exit of world"
|
||||
21 "(transmit, neutral) : ener fluence: dE(MeV)/dOmega"
|
||||
22 "(transmit, neutral) : space angle dN/dOmega"
|
||||
23 "(transmit, neutral) : projected angle at exit of world"
|
||||
30 "(reflect , charged) : kinetic energy at exit of world"
|
||||
31 "(reflect , charged) : ener fluence: dE(MeV)/dOmega"
|
||||
32 "(reflect , charged) : space angle dN/dOmega"
|
||||
33 "(reflect , charged) : projected angle at exit of world"
|
||||
40 "(reflect , neutral) : kinetic energy at exit of world"
|
||||
41 "(reflect , neutral) : ener fluence: dE(MeV)/dOmega"
|
||||
42 "(reflect , neutral) : space angle dN/dOmega"
|
||||
43 "(reflect , neutral) : projected angle at exit of world"
|
||||
50 "energy of Auger e- at creation"
|
||||
51 "energy of fluorescence gamma at creation"
|
||||
52 "energy of Auger e- at creation (log scale)"
|
||||
53 "energy of fluorescence gamma at creation (log scale)"
|
||||
54 "energy of PIXE Auger e- at creation"
|
||||
55 "energy of PIXE gamma at creation"
|
||||
56 "energy of PIXE Auger e- at creation (log scale)"
|
||||
57 "energy of PIXE gamma at creation (log scale)"
|
||||
58 "energy of G4DNA Auger e- at creation"
|
||||
59 "energy of G4DNA gamma at creation"
|
||||
60 "energy of G4DNA Auger e- at creation (log scale)"
|
||||
61 "energy of G4DNA gamma at creation (log scale)"
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default testem5)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, 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 testem5)
|
||||
|
||||
8- GEANT4/GEANT3/DATA COMPARISON
|
||||
|
||||
A Geant4/Geant3/exp. data comparison is given here for a few cases.
|
||||
These cases can be classified as follow:
|
||||
- e-/e+ incident particles versus protons and others.
|
||||
- 3 energy regimes: low: < 1MeV; medium: 1MeV -> few 10MeV; high: > 100MeV
|
||||
|
||||
We indicate here the corresponding macros.
|
||||
|
||||
| low energy | medium energy | high energy
|
||||
--------------------------------------------------------
|
||||
| acosta.mac | |
|
||||
e-+ | berger.mac | hanson.mac |
|
||||
| hunger.mac | kulchi.mac |
|
||||
| tavola.mac | |
|
||||
--------------------------------------------------------
|
||||
others| bichsel.mac | vincour.mac | shen1.mac shen2.mac
|
||||
| | gottsch.mac | tramu.mac
|
||||
--------------------------------------------------------
|
||||
|
||||
9- HOW TO START ?
|
||||
|
||||
- execute TestEm5 in 'batch' mode from macro files e.g.
|
||||
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm5 myMacro.mac
|
||||
|
||||
- execute TestEm5 in 'interactive' mode with visualization e.g.
|
||||
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm5
|
||||
Then type your commands, for instance :
|
||||
Idle> control/execute vis.mac
|
||||
Idle> run/beamOn 5
|
||||
....
|
||||
|
||||
Macros provided in this example:
|
||||
- acosta.mac: Back x-ray emission by 20 keV electrons in Silver.
|
||||
(E. Acosta et al. Journal of Applied Physics 83(11) 1998 page 6038,
|
||||
Fig. 4-5-6)
|
||||
- anthony.mac: LPM and dielectric effect measurement: 25 GeV electrons
|
||||
through thin foils.
|
||||
(P.L. Anthony et al. Phys.Rev. D 56 (1997) page 1373.)
|
||||
- atima.mac: to test PhysListEm19DStandard for ions
|
||||
- berger.mac: Energy deposit by 1 MeV electrons in silicon counters.
|
||||
(M.J.Berger et al. NIM 69 (1969) page 181.)
|
||||
- bichsel.mac: 0.766 MeV protons, transmitted through 1.37 mg/cm2 Al
|
||||
(H.Bichsel Phys.Rev. 112 (1958) page 182.)
|
||||
- dedx1.mac: to control dE/dx calculation.
|
||||
- dedx2.mac: to control dE/dx calculation. High statistic and plot
|
||||
- dna.mac: to illustrate DNA physics
|
||||
- fluo.mac: to illustrate atomic deexcitation options
|
||||
- gammaSpectrum.mac: to plot gamma spectrum with/without atomic deexcitation.
|
||||
- geom.mac: to play with geometry (can be run interactively with visualization)
|
||||
- gottsch.mac: 158.6 MeV protons, transmitted through 0.2160 g/cm2 Al
|
||||
(B.Gottschalk et al. NIM B74 (1993) page 467.)
|
||||
- hanson.mac: Angle distribution of 15.7 MeV electrons transmitted through
|
||||
thin gold foils.
|
||||
(A.O.Hanson et al. Phys.Rev.84 (1951) page 634.)
|
||||
- hunger.mac: Back scattering of 41 keV electrons.
|
||||
(H.J. Hunger and L. Kuchler Phys. Stat. Sol.(a) 56, K45 (1979))
|
||||
- ion.mac: ion C12 in 1m Iron
|
||||
- kulchi.mac: 2.25 MeV e-, transmitted through 26.60 mg/cm2 Al
|
||||
(L.Kulchitsky Phys.Rev. 61 (1941) page 254.)
|
||||
- mumsc.mac: 100 GeV mu+, transmitted through 1 m of iron
|
||||
- mutev.mac: 1 TeV mu+, transmitted through 1 m of iron
|
||||
- pixe.mac: to illustrate atomic deexcitation options
|
||||
- pixe_ANSTO.mac: to illustrate how to activate the ANSTO PIXE data libraries,
|
||||
for both cross sections and fluorescence radiation yields (for materials with Z < 93).
|
||||
The cross sections are available for protons with energy < 5 MeV
|
||||
and alpha particles with energy < 10 MeV/nucleon.
|
||||
(S. Bakr et al. (2021) NIM B, 507:1119),
|
||||
(S. Bakr et al (2018), NIMB B, 436: 285-291).
|
||||
- posi.mac: to test PhysListEm19DStandard for positron
|
||||
- shen1.mac: Angle distribution of high energy (50-200 GeV/c) protons
|
||||
transmitted through different targets.
|
||||
(G. Shen et al. Phys.Rev. D20 (1979) page 1584.)
|
||||
- shen2.mac: proton 175 GeV/c, transmitted through 8.004 mm Al
|
||||
(G. Shen et al. Phys.Rev. D20 (1979) page 1584.)
|
||||
- stepMax.cc: to test the command /testem/stepMax
|
||||
- tavora.mac: Back scattering of 35 keV electrons in Silver.
|
||||
(L.M. Tavora et al. J.Phys.D: Appl. Phys. 33 (2000) page 2497,
|
||||
Fig. 7)
|
||||
- tramu.mac: 1 TeV mu+, transmitted through 3 m of iron
|
||||
(Rev. of Particle Physics Eur. Phys. Jour. C (2000) page 172.
|
||||
Rev. of Particle Physics Letters B 592 (2004) page 251.)
|
||||
- vincour.mac: Angle distribution of 6.56 MeV protons transmitted through
|
||||
thin silicon targets.
|
||||
(J.Vincour,P.Bem NIM 148 (1978) page 396.)
|
||||
- vis.mac - to activate visualization
|
||||
@@ -0,0 +1,140 @@
|
||||
|
||||
///\file "electromagnetic/TestEm6/.README.txt"
|
||||
///\brief Example TestEm6 README page
|
||||
|
||||
/*! \page ExampleTestEm6 Example TestEm6
|
||||
|
||||
This example is intended to test the processes of gamma conversion
|
||||
to a pair of muons and annihilation of positrons with atomic
|
||||
electrons to a pair of muons.
|
||||
|
||||
\section TestEm6_s1 GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single block of a homogenous material.
|
||||
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
The default is 500 m of iron.
|
||||
|
||||
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 changed interactively via
|
||||
the commands defined in the DetectorMessenger class.
|
||||
|
||||
\section TestEm6_s2 PHYSICS LIST
|
||||
|
||||
Physics Lists are based on modular design. Several modules are
|
||||
instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
The electromagnetic physics is chosen from one of the Geant4 EM
|
||||
physics constructors in the physics_list library.
|
||||
|
||||
Cross sections can be enhanced (see below).
|
||||
|
||||
\section TestEm6_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
block perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the PrimaryGeneratorAction class, and can
|
||||
changed via the G4 build-in commands of G4ParticleGun class (see
|
||||
the macros provided with this example).
|
||||
The default is a Gamma of 100 TeV.
|
||||
|
||||
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 TestEm6_s4 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main() (see TestEm6.cc).
|
||||
The initialisation of the drawing is done via the command
|
||||
\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.
|
||||
Optionally one can choose to draw all particles, only the charged ones,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
\section TestEm6_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 build-in interactive command (/process/inactivate procname)
|
||||
allows to activate/inactivate the processes one by one.
|
||||
|
||||
The threshold for producing secondaries can be changed.
|
||||
eg:
|
||||
\verbatim
|
||||
/run/particle/setCut 100 micrometer
|
||||
/run/initialize
|
||||
\endverbatim
|
||||
|
||||
To visualize the GammaConversionToMuons :
|
||||
\verbatim
|
||||
/control/execute run01.mac
|
||||
/control/execute vis.mac
|
||||
/run/beamOn
|
||||
\endverbatim
|
||||
|
||||
To visualize the AnnihiToMuPair :
|
||||
\verbatim
|
||||
/control/execute run11.mac
|
||||
/control/execute vis.mac
|
||||
/run/beamOn
|
||||
\endverbatim
|
||||
|
||||
\section TestEm6_s6 HOW TO START ?
|
||||
|
||||
- Execute Test in 'batch' mode from macro files
|
||||
\verbatim
|
||||
% TestEm6 run01.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute Test in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% TestEm6
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
\section TestEm6_s7 HOW TO INCREASE STATISTICS ON gamma -> mu+mu- ?
|
||||
|
||||
The processes of gamma -> mu+mu- and e+e- -> mu+mu-
|
||||
have a low cross section but can be important
|
||||
for leakage through thick absorbers and calorimeters.
|
||||
Straight forward simulation will be quite time consuming.
|
||||
To make the processes more visible, the cross section can be
|
||||
artificially increased by some factor (here 1000)
|
||||
using the commands (only effective after /run/initialize)
|
||||
|
||||
\verbatim
|
||||
/testem/phys/SetGammaToMuPairFac 1000
|
||||
/testem/phys/SetAnnihiToMuPairFac 1000
|
||||
\endverbatim
|
||||
|
||||
|
||||
\section TestEm6_s8 HISTOGRAMS
|
||||
|
||||
Testem6 produces 6 histograms which illustrate the final state of
|
||||
the GammaConversionToMuons process. See their definitions in RunAction.cc
|
||||
|
||||
By default the histograms are saved as testem6.root
|
||||
|
||||
The format of the histogram file can be : root (default), xml, csv,
|
||||
by selecting g4nnn.hh in RunAction.hh
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,125 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm6
|
||||
-------
|
||||
This example is intended to test the processes of gamma conversion
|
||||
to a pair of muons and annihilation of positrons with atomic
|
||||
electrons to a pair of muons.
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single block of a homogenous material.
|
||||
|
||||
Two parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the (full) size of the box.
|
||||
The default is 500 m of iron.
|
||||
|
||||
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 changed interactively via
|
||||
the commands defined in the DetectorMessenger class.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
Physics Lists are based on modular design. Several modules are
|
||||
instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
The electromagnetic physics is chosen from one of the Geant4 EM
|
||||
physics constructors in the physics_list library.
|
||||
|
||||
Cross sections can be enhanced (see below).
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
block perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the PrimaryGeneratorAction class, and can
|
||||
changed via the G4 build-in commands of G4ParticleGun class (see
|
||||
the macros provided with this example).
|
||||
The default is a Gamma of 100 TeV.
|
||||
|
||||
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- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main() (see TestEm6.cc).
|
||||
The initialisation of the drawing is done via the command
|
||||
> /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.
|
||||
Optionally one can choose to draw all particles, only the charged ones,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
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 build-in interactive command (/process/inactivate procname)
|
||||
allows to activate/inactivate the processes one by one.
|
||||
|
||||
The threshold for producing secondaries can be changed.
|
||||
eg: /run/particle/setCut 100 micrometer
|
||||
/run/initialize
|
||||
|
||||
To visualize the GammaConversionToMuons :
|
||||
/control/execute run01.mac
|
||||
/control/execute vis.mac
|
||||
/run/beamOn
|
||||
|
||||
To visualize the AnnihiToMuPair :
|
||||
/control/execute run11.mac
|
||||
/control/execute vis.mac
|
||||
/run/beamOn
|
||||
|
||||
6- HOW TO START ?
|
||||
|
||||
- execute Test in 'batch' mode from macro files
|
||||
% TestEm6 run01.mac
|
||||
|
||||
- execute Test in 'interactive mode' with visualization
|
||||
% TestEm6
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
7- HOW TO INCREASE STATISTICS ON gamma -> mu+mu- ?
|
||||
|
||||
The processes of gamma -> mu+mu- and e+e- -> mu+mu-
|
||||
have a low cross section but can be important
|
||||
for leakage through thick absorbers and calorimeters.
|
||||
Straight forward simulation will be quite time consuming.
|
||||
To make the processes more visible, the cross section can be
|
||||
artificially increased by some factor (here 1000)
|
||||
using the commands (only effective after /run/initialize)
|
||||
|
||||
/testem/phys/SetGammaToMuPairFac 1000
|
||||
/testem/phys/SetAnnihiToMuPairFac 1000
|
||||
|
||||
|
||||
8- HISTOGRAMS
|
||||
|
||||
Testem6 produces 6 histograms which illustrate the final state of
|
||||
the GammaConversionToMuons process. See their definitions in RunAction.cc
|
||||
|
||||
By default the histograms are saved as testem6.root
|
||||
|
||||
The format of the histogram file can be : root (default), xml, csv,
|
||||
by selecting g4nnn.hh in RunAction.hh
|
||||
@@ -0,0 +1,177 @@
|
||||
|
||||
///\file "electromagnetic/TestEm7/.README.txt"
|
||||
///\brief Example TestEm7 README page
|
||||
|
||||
/*! \page ExampleTestEm7 Example TestEm7
|
||||
|
||||
- How to produce a Bragg curve in a water phantom.
|
||||
- How to compute the dose in 'test volumes' called tallies.
|
||||
- How to define a maximum step size.
|
||||
|
||||
\section TestEm7_s1 GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single block of a homogenous material,
|
||||
placed in a world.
|
||||
|
||||
Three parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the thickness of the box (sizeX),
|
||||
- the transverse dimension of the box (sizeYZ).
|
||||
|
||||
The default is 20 cm of water.
|
||||
|
||||
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 changed interactively via
|
||||
the commands defined in the DetectorMessenger class.
|
||||
|
||||
The size, matter, positions of several test-volumes (tallies) can be
|
||||
defined via UI commands : /testem/det/tally...
|
||||
|
||||
\section TestEm7_s2 PHYSICS LIST
|
||||
|
||||
Physics lists can be local (eg. in this example) or from G4 kernel
|
||||
physics_lists subdirectory.
|
||||
|
||||
Local physics lists:
|
||||
- "local" standard EM physics with current 'best' options setting.
|
||||
these options are explicited in PhysListEmStandard
|
||||
- "standardSS" standard EM physics with single Coulomb scattering
|
||||
instead of multiple scattering;
|
||||
- "standardNR" standard EM physics with single Coulomb scattering
|
||||
process G4ScreenedNuclearRecoil instead of the
|
||||
multiple scattering for ions with energy less than
|
||||
100 MeV/nucleon; the new process was developed
|
||||
by M.H. Mendenhall and R.A. Weller from Vanderbuilt
|
||||
University and published in NIM B 277 (2005) 420.
|
||||
In later Geant4 releases the process will be a part
|
||||
of Geant4 source, currently it is released together
|
||||
with its mathematical tool c2_functions in current
|
||||
|
||||
From geant4/source/physics_lists/builders:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
Decay and StepMax processes are added to each list.
|
||||
|
||||
Optional components can be added:
|
||||
- "elastic" elastic scattering of hadrons
|
||||
- "HElastic"
|
||||
- "QElastic"
|
||||
- "binary" QBBC configuration of hadron inelastic models
|
||||
- "binary_ion" Binary ion inelastic models
|
||||
- "ionIoni" Ion gas models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
Please, notice that options set through G4EmProcessOptions are global, eg
|
||||
for all particle types. In G4 builders, it is shown how to set options per
|
||||
particle type.
|
||||
|
||||
\section TestEm7_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
block perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the PrimaryGeneratorAction class, and can
|
||||
changed via the G4 build-in commands of G4ParticleGun class (see
|
||||
the macros provided with this example).
|
||||
The default is a 160 MeV proton.
|
||||
|
||||
In addition one can define 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 TestEm7_s4 DOSE IN 'TEST-VOLUMES'
|
||||
|
||||
The energy deposited in the test-volumes (tallies) defined in
|
||||
DetectorConstruction are printed at RunAction::EndOfRunAction(), both in MeV and gray.
|
||||
|
||||
\section TestEm7_s5 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm7.cc).
|
||||
The initialisation of the drawing is done via the command
|
||||
\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.
|
||||
Optionally one can choose to draw all particles, only the charged one,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
|
||||
\section TestEm7_s6- HOW TO START ?
|
||||
|
||||
- Execute Test in 'batch' mode from macro files
|
||||
\verbatim
|
||||
% TestEm7 proton.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute Test in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% TestEm7
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
|
||||
\section TestEm7_s7- HISTOGRAM OF THE BRAGG PEAK
|
||||
|
||||
Testem7 computes the total energy deposited along the trajectory of
|
||||
the incident particle : the so-called Bragg peak.
|
||||
|
||||
In order to control the accuracy of the deposition, the user can limit
|
||||
the maximum allowed for the step size of charged particles.
|
||||
(command /testem/stepMax )
|
||||
|
||||
The result is a 1D histogram, which is the total energy deposited
|
||||
along the trajectory of the incident particle.
|
||||
|
||||
The bin size is equal to stepMax. The number of bins is determined by
|
||||
the thickness of the absorber (with a minimum of 100 bins).
|
||||
The total energy deposited is plotted in MeV/mm per incident particle.
|
||||
|
||||
The next histogram allows to have a zoom around the Bragg peak. Its binning
|
||||
should be defined via UI command:
|
||||
\verbatim
|
||||
/analysis/h1/set 2 nbins xmin xmax unit
|
||||
\endverbatim
|
||||
|
||||
The last histogram shows the projectile range. Its bining should be defined
|
||||
similary by the UI command:
|
||||
\verbatim
|
||||
/analysis/h1/set 3 nbins xmin xmax unit
|
||||
\endverbatim
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default testem7)
|
||||
\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 testem7)
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,156 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm7
|
||||
-------
|
||||
|
||||
How to produce a Bragg curve in a water phantom.
|
||||
How to compute the dose in 'test volumes' called tallies.
|
||||
How to define a maximum step size.
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single block of a homogenous material,
|
||||
placed in a world.
|
||||
|
||||
Three parameters define the geometry :
|
||||
- the material of the box,
|
||||
- the thickness of the box (sizeX),
|
||||
- the transverse dimension of the box (sizeYZ).
|
||||
|
||||
The default is 20 cm of water.
|
||||
|
||||
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 changed interactively via
|
||||
the commands defined in the DetectorMessenger class.
|
||||
|
||||
The size, matter, positions of several test-volumes (tallies) can be
|
||||
defined via UI commands : /testem/det/tally...
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
Physics lists can be local (eg. in this example) or from G4 kernel
|
||||
physics_lists subdirectory.
|
||||
|
||||
Local physics lists:
|
||||
- "local" standard EM physics with current 'best' options setting.
|
||||
these options are explicited in PhysListEmStandard
|
||||
- "standardSS" standard EM physics with single Coulomb scattering
|
||||
instead of multiple scattering;
|
||||
- "standardNR" standard EM physics with single Coulomb scattering
|
||||
process G4ScreenedNuclearRecoil instead of the
|
||||
multiple scattering for ions with energy less than
|
||||
100 MeV/nucleon; the new process was developed
|
||||
by M.H. Mendenhall and R.A. Weller from Vanderbuilt
|
||||
University and published in NIM B 277 (2005) 420.
|
||||
The process is released in this example with its
|
||||
mathematical tool c2_functions
|
||||
|
||||
From geant4/source/physics_lists/builders:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
Decay and StepMax processes are added to each list.
|
||||
|
||||
Optional components can be added:
|
||||
- "elastic" elastic scattering of hadrons
|
||||
- "HElastic"
|
||||
- "QElastic"
|
||||
- "binary" QBBC configuration of hadron inelastic models
|
||||
- "binary_ion" Binary ion inelastic models
|
||||
- "ionIoni" Ion gas models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
block perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the PrimaryGeneratorAction class, and can
|
||||
changed via the G4 build-in commands of G4ParticleGun class (see
|
||||
the macros provided with this example).
|
||||
The default is a 160 MeV proton.
|
||||
|
||||
In addition one can define 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- DOSE IN 'TEST-VOLUMES'
|
||||
|
||||
The energy deposited in the test-volumes (tallies) defined in
|
||||
DetectorConstruction are printed at EndOfRun, both in MeV and gray.
|
||||
|
||||
5- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main().
|
||||
The initialisation of the drawing is done via the command
|
||||
> /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.
|
||||
Optionally one can choose to draw all particles, only the charged one,
|
||||
or none. This command is defined in EventActionMessenger class.
|
||||
|
||||
6- HOW TO START ?
|
||||
|
||||
- execute Test in 'batch' mode from macro files
|
||||
% TestEm7 proton.mac
|
||||
|
||||
- execute Test in 'interactive mode' with visualization
|
||||
% TestEm7
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
7- HISTOGRAM OF THE BRAGG PEAK
|
||||
|
||||
Testem7 computes the total energy deposited along the trajectory of
|
||||
the incident particle : the so-called Bragg peak.
|
||||
|
||||
In order to control the accuracy of the deposition, the user can limit
|
||||
the maximum allowed for the step size of charged particles.
|
||||
(command /testem/stepMax )
|
||||
|
||||
The result is a 1D histogram, which is the total energy deposited
|
||||
along the trajectory of the incident particle.
|
||||
|
||||
The bin size is equal to stepMax. The number of bins is determined by
|
||||
the thickness of the absorber (with a minimum of 100 bins).
|
||||
The total energy deposited is plotted in MeV/mm per incident particle.
|
||||
|
||||
The next histogram allows to have a zoom around the Bragg peak. Its binning
|
||||
should be defined via UI command:
|
||||
/analysis/h1/set 2 nbins xmin xmax unit
|
||||
|
||||
The last histogram shows the projectile range. Its bining should be defined
|
||||
similary by the UI command:
|
||||
/analysis/h1/set 3 nbins xmin xmax unit
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default testem7)
|
||||
|
||||
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 testem7)
|
||||
@@ -0,0 +1,88 @@
|
||||
|
||||
///\file "electromagnetic/TestEm8/.README.txt"
|
||||
///\brief Example TestEm8 README page
|
||||
|
||||
/*! \page ExampleTestEm8 Example TestEm8
|
||||
|
||||
Example for investigation of ionisation in thin absorbers and gaseous
|
||||
detectors
|
||||
|
||||
\section TestEm8_s1 GEOMETRY DEFINITION
|
||||
|
||||
The target is a cylinder made of a given material placed inside
|
||||
cylindrical container, which is placed inside the world volume.
|
||||
|
||||
Following parameters define the geometry:
|
||||
- the material of the target,
|
||||
- the thickness of the target,
|
||||
- the radius of the target,
|
||||
- the material of the container,
|
||||
- the thickness of the container,
|
||||
- the material of the world.
|
||||
|
||||
The list of materials used in gaseous detectors are built inside
|
||||
the DetectorConstruction class, also NIST materials are available.
|
||||
The default geometry is provided but all parameters can be changed via
|
||||
UI commands defined in the DetectorMessenger class, for example,
|
||||
|
||||
\verbatim
|
||||
/testem/setGasMat XeCH4C3H8
|
||||
/testem/setWindowMat G4_MYLAR
|
||||
/testem/setWorldMat G4_AIR
|
||||
/testem/setGasThick 10 cm
|
||||
/testem/setGasRad 20 cm
|
||||
/testem/setWindowThick 50 um
|
||||
\endverbatim
|
||||
|
||||
\section TestEm8_s2 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
absorber perpendicular to the input face. The type of the particle
|
||||
and its energy can be set via the G4 build-in commands of G4ParticleGun .
|
||||
A RUN is a set of events.
|
||||
|
||||
\section TestEm8_s3 DETECTOR RESPONSE
|
||||
|
||||
The TargetSD class sending information about each step inside the target
|
||||
to the HistoManager class scoring of energy deposition in the detector.
|
||||
Additionally at each step of a particle inside the target the number of
|
||||
ionisation clusters is sampled using G4ElectronIonPair helper class. The
|
||||
parameter of transformation of energy into ionisation clusters can be
|
||||
set via UI command:
|
||||
|
||||
\verbatim
|
||||
/testem/setPairEnergy 19 eV
|
||||
\endverbatim
|
||||
|
||||
\section TestEm8_s4 PHYSICS
|
||||
|
||||
The particle's type and the physics processes which will be available
|
||||
in this example are set in PhysicsList class, which uses Geant4
|
||||
EM physics constructors provided in the physics_list library.
|
||||
|
||||
The PhysicsListMessenger classes introduce interactive commands. In particular,
|
||||
PAI ionisation model can be added using G4EmConfigurator helper class,
|
||||
which is invoked by the UI command
|
||||
|
||||
\verbatim
|
||||
/testem/phys/addPhysics pai
|
||||
\endverbatim
|
||||
|
||||
\section TestEm8_s5- HOW TO START ?
|
||||
|
||||
- Execute TestEm8 in 'batch' mode from macro files e.g.
|
||||
\verbatim
|
||||
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm8 TestEm8.in N
|
||||
\endverbatim
|
||||
here N means number of threads in multi-threaded mode, by
|
||||
default 2 threads are used
|
||||
|
||||
- Execute TestEm8 in 'interactive' mode with visualization e.g.
|
||||
\verbatim
|
||||
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm8
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
\endverbatim
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,87 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm8
|
||||
-------
|
||||
|
||||
Example for investigation of ionisation in thin absorbers and gaseous
|
||||
detectors
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The target is a cylinder made of a given material placed inside
|
||||
cylindrical container, which is placed inside the world volume.
|
||||
|
||||
Following parameters define the geometry:
|
||||
- the material of the target,
|
||||
- the thickness of the target,
|
||||
- the radius of the target,
|
||||
- the material of the container,
|
||||
- the thickness of the container,
|
||||
- the material of the world.
|
||||
|
||||
The list of materials used in gaseous detectors are built inside
|
||||
the DetectorConstruction class, also NIST materials are available.
|
||||
The default geometry is provided but all parameters can be changed via
|
||||
UI commands defined in the DetectorMessenger class, for example,
|
||||
|
||||
/testem/setGasMat XeCH4C3H8
|
||||
/testem/setWindowMat G4_MYLAR
|
||||
/testem/setWorldMat G4_AIR
|
||||
/testem/setGasThick 10 cm
|
||||
/testem/setGasRad 20 cm
|
||||
/testem/setWindowThick 50 um
|
||||
|
||||
2- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
absorber perpendicular to the input face. The type of the particle
|
||||
and its energy can be set via the G4 build-in commands of G4ParticleGun.
|
||||
A RUN is a set of events.
|
||||
|
||||
3- DETECTOR RESPONSE
|
||||
|
||||
The TargetSD class sending information about each step inside the target
|
||||
to the HistoManager class scoring of energy deposition in the detector.
|
||||
Additionally at each step of a particle inside the target the number of
|
||||
ionisation clusters is sampled using G4ElectronIonPair helper class. The
|
||||
parameter of transformation of energy into ionisation clusters can be
|
||||
set via UI command:
|
||||
|
||||
/testem/setPairEnergy 19 eV
|
||||
|
||||
4- PHYSICS
|
||||
|
||||
The particle's type and the physics processes which will be available
|
||||
in this example are set in PhysicsList class, which uses Geant4
|
||||
EM physics constructors provided in the physics_list library.
|
||||
|
||||
The messenger classes introduce interactive commands. In particular,
|
||||
PAI ionisation model can be added using G4EmConfigurator helper class,
|
||||
which is invoked by one following UI commands:
|
||||
|
||||
/testem/phys/addPhysics pai
|
||||
/testem/phys/addPhysics pai_photon
|
||||
/process/em/AddPAIRegion all GasDetector pai
|
||||
/process/em/AddPAIRegion all GasDetector pai_photon
|
||||
|
||||
Cuts for all setup and/or for sensitive volume may changed via commands:
|
||||
|
||||
/run/setCut 0.5 mm
|
||||
/run/setCutForRegion GasDetector 1.8 mm
|
||||
|
||||
5- HOW TO START ?
|
||||
|
||||
Execute TestEm8 in 'batch' mode from macro files e.g.
|
||||
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm8 TestEm8.in N
|
||||
here N means number of threads in multi-threaded mode, by
|
||||
default 2 threads are used
|
||||
|
||||
- execute TestEm8 in 'interactive' mode with visualization e.g.
|
||||
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm8
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
@@ -0,0 +1,120 @@
|
||||
|
||||
///\file "electromagnetic/TestEm9/.README.txt"
|
||||
///\brief Example TestEm9 README page
|
||||
|
||||
/*! \page ExampleTestEm9 Example TestEm9
|
||||
|
||||
- Demonstrate electromagnetic physics in crystal calorimeters.
|
||||
- How to define cut-per-region.
|
||||
|
||||
\section TestEm9_s1 GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of the vertex detector (VD), the electromagnetic
|
||||
calorimeter (EM), and the muon identifier (MU). Detector layout along
|
||||
the Z axis.
|
||||
|
||||
VD consisted of 3 layers of Si with pads structured along the X axis.
|
||||
Between VD and EM there are 2 active absorbers (scintillators).
|
||||
EM is the matrix 5x5 of heavy crystals. MU consist of 2 active absorbers
|
||||
(scintillators) and the iron plate between.
|
||||
|
||||
2 regions additional to the World are defined: VertexDetector and
|
||||
MuonDetector. For testing purposes first absorber of MU is included in
|
||||
the region of VD.
|
||||
|
||||
Material of calorimeter and absorber can be choosen: \n
|
||||
Air Water lAr Al Fe BGO PbWO4 Pb. \n
|
||||
Eg:
|
||||
\verbatim
|
||||
/testem/det/CalMat PbWO4
|
||||
/testem/det/AbsMat Al
|
||||
\endverbatim
|
||||
|
||||
The size of the detector can be changed also.\n
|
||||
Eg:
|
||||
\verbatim
|
||||
/testem/det/EcalLength 20 cm
|
||||
/testem/det/EcalWidth 5 cm
|
||||
/testem/det/update ---> rebuild the geometry
|
||||
\endverbatim
|
||||
|
||||
\section TestEm9_s2 PHYSICS LISTS
|
||||
|
||||
Physics Lists are based on modular design. Several modules are instantiated:
|
||||
-# Transportation
|
||||
-# EM physics
|
||||
-# Decays
|
||||
-# StepMax - for step limitation
|
||||
|
||||
The following options for EM physics using builders from physics_lists
|
||||
sub-package are available:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
A local builder, PhysListEmStandard "local" (similar to opt0) is also
|
||||
available.
|
||||
|
||||
|
||||
Optional components can be added:
|
||||
- "elastic" elastic scattering of hadrons
|
||||
- "binary" QBBC configuration of hadron/ion inelastic models
|
||||
- "gamma_nuc" gamma- and electro-nuclear processes
|
||||
- "stopping" stopping processes
|
||||
|
||||
\section TestEm9_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
cylinder perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the PrimaryGeneratorAction class, and can
|
||||
changed via the G4 build-in commands of G4ParticleGun class.
|
||||
|
||||
\section TestEm9_s4 OUTPUT
|
||||
|
||||
The batch regime of simulation can be started
|
||||
\verbatim
|
||||
$G4WORKDIR/bin/$G4SYSTEM/TestEm9 TestEm9.in
|
||||
\endverbatim
|
||||
where TestEm9.in is the example of macro file for batch job.
|
||||
|
||||
As a result of simulation the number of secondaries produced
|
||||
in different regions are averaged. The average energy depositions
|
||||
in active absorbers and EM as well as RMS of these values are shown.
|
||||
The number of hits in pads of VD is printed out.
|
||||
|
||||
\section TestEm9_s5 VISUALISATION
|
||||
|
||||
To use visualisation the environment variable G4_VIS_USE should be
|
||||
defined. An interactive session starts if no macro file is specified
|
||||
in the command line:
|
||||
\verbatim
|
||||
$G4WORKDIR/bin/$G4SYSTEM/TestEm9
|
||||
\endverbatim
|
||||
|
||||
To start visualisation one can issur
|
||||
\verbatim
|
||||
>/control/execute vis.mac
|
||||
>/run/beamOn 1
|
||||
\endverbatim
|
||||
|
||||
\section TestEm9_s6 ANALYSIS
|
||||
|
||||
Number of histograms are built inside the example using internal
|
||||
analysis sub-package. Histograms are saved in a root file.
|
||||
Histogram booking and saving is done only if any of histogram
|
||||
|
||||
\verbatim
|
||||
/testem/histo/fileName myname
|
||||
/testem/histo/setHisto id nbins xmin xmax unit
|
||||
\endverbatim
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,108 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
TestEm9
|
||||
-------
|
||||
Demonstrate electromagnetic physics in crystal calorimeters.
|
||||
How to define cut-per-region.
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of the vertex detector (VD), the electromagnetic
|
||||
calorimeter (EM), and the muon identifier (MU). Detector layout along
|
||||
the Z axis.
|
||||
|
||||
VD consisted of 3 layers of Si with pads structured along the X axis.
|
||||
Between VD and EM there are 2 active absorbers (scintillators).
|
||||
EM is the matrix 5x5 of heavy crystals. MU consist of 2 active absorbers
|
||||
(scintillators) and the iron plate between.
|
||||
|
||||
2 regions additional to the World are defined: VertexDetector and
|
||||
MuonDetector. For testing purposes first absorber of MU is included in
|
||||
the region of VD.
|
||||
|
||||
Material of calorimeter and absorber can be choosen:
|
||||
Air Water lAr Al Fe BGO PbWO4 Pb.
|
||||
eg: /testem/det/CalMat PbWO4
|
||||
/testem/det/AbsMat Al
|
||||
|
||||
The size of the detector can be changed also.
|
||||
|
||||
eg: /testem/det/EcalLength 20 cm
|
||||
/testem/det/EcalWidth 5 cm
|
||||
/testem/det/update ---> rebuild the geometry
|
||||
|
||||
2- PHYSICS LISTS
|
||||
|
||||
Physics Lists are based on modular design. Several modules are instantiated:
|
||||
1. Transportation
|
||||
2. EM physics
|
||||
3. Decays
|
||||
4. StepMax - for step limitation
|
||||
|
||||
The following options for EM physics using builders from physics_lists
|
||||
sub-package are available:
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
|
||||
- "emlivermore" low-energy EM physics using Livermore data
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
low-energy models
|
||||
|
||||
A local builder, PhysListEmStandard "local" (similar to opt0) is also
|
||||
available.
|
||||
|
||||
Optional components can be added:
|
||||
- "elastic" elastic scattering of hadrons
|
||||
- "binary" QBBC configuration of hadron/ion inelastic models
|
||||
- "gamma_nuc" gamma- and electro-nuclear processes
|
||||
- "stopping" stopping processes
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
cylinder perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the PrimaryGeneratorAction class, and can
|
||||
changed via the G4 build-in commands of G4ParticleGun class.
|
||||
|
||||
4- OUTPUT
|
||||
|
||||
The batch regime of simulation can be started
|
||||
$G4WORKDIR/bin/$G4SYSTEM/TestEm9 TestEm9.in
|
||||
where TestEm9.in is the example of macro file for batch job.
|
||||
|
||||
As a result of simulation the number of secondaries produced
|
||||
in different regions are averaged. The average energy depositions
|
||||
in active absorbers and EM as well as RMS of these values are shown.
|
||||
The number of hits in pads of VD is printed out.
|
||||
|
||||
5- VISUALISATION
|
||||
|
||||
To use visualisation the environment variable G4_VIS_USE should be
|
||||
defined. An interactive session starts if no macro file is specified
|
||||
in the command line:
|
||||
$G4WORKDIR/bin/$G4SYSTEM/TestEm9
|
||||
|
||||
To start visualisation one can issur
|
||||
>/control/execute vis.mac
|
||||
>/run/beamOn 1
|
||||
|
||||
6- ANALYSIS
|
||||
|
||||
Number of histograms are built inside the example using internal
|
||||
analysis sub-package. Histograms are saved in a root file.
|
||||
Histogram booking and saving is done only if any of histogram
|
||||
|
||||
/testem/histo/fileName myname
|
||||
/testem/histo/setHisto id nbins xmin xmax unit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user