Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This guide provides a step-by-step walkthrough covering package and tool installation.

Work Area

The SLIC package and its dependencies will be installed into a common work area.

...

Tip

The $sim_work/setup.sh script will henceforth be referred to as setup.sh. At the end, it will have all of the environment variables required by SLIC and its dependencies. Throughout the guide, any time a line is added to setup.sh, you should also execute this line in your current bash shell. Probably the easiest way to do this is by adding to the script first and then (re)sourcing it.

Java

Java is required for LCIO installation.

...

Info

Technically, installation of the LCIO C++ libraries only requires a Java JRE, but the JDK is useful for doing reconstruction and analysis where you may want to compile Java programs.

Proceed to Package Installation!

You are now ready to install the simulation packages.

Tip

The same shell window should be used throughout the installation process in order to preserve the environment variables.

Package Installations

CLHEP

CLHEP has installation instructions for version 1.9 and up. But you should not need them to setup the package.

...

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.

...

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.

  1. Go back to the work dir.
    No Format
    cd $sim_wrk
    
  2. Checkout the physics list from CVS.
    No Format
    cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd checkout LCPhys
    
  3. 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
    
  4. Set the LCPhys variable in setup.sh.
    No Format
    LCPHYS_BASE=$sim_wrk/LCPhys
    

LCIO

LCIO provides binary output capabilities.

...

  1. Go back to the work dir.
    No Format
    cd $sim_wrk
    
  2. Checkout LCIO from CVS.
    No Format
    cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcio checkout lcio
    
  3. Add these lines to your setup.sh.
    No Format
    export LCIO=${sim_wrk}/lcio 
    export PATH=$LCIO/tools:$LCIO/bin:$PATH
    
  4. Build the libraries using the bundled aid and ant tools.
    No Format
    ant aid.generate cpp
    

Xerces-C++

  1. Go back to the work dir, create a subdir for Xerces-C++, and go into it.
    No Format
    cd $sim_wrk
    mkdir xercesc
    cd xercesc
    
  2. Download the Xerces tarball.
    No Format
    wget http://www.apache.org/dist/xml/xerces-c/xerces-c-src_2_6_0.tar.gz
    
  3. Unzip the tarball.
    No Format
    tar -zxvf xerces-c-src_2_6_0.tar.gz
    
  4. Set XERCESCROOT for the build in your environment, only.
    No Format
    export XERCESCROOT=${sim_work}/xerces-c-src_2_6_0
    
  5. Go into the Xerces-C++ build area.
    No Format
    cd xerces-c-src_2_6_0/src/xercesc
    
  6. Configure the build.
    No Format
    runConfigure -plinux -cgcc 
    -xg++ -minmem -nsocket 
    -tnative -rpthread
    -P `cd ../../..; pwd`
    
  7. Build and install it.
    No Format
    make
    make install
    
  8. 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 PATH=$XERCESCROOT/bin:$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.

  1. Download a snapshot of the current CVS head using this link in your browser: http://simu.cvs.cern.ch/cgi-bin/simu.cgi/simu/GDML2/GDML2.tar.gz?tarball=1.
    • Save the tarball to sim_wrk, which should be C:\sim.
  2. Unzip the tarball.
    No Format
    tar -zxvf GDML2.tar.gz
    
  3. Change into the CPPGDML directory.
    No Format
    cd GDML2/CPPGDML
    
  4. Set GDML_BASE and PLATFORM in setup.sh.
    No Format
    export GDML_BASE=${sim_work}/GDML2/CPPGDML
    export PLATFORM=cygwin_g++
    
  5. Configure the build.
    No Format
    ./configure --enable-geant4-vis --enable-geant4-ui --with-geant4-libtype=granular --with-platform=cygwin_g++
    
  6. Build it.
    No Format
    make
    

LCDD

  1. Go to the work dir and checkout LCDD.
    No Format
    cd ${sim_work}
    cvs -d CVSROOT=:pserver:anonymous@cvs.freehep.org:/cvs/lcd checkout lcdd
    
  2. Go into the LCDD dir.
    No Format
    cd lcdd
    
  3. Configure the build.
    No Format
    ./configure
    
  4. Build the library.
    No Format
    make
    
  5. Set the LCDD_BASE variable in setup.sh.
    No Format
    export LCDD_BASE=${sim_work}/lcdd
    

SLIC

Finally, you are ready to install the simulation "hub" package. After this, you will have a fully-featured Geant4 simulator on your Windows machine.

...

If the build completes successfully, you should see SLIC's usage statement from the test run.

Running SLIC after Installation

When you want to run later in a Cygwin shell, $XERCESCROOT/bin should be in the PATH, so that Windows can find the DLL at runtime. Since the other applications were linked-in statically, this should be the only setup requirement.

...

If you receive an error message about a missing DLL cygxerces-c26.dll, then make sure that the PATH is setup correctly and Xerces-C++ was properly installed.

Final Setup Script

The final version of setup.sh should be similar to this.

...

The above should be sufficient to "bootstrap" any future (re)builds.

Done!

That's it.

Happy simulating!

...

If you think this guide could be improved in any way, then please contact the author

Additional Resources

SLIC Homepage
Running SLIC at SLAC