Import Geant4 11.0.0 source tree
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
|
||||
///\file "exoticphysics/.README.txt"
|
||||
///\brief Examples exoticphysics README page
|
||||
|
||||
/*! \page Examples_exoticphysics Category "exoticphysics"
|
||||
|
||||
Examples in this directory demonstrate exotic physics applications.
|
||||
Currently, four examples are provided:
|
||||
|
||||
\link Examplechanneling channeling \endlink
|
||||
|
||||
This example simulates channeling of 400 GeV/c protons in a bent crystal.
|
||||
|
||||
\link Exampledmparticle dmparticle \endlink
|
||||
|
||||
This is very preliminary and simplified Geant4 example for light dark matter
|
||||
(LDM) particles.
|
||||
|
||||
\link Examplemonopole monopole \endlink
|
||||
|
||||
This example is devoted to the energy deposited by classical magnetic
|
||||
monopole.
|
||||
|
||||
\link Examplephonon phonon \endlink
|
||||
|
||||
This example simulates phonons in sub-Kelvin temperature Germanium crystal.
|
||||
|
||||
\link Examplesaxs saxs \endlink
|
||||
|
||||
The example saxs implements the typical setup of a Small Angle X-ray
|
||||
Scattering (SAXS) experiment.
|
||||
|
||||
\link Exampleucn ucn \endlink
|
||||
|
||||
This example simulates the passage of ultra-cold neutrons (UCN) in a
|
||||
hollow pipe.
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
Geant4 extended examples - exotic physics
|
||||
----------------------------------------------
|
||||
|
||||
Examples in this directory demonstrate exotic physics applications.
|
||||
Currently, four examples are provided:
|
||||
|
||||
channeling
|
||||
----------
|
||||
|
||||
This example simulates channeling of 400 GeV/c protons in a bent crystal.
|
||||
|
||||
dmparticle
|
||||
---------
|
||||
This is very preliminary and simplified Geant4 example for light dark matter
|
||||
(LDM) particles.
|
||||
|
||||
monopole
|
||||
---------
|
||||
|
||||
This example is devoted to the energy deposited by classical magnetic
|
||||
monopole.
|
||||
|
||||
phonon
|
||||
------
|
||||
|
||||
This example simulates phonons in sub-Kelvin temperature Germanium crystal.
|
||||
|
||||
saxs
|
||||
----
|
||||
|
||||
The example saxs implements the typical setup of a Small Angle X-ray
|
||||
Scattering (SAXS) experiment.
|
||||
|
||||
ucn
|
||||
---
|
||||
|
||||
This example simulates the passage of ultra-cold neutrons (UCN) in a
|
||||
hollow pipe.
|
||||
@@ -0,0 +1,92 @@
|
||||
|
||||
///\file "exoticphysics/channeling/.README.txt"
|
||||
///\brief Example channeling README page
|
||||
|
||||
/*! \page Examplechanneling Example channeling
|
||||
|
||||
\author Enrico Bagli - INFN and University Ferrara (Italy) \n
|
||||
bagli@fe.infn.it
|
||||
|
||||
This example shows how channeling in bent crystal can be simulated
|
||||
in Geant4
|
||||
|
||||
\section channeling_s1 INTRODUCTION
|
||||
|
||||
The example simulates the channeling of 400 GeV/c protons in bent
|
||||
Si crystal. Channeling occurs when particles enter a crystal aligned
|
||||
with atomic planes or axes. In bent crystals, the particles are
|
||||
trapped between atomic planes and follow the crystal curvature
|
||||
being deflected. If the particle direction is tangent to a bent
|
||||
crystal plane is reflected to the opposite direction with respect
|
||||
to channeling, i.e., it suffer ‘volume reflection’. The example
|
||||
provides the physical model for planar channeling and volume
|
||||
reflection in bent crystals.
|
||||
|
||||
\section channeling_s2 GEOMETRY
|
||||
|
||||
The geometry is a bent Si crystal with three Si detectors placed at
|
||||
-9.998 m, -0.320 m and 10.756 m with respect to bent crystal position.
|
||||
The Si detectors allows to measure incoming and outgoing angle
|
||||
after the interaction with the Si bent crystal. The
|
||||
geometry is all under vacuum.
|
||||
|
||||
\section channeling_s3 PRIMARY EVENT
|
||||
|
||||
The primary events are 400 GeV/c protons at -1.05 m from the
|
||||
crystal with 13.36 microrad x 11.25 microrad divergence.
|
||||
|
||||
\section channeling_s4 PHYSICS
|
||||
|
||||
In the example the physics of channeling and volume reflection
|
||||
has been added to the standard Geant4 physics. The description
|
||||
of the used model can be found in the paper ‘A model for the
|
||||
interaction of high-energy particles in straight and bent
|
||||
crystals implemented in Geant4’ by E. Bagli et al., available
|
||||
online at http://arxiv.org/abs/1403.5819
|
||||
|
||||
\section channeling_s5 EXECUTION & OUTPUT
|
||||
|
||||
The executable must be run from within the source directory of the example
|
||||
to ensure that it can find the path for crystal data files.
|
||||
|
||||
Data files for Si crystal interplanar potential, nuclei and electron density
|
||||
are stored in a named subdirectory’data’
|
||||
|
||||
Upon execution, the macro
|
||||
\verbatim
|
||||
2009_PLB680_129.mac
|
||||
\endverbatim
|
||||
will automatically run the
|
||||
example with 1000 protons.
|
||||
|
||||
Use
|
||||
\verbatim
|
||||
/xtal/setBR XXX 0. 0. m
|
||||
\endverbatim
|
||||
To change crystal bending to XXX meters
|
||||
|
||||
Use
|
||||
\verbatim
|
||||
/xtal/setSize 1.0 70. XXX mm
|
||||
\endverbatim
|
||||
To change crystal length to XXX millimeter
|
||||
|
||||
Use
|
||||
\verbatim
|
||||
/xtal/setEC data/Si220
|
||||
\endverbatim
|
||||
To select the (110) Si crystal plane of channeling
|
||||
|
||||
GPS commands are used for the primary generator.
|
||||
|
||||
\subsection channeling_s5_sub1 ExExhCh.root
|
||||
|
||||
The output is the ExExhCh.root file with the TTree ExExChTree
|
||||
has the leaves:
|
||||
- angXin : incoming particle X angle at the crystal
|
||||
- angYin : incoming particle Y angle at the crystal
|
||||
- posXin : hitting X position of the particle at the crystal
|
||||
- posYin : hitting Y position of the particle at the crystal
|
||||
- angXout: outgoing particle X angle out of the the crystal
|
||||
- angYout: outgoing particle Y angle out of the the crystal
|
||||
*/
|
||||
@@ -0,0 +1,71 @@
|
||||
=================================================================
|
||||
Channeling effect in Geant4
|
||||
=================================================================
|
||||
Enrico Bagli - INFN and University Ferrara (Italy)
|
||||
bagli@fe.infn.it
|
||||
|
||||
This example shows how channeling in bent crystal can be simulated
|
||||
in Geant4
|
||||
|
||||
1.INTRODUCTION
|
||||
The example simulates the channeling of 400 GeV/c protons in bent
|
||||
Si crystal. Channeling occurs when particles enter a crystal aligned
|
||||
with atomic planes or axes. In bent crystals, the particles are
|
||||
trapped between atomic planes and follow the crystal curvature
|
||||
being deflected. If the particle direction is tangent to a bent
|
||||
crystal plane is reflected to the opposite direction with respect
|
||||
to channeling, i.e., it suffer ‘volume reflection’. The example
|
||||
provides the physical model for planar channeling and volume
|
||||
reflection in bent crystals.
|
||||
|
||||
2.GEOMETRY
|
||||
The geometry is a bent Si crystal with three Si detectors placed at
|
||||
-9.998 m, -0.320 m and 10.756 m with respect to the position of
|
||||
the bent crystal itself. The Si detectors allows to measure
|
||||
incoming and outgoing angle after the interaction with the Si bent crystal.
|
||||
The geometry is all under vacuum.
|
||||
|
||||
3.PRIMARY EVENT
|
||||
The primary events are 400 GeV/c protons launched at -10.5 m from the
|
||||
crystal with 13.36 microrad x 11.25 microrad divergence.
|
||||
|
||||
4.PHYSICS
|
||||
In the example the physics of channeling and volume reflection
|
||||
has been added to the standard Geant4 physics. The description
|
||||
of the used model can be found in the paper ‘A model for the
|
||||
interaction of high-energy particles in straight and bent
|
||||
crystals implemented in Geant4’ by E. Bagli et al., available
|
||||
online at http://arxiv.org/abs/1403.5819
|
||||
|
||||
5.EXECUTION & OUTPUT
|
||||
The executable must be run from within the source directory of the example
|
||||
to ensure that it can find the path for crystal data files.
|
||||
|
||||
Data files for Si crystal interplanar potential, nuclei and electron density
|
||||
are stored in a subdirectory named ’data’
|
||||
|
||||
Upon execution, the 2009_PLB680_129.mac macro will automatically run the
|
||||
example with 1000 protons.
|
||||
|
||||
Use
|
||||
/xtal/setBR XXX 0. 0. m
|
||||
To change crystal bending to XXX meters
|
||||
|
||||
Use
|
||||
/xtal/setSize 1.0 70. XXX mm
|
||||
To change crystal length to XXX millimeter
|
||||
|
||||
Use
|
||||
/xtal/potfilename data/Si220pl
|
||||
To select the (110) Si crystal plane of channeling
|
||||
|
||||
GPS commands are used for the primary generator.
|
||||
|
||||
The output is the ExExhCh.root file with the TTree ExExChTree
|
||||
has the leaves:
|
||||
- angXin : incoming particle X angle at the crystal
|
||||
- angYin : incoming particle Y angle at the crystal
|
||||
- posXin : hitting X position of the particle at the crystal
|
||||
- posYin : hitting Y position of the particle at the crystal
|
||||
- angXout: outgoing particle X angle out of the the crystal
|
||||
- angYout: outgoing particle Y angle out of the the crystal
|
||||
@@ -0,0 +1,70 @@
|
||||
|
||||
///\file "exoticphysics/dmparticle/.README.txt"
|
||||
///\brief Example dmparticle README page
|
||||
|
||||
/*! \page Exampledmparticle Example dmparticle
|
||||
|
||||
This is very preliminary and simplified Geant4 example for light dark matter (LDM) particles.
|
||||
It consists of LDM bremsstrahlung process (in G4LDMPhysics constructor)
|
||||
for protons creating G4LDMPhotons.
|
||||
The latter decays creating G4LDMHi and G4LDMHiBar LDM scalar particles. They
|
||||
can scatter on nucleons and electrons.
|
||||
|
||||
The first version has electromagnetic processes only. Hadron constructors can be added similarly
|
||||
to HadrN examples.
|
||||
|
||||
More LDM processes will be added according to experiment requirements
|
||||
|
||||
|
||||
\section dmparticle_s1 GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single block of a homogenous material,
|
||||
placed in a world.
|
||||
|
||||
Parameters define the geometry :
|
||||
- the material of the box
|
||||
- the thickness of the box
|
||||
- the tranverse dimension of the box
|
||||
|
||||
The default is 130 cm of tungsten.
|
||||
Equivalent UI commands are following:
|
||||
\verbatim
|
||||
/testex/det/setMat G4_W
|
||||
/testex/det/sizeX 130 cm
|
||||
/testex/det/sizeYZ 30 cm
|
||||
\endverbatim
|
||||
|
||||
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 dmparticle_s2 PHYSICS LIST
|
||||
|
||||
|
||||
Physics Lists include EM standard physics and decay physics, additional
|
||||
dark matter particle physics imlemented inside PhysicsList method. By
|
||||
default DMLPhoton is defined with the mass 0.5 GeV.
|
||||
To define different mass of this photon or enable DMLHi, DMLHiBar
|
||||
command line commands should be applied.
|
||||
|
||||
\section dmparticle_s3 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 proton 100 GeV
|
||||
|
||||
\section dmparticle_s5- HOW TO START ?
|
||||
|
||||
|
||||
Execute Test in 'batch' mode from macro files
|
||||
|
||||
\verbatim
|
||||
% dmparticle dmparticle.in
|
||||
% dmparticle dmparticle.in 0.2 0.4
|
||||
\endverbatim
|
||||
|
||||
two extra numbers are masses in GeV of DMLPhoton and DMLHi
|
||||
*/
|
||||
@@ -0,0 +1,79 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
dmparticle
|
||||
----------
|
||||
|
||||
V. Grichine (25.03.2017)
|
||||
|
||||
Geant4 application for testing of dark matter particles and processes
|
||||
(based on TestEm8 and monopole examples)
|
||||
|
||||
This is very preliminary and simplified Geant4 example for light dark matter (LDM) particles.
|
||||
It consists of LDM bremsstrahlung process (in G4LDMPhysics constructor)
|
||||
for protons creating G4LDMPhotons.
|
||||
The latter decays creating G4LDMHi and G4LDMHiBar LDM scalar particles. They
|
||||
can scatter on nucleons and electrons.
|
||||
|
||||
The first version has electromagnetic processes only. Hadron constructors can be added similarly
|
||||
to HadrN examples.
|
||||
|
||||
More LDM processes will be added according to experiment requirements
|
||||
|
||||
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single block of a homogenous material,
|
||||
placed in a world.
|
||||
|
||||
Parameters define the geometry :
|
||||
- the material of the box
|
||||
- the thickness of the box
|
||||
- the tranverse dimension of the box
|
||||
|
||||
The default is 130 cm of tungsten.
|
||||
Equivalent UI commands are following:
|
||||
/testex/det/setMat G4_W
|
||||
/testex/det/sizeX 130 cm
|
||||
/testex/det/sizeYZ 30 cm
|
||||
|
||||
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 include EM standard physics and decay physics, additional
|
||||
dark matter particle physics imlemented inside PhysicsList method. By
|
||||
default DMLPhoton is defined with the mass 0.5 GeV.
|
||||
To define different mass of this photon or enable DMLHi, DMLHiBar
|
||||
command line commands should be applied.
|
||||
|
||||
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 proton 100 GeV
|
||||
|
||||
4- HOW TO START ?
|
||||
|
||||
- execute Test in 'batch' mode from macro files
|
||||
% dmparticle dmparticle.in
|
||||
% dmparticle dmparticle.in 0.2 0.4
|
||||
|
||||
two extra numbers are masses in GeV of DMLPhoton and DMLHi
|
||||
|
||||
5- HISTOGRAMS
|
||||
|
||||
The result is five histograms:
|
||||
- energy deposition along the target
|
||||
|
||||
The histogram is saved in Root file.
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
|
||||
///\file "exoticphysics/monopole/.README.txt"
|
||||
///\brief Example monopole README page
|
||||
|
||||
/*! \page Examplemonopole Example monopole
|
||||
|
||||
\author V.Ivanchenko, M.Vladymyrov \n
|
||||
CERN, Geneva, Switzerland \n
|
||||
Lebedev Physical Institute, Moscow, Russia \n
|
||||
|
||||
|
||||
This example is devoted to the energy deposited by classical magnetic
|
||||
monopole.
|
||||
|
||||
\section monopole_s1 GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single block of a homogenous material,
|
||||
placed in a world.
|
||||
|
||||
Four parameters define the geometry :
|
||||
- the material of the box
|
||||
- the thickness of the box
|
||||
- the tranverse dimension of the box
|
||||
- the maximal step size in target
|
||||
|
||||
The default is 10 cm of alumunium, step is limited by 5mm.
|
||||
Equivalent UI commands are following:
|
||||
\verbatim
|
||||
/testex/det/setMat G4_Al
|
||||
/testex/det/sizeX 10 cm
|
||||
/testex/det/sizeYZ 5 cm
|
||||
/testex/det/setStepSize 5 mm
|
||||
\endverbatim
|
||||
|
||||
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.
|
||||
|
||||
In addition, a global, uniform, and transverse magnetic field can be applied
|
||||
via G4MonopoleFieldSetup class, with the default z-value 0.2 tesla.
|
||||
This value can be changed via UI command:
|
||||
\verbatim
|
||||
/testex/fld/setField 0.2 tesla
|
||||
\endverbatim
|
||||
|
||||
\section monopole_s2 PHYSICS LIST
|
||||
|
||||
The physics list includes standard FTFP_BERT physics and the additional builder
|
||||
for monopole physics.
|
||||
To define monopole parameters an extra string should be provided via
|
||||
the program arguments:
|
||||
\verbatim
|
||||
./monopole -s '2 0 200 GeV' # in the interactive mode
|
||||
./monopole -m file.mac -s '2 0 200 GeV' # in the batch mode
|
||||
\endverbatim
|
||||
|
||||
\section monopole_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 monopole 100 GeV
|
||||
|
||||
\section monopole_s4 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main() for interactive session,
|
||||
the initial parameters of the program are defined in the init_vis.mac macro
|
||||
which then executes the visualisation macro, 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.
|
||||
|
||||
\section monopole_s5 HOW TO RUN ?
|
||||
|
||||
This example handles the program arguments in a similar way as the basic
|
||||
B4 example.
|
||||
It can be run with the following optional arguments:
|
||||
\verbatim
|
||||
% ./monopole [-m macro ] [-s setupMonopole] [-t nThreads]
|
||||
\endverbatim
|
||||
|
||||
The -s option was already explained in the Physics list section.
|
||||
The -t option is available only in multi-threading mode
|
||||
and it allows the user to override the Geant4 default number of
|
||||
threads. The number of threads can be also set via G4FORCENUMBEROFTHREADS
|
||||
environment variable which has the top priority.
|
||||
|
||||
- Execute program in the 'batch' mode from macro files
|
||||
\verbatim
|
||||
% ./monopole -m monopole.in [-s setupMonopole]
|
||||
\endverbatim
|
||||
|
||||
- Execute program in the 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% ./monopole [-s setupMonopole]
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
\section monopole_s6 HISTOGRAMS
|
||||
|
||||
The result is five histograms:
|
||||
- Monopole eneregy deposition in current material
|
||||
- dedx for proton
|
||||
- dedx for monopole
|
||||
- range for proton in current material
|
||||
- range for monopole in current material
|
||||
|
||||
The histogram is saved in Root file.
|
||||
Limit of bin size can be set with testex/run/binSize (default 5mm). Real size
|
||||
is chosen as a minimal between this and step limit (see Geometry section)
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,111 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
monopole
|
||||
--------
|
||||
V.Ivanchenko, M.Vladymyrov
|
||||
CERN, Geneva, Switzerland
|
||||
Lebedev Physical Institute, Moscow, Russia
|
||||
|
||||
|
||||
This example is devoted to the energy deposited by classical magnetic
|
||||
monopole.
|
||||
|
||||
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single block of a homogenous material,
|
||||
placed in a world.
|
||||
|
||||
Four parameters define the geometry :
|
||||
- the material of the box
|
||||
- the thickness of the box
|
||||
- the tranverse dimension of the box
|
||||
- the maximal step size in target
|
||||
|
||||
The default is 10 cm of alumunium, step is limited by 5mm.
|
||||
Equivalent UI commands are following:
|
||||
/testex/det/setMat G4_Al
|
||||
/testex/det/sizeX 10 cm
|
||||
/testex/det/sizeYZ 5 cm
|
||||
/testex/det/setStepSize 5 mm
|
||||
|
||||
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.
|
||||
|
||||
In addition, a global, uniform, and transverse magnetic field can be applied
|
||||
via G4MonopoleFieldSetup class, with the default z-value 0.2 tesla.
|
||||
This value can be changed via UI command:
|
||||
/testex/fld/setField 0.2 tesla
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The physics list includes standard FTFP_BERT physics and the additional builder
|
||||
or monopole physics.
|
||||
To define monopole parameters an extra string should be provided via
|
||||
the program arguments:
|
||||
./monopole -s '2 0 200 GeV' # in the interactive mode
|
||||
./monopole -m file.mac -s '2 0 200 GeV' # in the batch mode
|
||||
|
||||
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 monopole 100 GeV.
|
||||
|
||||
4- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main() for interactive session,
|
||||
the initial parameters of the program are defined in the init_vis.mac macro
|
||||
which then executes the visualisation macro, 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- HOW TO RUN ?
|
||||
|
||||
This example handles the program arguments in a similar way as the basic
|
||||
B4 example.
|
||||
It can be run with the following optional arguments:
|
||||
% ./monopole [-m macro ] [-s setupMonopole] [-t nThreads]
|
||||
|
||||
The -s option was already explained in the Physics list section.
|
||||
The -t option is available only in multi-threading mode
|
||||
and it allows the user to override the Geant4 default number of
|
||||
threads. The number of threads can be also set via G4FORCENUMBEROFTHREADS
|
||||
environment variable which has the top priority.
|
||||
|
||||
- Execute program in the 'batch' mode from macro files
|
||||
% ./monopole -m monopole.in [-s setupMonopole]
|
||||
|
||||
- Execute program in the 'interactive mode' with visualization
|
||||
% ./monopole [-s setupMonopole]
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
|
||||
6- HISTOGRAMS
|
||||
|
||||
The result is five histograms:
|
||||
- Monopole eneregy deposition in current material
|
||||
- dedx for proton
|
||||
- dedx for monopole
|
||||
- range for proton in current material
|
||||
- range for monopole in current material
|
||||
|
||||
The histogram is saved in Root file.
|
||||
Limit of bin size can be set with testex/run/binSize (default 5mm). Real size
|
||||
is chosen as a minimal between this and step limit (see Geometry section)
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
|
||||
///\file "exoticphysics/phonon/.README.txt"
|
||||
///\brief Example phonon README page
|
||||
|
||||
/*! \page Examplephonon Example phonon
|
||||
|
||||
\author Daniel Brandt - SLAC \n
|
||||
dbrandt@slac.stanford.edu
|
||||
|
||||
This example demonstrates how phonon propagation in cryogenic crystals
|
||||
can be simulated in Geant4.
|
||||
|
||||
\section phonon_s1 INTRODUCTION
|
||||
|
||||
Phonon propagation is different from most other Geant4 propagation
|
||||
simulations in a number of respects:
|
||||
|
||||
- Phonons are massless particles moving slower than the speed of light
|
||||
|
||||
- Phonon propagation and momentum vectors are not parallel
|
||||
|
||||
- Events isotropic in phonon-momentum space are not isotropic in real
|
||||
space.
|
||||
|
||||
This example will simulate the propagation of acoustic phonons through
|
||||
a Germanium crystal, providing processes to simulate phonon scattering
|
||||
of isotopic impurities, mode mixing between polarization states and
|
||||
anharmonic downconversion (phonon splitting). As such it provides all
|
||||
the physics required to realistically simulate phonon propagation in
|
||||
cryogenically cold semiconductor crystals.
|
||||
|
||||
\section phonon_s2 GEOMETRY
|
||||
|
||||
In this example the geometry is a cylindrical Germanium crystal
|
||||
centered at (0,0,0) with Almuninium end caps. Phonons absorbed in the
|
||||
Al end caps are counted by the sensitive detector.
|
||||
|
||||
\section phonon_s3 PRIMARY EVENT
|
||||
|
||||
The primary event is a single phonon of energy 7.5 meV at the center of
|
||||
the Ge crystal. The polarization type (fast transvere, slow transverse or
|
||||
longitudinal) is determined randomly according to the density of states
|
||||
in Germanium. The direction of propagation is than determined by by the
|
||||
User Stacking Action class XPhononStackingAction.
|
||||
|
||||
\section phonon_s4 EXECUTION & OUTPUT
|
||||
|
||||
The executable must be run from within the source directory of the example
|
||||
to ensure that it can find the path for crystal data files.
|
||||
Alternatively the search path for the crystal maps can be set in the
|
||||
setting the G4LATTICEDATA environment variable. If this variable does not
|
||||
exist, it defaults to ./CrystalMaps.
|
||||
|
||||
Data files for each crystal material are stored in a named subdirectory
|
||||
under $G4LATTICEDATA/, along with a config.txt file which specifies the
|
||||
numerical constants for the lattice. This example includes germanium [111]
|
||||
in CrystalMaps/Ge/.
|
||||
|
||||
Upon execution, the vis.mac visualization macro will automatically be
|
||||
executed. For the visualization to work, OpenGL support must be installed.
|
||||
The macro will automatically generate a single Primary Event (7.5 meV phonon)
|
||||
at the center of the crystal.
|
||||
|
||||
The trajectory colour will indicate the polarization state of the phonon:
|
||||
- Longitudinal: blue
|
||||
- Fast Transverse: green
|
||||
- Slow Transverse: red
|
||||
|
||||
A small circle will be drawn wherever a phonon is absorbed into the
|
||||
Aluminium. All events within the Aluminium are written into plain-text
|
||||
space-sparated-value (ssv) files:
|
||||
|
||||
\subsection phonon_s4_sub1 timing.ssv
|
||||
|
||||
- COLUMN 1: Time phonon was absorbed in ns since start of run
|
||||
- COLUMN 2: Energy of phonon absorbed
|
||||
|
||||
\subsection phonon_s4_sub2 tcaustic.ssv
|
||||
|
||||
- COLUMN 1: x-position of absobrtion in mm
|
||||
- COLUMN 2: y-position of absobrtion in mm
|
||||
- COLUMN 3: z-position of absobrtion in mm
|
||||
|
||||
Every time a phonon is simulated, the information is appended to timing.ssv
|
||||
and caustic.ssv. If the files do not exist they will be created.
|
||||
|
||||
\section phonon_s5 TESTING
|
||||
|
||||
In order to test the example, it can be run as
|
||||
\verbatim
|
||||
./XGeBox run.in > test.out
|
||||
\endverbatim
|
||||
|
||||
This will create a single primary event and then cause the example to
|
||||
terminate automatically, with all screen output redirected to test.out.
|
||||
|
||||
If all went well, test.out should be identical to run.out provided with
|
||||
this example. Also, the files caustic.ssv and timing.ssv should have been
|
||||
created and be identical to caustic.out and timing.out respectively.
|
||||
|
||||
After the first time the example runs, it will append to caustic.ssv and
|
||||
timing.ssv. If the testing should be re-run, then caustic.ssv and timing.ssv
|
||||
will have to be deleted.
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,99 @@
|
||||
|
||||
=================================================================
|
||||
Phonon propagation in Geant4
|
||||
=================================================================
|
||||
Daniel Brandt - SLAC
|
||||
dbrandt@slac.stanford.edu
|
||||
|
||||
This example demonstrates how phonon propagation in cryogenic crystals
|
||||
can be simulated in Geant4.
|
||||
|
||||
1.INTRODUCTION
|
||||
|
||||
Phonon propagation is different from most other Geant4 propagation
|
||||
simulations in a number of respects:
|
||||
|
||||
-Phonons are massless particles moving slower than the speed of light
|
||||
|
||||
-Phonon propagation and momentum vectors are not parallel
|
||||
|
||||
-Events isotropic in phonon-momentum space are not isotropic in real
|
||||
space.
|
||||
|
||||
This example will simulate the propagation of acoustic phonons through
|
||||
a Germanium crystal, providing processes to simulate phonon scattering
|
||||
off isotopic impurities, mode mixing between polarization states and
|
||||
anharmonic downconversion (phonon splitting). As such it provides all
|
||||
the physics required to realistically simulate phonon propagation in
|
||||
cryogenically cold semiconductor crystals.
|
||||
|
||||
2. GEOMETRY
|
||||
|
||||
In this example the geometry is a cylindrical Germanium crystal
|
||||
centered at (0,0,0) with Almuninium end caps. Phonons absorbed in the
|
||||
Al end caps are counted by the sensitive detector.
|
||||
|
||||
3. PRIMARY EVENT
|
||||
|
||||
The primary event is a single phonon of energy 7.5 meV at the center of
|
||||
the Ge crystal. The polarization type (fast transvere, slow transverse or
|
||||
longitudinal) is determined randomly according to the density of states
|
||||
in Germanium. The direction of propagation is than determined by by the
|
||||
User Stacking Action class XPhononStackingAction.
|
||||
|
||||
4. EXECUTION & OUTPUT
|
||||
|
||||
The executable must be run from within the source directory of the example
|
||||
to ensure that it can find the path for crystal data files. Alternatively
|
||||
the search path for the crystal maps can be set in the setting the
|
||||
G4LATTICEDATA environment variable. If this variable does not exist, it
|
||||
defaults to ./CrystalMaps.
|
||||
|
||||
Data files for each crystal material are stored in a named subdirectory
|
||||
under $G4LATTICEDATA/, along with a config.txt file which specifies the
|
||||
numerical constants for the lattice. This example includes germanium [111]
|
||||
in CrystalMaps/Ge/.
|
||||
|
||||
Upon execution, the vis.mac visualization macro will automatically be
|
||||
executed. For the visualization to work, OpenGL support must be installed.
|
||||
The macro will automatically generate a single Primary Event (7.5 meV phonon)
|
||||
at the center of the crystal.
|
||||
|
||||
The trajectory colour will indicate the polarization state of the phonon:
|
||||
Longitudinal: blue
|
||||
Fast Transverse: green
|
||||
Slow Transverse: red
|
||||
|
||||
A small circle will be drawn wherever a phonon is absorbed into the
|
||||
Aluminium. All events within the Aluminium are written into plain-text
|
||||
space-sparated-value (ssv) files.
|
||||
|
||||
timing.ssv
|
||||
------------
|
||||
COLUMN 1: Time phonon was absorbed in ns since start of run
|
||||
COLUMN 2: Energy of phonon absorbed
|
||||
|
||||
caustic.ssv
|
||||
------------
|
||||
COLUMN 1: x-position of absobrtion in mm
|
||||
COLUMN 2: y-position of absobrtion in mm
|
||||
COLUMN 3: z-position of absobrtion in mm
|
||||
|
||||
Every time a phonon is simulated, the information is appended to timing.ssv
|
||||
and caustic.ssv. If the files do not exist they will be created.
|
||||
|
||||
5. TESTING
|
||||
|
||||
In order to test the example, it can be run as
|
||||
./XGeBox run.in > test.out
|
||||
|
||||
This will create a single primary event and then cause the example to
|
||||
terminate automatically, with all screen output redirected to test.out.
|
||||
|
||||
If all went well, test.out should be identical to run.out provided with
|
||||
this example. Also, the files caustic.ssv and timing.ssv should have been
|
||||
created and be identical to caustic.out and timing.out respectively.
|
||||
|
||||
After the first time the example runs, it will append to caustic.ssv and
|
||||
timing.ssv. If the testing should be re-run, then caustic.ssv and timing.ssv
|
||||
will have to be deleted.
|
||||
@@ -0,0 +1,253 @@
|
||||
|
||||
///\file "exoticphysics/saxs/.README.txt"
|
||||
///\brief Example SAXS README page
|
||||
|
||||
/*! \page Examplesaxs Example saxs
|
||||
|
||||
\author Gianfranco Paternò - INFN and University Ferrara (Italy) \n
|
||||
paterno@fe.infn.it
|
||||
|
||||
The example saxs implements the typical setup of a Small Angle X-ray
|
||||
Scattering (SAXS) experiment. It is meant to illustrate the
|
||||
usage of molecular interference (MI) of Rayleigh (coherent) scattering
|
||||
of photons inside the matter, which is implemented in the
|
||||
G4PenelopeRayleighModelMI model.
|
||||
|
||||
|
||||
\section saxs_s1 Geometry
|
||||
|
||||
The setup consists of a phantom/sample under investigation, slits
|
||||
to collimate the photon beam and a shielded detector to collect
|
||||
the photons scattered by the phantom (see SAXSDetectorConstruction).
|
||||
|
||||
The geometry is scalable through the interactive commands defined
|
||||
in the SAXSDetectorConstructionMessenger class. All the significant
|
||||
quantities, such as the setup (scattering) rotation angle, the position
|
||||
and size of all the volumes, as well as the phantom material can be
|
||||
set via macro commands.
|
||||
|
||||
Two macro files come with this example: saxs.in and saxs_slits.in.
|
||||
|
||||
-# In the saxs.in macro, the phantom is a cylinder with a diameter and
|
||||
a height of 10 mm made of a mixture of 80% fat and 20% water.
|
||||
In general, if the argument of <code>/det/setPhantomMaterial</code> command is 2,
|
||||
as in this case, the material is a biological tissue ("MedMat")
|
||||
defined as a mixture of fat, water, collagen and hydroxyapatite.
|
||||
The weight fraction of the mixture components can be set through commands
|
||||
\verbatim
|
||||
/det/setComp0
|
||||
/det/setComp1
|
||||
/det/setComp2
|
||||
/det/setComp3
|
||||
\endverbatim
|
||||
respectively.
|
||||
The tissue form factor (including MI) is automatically calculated as a
|
||||
weighed sum of the form factors of the basis components.
|
||||
In this case, no slits are foreseen and the sensitive detector
|
||||
positioned 400 mm downstream of the phantom collects all the photons
|
||||
transmitted and scattered by the phantom, which is irradiated
|
||||
by a pencil beam with an energy of 20 keV.
|
||||
|
||||
-# In the saxs_slits.in macro, the phantom is again a cylinder with a
|
||||
diameter and a height of 10 mm. The phantom is made of a custom
|
||||
material ("CustomMat") whose density and composition is set through
|
||||
\verbatim
|
||||
/det/setCustomMatDensity
|
||||
/det/setCustomMatHmassfract,
|
||||
/det/setCustomMatNmassfract
|
||||
/det/setCustomMatOmassfract
|
||||
\endverbatim
|
||||
commands. In general, a custom material can be defined by
|
||||
specifying the mass fraction of H, C, N, O, Na, P, S, Cl, K, and Ca via
|
||||
commands analogous to those mentioned above. In this case, the material
|
||||
composition corresponds to that of ammonium nitrate
|
||||
(NH<sub>4</sub>NO<sub>3</sub>).
|
||||
For a custom material, the user can provide the path of the file with
|
||||
the material form factor (with MI) through the
|
||||
\verbatim
|
||||
/det/SetCustomMatFF
|
||||
\endverbatim
|
||||
command. As an example, the file myFF.dat contains the form factor of
|
||||
NH<sub>4</sub>NO<sub>3</sub> measured by Harding in 1999.
|
||||
In this case the slits upstream and downstream the phantom
|
||||
are present. This setup is suitable for both monochromatic and
|
||||
polychromatic beams. To speed-up the simulation, a monochromatic
|
||||
photon beam was chosen, but a polychromatic beam can be easily defined.
|
||||
|
||||
\section saxs_s2 Physics
|
||||
|
||||
In this example, only electromagnetic processes and decays are considered.
|
||||
|
||||
They are defined in a custom physics list that allows the user to
|
||||
choose among various EM PhysicsList constructors. In particular,
|
||||
by choosing G4EmPenelopePhysicsMI and setting fUseMIFlag as true,
|
||||
it is possible to enable the molecular interference effects. This
|
||||
is the default configuration.
|
||||
|
||||
\section saxs_s3 Action Initialization
|
||||
|
||||
SAXSActionInitialization class instantiates and registers to
|
||||
Geant4 kernel all user action classes. While in sequential mode
|
||||
the action classes are instatiated just once, by invoking the
|
||||
method: SAXSActionInitialization::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 is instantiated both thread-local and global.
|
||||
That's why its instance is created also in the method
|
||||
SAXSActionInitialization::BuildForMaster(), which is
|
||||
invoked only in multi-threading mode.
|
||||
|
||||
\section saxs_s4 Primary generator
|
||||
|
||||
The primary generator action class employs the G4GeneralParticleSource (GPS)
|
||||
generator. The primary beam has to be defined via the G4 built-in
|
||||
commands of the G4GeneralParticleSource in a input macro file.
|
||||
In particular, a photon beam directed toward the phantom must be defined
|
||||
to test the MI effects. The X-ray beam can be monochromatic or
|
||||
polychromatic, parallel or divergent.
|
||||
|
||||
|
||||
\section saxs_s5 Event and Detector Response
|
||||
|
||||
An event consists of the generation of a single particle which is
|
||||
transported through the phantom and then to the sensitive detector.
|
||||
|
||||
The interactions of the photons inside the phantom, and in particular,
|
||||
the scattering events, are scored in a dedicated ntuple through the
|
||||
SAXSSteppingAction class.
|
||||
|
||||
The hits of the particles on the sensitive detector positioned
|
||||
downstream of the phantom (SAXSSensitiveDetectorHit) are recorded
|
||||
in a dedicated ntuple through the SAXSSensitiveDetector class.
|
||||
|
||||
\section saxs_s6 Analysis
|
||||
|
||||
The analysis tools are used to accumulate statistics.
|
||||
ntuple are created in SAXSRunAction::SAXSRunAction()
|
||||
constructor for the following quantities:
|
||||
|
||||
Ntuple1 (<code>part</code>) - Particles impinging on the Sensitive Detector (SD):
|
||||
|
||||
- energy of the particles
|
||||
- position of the hits
|
||||
- momentum of the particles
|
||||
- time of the hits
|
||||
- type of impinging particles
|
||||
- ID number of the impinging particles
|
||||
- number of scattering events a primary had before hitting the SD
|
||||
- event number of the hits
|
||||
|
||||
Ntuple2 (<code>scatt</code>) - Interactions of photons inside the phantom:
|
||||
|
||||
- ID of the process occurred
|
||||
(0-> transportation, 1->Rayleigh, 2->Compton, 3->Photoelectic)
|
||||
- initial energy of the particles
|
||||
- scattering angle
|
||||
|
||||
The ntuples are saved in the output file in the Root format.
|
||||
When running in multi-threading mode, the ntuples accumulated
|
||||
on threads are automatically merged in a single output file.
|
||||
|
||||
The default output format is root. Two root scripts come with
|
||||
this example to analyze the output file: scattAnalysis.C and
|
||||
ADXRD.C. The first can be used to analyze the <code>scatt</code> ntuple, while
|
||||
the second can be used for <code>part</code> ntuple.
|
||||
|
||||
\section saxs_s7 How to run
|
||||
|
||||
Execute <code>saxs</code> in the 'interactive mode' with visualization:
|
||||
\verbatim
|
||||
% ./saxs
|
||||
\endverbatim
|
||||
and type in the commands line by line:
|
||||
\verbatim
|
||||
Idle> /control/verbose 2
|
||||
Idle> /tracking/verbose 1
|
||||
Idle> ...
|
||||
Idle> /run/beamOn 10
|
||||
Idle> ...
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
or it is possible to run a macro file (test.in is a simple macro where the
|
||||
primary beam is defined through the usual GPS commands):
|
||||
\verbatim
|
||||
Idle> /control/execute test.in
|
||||
Idle> /run/beamOn 10
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Execute saxs in the 'batch' mode from macro files (without visualization)
|
||||
\verbatim
|
||||
% ./saxs saxs.in [Ncores]
|
||||
% ./saxs saxs_slits.in [Ncores]
|
||||
\endverbatim
|
||||
<code>Ncores</code> (optional argument) is the number of threads the user wants
|
||||
to use in MT mode.
|
||||
|
||||
\section saxs_s8 Appendix
|
||||
|
||||
The following paragraphs are common to all basic examples
|
||||
|
||||
\subsection saxs_s8a Visualization
|
||||
|
||||
The visualization manager is set via the G4VisExecutive class
|
||||
in the main() function in saxs.cc.
|
||||
The initialisation of the drawing is done via a set of /vis/ commands
|
||||
in the macro vis.mac. This macro is automatically read from
|
||||
the main function when the example is used in interactive running mode.
|
||||
|
||||
By default, vis.mac opens an OpenGL viewer (<code>/vis/open OGL</code>).
|
||||
The user can change the initial viewer by commenting out this line
|
||||
and instead uncommenting one of the other <code>/vis/open</code>
|
||||
statements, such as
|
||||
HepRepFile or DAWNFILE (which produce files that can be viewed with the
|
||||
HepRApp and DAWN viewers, respectively). Note that one can always
|
||||
open new viewers at any time from the command line. For example, if
|
||||
you already have a view in, say, an OpenGL window with a name
|
||||
"viewer-0", then
|
||||
\verbatim
|
||||
/vis/open DAWNFILE
|
||||
\endverbatim
|
||||
then to get the same view
|
||||
\verbatim
|
||||
/vis/viewer/copyView viewer-0
|
||||
\endverbatim
|
||||
or to get the same view *plus* scene-modifications
|
||||
\verbatim
|
||||
/vis/viewer/set/all viewer-0
|
||||
\endverbatim
|
||||
then to see the result
|
||||
\verbatim
|
||||
/vis/viewer/flush
|
||||
\endverbatim
|
||||
|
||||
The DAWNFILE, HepRepFile drivers are always available
|
||||
(since they require no external libraries), but the OGL driver requires
|
||||
that the Geant4 libraries have been built with the OpenGL option.
|
||||
|
||||
vis.mac has additional commands that demonstrate additional functionality
|
||||
of the vis system, such as displaying text, axes, scales, date, logo and
|
||||
shows how to change viewpoint and style.
|
||||
To see even more commands use <code>help</code> or <code>ls</code> or
|
||||
browse the available UI commands in the Application Developers Guide.
|
||||
|
||||
For more information on visualization, including information on how to
|
||||
install and run DAWN, OpenGL and HepRApp, see the visualization tutorials,
|
||||
for example,
|
||||
http://geant4.slac.stanford.edu/Presentations/vis/G4[VIS]Tutorial/G4[VIS]Tutorial.html
|
||||
(where [VIS] can be replaced by DAWN, OpenGL and HepRApp)
|
||||
|
||||
The tracks are automatically drawn at the end of each event, accumulated
|
||||
for all events and erased at the beginning of the next run.
|
||||
|
||||
\subsection saxs_s8b User Interfaces
|
||||
|
||||
The user command interface is set via the G4UIExecutive class
|
||||
in the main() function in saxs.cc
|
||||
The selection of the user command interface is then done automatically
|
||||
according to the Geant4 configuration or it can be done explicitly via
|
||||
the third argument of the G4UIExecutive constructor (see exampleB4a.cc).
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,217 @@
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Extended Example saxs
|
||||
--------------------
|
||||
|
||||
The example saxs implements the typical setup of a Small Angle X-ray
|
||||
Scattering (SAXS) experiment. It is meant to illustrate the
|
||||
usage of molecular interference (MI) of Rayleigh (coherent) scattering
|
||||
of photons inside the matter, which is implemented in the
|
||||
G4PenelopeRayleighModelMI model.
|
||||
|
||||
1- GEOMETRY
|
||||
|
||||
The setup consists of a phantom/sample under investigation, slits
|
||||
to collimate the photon beam and a shielded detector to collect
|
||||
the photons scattered by the phantom (see SAXSDetectorConstruction).
|
||||
|
||||
The geometry is scalable through the interactive commands defined
|
||||
in the SAXSDetectorConstructionMessenger class. All the significant
|
||||
quantities, such as the setup (scattering) rotation angle, the position
|
||||
and size of all the volumes, as well as the phantom material can be
|
||||
set via macro commands.
|
||||
|
||||
Two macro files come with this example: saxs.in and saxs_slits.in.
|
||||
|
||||
In the saxs.in macro, the phantom is a cylinder with a diameter and
|
||||
a height of 10 mm made of a mixture of 80% fat and 20% water.
|
||||
In general, if the argument of /det/setPhantomMaterial command is 2,
|
||||
as in this case, the material is a biological tissue ("MedMat")
|
||||
defined as a mixture of fat, water, collagen and hydroxyapatite.
|
||||
The weight fraction of the mixture components can be set through commands
|
||||
/det/setComp0, /det/setComp1, /det/setComp2, /det/setComp3, respectively.
|
||||
The tissue form factor (including MI) is automatically calculated as a
|
||||
weighed sum of the form factors of the basis components.
|
||||
In this case, no slits are foreseen and the sensitive detector
|
||||
positioned 400 mm downstream of the phantom collects all the photons
|
||||
transmitted and scattered by the phantom, which is irradiated
|
||||
by a pencil beam with an energy of 20 keV.
|
||||
|
||||
In the saxs_slits.in macro, the phantom is again a cylinder with a
|
||||
diameter and a height of 10 mm. The phantom is made of a custom
|
||||
material ("CustomMat") whose density and composition is set through
|
||||
/det/setCustomMatDensity and /det/setCustomMatHmassfract,
|
||||
/det/setCustomMatNmassfract, /det/setCustomMatOmassfract commands,
|
||||
respectively. In general, a custom material can be defined by
|
||||
specifying the mass fraction of H, C, N, O, Na, P, S, Cl, K, and Ca via
|
||||
commands analogous to those mentioned above. In this case, the material
|
||||
composition corresponds to that of ammonium nitrate (NH4NO3).
|
||||
For a custom material, the user can provide the path of the file with
|
||||
the material form factor (with MI) through the /det/SetCustomMatFF
|
||||
command. As an example, the file myFF.dat contains the form factor of
|
||||
NH4NO3 measured by Harding in 1999.
|
||||
In this case the slits upstream and downstream the phantom
|
||||
are present. This setup is suitable for both monochromatic and
|
||||
polychromatic beams. To speed-up the simulation, a monochromatic
|
||||
photon beam was chosen, but a polychromatic beam can be easily defined.
|
||||
|
||||
2- PHYSICS
|
||||
|
||||
In this example, only electromagnetic processes and decays are considered.
|
||||
They are defined in a custom physics list that allows the user to
|
||||
choose among various EM PhysicsList constructors. In particular,
|
||||
by choosing G4EmPenelopePhysicsMI and setting fUseMIFlag as true,
|
||||
it is possible to enable the molecular interference effects. This
|
||||
is the default configuration.
|
||||
|
||||
3- ACTION INITALIZATION
|
||||
|
||||
SAXSActionInitialization class instantiates and registers to
|
||||
Geant4 kernel all user action classes. While in sequential mode
|
||||
the action classes are instatiated just once, by invoking the
|
||||
method: SAXSActionInitialization::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 is instantiated both thread-local and global.
|
||||
That's why its instance is created also in the method
|
||||
SAXSActionInitialization::BuildForMaster(), which is
|
||||
invoked only in multi-threading mode.
|
||||
|
||||
4- PRIMARY GENERATOR
|
||||
|
||||
The primary generator action class employs the G4GeneralParticleSource (GPS)
|
||||
generator. The primary beam has to be defined via the G4 built-in
|
||||
commands of the G4GeneralParticleSource in a input macro file.
|
||||
In particular, a photon beam directed toward the phantom must be defined
|
||||
to test the MI effects. The X-ray beam can be monochromatic or
|
||||
polychromatic, parallel or divergent.
|
||||
|
||||
5- EVENT AND DETECTOR RESPONSE
|
||||
|
||||
An event consists of the generation of a single particle which is
|
||||
transported through the phantom and then to the sensitive detector.
|
||||
|
||||
The interactions of the photons inside the phantom, and in particular,
|
||||
the scattering events, are scored in a dedicated ntuple through the
|
||||
SAXSSteppingAction class.
|
||||
|
||||
The hits of the particles on the sensitive detector positioned
|
||||
downstream of the phantom (SAXSSensitiveDetectorHit) are recorded
|
||||
in a dedicated ntuple through the SAXSSensitiveDetector class.
|
||||
|
||||
6- ANALYSIS:
|
||||
|
||||
The analysis tools are used to accumulate statistics.
|
||||
ntuple are created in SAXSRunAction::SAXSRunAction()
|
||||
constructor for the following quantities:
|
||||
|
||||
Ntuple1 (part) - Particles impinging on the Sensitive Detector (SD):
|
||||
- energy of the particles
|
||||
- position of the hits
|
||||
- momentum of the particles
|
||||
- time of the hits
|
||||
- type of impinging particles
|
||||
- ID number of the impinging particles
|
||||
- number of scattering events a primary had before hitting the SD
|
||||
- event number of the hits
|
||||
|
||||
Ntuple2 (scatt) - Interactions of photons inside the phantom:
|
||||
- ID of the process occurred
|
||||
(0-> transportation, 1->Rayleigh, 2->Compton, 3->Photoelectic)
|
||||
- initial energy of the particles
|
||||
- scattering angle
|
||||
|
||||
The ntuples are saved in the output file in the Root format.
|
||||
|
||||
When running in multi-threading mode, the ntuples accumulated
|
||||
on threads are automatically merged in a single output file.
|
||||
|
||||
The default output format is root. Two root scripts come with
|
||||
this example to analyze the output file: scattAnalysis.C and
|
||||
ADXRD.C. The first can be used to analyze the scatt ntuple, while
|
||||
the second can be used for part ntuple.
|
||||
|
||||
7- HOW TO RUN
|
||||
|
||||
- Execute saxs in the 'interactive mode' with visualization:
|
||||
% ./saxs
|
||||
and type in the commands line by line:
|
||||
Idle> /control/verbose 2
|
||||
Idle> /tracking/verbose 1
|
||||
Idle> ...
|
||||
Idle> /run/beamOn 10
|
||||
Idle> ...
|
||||
Idle> exit
|
||||
or it is possible to run a macro file (test.in is a simple macro where the
|
||||
primary beam is defined through the usual GPS commands):
|
||||
Idle> /control/execute test.in
|
||||
Idle> /run/beamOn 10
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
- Execute saxs in the 'batch' mode from macro files
|
||||
(without visualization)
|
||||
% ./saxs saxs.in [Ncores]
|
||||
% ./saxs saxs_slits.in [Ncores]
|
||||
Ncores (optional argument) is the number of threads the user wants to use in
|
||||
MT mode.
|
||||
|
||||
|
||||
The following paragraphs are common to all basic examples
|
||||
|
||||
A- VISUALISATION
|
||||
|
||||
The visualization manager is set via the G4VisExecutive class
|
||||
in the main() function in saxs.cc.
|
||||
The initialisation of the drawing is done via a set of /vis/ commands
|
||||
in the macro vis.mac. This macro is automatically read from
|
||||
the main function when the example is used in interactive running mode.
|
||||
|
||||
By default, vis.mac opens an OpenGL viewer (/vis/open OGL).
|
||||
The user can change the initial viewer by commenting out this line
|
||||
and instead uncommenting one of the other /vis/open statements, such as
|
||||
HepRepFile or DAWNFILE (which produce files that can be viewed with the
|
||||
HepRApp and DAWN viewers, respectively). Note that one can always
|
||||
open new viewers at any time from the command line. For example, if
|
||||
you already have a view in, say, an OpenGL window with a name
|
||||
"viewer-0", then
|
||||
/vis/open DAWNFILE
|
||||
then to get the same view
|
||||
/vis/viewer/copyView viewer-0
|
||||
or to get the same view *plus* scene-modifications
|
||||
/vis/viewer/set/all viewer-0
|
||||
then to see the result
|
||||
/vis/viewer/flush
|
||||
|
||||
The DAWNFILE, HepRepFile drivers are always available
|
||||
(since they require no external libraries), but the OGL driver requires
|
||||
that the Geant4 libraries have been built with the OpenGL option.
|
||||
|
||||
vis.mac has additional commands that demonstrate additional functionality
|
||||
of the vis system, such as displaying text, axes, scales, date, logo and
|
||||
shows how to change viewpoint and style.
|
||||
To see even more commands use help or ls or browse the available UI commands
|
||||
in the Application Developers Guide.
|
||||
|
||||
For more information on visualization, including information on how to
|
||||
install and run DAWN, OpenGL and HepRApp, see the visualization tutorials,
|
||||
for example,
|
||||
http://geant4.slac.stanford.edu/Presentations/vis/G4[VIS]Tutorial/G4[VIS]Tutorial.html
|
||||
(where [VIS] can be replaced by DAWN, OpenGL and HepRApp)
|
||||
|
||||
The tracks are automatically drawn at the end of each event, accumulated
|
||||
for all events and erased at the beginning of the next run.
|
||||
|
||||
B- USER INTERFACES
|
||||
|
||||
The user command interface is set via the G4UIExecutive class
|
||||
in the main() function in saxs.cc
|
||||
The selection of the user command interface is then done automatically
|
||||
according to the Geant4 configuration or it can be done explicitly via
|
||||
the third argument of the G4UIExecutive constructor (see exampleB4a.cc).
|
||||
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
|
||||
///\file "exoticphysics/ucn/.README.txt"
|
||||
///\brief Example ucn README page
|
||||
|
||||
/*! \page Exampleucn Example ucn
|
||||
|
||||
\author Peter Gumplinger - TRIUMF, Vancouver, Canada \n
|
||||
gum@triumf.ca
|
||||
|
||||
This example demonstrates how ultra-cold neutrons (UCN) propagate
|
||||
in a guide pipe and how this can be simulated in Geant4.
|
||||
|
||||
\section ucn_s1 INTRODUCTION
|
||||
|
||||
This example exhibits the functionality of UCN physics
|
||||
|
||||
|
||||
\section ucn_s2 GEOMETRY
|
||||
|
||||
The geometry consists of a single hollow pipe (cylinder)
|
||||
placed in a world.
|
||||
|
||||
Default World Size: G4Box - 1m x 1m x 100m
|
||||
|
||||
The pipe wall is made of G4_Ni while the world and, hence,
|
||||
the inside of the pipe is made from G4_Galactic
|
||||
|
||||
The G4UCNMaterialPropertiesTable properties are:
|
||||
\verbatim
|
||||
"REFLECTIVITY" = 1
|
||||
"DIFFUSION" = 0.1
|
||||
"FERMIPOT" = 252.0 neV
|
||||
"SPINFLIP"= 0.
|
||||
"LOSS" = 12.5e-5
|
||||
"LOSSCS" = 0.
|
||||
"ABSCS"= 4.49 // 1/v loss cross-section at room temp.
|
||||
"SCATCS" = 18.5 // (incoherent) "elastic" scattering cross-section
|
||||
\endverbatim
|
||||
|
||||
The MicroRoughnessParameters are:
|
||||
\verbatim
|
||||
Roughness correlation length w = 30nm
|
||||
Surface roughness b = 1nm
|
||||
# of angles theta_i in the look-up tables: 180
|
||||
# of energie bins in the look-up tables: 1000
|
||||
min. and max. values of theta_i: 0*degree and 90*degree
|
||||
min. and max values of Energy: 1neV and 1000neV
|
||||
# of angles theta_o in the look-up table calculation: 15
|
||||
# of angels phi_o in the look-up table calculation: 15
|
||||
angular cut: 0.01*degree
|
||||
\endverbatim
|
||||
|
||||
The default step limits in the vacuum is 1mm and maxTime is 100s
|
||||
|
||||
The simulation is in a G4UniformGravityField
|
||||
|
||||
\section ucn_s3 PHYSICS LIST
|
||||
|
||||
The ExUCNPhysicsList defines only
|
||||
- G4Neutron, G4Proton, G4Electron, G4AntiNeutrinoE, G4MuonPlus, G4MuonMinus and
|
||||
G4GenericIon
|
||||
|
||||
Through ExUCNExtraPhysics the following processes are instantiated:
|
||||
- G4StepLimiter
|
||||
- G4UserSpecialCuts
|
||||
|
||||
and in ConstructUCN()
|
||||
- G4UCNLoss
|
||||
- G4UCNAbsorption
|
||||
- G4UCNMultiScattering
|
||||
|
||||
\section ucn_s4 THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single ultra-colde neutron
|
||||
(uniform between 1neV and 100neV from the origin uniform into 4pi
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
|
||||
\section ucn_s5 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see ExUCN.cc)
|
||||
for interactive session.
|
||||
The initialisation of the drawing is done via the command
|
||||
|
||||
\verbatim
|
||||
/control/execute vis.mac
|
||||
\endverbatim
|
||||
|
||||
\section ucn_s6 TESTING
|
||||
|
||||
This example handles the program arguments in a new way.
|
||||
It can be run with the following optional arguments:
|
||||
|
||||
\verbatim
|
||||
% ExUCN [-m macro ] [-u UIsession] [-t nThreads]
|
||||
\endverbatim
|
||||
|
||||
The -t option is available only in multi-threading mode
|
||||
and it allows the user to override the Geant4 default number of
|
||||
threads. The number of threads can be also set via G4FORCENUMBEROFTHREADS
|
||||
environment variable which has the top priority.
|
||||
|
||||
Execute ExUCN in 'batch' mode from macro files e.g.
|
||||
|
||||
\verbatim
|
||||
% ExUCN -m ExUCN.in > ExUCN.out &
|
||||
\endverbatim
|
||||
|
||||
Execute ExUCN in 'interactive' mode with visualization e.g.
|
||||
|
||||
\verbatim
|
||||
% ExUCN
|
||||
Idle> type your commands, for example:
|
||||
Idle> run/beamOn 1
|
||||
...
|
||||
\endverbatim
|
||||
|
||||
\section ucn_s7 HISTOGRAMS
|
||||
|
||||
- no histograms for now
|
||||
*/
|
||||
@@ -0,0 +1,106 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
ExUCN
|
||||
-----
|
||||
Peter Gumplinger
|
||||
TRIUMF, Vancouver, Canada
|
||||
|
||||
This example exhibits the functionality of UCN physics
|
||||
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a single hollow pipe (cylinder)
|
||||
placed in a world.
|
||||
|
||||
Default World Size: G4Box - 1m x 1m x 100m
|
||||
|
||||
The pipe wall is made of G4_Ni while the world and, hence,
|
||||
the inside of the pipe is made from G4_Galactic
|
||||
|
||||
The G4UCNMaterialPropertiesTable properties are:
|
||||
|
||||
"REFLECTIVITY" = 1
|
||||
"DIFFUSION" = 0.1
|
||||
"FERMIPOT" = 252.0 neV
|
||||
"SPINFLIP"= 0.
|
||||
"LOSS" = 12.5e-5
|
||||
"LOSSCS" = 0.
|
||||
"ABSCS"= 4.49 // 1/v loss cross-section at room temp.
|
||||
"SCATCS" = 18.5 // (incoherent) "elastic" scattering cross-section
|
||||
|
||||
The MicroRoughnessParameters are:
|
||||
|
||||
Roughness correlation length w = 30nm
|
||||
Surface roughness b = 1nm
|
||||
# of angles theta_i in the look-up tables: 180
|
||||
# of energie bins in the look-up tables: 1000
|
||||
min. and max. values of theta_i: 0*degree and 90*degree
|
||||
min. and max values of Energy: 1neV and 1000neV
|
||||
# of angles theta_o in the look-up table calculation: 15
|
||||
# of angels phi_o in the look-up table calculation: 15
|
||||
angular cut: 0.01*degree
|
||||
|
||||
The default step limits in the vacuum is 1mm and maxTime is 100s
|
||||
|
||||
The simulation is in a G4UniformGravityField
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The ExUCNPhysicsList defines only G4Neutron, G4Proton, G4Electron,
|
||||
G4AntiNeutrinoE, G4MuonPlus, G4MuonMinus and G4GenericIon
|
||||
|
||||
Through ExUCNExtraPhysics the following processes are instantiated:
|
||||
|
||||
G4StepLimiter
|
||||
G4UserSpecialCuts
|
||||
|
||||
and in ConstructUCN()
|
||||
|
||||
G4UCNLoss
|
||||
G4UCNAbsorption
|
||||
G4UCNMultiScattering
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single ultra-cold neutron,
|
||||
uniform between 1neV and 100neV, from the origin and uniform
|
||||
into 4pi solid angle.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
|
||||
4- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main() for interactive session.
|
||||
The initialisation of the drawing is done via the command
|
||||
/control/execute vis.mac
|
||||
|
||||
5- HOW TO START ?
|
||||
|
||||
This example handles the program arguments in a new way.
|
||||
It can be run with the following optional arguments:
|
||||
% ExUCN [-m macro ] [-u UIsession] [-t nThreads]
|
||||
|
||||
The -t option is available only in multi-threading mode
|
||||
and it allows the user to override the Geant4 default number of
|
||||
threads. The number of threads can be also set via G4FORCENUMBEROFTHREADS
|
||||
environment variable which has the top priority.
|
||||
|
||||
- execute ExUCN in 'batch' mode from macro files e.g.
|
||||
% ExUCN -m ExUCN.in > ExUCN.out &
|
||||
|
||||
- execute ExUCN in 'interactive' mode with visualization e.g.
|
||||
% ExUCN
|
||||
....
|
||||
Idle> type your commands, for example:
|
||||
Idle> run/beamOn 1
|
||||
....
|
||||
|
||||
6- HISTOGRAMS
|
||||
|
||||
- no histograms for now
|
||||
Reference in New Issue
Block a user