Installation guides are available for a variety of different
Geant4 releases and operating systems.
Be sure to use the appropriate guide for your Geant4 release and system. The full set of guides can be found at:
http://geant4.slac.stanford.edu/installation
What are the two pieces of software
required for building Geant4?
Selecting an Example Application
Building an Example
Application
Single versus
Multi-User Installation
XCode 2.4:
XCode 2.4 is a set of developer tools that includes the gcc 4.0.1 compiler that is recommended for Geant4 on Macintosh OSX. Any version of XCode from 2.2 onward contains this compiler and should work. Earlier versions of XCode will give you problems. To check your version, go to the Apple menu, "About this Mac", "More InfoÉ", "Software Applications" and then find XCode.
If you need to pick up a new version of XCode, you can get it from:
http://developer.apple.com/tools/download/
You must register with Apple Developer Connection, but there is no charge.
Note that the download is very large, over 900MB, so get yourself on a fast network.
X11:
X11 is the XWindows system for Macintosh OSX. It comes with your OS X Mac on the installation DVD, but is not generally pre-installed.
Insert the Mac OS X Tiger installation DVD disk 1 into your Mac.
Use Spotlight to search for a file named X11User.pkg. It is typically in /Volumes/Mac OS X Install DVD/System/Installation/Packages.
Click on this package to start the installation process.
If you don't have X11, you can still use Geant4 on your Mac, but you will not be able to output graphics to OpenGL. You should answer "no" when the Geant4 configuration script asks about OpenGL and RayTracerX, and then just use one of the other Geant4 graphics drivers such as HepRepFile (see some notes on HepRepFile later in this guide).
Later, when you have X11 installed, you can rerun the Geant4 configuration script, answer "yes" for OpenGL and RayTracerX, and Geant4 will recompile only those parts of the code that care about the difference.
CLHEP:
CLHEP is a set of base libraries that have long provided great functionality for the particle physics community. They provide things like matrix manipulations and four-vector tools. The Geant4 collaboration has chosen to use these libraries rather than re-invent these wheels. Please note that while CLHEP and Geant4 both come out of the particle physics communities, they are separate products - the Geant4 collaboration is not responsible for maintenance, distribution or documentation of CLHEP.
Go to the CLHEP source download page:
http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/clhep.html
If your Mac uses PowerPC Architecture
There is a pre-built version of CLHEP that you can take.
Select "Mac OS X 10.4(Tiger) CLHEP 2.0.3.1 for gcc 4.0"
which corresponds to:
The file is about 16MB. It contains two copies of each library, one for PowerPC processors and another for Intel processors.
The file will automatically unzip and will be placed on your desktop as:
clhep-2.0.3.1-osx104-ppc_gcc401.tar
Click on the file.
It will automatically un-tar and leave you with a folder on your desktop:
clhep-2.0.3.1-osx104-ppc_gcc401
Rename this folder to be called CLHEP
Put this into your Applications folder.
You're done setting up CLHEP.
If your Mac uses Intel Architecture
You will need to build CLHEP yourself.
From the "Source" section near the bottom of the page, select "clhep-2.0.3.1.tgz"
which corresponds to:
http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/distributions/clhep-2.0.3.1.tgz
The file is about 5MB.
The file will automatically unzip and will be placed on your desktop as:
clhep-2.0.3.1.tar
Click on the file.
It will automatically un-tar and leave you with a folder on your desktop:
2.0.3.1
Create a folder in your Applications folder called CLHEP
Put the downloaded folder there, so that you now have:
/Applications/CLHEP/2.0.3.1
For the following step, note that there are two dashes in a row before the word "prefix".
And be sure to point to your top level CLHEP directory, NOT:
/Applications/CLHEP/2.0.3.1/CLHEP
In a terminal window, navigate into the unpacked directory
and begin the configuration process.
cd /Applications/CLHEP/2.0.3.1/CLHEP
./configure --prefix /Applications/CLHEP
You should get a response that starts with:
checking
build system type...
And ends with:
liblist=`./getObjectList
-shared Units Vector Evaluator GenericFunctions Geometry Random Matrix
RandomObjects RefCount Cast Exceptions`; \
g++
-O -ansi -pedantic -Wall -D_GNU_SOURCE -g -O2 -o libCLHEP-2.0.3.1.dylib -dynamiclib -single_module
-undefined dynamic_lookup -Wl,-install_name,libCLHEP-2.0.3.1.dylib $liblist -o
libCLHEP-2.0.3.1.dylib
Run the build process:
make
You should get a response that starts with:
Making
all in Units
Making
all in Units
make all-am
make[3]:
Nothing to be done for `all-am'.
Making
all in .
/Applications/CLHEP/2.0.3.1/CLHEP/Units/autotools/install-sh
-d /Applications/CLHEP/2.0.3.1/CLHEP/Units/CLHEP;
install headers in
/Applications/CLHEP/2.0.3.1/CLHEP/Units/CLHEP/Units
And ends with:
Making
all in .
/Applications/CLHEP/2.0.3.1/CLHEP/Exceptions/autotools/install-sh
-d /Applications/CLHEP/2.0.3.1/CLHEP/Exceptions/CLHEP;
install headers in
/Applications/CLHEP/2.0.3.1/CLHEP/Exceptions/CLHEP/Exceptions
install headers in /Applications/CLHEP/2.0.3.1/CLHEP/Exceptions/CLHEP/RefCount
install headers in
/Applications/CLHEP/2.0.3.1/CLHEP/Exceptions/CLHEP/Cast
Making
all in src
make[2]:
Nothing to be done for `all'.
Making
all in test
make[2]:
Nothing to be done for `all'.
make[1]:
Nothing to be done for `all-am'.
The complete output from the above command can be found in this same web directory as:
Finally, move the build products to their installation area:
make install
You should get a response that starts with:
Making
install in Units
Making
install in Units
make[3]:
Nothing to be done for `install-exec-am'.
test
-z "/Applications/CLHEP/include/CLHEP/Units" ||
/Applications/CLHEP/2.0.3.1/CLHEP/Units/autotools/install-sh -d "/Applications/CLHEP/include/CLHEP/Units"
And ends with:
test
-z "/Applications/CLHEP/lib" ||
/Applications/CLHEP/2.0.3.1/CLHEP/install-sh -d
"/Applications/CLHEP/lib"
/usr/bin/install -c -m 644
'libCLHEP-2.0.3.1.a' '/Applications/CLHEP/lib/libCLHEP-2.0.3.1.a'
ranlib
'/Applications/CLHEP/lib/libCLHEP-2.0.3.1.a'
/usr/bin/install -c
'libCLHEP-2.0.3.1.dylib' '/Applications/CLHEP/lib/libCLHEP-2.0.3.1.dylib'
make[2]:
Nothing to be done for `install-data-am'.
The complete output from the above command can be found in this same web directory as:
You will now have directories such as:
~/CLHEP/include
and
~/CLHEP/lib
You're done setting up CLHEP.
Much more detailed instructions on installation of CLHEP are available from the CLHEP web site:
http://proj-clhep.web.cern.ch/proj-clhep/INSTALLATION/newCLHEP-install.html
From the top of the Geant4 home page:
http://geant4.web.cern.ch/geant4/
Select "Download" from near the top right corner of the page.
Select "Unix tar format, compressed using gzip"
which corresponds to:
http://geant4.web.cern.ch/geant4/support/source/geant4.8.3.tar.gz
The file is about 16M.
The file will automatically unzip and will be placed on your desktop as:
geant4.8.3.tar
Click on the file.
It will automatically un-tar and leave you with a folder on your desktop:
geant4.8.3
Put this into your Applications folder.
Depending on the physics of your particular application, you may need to install additional data files. These data files can be downloaded separately from the Geant4 source distribution page (the same place where you got Geant4 itself).
Create a new folder within /Applications/geant4.8.3 to hold any of these required data files.
/Applications/geant4.8.3/data
For now, pick up the "data files for low energy electromagnetic processes":
http://geant4.web.cern.ch/geant4/support/source/G4EMLOW.4.2.tar.gz
The file is about 7.6M.
The file will automatically unzip and will be placed on your desktop as:
G4EMLOW4.2.tar
Click on the file.
It will automatically un-tar and leave you with a folder on your desktop:
G4EMLOW4.2
Put this into your Applications/geant4.8.3/data folder.
TAKE YOUR TIME AT THIS STAGE, DON'T RUSH IT.
Mistakes made at this stage can be very time-consuming to correct. Slow down.
Maybe get a cup of coffee (or a glass of wine) before you proceed. Breathe.
Finally, unless you're absolutely sure you are starting from a nice clean system, make sure you don't have any pre-existing Geant4 environment variables. You can use the "printenv" command to show all variables, and filter this with a "grep" for the string G4 as follows:
From a Terminal or xterm window:
printenv | grep G4
If any variables show up, find out what is setting them and remove them. They might be coming from some other script that you invoke upon login for some other project. Take the time now to find the cause and resolve it.
From a Terminal or xterm window:
cd /Applications/geant4.8.3/
./Configure -build
You will be asked a series of questions.
In most cases, you can just take the default response (by hitting carriage return).
But pay close attention so that you do not accept the default for the following questions:
When it says:
Could
not find CLHEP installed on this system!
Please,
specify where CLHEP is installed:
First, confirm that you have installed your CLHEP to
/Applications/CLHEP
Make sure you have lib, bin and include subdirectories in that directory.
If not, recheck your CLHEP installation. If so, proceed.
Enter: /Applications/CLHEP
Or wherever you've decided to keep CLHEP.
Take the default for everything else except:
When it asks about:
G4VIS_BUILD_OPENGLX_DRIVER
G4VIS_USE_OPENGLX
Enter: y
This tells Geant4 that you want to include the optional OpenGL Visualization driver.
When it asks about:
G4VIS_BUILD_RAYTRACERX_DRIVER
G4VIS_USE_RAYTRACERX
Enter: y
This tells Geant4 that you want to include the optional RayTracerX Visualization driver.
Take the default for everything else.
Once all of the questions have been answered, you will be told:
WARNING: the generated configuration
file can be edited if necessary!
You can introduce any change to the configuration file
/Applications/geant4.8.3/.config/bin/Darwin-g++/config.sh before the final installation.
To do so, use a shell escape now (e.g. !vi /Applications/geant4.8.3/.config/bin/Darwin-g++/config.sh).
Press [Enter] to start installation or use a shell escape to edit config.sh:
At this point, what you have seen in this question and answer session should match what you find in this web directory as:
You are ready to proceed with the build.
Hit Enter.
You will then see:
Now
starting Geant4 libraries build...
On
this machine the G4SYSTEM=Darwin-g++
On
this machine the G4INSTALL=/Applications/geant4.8.3
On
this machine the G4TMP=/Applications/geant4.8.3/tmp
On
this machine the G4LIB=/Applications/geant4.8.3/lib
On
this machine the G4LEVELGAMMADATA=/Applications/geant4.8.3/data/PhotonEvaporation2.0
On
this machine the
G4RADIOACTIVEDATA=/Applications/geant4.8.3/data/RadioactiveDecay3.1
On
this machine the G4LEDATA=/Applications/geant4.8.3/data/G4EMLOW4.2
On
this machine the NeutronHPCrossSections=/Applications/geant4.8.3/data/G4NDL3.10
On
this machine the CLHEP_BASE_DIR=/Applications/CLHEP
On
this machine the CLHEP_INCLUDE_DIR=/Applications/CLHEP/include
On
this machine the CLHEP_LIB_DIR=/Applications/CLHEP/lib
On
this machine the CLHEP_LIB=CLHEP
On
this machine the G4VIS_BUILD_OPENGLX_DRIVER=1
On
this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=1
On
this machine the G4VIS_USE_OPENGLX=1
On
this machine the G4VIS_USE_RAYTRACERX=1
On
this machine the XMFLAGS=
On
this machine the XMLIBS=
On
this machine the XMFLAGS=
On
this machine the XAWFLAGS=
On
this machine the XAWLIBS=
On
this machine the G4LIB_BUILD_STATIC=1
On
this machine the G4LIB_USE_GRANULAR=1
Starting
build...
*************************************************************
Installation Geant4 version :
geant4-08-03
Copyright (C) 1994-2007 Geant4
Collaboration
*************************************************************
Making
dependency for file src/G4ios.cc ...
Making
dependency for file src/G4coutDestination.cc ...
Making
dependency for file src/G4VStateDependent.cc ...
Making
dependency for file src/G4VNotifier.cc ...
Making
dependency for file src/G4VExceptionHandler.cc ...
Making
dependency for file src/G4UnitsTable.cc ...
Making
dependency for file src/G4Timer.cc ...
Making
dependency for file src/G4StateManager.cc ...
Making
dependency for file src/G4SliceTimer.cc ...
Making
dependency for file src/G4PhysicsVector.cc ...
Making
dependency for file src/G4PhysicsTable.cc ...
Making
dependency for file src/G4PhysicsOrderedFreeVector.cc ...
Making
dependency for file src/G4PhysicsLogVector.cc ...
Making
dependency for file src/G4PhysicsLnVector.cc ...
Making
dependency for file src/G4PhysicsLinearVector.cc ...
Making
dependency for file src/G4PhysicsFreeVector.cc ...
Making
dependency for file src/G4OrderedTable.cc ...
Making
dependency for file src/G4LPhysicsFreeVector.cc ...
Making
dependency for file src/G4Exception.cc ...
Making
dependency for file src/G4DataVector.cc ...
Making
dependency for file src/G4AllocatorPool.cc ...
Compiling
G4AllocatorPool.cc ...
Compiling
G4DataVector.cc ...
Compiling
G4Exception.cc ...
Once you see any lines like:
Compiling G4AllocatorPool.cc ...
with no errors,
the compilation is successfully under way.
Adjust your machine's power management properties so that it doesn't go to sleep, and then walk away for a long long time. Wait, and wait, and wait, for the initial compilation to run.
The same information that is showing on the console is also being written to a log file so that you can review it later if necessary. The information will appear in:
/Applications/geant4.8.3/.config/bin/Darwin-g++/g4make.log
An example of how this log file should look can be found in this same web directory as:
When you get to the part about G4OpenGL, you may see some warning messages that can be ignored. They will have the form:
Creating/replacing
object files in /Applications/geant4.8.3/lib/Darwin-g++/libG4OpenGL.a ...
ar:
creating archive /Applications/geant4.8.3/lib/Darwin-g++/libG4OpenGL.a
ranlib:
file:
/Applications/geant4.8.3/lib/Darwin-g++/libG4OpenGL.a(G4OpenGLImmediateWin32.o)
has no symbols
ranlib:
file:
/Applications/geant4.8.3/lib/Darwin-g++/libG4OpenGL.a(G4OpenGLImmediateWin32Viewer.o)
has no symbols
ranlib:
file:
/Applications/geant4.8.3/lib/Darwin-g++/libG4OpenGL.a(G4OpenGLImmediateXm.o)
has no symbols
You can ignore these. OpenGL will still be usable.
Eventually, you will see messages stating that libname.map has been built, then you will see messages about successful completion:
Libmap
stage. Searching for GNUmakefiles and sorting ...
Weeding
out paths and files ...
Making
libname.map starter file ...
Making
libname.map ...
Reading library name map file...
warning:
this program uses gets(), which is unsafe.
Reading dependency files...
Checking for circular dependencies...
Reordering according to dependencies...
Writing new library map file...
Libraries
installation completed !
####################################################
#
Your Geant4 installation seems to be successful!
#
To be sure please have a look into the log file:
#
/Applications/geant4.8.3/.config/bin/Darwin-g++/g4make.log
####################################################
The configure process has set up some environment variables that you will want to have in future sessions. Have configure make you an environment setup script by typing:
./Configure
(that was with no options, as opposed to ./Configure -build that you typed earlier).
You will see the following:
--- Geant4 Toolkit Installation ---
(setting environments for USER )
---------------------------------------------------
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).
---------------------------------------------------
Your directory /Applications/geant4.8.3 will now contain two scripts:
env.sh
and
env.csh
You have now built the Geant4 toolkit. If you have learned a little about
Geant4, you will know that Geant4 is not an application but rather a toolkit
from which you can build any number of applications. So before you can test Geant4, you need an example
application.
You should create a new directory, outside of your Geant4
installation area, where you will keep your example applications. This separation of spaces will help you
avoid accidentally messing up your main Geant4 installation, and will insure
that if you eventually update your main Geant4 installation (for example when a
newer Geant4 release is available), your personal application work will not be
disturbed.
Create a new directory for your work, and designate it as
your G4WORKDIR.
For example, if you want your work to be in /Applications/g4work:
export G4WORKDIR=/Applications/g4work
You can try any of the Geant4 examples. Some suggested starting points are any of the Novice examples
/Applications/geant4.8.3/examples/novice
or the analysis example
/Applications/geant4.8.3/examples/extended/analysis/A01
Each example is described in a detailed README it the example's top level directory.
Whichever example you choose, copy it to your Geant4 work
directory.
For example, you might end up with:
/Applications/g4work/A01
Note that this step needs to be redone any time you start a fresh Terminal or xterm window.
Type:
export G4WORKDIR=/Applications/g4work
export DYLD_LIBRARY_PATH=/Applications/CLHEP/lib
source /Applications/geant4.8.3/env.sh
It will respond:
On
this machine the G4SYSTEM=Darwin-g++
On
this machine the G4INSTALL=/Applications/geant4.8.3
On
this machine the G4LIB=/Applications/geant4.8.3/lib
On
this machine the G4LEVELGAMMADATA=/Applications/geant4.8.3/data/PhotonEvaporation2.0
On
this machine the
G4RADIOACTIVEDATA=/Applications/geant4.8.3/data/RadioactiveDecay3.1
On
this machine the G4LEDATA=/Applications/geant4.8.3/data/G4EMLOW4.2
On
this machine the NeutronHPCrossSections=/Applications/geant4.8.3/data/G4NDL3.10
On
this machine the CLHEP_BASE_DIR=/Applications/CLHEP
On
this machine the CLHEP_INCLUDE_DIR=/Applications/CLHEP/include
On
this machine the CLHEP_LIB_DIR=/Applications/CLHEP/lib
On
this machine the CLHEP_LIB=CLHEP
On
this machine the G4VIS_BUILD_OPENGLX_DRIVER=1
On
this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=1
On
this machine the G4VIS_USE_OPENGLX=1
On
this machine the G4VIS_USE_RAYTRACERX=1
On
this machine the XMFLAGS=
On
this machine the XMLIBS=
On
this machine the XMFLAGS=
On
this machine the XAWFLAGS=
On
this machine the XAWLIBS=
On
this machine the G4LIB_BUILD_STATIC=1
On
this machine the G4LIB_USE_GRANULAR=1
On
this machine the G4UI_USE_TCSH=1
In
your environment you have the G4WORKDIR=/Applications/g4work
A further note about the environment setup scripts:
The env scripts do not set every environment variable that
could be used by Geant4. They only
set those variables that you had declared to non-default values in the configure process. This works fine because any variable
that Geant4 does not find is assumed to be default. But if you are also setting some of your Geant4 environment
variables elsewhere, you can end up with inconsistent results. That is why you were strongly advised
to make sure you had no pre-existing Geant4 variables set before you began the
Geant4 build.
Did you "Configure the Environment" as described above? Remember that you need to do this every time you start a new Terminal or xterm window.
Build your example by typing:
cd $G4WORKDIR/A01
make
You will see output beginning with:
Making
dependency for file A01app.cc ...
Making
dependency for file src/A01Trajectory.cc ...
Making
dependency for file src/A01PrimaryGeneratorMessenger.cc ...
Making
dependency for file src/A01PrimaryGeneratorAction.cc ...
Making
dependency for file src/A01PhysicsList.cc ...
And ending with:
Compiling
A01app.cc ...
warning:
this program uses gets(), which is unsafe.
Using
granular libraries ...
Linking
A01app ...
...
Done!
The complete output from the above command can be found in this same web directory as:
If the build is successful, you will see the completed application file in your $G4WORKDIR directory such as:
$G4WORKDIR/bin/Darwin-g++/A01app
Since the example will be using OpenGL for visualization, you need to run it from an xterm window rather than a Terminal window (open the X11 application and then from its "Applications" menu, select "xterm").
As always for a new xterm or Terminal window, configure the environment:
export
G4WORKDIR=/Applications/g4work
export
DYLD_LIBRARY_PATH=/Applications/CLHEP/lib
source
/Applications/geant4.8.3/env.sh
Then, to run your example, cd to the example's top level directory, such as:
cd $G4WORKDIR/A01
And from there, run the newly created executable:
$G4WORKDIR/bin/Darwin-g++/A01app
You will see a response that starts with:
*************************************************************
Geant4 version Name: geant4-08-03 (5-May-2007)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
Visualization
Manager instantiating...
Visualization
Manager initialising...
Registering
graphics systems...
You
have successfully registered the following graphics systems.
Current
available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
GAGTree (GAGTree)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
OpenGLImmediateX (OGLIX)
OpenGLStoredX (OGLSX)
RayTracerX (RayTracerX)
And ends with:
EMcalorimeterPhysical[0]
EMcalorimeterLogical 1 CsI
cellPhysical[-1]
cellLogical 0 CsI /EMcalorimeter
HadCalorimeterPhysical[0]
HadCalorimeterLogical 1 Lead
HadCalColumnPhysical[-1] HadCalColumnLogical 1 Lead
HadCalCellPhysical[-1] HadCalCellLogical 1 Lead
HadCalLayerPhysical[-1] HadCalLayerLogical 1 Lead
HadCalScintiPhysical[0] HadCalScintiLogical 0 Scintillator
/HadCalorimeter
Idle>
The complete output from the above command can be found in this same web directory as:
Make sure your output included a mention of the graphics systems:
OpenGLImmediateX (OGLIX)
OpenGLStoredX (OGLSX)
If those didn't show up, you have missed something in the above instructions.
Did you correctly answered the questions about OpenGL in the ./Configure -build procedure?
Did you get error messages during that procedure?
Did you follow the instructions in the above section, "Creating
the setup script"?
Did you follow the instructions above about "As always
for a new xterm or Terminal window, configure the environmentÉ."?
If you still can't figure out why you don't have OpenGL, you
can still proceed, but you will have to use some other graphics driver. See some notes a little later in this
document about how to use the HepRepFile driver.
From here, we'll assume you have OpenGL successfully loaded.
From the idle prompt, visualize the example by typing the following:
/vis/open OGLIX
/vis/drawVolume
You will get the following response:
Got
standard cmap
Window
name: viewer-0 (OpenGLImmediateX)
WARNING:
objects with visibility flag set to "false" will not be drawn!
"/vis/viewer/set/culling global
false" to Draw such objects.
Also see other
"/vis/viewer/set" commands.
WARNING:
SceneHandler "scene-handler-0", to which viewer "viewer-0"
is attached, has no scene -
"/vis/scene/create" and"/vis/sceneHandler/attach"
(or use compound command
"/vis/drawVolume").
WARNING:
For systems which are not "auto-refresh" you will need to
issue "/vis/viewer/refresh"
or "/vis/viewer/flush".
And an OpenGL window will appear and the example geometry will be drawn, as in:

