Installation

The OLYMPUS Monte Carlo is based on GEANT4.

The current version used is GEANT4.9.3. GEANT4 is available from CERN but it also requires some other packages to be available. So it is necessary to install GEANT4

Installing GEANT4

For: Mac OS X, version 10.5.8 & SL5: Scientific Linux SL release 5.4 (Boron)

1. Prepare your system: build tools (X11 on Mac) and compiler (at least gcc version 4.0.1). At this point it is difficult to be more specific . You will see.

2. Install CLHEP (usually this part does not create any trouble), for both OSs:

(default prefix is /usr/local)
make
make check
make install

3. Geant4.9.3 (other versions are not checked)

foreach i (`ls *.gz`)
echo $i; tar zxvf $i
end

./Configure -build

it is the last chance to change the configuration file. After pressing ENTER button, take a big coffee ...

If you made a mistake before, it is better to start the Geant installation from the very beginning, e.g. from removing your untared Geant directory and untar the Geant tarball geant4.9.3.p01.tar again .

You should find the following information:
"---------------------------------------------------
The Geant4 toolkit installation was found.
The files env.[c]sh will be copied to your current directory.
For setting Geant4 environments you should make:
source env.csh
or
. env.sh
It will also check G4WORKDIR setting and set it to your HOME if needed.
You can use these files also for further modifications (adding your own environments).

---------------------------------------------------
"
and two scripts: env.csh, env.sh . Use a proper one .

4. As the last point, it is very convenient to initialize all necessary software before your work with OLYMPUS MC, including Root, Geant and Clhep parts in one go. The script can looks like:
a) setup.sh for Mac OS:
------------
# CLHEP
export DYLD_LIBRARY_PATH=<PRIVATE_CLHEP_INSTALLATION_DIRECTORY>/lib
# GEANT
source <GEANT_SOURCE_DIR>/geant4.9.3.p01/env.sh
# Root:
ROOTSYS=<ROOT_INSTALLATION_DIR>/root_v5.27.04/root
export PATH=$ROOTSYS/bin:$PATH
export DYLD_LIBRARY_PATH=$ROOTSYS/lib:$DYLD_LIBRARY_PATH

------------

b) setup.sh for SL5 (for zsh):
------------
# CLHEP
export LD_LIBRARY_PATH=<PRIVATE_CLHEP_INSTALLATION_DIRECTORY>/lib
# Geant:
source <GEANT_SOURCE_DIR>/geant4.9.3.p01/.config/bin/Linux-g++/env.sh
# Root:
ROOTSYS=<ROOT_INSTALLATION_DIR>/root
export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:/opt/products/lib/:$LD_LIBRARY_PATH

------------

use the script as:
. setup.sh