| Getting Started with SLIC and LCDD for ILC Detector Simulation | ||
|---|---|---|
| <<< Previous | Next >>> | |
SLIC and LCDD are geared towards a "Linux-like" setup, so you will probably get the best results on a similar platform, i.e. one that has gcc and standard shell utilities. Windows users must use the Cygwin environment, the setup of which is not covered here. Basically, your target system should have the bash shell plus the commands cvs, gmake, tar, and gcc (version 3.x).
If your system is missing commands in this list, then now is the time to go get them.
Commands in this guide will use sh syntax. csh'ers, et al. will need to modify the commands to work in their environment.
SLIC and LCDD have four external dependencies that you need to install yourself. Their vital details are summarized below.
Table 1. Package Summary
| Package Name | Description | Source Code | App Env Var | SLIC Env Var | Dependencies | Version | Note |
|---|---|---|---|---|---|---|---|
| CLHEP | Class libraries for HEP | WWW Download | CLHEP_BASE_DIR, et al | same | none | 1.8.x or 1.9.x | This must be installed before Geant4. |
| Geant4 | Core MC Simulation Toolkit | WWW Download | G4INSTALL, et al | same | CLHEP, external visualization packages | 7.x | |
| Xerces C++ | XML Parser | WWW Download | XERCESCROOT | same | none | 2.6 | WWW support is required. |
| LCIO | Simulator Event I/O | Installation Instructions | LCIO | same | none | 1.4 | The CVS head should also work. |
Before installing the simulation framework applications, you will need to setup CLHEP, Geant4, Xerces and LCIO according to the information from above. Each is sufficiently well-documented that you should not have trouble doing this, provided you are somewhat familiar with the Unix commandline.
![]() |
You may already have installations for one or more of these packages. Check with your system administrator. |
Unless otherwise noted, all environment variables should be kept once set.
In addition to the external dependencies, the SLIC simulator requires three packages.
SLIC and its immediate dependencies are summarized below.
Table 2. Package Summary
| Package Name | Description | Env Var | Dependencies | Version | Note |
|---|---|---|---|---|---|
| SLIC | Core simulation package. | SLIC_BASE | Geant4, Xerces, GDML, LCDD, LCIO, LCPhys | CVS head | |
| LCDD | XML-based detector description package. | LCDD_BASE | Geant4, Xerces, GDML | CVS head | |
| LCPhys | Linear Collider physics list. | LCPHYS_BASE | Geant4 | CVS head | |
| GDML | XML-based geometry system. | GDML_BASE, PLATFORM, SITE | Geant4, Xerces | 2.1 | Modified version packaged with LCDD in $LCDD_BASE/extern/gdml.tar.gz. |
To summarize, SLIC provides the core Geant4 binding. For detector description, SLIC uses LCDD, which extends GDML by including additional elements. LCPhys is a Linear Collider physics list.
I prefer to build simulation apps with static libraries when possible. Then I can avoid having to set the LD_LIBRARY_PATH variable at runtime. The executables are more self-contained and portable if runtime dependencies are minimized.
Of the external dependencies, Xerces is the only one which cannot be built statically, or at least the default setup script does not allow this selection.
By default, LCDD and SLIC are compiled with the settings from your Geant4 install.
I use only static libraries with GDML, because I ran into a nasty Seg Fault when attempting to use shared.
LCIO creates a static library by default.
Assuming you have installed the dependencies, source your Geant4 setup script.
source $G4INSTALL/.config/bin/$G4SYSTEM/env.sh |
Of course, if G4INSTALL or G4SYSTEM is not set, the full path should be substituted.
Check that XERCESCROOT is set to your root Xerces C++ installation area, which should have lib and include directories.
The variable LCIO should also be set to your base LCIO installation area.
You can now checkout SLIC and run its build script, which will walk you through the rest of the build process with a number of prompts.
export CVSROOT=:pserver:anonymous@cvs.freehep.org:/cvs/lcd cvs co slic cd slic export SLIC_BASE=`pwd` ./config/setup/build.sh |
Assuming that the environment from Geant4/CLHEP, LCIO and Xerces was left in place, the script should choose reasonable defaults for most settings. Just press ENTER to choose the default setting. The script will die if the selection is invalid, so take your time.
During the build process, the LCPhys package will be checked out and, by default, built and installed into the Geant4 lib directory. If you attempt to do this without write access to this directory, the build will fail. You can select not to build this library but will still need to have it installed in the $G4LIB/$G4SYSTEM directory or in $G4LIB/plists/$G4SYSTEM so that the linker can find it.
The setup script should successfully build LCDD, GDML, LCPhys and SLIC itself. You should see the results from executing slic --help once the build completes successfully.
| <<< Previous | Home | Next >>> |
| Getting Started with SLIC and LCDD for ILC Detector Simulation | Running SLIC |