To add trajectories and hits to the visualization, and then run an event:
/vis/scene/add/trajectories
/vis/scene/add/hits
/run/beamOn 1
You will then see something like:

When you are finished with your Geant4 session, just type:
exit
For more details on using OpenGL for Geant4, see:
http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html
Here's another example. This one makes output go to a HepRep file, suitable for viewing in the HepRApp HepRep Browser:
$G4WORKDIR/bin/Darwin-g++/A01app
/vis/open HepRepFile
/vis/drawVolume
/vis/viewer/flush
/vis/scene/add/trajectories
/vis/scene/add/hits
/run/beamOn 1
For more details on using HepRApp for Geant4, see:
http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html
Note: HepRApp and Geant4 do not have to run on the same machine. You can copy the .heprep file from the Geant4 machine to the machine with HepRApp, or you can simply make the .heprep file visible from the web, and let HepRApp pick it up via the url.
Also note that the .heprep file can be zipped to about 5
percent of original size and HepRApp can then read in the zipped version (you
don't need to unzip the file).
You now have Geant4 installed and have demonstrated a few examples using two different visualization systems.
The above instructions assumed you were doing a single-user installation. They had you keep all of the build products in the same area as your CLHEP and Geant4 source. Note however that both of these packages support standard multi-user installation processes.
For CLHEP, just specify a different value for "--prefix".
For Geant4, when ./Configure -build asks you to "Specify the path where Geant4 libraries and source files should be installed", specify whatever area you want instead of taking the default. When you are asked about the CLHEP library, be sure to specify the same location that you specified during the CLHEP installation. Then, after you've installed Geant4 as described below, issue an additional command (as root user), ./Configure -install.
I hope these instructions have been helpful.
If you find any problems or can suggest corrections, please let me know.
Joseph Perl
Stanford Linear Accelerator Center
15 July 2007