Warning | ||
---|---|---|
| ||
This page contains old instructions that are kept for reference purposes only. Please refer to the Simulation Software Distribution page for a much easier way of building slic and its dependencies. |
The SLIC full simulator program requires the setup of 8 different software packages, not counting the required build tools.
...
Tools
You need the following command line tools.
- cvs
- g++
- make
- gzip
- tar
- javac
If your system is missing one of these, then you have serious problems anyways!
- (gcc 3.2 and 3.3 seem to work okay. I doubt that 3.4 works.)
- make
- gzip
- tar (that's the GNU version)
If you are missing one of these...are you sure that you're running Linux?
Any recent versions of these programs should do okay.
You also need a Java VM, for running ant.
- java (to run ant)
Also, wget is mighty useful Also, for retrieving files via http, wget is useful.
Work Area
The SLIC package and its dependencies will be installed into a common work area.
...
Info |
---|
Possibly some of these software packages already exist on your system. |
Tip |
---|
The same shell window should be used throughout the installation process in order to preserve the environment variables. |
CLHEP
CLHEP has installation instructions for version 1.9 and up. But you should not need them to setup the package.
...
Package Versions
Currently, the SLIC, LCDD, LCIO, GDML, and LCPhys CVS heads should all work fine together.
The following is a recent, tested configuration.
No Format |
---|
|
...
slic |
...
v1r12p0 lcio v1r5p0_slic lcdd v1r8p2 lcphys v1r0p1 gdml 2.3.0 geant4 7.1.0 clhep 1.9.2. |
...
No Format |
---|
tar -zxvf clhep-1.9.2.0.tgz
|
...
No Format |
---|
cd 1.9.2.0/CLHEP
|
...
No Format |
---|
./configure --prefix=`cd ../..; pwd` --disable-shared
|
...
No Format |
---|
make
make install
|
...
No Format |
---|
export CLHEP_BASE_DIR=$sim_work/clhep
|
1
xerces 2.6.0
|
The Geant4 version must be 7.1.x or SLIC will not compile.
CLHEP
CLHEP has installation instructions (http://wwwasd.web.cern.ch/wwwasd/lhc\+\+/clhep/INSTALLATION/newCLHEP-install.html) for version 1.9 and up. But you should not need them to setup the package.
- Create a working directory for CLHEP and go into it.
No Format mkdir clhep cd clhep
- Download the CLHEP tarball.
No Format wget http://cern.ch/clhep/clhep-1.9.2.0.tgz
- Unzip to your work directory.
No Format tar -zxvf clhep-1.9.2.0.tgz
- Change to CLHEP directory.
No Format cd 1.9.2.0/CLHEP
- Configure the build. (Now go get some coffee.)
No Format ./configure --prefix=`cd ../..; pwd` --disable-shared
- Build the library and install it. (Get some more coffee.)
No Format make make install
- Add the following to setup.sh
No Format export CLHEP_BASE_DIR=$sim_work/clhep
Now that the CLHEP dependency is satisfied, you should be able to install Geant4.
Geant4
Geant4 is probably the most difficult application to install of SLIC's dependencies, because there are a lot of options, it takes a long time, and it requires several different make commands. I will describe a minimal installation procedure with support for built-in UI and visualization drivers. You can always update the libraries later if you decide to change these settings.
Warning |
---|
Due to limitations of GDML, Geant4 must be compiled with granular libraries. This should be fixed soon. |
Info |
---|
These procedures are geared towards setting up a minimal Geant4 installation for SLIC. If you want a full Geant4 setup, I recommend running the Configure script. It will walk you through setting up a complete enviroment. |
- Return to the work dir, create a Geant4 subdir and go into it.
No Format cd $sim_work mkdir geant4 cd geant4
- Download the Geant4 tarball.
No Format wget http://geant4.cern.ch/geant4/source/source/geant4.7.1.tar.gz
- Unzip it.
No Format tar -zxvf geant4.7.0.p01.tar.gz
- Set the following variables in setup.sh. (You should not need to run Configure.)
No Format export G4INSTALL=${sim_work}/geant4/geant4.7.1 export G4SYSTEM=Linux-g++ export G4LIB_USE_GRANULAR=1
- If you want to enable OpenGL-based visualization, set these variables, too.
No Format export G4VIS_BUILD_OPENGLX_DRIVER=1 export G4VIS_USE_OPENGLX=1 export OGLHOME=/usr
- Refer to the Application Guide Section on Enviroment Variables for additional enviroment variables that you might want to set.
- Go into the Geant4 base dir.
No Format cd geant4.7.1
- LCPhys requires that a special flag is set in order to use the latest Kaon model. At the end of config/architecture.gmk, insert the following line exactly as it appears below:
Hopefully, this hack will be remedied soon!No Format CPPFLAGS += -DG4BERTINI_KAON
- Build the libraries, which will be placed at $G4INSTALL/lib/Linux-g++. (This could take up to a few hours depending on your machine.)
No Format cd source make
- Install the headers into the $G4INSTALL/include directory.
No Format make includes
- Build the physics list libraries. These will go into the default location at $G4INSTALL/lib/plists/Linux-g++.
No Format cd ../physics_lists/hadronic make
Hopefully, Geant4 has been installed successfully, and you don't have too many more gray hairs! (Did you remember to set G4BERTINI_KAON? LCPhys won't work without it.)
LCPhys
SLIC requires a special physics list written by Dennis Wright for Linear Collider physics.
- Go back to the work dir
Now that the CLHEP dependency is satisfied, you should be able to install Geant4.
Geant4
Geant4 is probably the most difficult application to install of SLIC's dependencies, because there are a lot of options, it takes a long time, and it requires several different make commands. I will describe a minimal installation procedure with support for built-in UI and visualization drivers. You can always update the libraries later if you decide to change these settings.
Warning |
---|
The default Geant4 library settings for WIN32 are granular and static. You may choose other settings, but this could require changes in installation settings "down the line" that I may not mention. |
Info |
---|
These procedures are geared towards setting up a minimal Geant4 installation for SLIC. If you want a full Geant4 setup, I recommend running the Configure script. It will walk you through setting up a complete enviroment. |
- Return to the work dir, create a Geant4 subdir and go into it.
No Format cd $sim_work mkdir geant4 cd geant4
- Download the Geant4 tarball.
No Format wget http://geant4.cern.ch/geant4/source/source/geant4.7.1.tar.gz
- Unzip it.
No Format tar -zxvf geant4.7.0.p01.tar.gz
- Set the following variables in setup.sh. (You should not need to run Configure.)
No Format export G4INSTALL=${sim_work}/geant4/geant4.7.1 export G4SYSTEM=Linux-g++
- If you want to enable OpenGL-based visualization, set these variables, too.
No Format export G4VIS_BUILD_OPENGLX_DRIVER=1 export G4VIS_USE_OPENGLX=1 export OGLHOME=/usr
- Refer to the Application Guide Section on Enviroment Variables for additional enviroment variables that you might want to set.
- Go into the Geant4 base dir.
No Format cd geant4.7.1
- LCPhys requires that a special flag is set in order to use the latest Kaon model. At the end of config/architecture.gmk, insert the following line exactly as it appears below:
Hopefully, this hack will be remedied soon!No Format CPPFLAGS += -DG4BERTINI_KAON
- Build the libraries, which will be placed at $G4INSTALL/lib/Linux-g++. (This could take up to a few hours depending on your machine.)
No Format cd source make
- Install the includes into $G4INSTALL/include .
No Format make includes
- Build the physics list libraries. These will go into the default location at $G4INSTALL/lib/plists/Linux-g++.
No Format cd ../physics_lists/hadronic make
Hopefully, Geant4 has been installed successfully, and you don't have too many more gray hairs!
LCPhys
SLIC requires a special physics list written by Dennis Wright for Linear Collider physics.
- Go back to the work dir.
No Format cd $sim_work
- Checkout the physics list from CVS.
No Format cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd checkout LCPhys
- Assuming that the environment from the Geant4 installation is still in place, you can build this like any other physics list, and the library should be installed into $G4INSTALL/lib/plists/WIN32-g++.
No Format cd LCPhys make
- Set the LCPhys variable in setup.sh.
No Format LCPHYS_BASE=$sim_work/LCPhys
LCIO
LCIO provides binary output capabilities.
Warning |
---|
Installation requires a working Java runtime for ant support. |
LCIO has a very nice manual with a whole section on installation. Thanks, Frank!
I will still walk you through the basic procedure.
- Go back to the work dir.
No Format cd $sim_work
- Checkout LCIO from CVS.
No Format cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcio checkout lcio
- Add these lines to your setup.sh.
No Format export LCIO=${sim_work}/lcio export PATH=$LCIO/tools:$LCIO/bin:$PATH
- Build the libraries using the bundled aid and ant tools.
No Format cd $sim_work/lcio ant aid.generate cpp
Xerces-C++
- Go back to the work dir, create a subdir for Xerces-C++, and go into it.
No Format cd $sim_work mkdir xercesc cd xercesc
- Checkout the physics list from CVSDownload the Xerces tarball.
Unzip the tarballNo Format wget http://www.apache.org/dist/xml/xerces-c/xerces-c-src_2_6_0.tar.gz
cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd checkout LCPhys
- Assuming that the environment from the Geant4 installation is still in place, you can build this like any other physics list, and the library should be installed into $G4INSTALL/lib/plists/WIN32-g++.
No Format tar -zxvf xerces-c-src_2_6_0.tar.gzcd LCPhys make
- Set XERCESCROOT for the build in your environment, onlyLCPhys variable in setup.sh.
No Format export XERCESCROOT=${simLCPHYS_BASE=$sim_work}/xercesc/xerces-c-src_2_6_0
- Go into the Xerces-C++ build area.
No Format cd xerces-c-src_2_6_0/src/xercesc
- Configure the build.
No Format runConfigure -plinux -cgcc -xg++ -minmem -nsocket -tnative -rpthread -P `cd ../../..; pwd`
- Build and install it.
No Format make make install
/LCPhys
LCIO
LCIO provides binary output capabilities.
Warning |
---|
Installation requires a working Java runtime for ant support. |
LCIO has a very nice manual with a whole section on installation. Thanks, Frank!
I will still walk you through the basic procedure.
- Go back to the work dir.
No Format cd $sim_work
- Checkout LCIO from CVS.
No Format cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcio checkout lcio
- Add these lines to your setup.sh.
In setup.sh, set XERCESCROOT to the installation area and add the DLL location to the PATH.No Format export LCIO
No Format export XERCESCROOT=${sim_work}/xercesclcio export LD_LIBRARY_PATH=$XERCESCROOT/lib:$LD_LIBRARY_PATH
...
$LCIO/tools:$LCIO/bin:$PATH
- Build the libraries using the bundled aid and ant tools.
No Format cd $sim_work/lcio ant aid.generate cpp
Xerces-C++
...
- Go back to the work dir, create a subdir for Xerces-C++
...
- , and go into it.
No Format cd $sim_work mkdir xercesc cd xercesc
- Download the Xerces tarball.
No Format wget http://www.apache.org/dist/xml/xerces-c/xerces-c-src_2_6_0.tar.gz
GDML
GDML's CVS is not directly accessible from the command line, but a tarball is available through a WWW interface.
- Download a snapshot of the current CVS head to sim_wrk using this link in your browser: http://simu.cvs.cern.ch/cgi-bin/simu.cgi/simu/GDML2/GDML2.tar.gz?tarball=1.
- Unzip the tarball.
Change into the CPPGDML directoryNo Format tar -zxvf GDML2xerces-c-src_2_6_0.tar.gz
- Set XERCESCROOT for the build in your environment, only.
Set GDML_BASE and PLATFORM in setup.shNo Format cd GDML2/CPPGDML
export XERCESCROOT=${sim_work}/xercesc/xerces-c-src_2_6_0
- Go into the Xerces-C++ build area.
No Format export GDML_BASE=${sim_work}/GDML2/CPPGDMLcd xerces-c-src_2_6_0/src/xercesc
- Configure the build.
No Format ./configurerunConfigure -plinux -cgcc -xg++ -minmem -nsocket -tnative -rpthread -P `cd ../../..; pwd`
- Build and install it.
No Format make make install
- In setup.sh, set XERCESCROOT to the installation area and add the DLL location to the PATH.
No Format export XERCESCROOT=${sim_work}/xercesc export LD_LIBRARY_PATH=$XERCESCROOT/lib:$LD_LIBRARY_PATH
Tip |
---|
When rebuilding Xerces-C++, which you will probably not need to do once you get it working, XERCESCROOT needs to be set back to the Xerces-C++ source area rather than the installation base. |
GDML
GDML's CVS is not directly accessible from the command line, but a tarball is available through a WWW interface.
- Download a snapshot of the current CVS head to sim_wrk using this link in your browser: http://simu.cvs.cern.ch/cgi-bin/simu.cgi/simu/GDML2/GDML2.tar.gz?tarball=1.
- Unzip the tarball.
No Format tar -zxvf GDML2.tar.gz
- Change into the CPPGDML directory.
No Format cd GDML2/CPPGDML
- Set GDML_BASE and PLATFORM in setup.sh.
No Format export GDML_BASE=${sim_work}/GDML2/CPPGDML
- Configure the build.
No Format ./configureenable-geant4-vis --enable-geant4-ui --enable-geant4-granular-libs --enable-shared-libs=no
- Build it.
No Format make
...