CosmicRays.org
Cosmic Ray Telescope Muon Detector
Counting Particles from Space
home detector vacuum power supply electronics roadmap&links Tony

geiger tubes rays rays#2 cutoff rigidity scintillation particles αβγ

cloud chamber spark chamber CERN positrons graphs neutrinos voyager1

Sergei Krikalev CORSIKA GEANT4 MISC Artemia

commissioning cockroft-walton adjustable cockroft-walton Simple HV supply  

cern keyring  
Geiger-Müller Detector/Tube Pages: Neon Bulb LED,SCR SCR Coincidence  
  MUON DETECTOR WITH GEIGER TUBES  

GEANT4 - Particle Physics Simulation

GEANT4 INSTALLATION | SIMULATION

GEANT4 is a simulation package written in C++ to simulate high energy particle interaction with matter. For an overview of what can be done, has been done and more, visit the GEANT4 HOME PAGE and for a video and slide workshop visit Introduction to Geant4

These GEANT4 pages are intended to provide some brief installation directions, and a quick guide on how to use it, i.e. how to get first results.

INSTALLATION on DEBIAN SARGE

First you need to compile and install the CLHEP (CERN Library for High Energy Physics):

muon@hep:/hep/$ ll
total 5348
-rw-r--r--  1 muon muon 5456691 2006-03-19 21:51 clhep-1.9.2.2.tgz
muon@hep:/hep/$ tar xzf clhep-1.9.2.2.tgz
muon@hep:/hep/$ ll
total 5348
drwxr-xr-x  3 muon muon    4096 2006-03-19 21:51 1.9.2.2
-rw-r--r--  1 muon muon 5456691 2006-03-19 21:51 clhep-1.9.2.2.tgz
muon@hep:/hep/$ cd 1.9.2.2
muon@hep:/hep/$ ./configure
muon@hep:/hep/$ make
muon@hep:/hep/$ make check
muon@hep:/hep/$ make install
include files in: /usr/local/include/CLHEP
library files in: /usr/local/lib/
Well, we've compiled and installed the CERN library, so now we're ready to compile and install the GEANT4 package:
muon@hep:/hep/geant4$ ll
total 13952
-rw-r--r--   1 muon muon 14254509 2006-03-20 08:50 geant4.8.0.p01.gtar.gz
muon@hep:/hep/geant4$ ll
total 13952
drwxr-xr-x  18 cap  1196     4096 2006-03-23 02:04 geant4.8.0.p01
-rw-r--r--   1 muon muon 14254509 2006-03-20 08:50 geant4.8.0.p01.gtar.gz
muon@hep:/hep/geant4$ cd geant4.8.0.p01
muon@hep:/hep/geant4/geant4.8.0.p01# ./Configure -build
Now the GEANT4 configuration will ask you some questions. Those are pretty straightforward - actually for the first installation it is safe to accept the default values.

One things that must be customized are the directories for the data files. Download the PhotonEvaporation, RadiativeDecay, G4EMLOW, G4NDL and G4ELASTIC data files from the GEANT4 home page, save them in e.g. /hep/geant4/geant4.8.0.p01/data/ and unpack them. Now tell the GEANT4 configurator where to find the data files directories (the version numbers might be different):
Please, specify default directory where ALL the Geant4 data is installed:
 G4LEVELGAMMADATA:              /hep/geant4/geant4.8.0.p01/data/PhotonEvaporation2.0
 G4RADIOACTIVEDATA:             /hep/geant4/geant4.8.0.p01/data/RadiativeDecay3.0
 G4LEDATA:                      /hep/geant4/geant4.8.0.p01/data/G4EMLOW3.0
 NeutronHPCrossSections:        /hep/geant4/geant4.8.0.p01/data/G4NDL3.7
 G4ELASTICDATA:                 /hep/geant4/geant4.8.0.p01/data/G4ELASTIC1.1
You will be asked about customizing these next.
Here are some other configuration things where I didn't accept the default:
  G4UI_BUILD_XM_SESSION
  G4UI_USE_XM

  Specifies to include and use the XM Motif based user interfaces.
  The XM Motif extensions are required to activate and build this
  driver.
[n] y

  G4VIS_BUILD_OPENGLX_DRIVER
  G4VIS_USE_OPENGLX

It is an interface to the de facto standard 3D graphics library,
OpenGL. It is well suited for real-time fast visualization
and prototyping. The X11 version of the OpenGL libraries is
required.
[n] y

  G4VIS_BUILD_OPENGLXM_DRIVER
  G4VIS_USE_OPENGLXM

