Setup for Geant4
Introduction 
Geant4 Home

Setup Geant4

Test Program

Developer Notes
Compiling from scratch

Introduction

This page is meant to provide the steps necessary to setup and use Geant4 on your system.  Currently we are using Geant4 3.2.

Setup Geant4

GLAST uses Geant4 release 3.2.  We have provided a binary distribution of the Geant4 libraries and header files, so that users do not need to compile Geant4 themselves.  While a number of external libraries can be used in conjunction with Geant4, we are only using CLHEP.  None of the optional visualization libraries are in use at this time.

Step by Step Instructions

  1. Check to see if CLHEP 1.7.0.0 is installed in your $GLAST_EXT directory.  If so, continue to the next step, otherwise:
    1. Download CLHEP 1.7.0.0 from:
      ftp-glast.slac.stanford.edu/glast.u05/extlib/clhep
    2. Extract the zip file into your $GLAST_EXT directory.
  2. Download the Geant4 3.2 binary distribution for your system (Windows NT, 2000, XP, or Linux). Grab the version compiled against CLHEP 1.7.00.
    1. ftp-glast.slac.stanford.edu/glast.u05/extlib/geant4
    2. Extract the contents into a $GLAST_EXT/geant4 directory.
  3. Checkout the Geant4 interface package from the GLAST CVS repository.  For additional information about using CVS and CMT see the GLAST SAS How-to page.
    1. Linux
      1. Use glastpack:
        glastpack.pl rco Geant4 v1r1
    2. Windows
      1. Use VCMT to checkout the following packages,  using the "checkout" button:
        1. EXTLIB v2r4p2
        2. CLHEP v1r7p0
        3. GlastPolicy v4r3
        4. Geant4 v1r1
  4. Now setup and build the Geant4 interface package
    1. Linux
      1. Use glastpack to build:
        glastpack.pl build Geant4 v1r1
    2. Windows
      1. Use VCMT
        1. Highlight the Geant4 package
        2. Click the broadcast global box
        3. Click the setup button
        4. In the Project drop down box, choose test_Geant4
        5. Click the make button

Running the Test Program

The Geant4 interface package, includes a test program.  The N01 example that comes with the Geant4 distribution.  The test application is named test_Geant4.  If you followed the step by step instructions above, you should have already compiled the routine. You should now try running the test program (no input parameters are required).  The resulting output should look like this.

Congratulations!

You now have Geant4 installed on your machine, you can begin using the Geant4 libraries in conjunction with our GLAST software which utilizes Geant4.

 

Back to GLAST Software Home

H. Kelly Last Modified:  2002-12-02 11:43:26 -0800