/*! @page g4setupb Geant4 Installation
Previous: @ref sg4setup
Up: @ref g4setup
Next: @ref ssg4setup2
@section ssg4setup Additionnal Libraries
As many environment variables will have to be set, it is better to create a script file which would collect all of them. Let us refer at it as the SetEnv.sh script file. One can also copy the environment variables directly in the bash_profile, but it is more clear to have them separately. Each time one would start a work on the simulation one should first execute the SetEnv.sh script.
\anchor lbclhep
The class libraries for high energy physics can be downloaded from the CLHEP website. The installation is well detailled on the web. For the version we used the installation procedure can be described as follow
*-# Download a
clhep-version.tar.gz file. Recommended: http://cern.ch/clhep/clhep-1.9.1.2.tgz because the 2.0.x.x release are not yet perfectly working.
*-# Create a directory CLHEP-VERSION/ and copy the clhep-version.tar.gz file in it.
*-# Untar and unzip the file with tar -xzfv clhep-version
*-# Create a work directory CLHEP out of the source directory, for example /home/user/CLHEP
*-# Go to CLHEP-VERSION/CLHEP directory and execute the following commands:
./configure --prefix=/home/user/CLHEP
(Note that files will be installed under /usr/local if you do not
specify a prefix.)
make
(Build temporary copies of libraries and executables.)
make check
(Run the tests.)
make install
(Copy libraries, headers, executables, etc. to relevant
subdirectories under .)
*-# \anchor clheplibs Set environement variable to indicate where the libraries are located, and the reference name of the library. To access the correct values, execute the following
cd CLHEP/bin
./clheplib
add the CLHEP/lib directory to the list of library paths (e.g)
export LD_LIBRARY_PATH=:$LD_LIBRARY_PATH:/home/user/CLHEP/lib
and export the name of the library (e.g)
export CLHEP_LIB=CLHEP-1.9.1.2
Also set
export CLHEP_BASE_DIR=/home/user/CLHEP/
It is recommended to set those variables in the SetEnv.sh file, which would be dedicated to store and set all the environment variables of the simulation. It is important execute it before the compilation of \gf, which needs to have those variables set to run.
Geant4 can support many visualisation application and the user is free to chose the one which he prefers to use.
NB: When one has no root privileges, it is better to create a directory "CLHEP" appart the directory "CLHEP-version" where the downloaded file is extracted. The bin and libraries will be then store in the "CLHEP" directory. The same procedure is used below.
\anchor lbmesa
For the visualisation in three dimensions engine is required. The usual engine is OpenGL and one should check that it is correctly installed on the system. If not, Mesa is a free engine that can be downloaded easily, together with a demos package, at Mesa3D website. The instalation is done as follow
- Go to the top directory of Mesa and execute the command
make linux-x86
(or the name of the system configuration)
- Update the library environnement variable with the Mesa/lib directory
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/Mesa/lib
- The demos are installed in the Mesa/progs/demos directory, and one can run one of them to test if Mesa is well installed.
\anchor lbvrml
Geant4 can export the geometry in the virtual reality modeling language (VRML) format. The freewrl VRML viewer can be installed as a web browser plugin or ran in stand alone mode by a script.
First one should download freetype which is a nice font software used by freewrl. It not present on the computer, download it, untar, create a "/home/user/freetype directory and enter the following commands in the code directory freetype-version:
*- ./configure /home/user/freetype (or /usr/local, or the directory to output the libraries)
*- make
*- make install (for root privilege only, otherwise use the standalone script.)
*.
Then download freewrl and open the INSTALL.HTML file. The installation is done in three steps:
* - Edit vrml.conf and adjust it to the system, in particular the output libraries directory can be set to /home/user/freewrl (for example) and the freetype2 libraries directory might be corrected. Moreover the lines refering to Java application could be commented out.
* - perl Makefile.PL
* - make install
*.
Note that the library libjs.so shall be downloaded if necessary. It can be copied in the freewrl-version/blib/arch/auto/VRML/JS/ directory.
If one does not have the root privileges one can simply use the
runme-standalone script. It is however a bit less efficient.
A better application is OPEN VRML.
*- ./configure /home/user/OpenVRML
*- make
*- make check
*- make install
\anchor lbdawn
Danw is a usefull application, whih allow to generate *.eps files from three dimensional OpenGL pictures. The installation is done easily following the danw tutorial website intructions. The following environment variables should be defined:
export G4DAWN_NAMED_PIPE=1
export G4DAWN_GUI_ALWAYS=1
export G4DAWN_GUI_ALWAYS=1
export G4VIS_USE_DAWN=1
export G4DAWN_NAMED_PIPE=1
export DAWN_PS_PREVIEWER=/usr/X11R6/bin/gv
\anchor lbroot
For histogramming and generating ntuples or trees, Root is probably the most convenient tool. It also provides a convenient interface and the manipulation and fitting of histograms are some of it's important feaures. An comprehensive documentation is available in the web page. The LEMuSR simulation requires Root to be installed.
\anchor lbcomment
The new environement variables can be define in the bash file for example, in order to have them defined by default for any logging.
Those libraries come with many tests and it's is recommended to run some of them before going any further.
<
*/