How to create an interface between Sandbox.UrQMD Fortran code and GEANT4 toolkit
--
KhaledAbdelWaged - 06-Feb-2012
Introduction
Geant4
use many transport codes to generate non-elastic reactions in macroscopic targets. The motivation was to provide a satisfactory level of description of final state hadron production for accurate and comprehensive simulations of particle detectors used in modern particle and nuclear physics experiments.
In
Geant4
there are mainly 4 codes which are frequently applied for simulating N-body collisions within the hadronic cascade models, namely,
Binary
,
Bertini
,
FTF and QGS
. The
Geant4
Binary and Bertini cascade models implement large resonance collision term but multiparticle production through string formation and fragmentation is not considered, which sets the upper limit of model applicability in nucleon induced reactions to about 5
GeV/c
incident momentum. In contrast to
Binary and
Bertini cascade models,
FTF and
QGS, takes multiparticle production into account, to handle interaction for particles above about 15-20
GeV/c
. For a reliable description of
secondaries
produced in high and low energy domains,
Geant4
invoke
Binary (Bertini) in the
FTF(QGS) models. The corresponding hybrid model is called
FTFB(QGSB)
.
Motivation
To improve the simulation, it is worthwhile to supplement
Geant4
toolkit with a single transport code which takes into account both resonance and multiparticle production. The
Sandbox.UrQMD
(Ultra relativistic Quantum Molecular Dynamics) model, which is first released in 1998, is designed to simulate (ultra)relativistic heavy ion collisions in a wide energy range from
Bevalac
and
SIS
up to
AGS
,
SPS
and
RHIC
. Thanks to the
Sandbox.UrQMD
collaborators, the
Sandbox.UrQMD
is provided as open source Fortran code on its website.
What the interface may offer?
Geant4-Sandbox.UrQMD interface offers interactions of
Protons
,
neutrons
,
pions
and
kaons
(and their
antiparticles
) as well as light and heavy
ions
interactions with matter. It gives type, mass, energy, and momentum of all
secondary particles
that are created in matter. Similar to
CORSIKA-Sandbox.UrQMD interface
, the upper energy limit is recommended to be about several 100
GeV
. For the simulation, the appropriate
Sandbox.UrQMD cross sections (for determining the
mean free path
between the interactions) are used.However, the probability for an interaction with matter at a given point is computed by the
Geant4 cross sections classes
.
This page provides installation requirements and instructions of the
Geant4
-
Sandbox.UrQMD
interace.This interface is developed by
Khaled Abdel-Waged et al., and sponsered by
King Abdul Aziz City for Science and Technology
/
National Center for Mathematics and Physics
under the contract number
31-465.
Software installation requirements
The
Geant4
interface to
Sandbox.UrQMD-1.3cr
Fortran code uses the following software tools and packages:
- Sandbox.UrQMD-1.3cr
event generator (in its original Fortran implementation)
- Geant4
version: ver.9.3.p01
or higher
The interface and original
Sandbox.UrQMD-1.3cr
source code have been compiled and tested using:
- gcc 4.1.2
with g77 (FORTRAN77
and GNUmake
)
Operating systems used for this test is :
Red Hat Linux
4.1.2-64
Overall interface design
The use of
Sandbox.UrQMD-1.3cr
physics in
Geant4
has resulted in the introduction of a new event model (
G4UrQMD1_3Model).
The general steps in the logical sequence are determined by:
- Instantiation of the G4UrQMD1_3Model process.
- Generation of interaction events.
Instantiation of G4UrQMD1_3Model
Upon instantiation of
Geant4
-
Sandbox.UrQMD
interface, the class constructor initialises variables associated with the class and the
Sandbox.UrQMD-1.3cr
FORTRAN model. The latter involves initialisation of a series of common-block variables from the C++ code, mimicking the initialisation process performed by the FORTRAN code when used in standalone mode.
Generation of interaction events
In order to generate interaction events, the
ApplyYourself
member function of
Geant4
is executed. The details of the projectile and target are determined (e.g.,
mass number
,
charge
, projectile energy…).
The FORTRAN subroutine
Sandbox.UrQMD() is called from
ApplyYourself
. Upon completion of the
Sandbox.UrQMD event, the information on the
secondary
particles generated are transferred to the product vector.
If no data exist for the specific projectile-target combination, a
“Warning” is declared, and the run is stopped.
Class structure for model
The interface comprises
G4UrQMD1_3Model class, which is derived from
G4HadronicInteraction
, and is defined within the
Geant4
user
physics list
if access to
UrQMD1_3physics is required. It controls initialisation of
Sandbox.UrQMD-1.3cr
through common block variables.
A small FORTRAN subroutine is included with the
G4UrQMD distribution. This is required to ensure that block data initialisation in
G4UrQMD1_3Model is performed (through FORTRAN EXTERNAL statements). Specifically the new FORTRAN subroutine is:
- g4urqmdblockdata.f
Installing Sandbox.UrQMD-1.3cr and building the libG4hadronic_urqmd13 library
Before installation, please first read
architecutre.gmk file in Geant4 subdirectory
../../config/sys which defines all the Geant4 paths.
Copy the file
g4urqmd-1.3cr.2012.tar to the directory (e.g.):
cd $G4INSTALL/source/processes/hadronic/models
If you are not successfull to install files into the directory "models" because of "permission denied", then please try to copy the files in $G4INSTALL/examples/extended/hadronic
Untar
the files:
tar –xvzf g4urqmd-1.3cr.2012.tar
This creates the
UrQMD13 directory, which contains:
- a subdirectory UrQMDsrc/ containing Sandbox.UrQMD-1.3cr
( to be downloaded by the user himself)
- a subdirectory include/ containg (G4UrQMD1_3Interface.hh & G4UrQMD1_3Model.hh)
- a subdirectory src/ containing (G4UrQMD1_3Model.cc)
Execute the script patch_make_and_install.csh from the directory
UrQMD13. This executes a patch script and compiles all the relevant FORTRAN files in
UrQMD13src, and copies the object files to the directory:
$G4TMP/$G4SYSTEM/G4hadronic_UrQMD13
Change directory and execute make on the C++ source:
cd ..
make
This will build the library:
$G4LIB/$G4SYSTEM/libG4hadronic_UrQMD13.a
Ensure that the
GNUmakefile for you application (in
UrQMD13 directory) includes the following lines:
CPPFLAGS += -I$(G4BASE)/.../.../UrQMD13/include
The main () program
Geant4
does not provide the
main()
. In the
main()
, one has to construct
G4ProcessManager
, in order to process a run for the interface.
Ensure that the
GNUmakefile for you application (in
“main” directory) includes the following lines:
CPPFLAGS += -I$(G4BASE)/.../.../.../UrQMD13/include
EXTRALIBS += -L$(G4INSTALL)/lib/$(G4SYSTEM)–lG4hadronic_UrQMD13
EXTRA_LINK_DEPENDENCIES:= $(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_UrQMD13.so
$G4INSTALL)/lib/$(G4SYSTEM)/ libG4hadronic_UrQMD13.so:
cd $(G4BASE)/.../.../.../UrQMD13; $(MAKE)
Download G4UrQMD-1.3cr.2012.tar
*
G4UrQMD-1.3cr.2012.tar