136 lines
6.0 KiB
Plaintext
136 lines
6.0 KiB
Plaintext
$Id: README,v 1.9 2003/12/04 11:01:58 guatelli Exp $
|
|
-------------------------------------------------------------------
|
|
|
|
=========================================================
|
|
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
|
=========================================================
|
|
|
|
xray_fluorescence
|
|
-----------------
|
|
XrayFluo is an advanced Geant4 example based on a realistic simulation of
|
|
a test beam.
|
|
The aim of the test beam was to characterize the response function of various
|
|
X-Rays detectors used to measure fluorescence emissions from samples composed
|
|
of different materials irradiated with a monochromatic beam of photons.
|
|
In this example the geometry of the detector is simplified:
|
|
one single pixel is used, since the test beams has used monolithic detectors.
|
|
The response function is tabulated for different values of incident
|
|
energy and stored in the file response.dat and SILIresponse.dat.
|
|
At the moment, two kinds of detectors are available: HPGe and Si(Li).
|
|
The sample, a simple box whose material can be selected, can be irradiated
|
|
with different particles, with different spectra for the incident energy and
|
|
with different shapes of the primary generator.
|
|
Apart from the sample and the detector there are two diaphragm reproducing
|
|
those used to collimate the incident beam during the test beam.
|
|
|
|
The aim of this advanced example is to illustrate the use of particle
|
|
generation and analysis schemes available in Geant4:
|
|
|
|
- the generation of particles is done via the G4ParticleGun: the example
|
|
shows how to use it in order to obtain a beam of circular section or
|
|
a particle source isotropic in space
|
|
|
|
_ the example includes the possibility to shoot particles according to a
|
|
given energy spectrum: the files B_flare.dat, C_Flare.dat and M_flare.dat
|
|
store the spectra of photons during solar flares, the files
|
|
mercury2_flx_solmax.dat and mercury_flx_solmin.dat contain the spectra of
|
|
protons respectively during solar maximum and solar minimum conditions, and
|
|
merc2_flx_alp_max.dat merc_flx_alp_min.dat contain the spectra of alpha
|
|
particles again respectively during solar maximum and solar minimum
|
|
conditions.
|
|
|
|
- histograming facilities are presently provided for the Linux environment
|
|
by using the AIDA3 interfaces.
|
|
The AIDA compliant version has not been tested by the developers and is
|
|
here as a example of "forward compatibility" on how to use analysis.
|
|
|
|
In order to be able to use any of these packages, prior installation is
|
|
necessary and a number of environment variables will have to be set.
|
|
|
|
-------------------------------------------------------------------------
|
|
----> 2.SET-UP
|
|
|
|
|
-example enviroment with the compiler 3.2
|
|
-a standard Geant4 example GNUmakefile is provided |
|
|
|
|
setup with: |
|
|
compiler = gcc-3.2
|
|
G4SYSTEM = linux-g++ |
|
|
|
|
The following environment variables need to be set: |
|
|
|
|
G4LEDATA: points to low energy data base - G4EMLOW2.2 |
|
|
|
|
setup for analysis with AIDA 3.0/Anaphe 5.0.5 for user with account |
|
|
on lxplus:
|
|
|
|
|
setenv G4ANALYSIS_USE 1
|
|
source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/scripts/setupAnaphe.csh
|
|
setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/scripts/ |
|
|
|
|
Please take a look to the Anaphe/Lizard web page |
|
|
http://anaphe.web.cern.ch/anaphe
|
|
for more info
|
|
-------------------------------------------------------------------------
|
|
To execute a sample simulation with visualisation of tracks
|
|
reaching the detector run:
|
|
|
|
XrayFluo
|
|
|
|
execute command "/control/execute xxxxx.mac"
|
|
|
|
|
|
If the analysis options are set, histograms will
|
|
automatically stored in the corresponding files (hbook or XML)
|
|
|
|
2. Detector description
|
|
|
|
The telescope and detector geometry is defined in
|
|
XrayFluoDetectorConstruction.cc
|
|
|
|
3. Detector peculiar properties are described in XrayFluoSiLiDetectorType and
|
|
XrayFluoHPGeDetectorType, both derived from XrayFluoVDetectorType. Other
|
|
detector types can be added, creating other implementations of
|
|
XrayFluoVDetectorType objects.
|
|
Detector type selection is made in XrayFluoDetectorConstruction, and can be
|
|
modified trough /apparate/detector command of the UI.
|
|
Other commands (apparate/sample /apparate/sampleGranularity
|
|
/apparate/GrainDiameter) are present to simulate sample granulosity:
|
|
grains are spheres, disposed in a compact cubic structure, i.e superipmposition
|
|
of planes of maximum density with ABC ABC path. The fundamental cell is of type
|
|
cubic with centered-faces.
|
|
|
|
4. Physics processes
|
|
|
|
The physics processes are in XrayFluoPhysicsList.cc
|
|
The main process in this example is fluorescence emission from the sample.
|
|
|
|
5. Event generation
|
|
|
|
This is done using the G4ParticleGun with some modifications. See
|
|
XrayFluoParticleGeneratorAction.cc
|
|
|
|
6. Analysis
|
|
|
|
At present the analisys is provided by any AIDA-3.0 compliant analysis system.
|
|
In the example the Anaphe toolkit (version 5.0.5) is used.
|
|
|
|
By setting visPlotter variable in XrayFluoAnalysisManager to true,
|
|
it is possible to display the simulated output of the detector while
|
|
simulation is in progress. Graph window is updated every 1000 events.
|
|
|
|
The example provides also a simple Python file used to display
|
|
histograms with Lizard 3.0.0.x
|
|
|
|
Various commads, with help, are available for Geant4 UI.
|
|
/analysis/outputFile and /analysis/fileType respectively for
|
|
changing the name and the type (xml or Hbook) of the file in wich results
|
|
are saved.
|
|
If these commends are used, to make the changes effective, another
|
|
command, /anaysis/update, must be executed.
|
|
|
|
NOTE: if a file named xrayfluo.hbk (default name) is present, it
|
|
will be deleted, even if /analysis/outputFile command is issued
|
|
before any run.
|
|
|
|
---- Last modified Susanna Guatelli 3/12/2003======= |