...
- 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.1.tar.gz
- Set the following variables in setup.sh. (You should not need to run Geant4's Configure script.)
If you would like to enable OpenGL visualization, add the following variable definitions.No Format export G4INSTALL=${sim_work}/geant4/geant4.7.1 export G4SYSTEM=WIN32-g++
This assumes you installed the X11 libraries when you set up cygwin.No Format export OGLHOME=/usr/X11R6 export G4VIS_BUILD_OPENGLX_DRIVER=1 export G4VIS_USE_OPENGLX=1
- 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
- Now for another lovely Geant4 hack. In order to successfully compile the HepRep driver, the following line in the file config/sys/WIN32-g++.gmk
should be replaced withNo Format CXXFLAGS := -Wall -ansi -pedantic -pipe
No Format CXXFLAGS := -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe
- Build the libraries, which will be placed at $G4INSTALL/lib/WIN32-g++. (This could take up to a few hours depending on your machine.)
No Format cd source make
- Install the headers into $G4INSTALL/include.
No Format make includes
- Build the physics list libraries. These will go into $G4INSTALL/lib/plists/WIN32-g++.
No Format cd ../physics_lists/hadronic make
...
The final version of setup.sh (without OpenGL visualization) should be similar to this.
...