It is an interface to the de facto standard 3D graphics library,
OpenGL. It is well suited for real-time fast visualization
and prototyping. The X11 version of the OpenGL libraries and
the Motif Xm extension is required.
[n] y

  G4VIS_BUILD_RAYTRACERXX_DRIVER
  G4VIS_USE_RAYTRACERX

Allows for interactive ray-tracing graphics through X11.
The X11 package is required.
[n] y

  G4VIS_BUILD_VRML_DRIVER
  G4VIS_USE_VRML

These driver generate VRML files, which describe 3D scenes to be
visualized with a proper VRML viewer.
[n] y
These are for visualization of the simulation and most of them require OpenGL to be installed on your system. If you run a desktop enviroment, you most likely have OpenGL installed by default anyway. The VRML_DRIVER option allows to export the simulation as VRML world. That WRL file can be viewed, e.g. with VRMLview http://www.sim.no/products/SIM_VRMLview/

./Configure -install
This will take a while, e.g. on a 2.4GHz AMD64 machine about an hour, if I remember correctly.

Setting the environment variables:

muon@hep:/hep/geant4/geant4.8.0.p01$ ./env.sh
On this machine the G4SYSTEM=Linux-g++
On this machine the G4INSTALL=/hep/geant4/install/src/geant4
On this machine the G4LIB=/hep/geant4/install/lib/geant4
On this machine the G4LEVELGAMMADATA=/hep/geant4/geant4.8.0.p01/PhotonEvaporation
On this machine the G4RADIOACTIVEDATA=/hep/geant4/geant4.8.0.p01/RadiativeDecay
On this machine the G4LEDATA=/hep/geant4/geant4.8.0.p01/G4EMLOW3.0
On this machine the NeutronHPCrossSections=/hep/geant4/geant4.8.0.p01/G4NDL3.8
On this machine the G4ELASTICDATA=/hep/geant4/geant4.8.0.p01/G4ELASTIC1.1
On this machine the CLHEP_BASE_DIR=/usr/local
On this machine the CLHEP_INCLUDE_DIR=/usr/local/include
On this machine the CLHEP_LIB_DIR=/usr/local/lib
On this machine the CLHEP_LIB=CLHEP
On this machine the G4UI_BUILD_XM_SESSION=1
On this machine the G4UI_USE_XM=1
On this machine the G4VIS_BUILD_OPENGLX_DRIVER=1
On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=1
On this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=1
On this machine the G4VIS_BUILD_VRML_DRIVER=1
On this machine the G4VIS_USE_OPENGLX=1
On this machine the G4VIS_USE_OPENGLXM=1
On this machine the G4VIS_USE_RAYTRACERX=1
On this machine the G4VIS_USE_VRML=1
On this machine the G4LIB_BUILD_ZLIB=1
On this machine the G4LIB_USE_ZLIB=1
On this machine the G4LIB_BUILD_STATIC=1
On this machine the G4LIB_USE_GRANULAR=1
On this machine the G4UI_USE_TCSH=1
G4WORKDIR will be set to HOME/geant4=/home/cap/geant4
Well, this didn't work on my linux box, so I replace the "On this machine the" with "export" and copied this into a shell script files, e.g.:
#!/bin/sh
export G4SYSTEM=Linux-g++
export G4INSTALL=/hep/geant4/install/src/geant4
export G4LIB=/hep/geant4/install/lib/geant4
[...etc...]
Run this shell script before doing anything with GEANT4, otherwise your program won't compile.

Another issue I encountered when compiling the examples or compiling my own muon detector simulation model:
muon@hep:/hep/geant4/geant4.8.0.p01/crorg1$ make
ls: CLHEP_BASE_DIR--UNDEFINED: No such file or directory
mkdir: cannot create directory `..//tmp/Linux-g++/crorg1': Permission denied
make: *** [..//tmp/Linux-g++/crorg1/exe/crorg1.d] Error 1
The solution:
muon@hep:/hep/geant4/install/src/geant4/config# pico architecture.gmk
Add
G4SYSTEM=Linux-g++
at the top of of the architecture.gmk file.


Last-Modified: Mon, 27 Mar 2006 18:34:25 GMT

Be very careful when handling high voltages!
cosmicrays.org cannot be held liable for damage of any sort!

Join the Particle Detector - Maillist now! Click Here!

www.cosmicrays.org    ©2003-2008 www.captain.at
No reproduction, distribution, publishing or transmission of the copyrighted materials at this site is permitted.