<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LawrenceDeacon</id>
	<title>PBTWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LawrenceDeacon"/>
	<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/wiki/Special:Contributions/LawrenceDeacon"/>
	<updated>2026-04-26T19:56:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=196</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=196"/>
		<updated>2016-06-07T02:32:16Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* B1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;ReleaseWithDebInfo&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . &lt;br /&gt;
&lt;br /&gt;
mkdir build &lt;br /&gt;
cd build &lt;br /&gt;
cmake ../B1 &lt;br /&gt;
make &lt;br /&gt;
./exampleB1 exampleB1.in | tee exampleB1.new.out &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results &lt;br /&gt;
diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The newly generated simulation results contain similar but not identical values to those in the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
This is due to the fact that the results depend on the initial state of the random number generator. The random seed used to generate the example output is unknown.&lt;br /&gt;
&lt;br /&gt;
====== B1 visualisation ======&lt;br /&gt;
&lt;br /&gt;
The example, when run without arguments, opens in interactive mode using the visualisation driver selected in the file vis.mac:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./exampleB1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The various visualisation packages can be tested by editing vis.mac to select the appropriate package. Some drivers create an interactive view of the simulation geometry. Others write to a file which can be viewed using an external software package e.g. DAWN - see the [http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Visualization/introduction.html geant manual] for details.&lt;br /&gt;
&lt;br /&gt;
Most packages are listed in the file in lines beginning &amp;lt;code&amp;gt;/vis/open&amp;lt;/code&amp;gt; and can be uncommented to select, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open OGL 600x600-0+0&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
RayTracerX is not listed in the file but can be enabled by uncommenting the other /vis/open lines and adding the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open RayTracerX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=195</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=195"/>
		<updated>2016-06-07T02:28:46Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* B1 visualisation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;ReleaseWithDebInfo&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . &lt;br /&gt;
&lt;br /&gt;
mkdir build &lt;br /&gt;
cd build &lt;br /&gt;
cmake ../B1 &lt;br /&gt;
make &lt;br /&gt;
./exampleB1 exampleB1.in | tee exampleB1.new.out &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results &lt;br /&gt;
diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
This is due to the fact that the results depend on the initial state of the random number generator. The random seed used to generate the example output is unknown.&lt;br /&gt;
&lt;br /&gt;
====== B1 visualisation ======&lt;br /&gt;
&lt;br /&gt;
The example, when run without arguments, opens in interactive mode using the visualisation driver selected in the file vis.mac:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./exampleB1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The various visualisation packages can be tested by editing vis.mac to select the appropriate package. Some drivers create an interactive view of the simulation geometry. Others write to a file which can be viewed using an external software package e.g. DAWN - see the [http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Visualization/introduction.html geant manual] for details.&lt;br /&gt;
&lt;br /&gt;
Most packages are listed in the file in lines beginning &amp;lt;code&amp;gt;/vis/open&amp;lt;/code&amp;gt; and can be uncommented to select, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open OGL 600x600-0+0&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
RayTracerX is not listed in the file but can be enabled by uncommenting the other /vis/open lines and adding the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open RayTracerX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=194</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=194"/>
		<updated>2016-06-07T02:28:20Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* B1 visualisation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;ReleaseWithDebInfo&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . &lt;br /&gt;
&lt;br /&gt;
mkdir build &lt;br /&gt;
cd build &lt;br /&gt;
cmake ../B1 &lt;br /&gt;
make &lt;br /&gt;
./exampleB1 exampleB1.in | tee exampleB1.new.out &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results &lt;br /&gt;
diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
This is due to the fact that the results depend on the initial state of the random number generator. The random seed used to generate the example output is unknown.&lt;br /&gt;
&lt;br /&gt;
====== B1 visualisation ======&lt;br /&gt;
&lt;br /&gt;
The example, when run without arguments, opens in interactive mode using the visualisation driver selected in the file vis.mac:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./exampleB1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 The various visualisation packages can be tested by editing vis.mac to select the appropriate package. Some drivers create an interactive view of the simulation geometry. Others write to a file which can be viewed using an external software package e.g. DAWN - see the [http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Visualization/introduction.html geant manual] for details.&lt;br /&gt;
&lt;br /&gt;
Most packages are listed in the file in lines beginning &amp;lt;code&amp;gt;/vis/open&amp;lt;/code&amp;gt; and can be uncommented to select, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open OGL 600x600-0+0&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
RayTracerX is not listed in the file but can be enabled by uncommenting the other /vis/open lines and adding the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open RayTracerX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=193</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=193"/>
		<updated>2016-06-07T02:27:35Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* B1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;ReleaseWithDebInfo&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . &lt;br /&gt;
&lt;br /&gt;
mkdir build &lt;br /&gt;
cd build &lt;br /&gt;
cmake ../B1 &lt;br /&gt;
make &lt;br /&gt;
./exampleB1 exampleB1.in | tee exampleB1.new.out &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results &lt;br /&gt;
diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
This is due to the fact that the results depend on the initial state of the random number generator. The random seed used to generate the example output is unknown.&lt;br /&gt;
&lt;br /&gt;
====== B1 visualisation ======&lt;br /&gt;
&lt;br /&gt;
The example, when run without arguments, opens in interactive mode using the visualisation driver selected in the file vis.mac. The various visualisation packages can be tested by editing vis.mac to select the appropriate package. Some drivers create an interactive view of the simulation geometry. Others write to a file which can be viewed using an external software package e.g. DAWN - see the [http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Visualization/introduction.html geant manual] for details.&lt;br /&gt;
&lt;br /&gt;
Most packages are listed in the file in lines beginning &amp;lt;code&amp;gt;/vis/open&amp;lt;/code&amp;gt; and can be uncommented to select, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open OGL 600x600-0+0&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
RayTracerX is not listed in the file but can be enabled by uncommenting the other /vis/open lines and adding the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open RayTracerX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=192</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=192"/>
		<updated>2016-06-07T02:26:57Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* B1 visualisation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;ReleaseWithDebInfo&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . &lt;br /&gt;
&lt;br /&gt;
mkdir build &lt;br /&gt;
cd build &lt;br /&gt;
cmake ../B1 &lt;br /&gt;
make &lt;br /&gt;
./exampleB1 exampleB1.in | tee exampleB1.new.out &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results &lt;br /&gt;
diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
This is due to the fact that the results depend on the initial state of the random number generator. To generate identical results the random seeds would need to be the same. The random seed used to generate the example output is unknown.&lt;br /&gt;
&lt;br /&gt;
====== B1 visualisation ======&lt;br /&gt;
&lt;br /&gt;
The example, when run without arguments, opens in interactive mode using the visualisation driver selected in the file vis.mac. The various visualisation packages can be tested by editing vis.mac to select the appropriate package. Some drivers create an interactive view of the simulation geometry. Others write to a file which can be viewed using an external software package e.g. DAWN - see the [http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Visualization/introduction.html geant manual] for details.&lt;br /&gt;
&lt;br /&gt;
Most packages are listed in the file in lines beginning &amp;lt;code&amp;gt;/vis/open&amp;lt;/code&amp;gt; and can be uncommented to select, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open OGL 600x600-0+0&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
RayTracerX is not listed in the file but can be enabled by uncommenting the other /vis/open lines and adding the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open RayTracerX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=191</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=191"/>
		<updated>2016-06-07T02:26:19Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* B1 visualisation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;ReleaseWithDebInfo&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . &lt;br /&gt;
&lt;br /&gt;
mkdir build &lt;br /&gt;
cd build &lt;br /&gt;
cmake ../B1 &lt;br /&gt;
make &lt;br /&gt;
./exampleB1 exampleB1.in | tee exampleB1.new.out &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results &lt;br /&gt;
diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
This is due to the fact that the results depend on the initial state of the random number generator. To generate identical results the random seeds would need to be the same. The random seed used to generate the example output is unknown.&lt;br /&gt;
&lt;br /&gt;
====== B1 visualisation ======&lt;br /&gt;
&lt;br /&gt;
The example, when run without arguments, opens in interactive mode using the visualisation driver selected in the file vis.mac. The various visualisation packages can be tested by editing vis.mac to select the appropriate package. Some drivers create an interactive view of the simulation geometry. Others write to a file which can be viewed using an external software package e.g. DAWN - see the [http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Visualization/introduction.html geant manual] for details.&lt;br /&gt;
&lt;br /&gt;
Most packages are listed in the file in lines beginning /vis/open and can be uncommented to select, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open OGL 600x600-0+0&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
RayTracerX is not listed in the file but can be enabled by uncommenting the other /vis/open lines and adding the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open RayTracerX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=190</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=190"/>
		<updated>2016-06-07T02:21:44Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;ReleaseWithDebInfo&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . &lt;br /&gt;
&lt;br /&gt;
mkdir build &lt;br /&gt;
cd build &lt;br /&gt;
cmake ../B1 &lt;br /&gt;
make &lt;br /&gt;
./exampleB1 exampleB1.in | tee exampleB1.new.out &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results &lt;br /&gt;
diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
This is due to the fact that the results depend on the initial state of the random number generator. To generate identical results the random seeds would need to be the same. The random seed used to generate the example output is unknown.&lt;br /&gt;
&lt;br /&gt;
====== B1 visualisation ======&lt;br /&gt;
&lt;br /&gt;
The example, when run without arguments, opens in interactive mode using the visualisation driver selected in the file vis.mac. The various visualisation packages can be tested by editing vis.mac to select the appropriate package.&lt;br /&gt;
Most packages are listed in the file in lines beginning /vis/open and can be uncommented to select, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open OGL 600x600-0+0&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
RayTracerX is not listed in the file but can be enabled by uncommenting the other /vis/open lines and adding the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/vis/open RayTracerX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=189</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=189"/>
		<updated>2016-06-07T02:15:06Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* B1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;ReleaseWithDebInfo&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . &lt;br /&gt;
&lt;br /&gt;
mkdir build &lt;br /&gt;
cd build &lt;br /&gt;
cmake ../B1 &lt;br /&gt;
make &lt;br /&gt;
./exampleB1 exampleB1.in | tee exampleB1.new.out &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results &lt;br /&gt;
diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
This is due to the fact that the results depend on the initial state of the random number generator. To generate identical results the random seeds would need to be the same. The random seed used to generate the example output is unknown.&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=188</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=188"/>
		<updated>2016-06-07T02:12:12Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* B1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;ReleaseWithDebInfo&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . &lt;br /&gt;
&lt;br /&gt;
mkdir build &lt;br /&gt;
cd build &lt;br /&gt;
cmake ../B1 &lt;br /&gt;
make &lt;br /&gt;
./exampleB1 exampleB1.in | tee exampleB1.new.out &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results &lt;br /&gt;
grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results &lt;br /&gt;
diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There seem to be significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
The reason for these differences is unclear.&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=187</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=187"/>
		<updated>2016-06-07T02:10:58Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* Geant4 Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;ReleaseWithDebInfo&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . mkdir build cd build cmake ../B1 make ./exampleB1 exampleB1.in | tee exampleB1.new.out grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There seem to be significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
The reason for these differences is unclear.&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=186</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=186"/>
		<updated>2016-06-07T02:10:36Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* Geant4 Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;ReleaseWithDebInfo&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_XM=ON \t&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . mkdir build cd build cmake ../B1 make ./exampleB1 exampleB1.in | tee exampleB1.new.out grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There seem to be significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
The reason for these differences is unclear.&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=185</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=185"/>
		<updated>2016-06-07T02:05:20Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* Geant4 Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;Release&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_USOLIDS=OFF \&lt;br /&gt;
-DGEANT4_USE_WT=OFF \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
-DINVENTOR_INCLUDE_DIR=/unix/pbt/software/dev/Coin-3.1.3/include/ \&lt;br /&gt;
-DINVENTOR_LIBRARY=/unix/pbt/software/dev/Coin-3.1.3/lib/libCoin.so \&lt;br /&gt;
-DINVENTOR_SOXT_INCLUDE_DIR=/unix/pbt/software/dev/SoXt-1.3.0/include/ \&lt;br /&gt;
-DINVENTOR_SOXT_LIBRARY=/unix/pbt/software/dev/SoXt-1.3.0/lib/libSoXt.so \&lt;br /&gt;
-DMOTIF_INCLUDE_DIR=/usr/include \&lt;br /&gt;
-DMOTIF_LIBRARIES=/usr/lib64/libXm.so \&lt;br /&gt;
-DQT_QMAKE_EXECUTABLE=/unix/pbt/software/dev/qt-5.5.1/bin/qmake \&lt;br /&gt;
-DBUILD_SHARED_LIBS=ON \&lt;br /&gt;
-DBUILD_STATIC_LIBS=OFF \&lt;br /&gt;
-DCMAKE_COLOR_MAKEFILE=ON \&lt;br /&gt;
-DCMAKE_USE_RELATIVE_PATHS=OFF \&lt;br /&gt;
-DCMAKE_VERBOSE_MAKEFILE=OFF \&lt;br /&gt;
/unix/pbt/software/src/geant4/geant4.10.02.p01-source&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . mkdir build cd build cmake ../B1 make ./exampleB1 exampleB1.in | tee exampleB1.new.out grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There seem to be significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
The reason for these differences is unclear.&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=184</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=184"/>
		<updated>2016-06-07T02:04:24Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* Geant4 Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/geant4/geant4.10.02.p01-prod-sl6&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;Release&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_USOLIDS=OFF \&lt;br /&gt;
-DGEANT4_USE_WT=OFF \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
-DINVENTOR_INCLUDE_DIR=/unix/pbt/software/dev/Coin-3.1.3/include/ \&lt;br /&gt;
-DINVENTOR_LIBRARY=/unix/pbt/software/dev/Coin-3.1.3/lib/libCoin.so \&lt;br /&gt;
-DINVENTOR_SOXT_INCLUDE_DIR=/unix/pbt/software/dev/SoXt-1.3.0/include/ \&lt;br /&gt;
-DINVENTOR_SOXT_LIBRARY=/unix/pbt/software/dev/SoXt-1.3.0/lib/libSoXt.so \&lt;br /&gt;
-DMOTIF_INCLUDE_DIR=/usr/include \&lt;br /&gt;
-DMOTIF_LIBRARIES=/usr/lib64/libXm.so \&lt;br /&gt;
-DQT_QMAKE_EXECUTABLE=/unix/pbt/software/dev/qt-5.5.1/bin/qmake \&lt;br /&gt;
-DBUILD_SHARED_LIBS=ON \&lt;br /&gt;
-DBUILD_STATIC_LIBS=OFF \&lt;br /&gt;
-DCMAKE_COLOR_MAKEFILE=ON \&lt;br /&gt;
-DCMAKE_USE_RELATIVE_PATHS=OFF \&lt;br /&gt;
-DCMAKE_VERBOSE_MAKEFILE=OFF \&lt;br /&gt;
/unix/pbt/software/src/geant4.10.02&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . mkdir build cd build cmake ../B1 make ./exampleB1 exampleB1.in | tee exampleB1.new.out grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There seem to be significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
The reason for these differences is unclear.&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=183</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=183"/>
		<updated>2016-06-07T02:02:36Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: /* Geant4 Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
-DCMAKE_INSTALL_PREFIX=&amp;quot;/unix/pbt/software/prod-sl6&amp;quot; \&lt;br /&gt;
-DCMAKE_INSTALL_CONFIG_NAME=&amp;quot;Release&amp;quot; \&lt;br /&gt;
-DGEANT4_BUILD_MULTITHREADED=ON \&lt;br /&gt;
-DGEANT4_INSTALL_DATA=ON \&lt;br /&gt;
-DGEANT4_BUILD_EXAMPLES=OFF \&lt;br /&gt;
-DGEANT4_BUILD_TESTS=OFF \&lt;br /&gt;
-DGEANT4_ENABLE_TESTING=OFF \&lt;br /&gt;
-DGEANT4_BUILD_STORE_TRAJECTORY=ON \&lt;br /&gt;
-DGEANT4_BUILD_VERBOSE_CODE=ON \&lt;br /&gt;
-DGEANT4_USE_G3TOG4=ON \&lt;br /&gt;
-DGEANT4_USE_GDML=ON \&lt;br /&gt;
-DGEANT4_USE_INVENTOR=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKDAWN=ON \&lt;br /&gt;
-DGEANT4_USE_NETWORKVRML=ON \&lt;br /&gt;
-DGEANT4_USE_OPENGL_X11=ON \&lt;br /&gt;
-DGEANT4_USE_QT=ON \&lt;br /&gt;
-DGEANT4_USE_RAYTRACER_X11=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_CLHEP=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_EXPAT=ON \&lt;br /&gt;
-DGEANT4_USE_SYSTEM_ZLIB=ON \&lt;br /&gt;
-DGEANT4_USE_USOLIDS=OFF \&lt;br /&gt;
-DGEANT4_USE_WT=OFF \&lt;br /&gt;
-DGEANT4_USE_XM=ON \&lt;br /&gt;
-DINVENTOR_INCLUDE_DIR=/unix/pbt/software/dev/Coin-3.1.3/include/ \&lt;br /&gt;
-DINVENTOR_LIBRARY=/unix/pbt/software/dev/Coin-3.1.3/lib/libCoin.so \&lt;br /&gt;
-DINVENTOR_SOXT_INCLUDE_DIR=/unix/pbt/software/dev/SoXt-1.3.0/include/ \&lt;br /&gt;
-DINVENTOR_SOXT_LIBRARY=/unix/pbt/software/dev/SoXt-1.3.0/lib/libSoXt.so \&lt;br /&gt;
-DMOTIF_INCLUDE_DIR=/usr/include \&lt;br /&gt;
-DMOTIF_LIBRARIES=/usr/lib64/libXm.so \&lt;br /&gt;
-DQT_QMAKE_EXECUTABLE=/unix/pbt/software/dev/qt-5.5.1/bin/qmake \&lt;br /&gt;
-DBUILD_SHARED_LIBS=ON \&lt;br /&gt;
-DBUILD_STATIC_LIBS=OFF \&lt;br /&gt;
-DCMAKE_COLOR_MAKEFILE=ON \&lt;br /&gt;
-DCMAKE_USE_RELATIVE_PATHS=OFF \&lt;br /&gt;
-DCMAKE_VERBOSE_MAKEFILE=OFF \&lt;br /&gt;
../../src/geant4.10.02&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . mkdir build cd build cmake ../B1 make ./exampleB1 exampleB1.in | tee exampleB1.new.out grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There seem to be significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
The reason for these differences is unclear.&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=174</id>
		<title>Software/Geant4/Installation</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation&amp;diff=174"/>
		<updated>2016-06-03T11:03:53Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation Of Geant4 And Supporting Packages ==&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive instructions on installing Geant4.  &lt;br /&gt;
This provides an overview of the installation procedure, as well as a list of prerequisites and additional software that need to be installed alongside Geant4.  &lt;br /&gt;
&lt;br /&gt;
In addition, information is given on the installation procedure for this additional software and the location the software is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; described here is the combination of files, folders, settings and user interface that allow users to make use of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; and related software packages for particle beam therapy simulations.&lt;br /&gt;
&lt;br /&gt;
Accessing the environment requires the following:&lt;br /&gt;
* Access to the filesystem and required folders.&lt;br /&gt;
* Terminal access to run simulations.&lt;br /&gt;
* A visualisation engine such as OpenGL on X (&#039;&#039;optional&#039;&#039;).&lt;br /&gt;
* Setting environment variables to point to installed software and scripts.&lt;br /&gt;
&lt;br /&gt;
The order of installation is important, as some packages depend on having the other packages first.&lt;br /&gt;
In some cases, installations will be successful if carried out in the wrong order, but some features will be disabled that should be enabled.&lt;br /&gt;
The order of packages described below is the order in which these packages were installed into the PBT environment.&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The list of required software is split into 2 categories:&lt;br /&gt;
&lt;br /&gt;
* [[#Prerequisites|Prerequisites]] are those components that are required in order for some part of &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; or the resulting simulation visualisations to function correctly;&lt;br /&gt;
* [[#Add Ons|Add Ons]] are optional pieces of software &amp;amp;mdash; normally visualisation software &amp;amp;mdash; that are installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]].&lt;br /&gt;
&lt;br /&gt;
See the individually linked pages for information on building each of the components that do not ship by default.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides extensive information on &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s02.html software that must be installed to compile Geant4 itself] and software required in order to &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s03.html compile optional components of Geant4].&lt;br /&gt;
&lt;br /&gt;
These are:&lt;br /&gt;
&lt;br /&gt;
* A C++11 compatible compiler: on Linux, this is [https://gcc.gnu.org &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;: the GNU Compiler Collection] which is installed by default.&lt;br /&gt;
* [[/CMake|&amp;lt;code&amp;gt;CMake&amp;lt;/code&amp;gt;]] required for building the various &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations through &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; files.&lt;br /&gt;
* The [[/CLHEP|&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; Class Library]] that provides a range of foundation and utility classes needed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; simulations.&lt;br /&gt;
&lt;br /&gt;
* [https://www.opengl.org &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; headers and libraries] to provide support for &amp;lt;code&amp;gt;OpenGL&amp;lt;/code&amp;gt; graphics (graphics card specific; installed by default on most Operating Systems).&lt;br /&gt;
* [https://en.wikipedia.org/wiki/X_Window_System &amp;lt;code&amp;gt;X11&amp;lt;/code&amp;gt;] headers and libraries to provide support for the &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;-Window system (installed by default on &amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;nix systems&lt;br /&gt;
* [[/Qt|&amp;lt;code&amp;gt;Qt4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Qt5&amp;lt;/code&amp;gt; headers and libraries]] to provide support for the Qt user interface and visualisation. &lt;br /&gt;
* [[/Xerces-C|&amp;lt;code&amp;gt;Xerces-C++&amp;lt;/code&amp;gt; headers and libraries]] compiled against the C++11 standard to provide support for GDML geometry descriptions.&lt;br /&gt;
* [http://www.opengroup.org/openmotif &amp;lt;code&amp;gt;Motif&amp;lt;/code&amp;gt;] and X11 headers and libraries to provide support for the Motif user interface and visualisation (installed by default on Linux)&lt;br /&gt;
* [[/Coin3D|&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;]] for Open Inventor visualisation (&amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt; is a free implementation of Open Inventor).  This requires the following libraries to be installed:&lt;br /&gt;
** The [[/Coin3D#simage|&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt;]] library with image format loaders and front-ends to common import libraries.  &amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; is meant for use with applications which read image files as textures.  &#039;&#039;&#039;&amp;lt;code&amp;gt;simage&amp;lt;/code&amp;gt; must be installed before &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
** The [[/Coin3D#SoXt|&amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt;]] open source InventorXt library, which is a GUI binding for using Open Inventor with Xt/Motif. &amp;lt;code&amp;gt;SoXt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
** [[/Coin3D#SoQt|&amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt;]] open source &amp;lt;code&amp;gt;Qt&amp;lt;/code&amp;gt; GUI component toolkit library for &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;SoQt&amp;lt;/code&amp;gt; must be installed after &amp;lt;code&amp;gt;Coin3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Add Ons ===&lt;br /&gt;
&lt;br /&gt;
The [http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/index.html CERN Geant4 Installation Guide] provides a range of &lt;br /&gt;
[http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch01s04.html software suggested for use with &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;].  &lt;br /&gt;
While none of these need to be installed for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; to compile and run, they are useful for visualising the resulting simulations.&lt;br /&gt;
&lt;br /&gt;
The following subset is installed on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Cluster]]:&lt;br /&gt;
&lt;br /&gt;
* The [[/DAWN|&amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt;]] postscript renderer to support the DAWN visualisation driver.&lt;br /&gt;
* The [[/HepRApp|&amp;lt;code&amp;gt;HepRApp&amp;lt;/code&amp;gt;]] Browser for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/Java Analysis Studio|&amp;lt;code&amp;gt;Java Analysis Studio&amp;lt;/code&amp;gt;]] (&amp;lt;code&amp;gt;JAS3&amp;lt;/code&amp;gt;), along with the [[/Java Analysis Studio#WIRED4|&amp;lt;code&amp;gt;WIRED4 JAS Plug-IN&amp;lt;/code&amp;gt;]] for use with the [http://www.slac.stanford.edu/~perl/heprep/ HepRep] visualisation driver.&lt;br /&gt;
* The [[/gMocren|&amp;lt;code&amp;gt;gMocren&amp;lt;/code&amp;gt;]] volume visualiser for &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; medical simulations.&lt;br /&gt;
&lt;br /&gt;
== Geant4 Installation ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://geant4.web.cern.ch/geant4/&lt;br /&gt;
; Latest version : 10.0.2 (13 June 2014)&lt;br /&gt;
; Source tarball : &amp;lt;code&amp;gt;src/geant4/geant4.10.00.p02.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the required software has now been installed, and &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; itself can finally be installed.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a number of ways to configure the software before building. Using the &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; command, each configuration option can be set interactively. Alternatively, the cmake command below configures with the recommended options. &lt;br /&gt;
* The makefile doesn&#039;t support &amp;lt;code&amp;gt;make install prefix&amp;lt;/code&amp;gt;, and so &amp;lt;code&amp;gt;DESTDIR&amp;lt;/code&amp;gt; must be used instead, and the files moved after installation.&lt;br /&gt;
&lt;br /&gt;
Installation commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=&amp;amp;quot;/unix/pbt/software/dev&amp;amp;quot; -DCMAKE_INSTALL_CONFIG_NAME=&amp;amp;quot;Release&amp;amp;quot; -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_INSTALL_DATA=ON -DGEANT4_BUILD_EXAMPLES=OFF -DGEANT4_BUILD_TESTS=OFF -DGEANT4_ENABLE_TESTING=OFF -DGEANT4_BUILD_STORE_TRAJECTORY=ON -DGEANT4_BUILD_VERBOSE_CODE=ON -DGEANT4_USE_G3TOG4=ON -DGEANT4_USE_GDML=ON -DGEANT4_USE_INVENTOR=ON -DGEANT4_USE_NETWORKDAWN=ON -DGEANT4_USE_NETWORKVRML=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_QT=ON -DGEANT4_USE_RAYTRACER_X11=ON -DGEANT4_USE_SYSTEM_CLHEP=OFF -DGEANT4_USE_SYSTEM_EXPAT=ON -DGEANT4_USE_SYSTEM_ZLIB=OFF -DGEANT4_USE_USOLIDS=OFF -DGEANT4_USE_WT=OFF -DGEANT4_USE_XM=ON -DINVENTOR_INCLUDE_DIR=/unix/pbt/software/dev/include -DINVENTOR_LIBRARY=/unix/pbt/software/dev/lib/libCoin.so -DINVENTOR_SOXT_INCLUDE_DIR=/unix/pbt/software/dev/include -DINVENTOR_SOXT_LIBRARY=/unix/pbt/software/dev/lib/libSoXt.so -DQT_QMAKE_EXECUTABLE=/unix/pbt/software/dev/bin/qmake -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_USE_RELATIVE_PATHS=OFF -DCMAKE_VERBOSE_MAKEFILE=OFF ../src/geant4.10.00.p02&lt;br /&gt;
make&lt;br /&gt;
make install DESTDIR=/unix/pbt/software/dev/stow/geant4-10.0.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stow commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/dev/stow&lt;br /&gt;
mv geant4-10.0.2/unix/pbt/software/dev/* geant4-10.0.2/&lt;br /&gt;
rm -r geant4-10.0.2/unix&lt;br /&gt;
stow geant4-10.0.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Software package tests ===&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 built-in tests ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software includes some system tests, which can be included in the installation command via the options &amp;lt;code&amp;gt;-DGEANT4_BUILD_TESTS=ON -DGEANT4_ENABLE_TESTING=ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
However, these tests are only used for testing of the system, and are not included in the distributed source tarballs, nor supported for use by end-users.&lt;br /&gt;
Therefore, these cannot easily be used for validation of the production system installation.&lt;br /&gt;
&lt;br /&gt;
=== GEANT4 examples ===&lt;br /&gt;
&lt;br /&gt;
One test of the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; software after installation is to make sure that all examples can be run and produce the expected results.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The examples can be built at installation time using the command &amp;lt;code&amp;gt;-DGEANT4_BUILD_EXAMPLES=ON&amp;lt;/code&amp;gt;, but this throws up a number of problems because not all installation requirements are met. It is easier to build and run the examples after the installation is complete.&lt;br /&gt;
* Environment variable &amp;lt;code&amp;gt;G4SHARE&amp;lt;/code&amp;gt; is defined in the environment scripts &amp;lt;code&amp;gt;pbt.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pbt-dev.bashrc&amp;lt;/code&amp;gt;, along with the variable &amp;lt;code&amp;gt;G4VERSION&amp;lt;/code&amp;gt;. For the current installation, the location stored in this variable is &amp;lt;code&amp;gt;/unix/pbt/software/dev/share/Geant4-10.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following errors and warnings were seen while configuring examples:&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;HepMC&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;Pythia6&amp;lt;/code&amp;gt; package&lt;br /&gt;
* Cannot find &amp;lt;code&amp;gt;GCCXML&amp;lt;/code&amp;gt; These packages are optional, but some of the examples are designed to demonstrate the connection with these packages. Note that some filetypes, such as &amp;lt;code&amp;gt;AIDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;HBOOK&amp;lt;/code&amp;gt;, do in fact have viewers installed in the PBT environments, but these are not available to the &amp;lt;code&amp;gt;GEANT4&amp;lt;/code&amp;gt; system. This what the errors are reporting.&lt;br /&gt;
&lt;br /&gt;
==== Basic examples ====&lt;br /&gt;
&lt;br /&gt;
===== B1 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp -r ${G4SHARE}/examples/basic/B1 . mkdir build cd build cmake ../B1 make ./exampleB1 exampleB1.in | tee exampleB1.new.out grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.out &amp;amp;gt; exampleB1.old.results grep -B0 -A3 &amp;amp;quot;End of Global Run&amp;amp;quot; exampleB1.new.out &amp;amp;gt; exampleB1.new.results diff exampleB1.old.results exampleB1.new.results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There seem to be significant differences in the simulation results compared to the included &amp;lt;code&amp;gt;exampleB1.out&amp;lt;/code&amp;gt; file.&lt;br /&gt;
The reason for these differences is unclear.&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation/CLHEP&amp;diff=173</id>
		<title>Software/Geant4/Installation/CLHEP</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation/CLHEP&amp;diff=173"/>
		<updated>2016-06-03T10:56:22Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; is intended to be a set of HEP-specific foundation and utility classes such as random generators, physics vectors, geometry and linear algebra.  &lt;br /&gt;
&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; is structured in a set of packages independent of any external package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; requires the &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; libraries in order to compile simulations.  &lt;br /&gt;
By default &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; distributes a minimal version of the &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; library sources with the toolkit to help cross-platform usage.  &lt;br /&gt;
This internal version of the CLHEP library is built and used by default, so having an external install of CLHEP is no longer a prerequisite for Geant4.&lt;br /&gt;
&lt;br /&gt;
However, the [[Software/BDSIM|BDSIM]] accelerator simulation toolkit, which uses Geant4 for particle-matter interactions, requires a standalone version of &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; to be compiled separately from &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;.  &lt;br /&gt;
As such, the instructions below relate to the standalone version of &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://proj-clhep.web.cern.ch/proj-clhep/&lt;br /&gt;
; Source URL : http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/&lt;br /&gt;
; Installed version : 2.3.1.1 (15 Mar 2016)&lt;br /&gt;
; Source code : &amp;lt;code&amp;gt;src/geant4-prerequisites/clhep/2.3.1.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation Notes ==&lt;br /&gt;
&lt;br /&gt;
The [http://proj-clhep.web.cern.ch/proj-clhep/ CLHEP website] provides some documentation on building and installing standalone &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; libraries at http://proj-clhep.web.cern.ch/proj-clhep/INSTALLATION/clhep-2.0.html .&lt;br /&gt;
&lt;br /&gt;
According to the release notes, http://geant4.web.cern.ch/geant4/support/ReleaseNotes4.10.2.html, the supported version of CLHEP for &amp;lt;code&amp;gt;Geant4.10.2.p01&amp;lt;/code&amp;gt; is 2.3.1.1. Using other versions of &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; may produce incorrect simulation results.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
When downloading software, the downloaded tarball (or other &amp;lt;code&amp;gt;Zip&amp;lt;/code&amp;gt; archive) should be placed in an appropriately named directory in &amp;lt;code&amp;gt;/unix/pbt/software/src&amp;lt;/code&amp;gt;: the instructions below assume that the directory is &amp;lt;code&amp;gt;/unix/pbt/software/src/clhep&amp;lt;/code&amp;gt;. The tarball should then be extracted into the same subdirectory.&lt;br /&gt;
&lt;br /&gt;
For CLHEP, the tarball is named &amp;lt;code&amp;gt;clhep-2.3.1.1.tgz&amp;lt;/code&amp;gt;. When extracted, this produces a directory called &amp;lt;code&amp;gt;2.3.1.1&amp;lt;/code&amp;gt;. Therefore, you will end up with a directory called &amp;lt;code&amp;gt;/unix/pbt/software/src/clhep/2.3.1.1&amp;lt;/code&amp;gt; containing the CLHEP source code:&lt;br /&gt;
&lt;br /&gt;
=== Source Code Extraction ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/src/clhep&lt;br /&gt;
tar -xvzf clhep-2.3.1.1.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build And Install ===&lt;br /&gt;
&lt;br /&gt;
==== Development Environment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build&lt;br /&gt;
mkdir -pv clhep/clhep-2.3.1.1&lt;br /&gt;
cd clhep/clhep-2.3.1.1&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=/unix/pbt/software/dev/clhep-2.3.1.1 /unix/pbt/software/src/clhep/2.3.1.1/CLHEP&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Production Environment ====&lt;br /&gt;
&lt;br /&gt;
It may be possible to install in the production environment by running cmake again and changing the install prefix, then running make install:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/clhep/clhep-2.3.1.1&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=/unix/pbt/software/prod .&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will save having to compile the code again. If this does not work, the compilation steps for the development environment (above) will need to be repeated in another build directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build&lt;br /&gt;
mkdir -pv clhep/clhep-2.3.1.1-prod&lt;br /&gt;
cd clhep/clhep-2.3.1.1-prod&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=/unix/pbt/software/prod /unix/pbt/software/src/clhep/2.3.1.1/CLHEP&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation/CLHEP&amp;diff=172</id>
		<title>Software/Geant4/Installation/CLHEP</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Installation/CLHEP&amp;diff=172"/>
		<updated>2016-06-03T10:33:14Z</updated>

		<summary type="html">&lt;p&gt;LawrenceDeacon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; is intended to be a set of HEP-specific foundation and utility classes such as random generators, physics vectors, geometry and linear algebra.  &lt;br /&gt;
&amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; is structured in a set of packages independent of any external package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; requires the &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; libraries in order to compile simulations.  &lt;br /&gt;
By default &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt; distributes a minimal version of the &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; library sources with the toolkit to help cross-platform usage.  &lt;br /&gt;
This internal version of the CLHEP library is built and used by default, so having an external install of CLHEP is no longer a prerequisite for Geant4.&lt;br /&gt;
&lt;br /&gt;
However, the [[Software/BDSIM|BDSIM]] accelerator simulation toolkit, which uses Geant4 for particle-matter interactions, requires a standalone version of &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; to be compiled separately from &amp;lt;code&amp;gt;Geant4&amp;lt;/code&amp;gt;.  &lt;br /&gt;
As such, the instructions below relate to the standalone version of &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
&lt;br /&gt;
; Website : http://proj-clhep.web.cern.ch/proj-clhep/&lt;br /&gt;
; Source URL : http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/&lt;br /&gt;
; Installed version : 2.3.1.1 (15 Mar 2016)&lt;br /&gt;
; Source code : &amp;lt;code&amp;gt;src/geant4-prerequisites/clhep/2.3.1.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation Notes ==&lt;br /&gt;
&lt;br /&gt;
The [http://proj-clhep.web.cern.ch/proj-clhep/ CLHEP website] provides some documentation on building and installing standalone &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; libraries at http://proj-clhep.web.cern.ch/proj-clhep/INSTALLATION/clhep-2.0.html .&lt;br /&gt;
&lt;br /&gt;
According to the release notes, http://geant4.web.cern.ch/geant4/support/ReleaseNotes4.10.2.html, the supported version of CLHEP for &amp;lt;code&amp;gt;Geant4.10.2.p01&amp;lt;/code&amp;gt; is 2.3.1.1. Using other versions of &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; may produce incorrect simulation results.&lt;br /&gt;
&lt;br /&gt;
For installation, &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; does not support installation into a sandbox directory (i.e. there are no options &amp;lt;code&amp;gt;prefix&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;DESTDIR&amp;lt;/code&amp;gt; defined for command &amp;lt;code&amp;gt;make install&amp;lt;/code&amp;gt;) and must be given the installation directory with the &amp;lt;code&amp;gt;-prefix&amp;lt;/code&amp;gt; option.  &lt;br /&gt;
As such, to recompile &amp;lt;code&amp;gt;CLHEP&amp;lt;/code&amp;gt; for different target directories, the &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; script must be rerun with a modified &amp;lt;code&amp;gt;-prefix /path/to/dest&amp;lt;/code&amp;gt; option.  This has to be managed manually as can be seen in the installation commands below.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
When downloading software, the downloaded tarball (or other &amp;lt;code&amp;gt;Zip&amp;lt;/code&amp;gt; archive) should be placed in an appropriately named directory in &amp;lt;code&amp;gt;/unix/pbt/software/src&amp;lt;/code&amp;gt;: the instructions below assume that the directory is &amp;lt;code&amp;gt;/unix/pbt/software/src/clhep&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The source code should then be extracted into a suitable subdirectory in &amp;lt;code&amp;gt;/unix/pbt/software/build&amp;lt;/code&amp;gt;.  The extracted source code directory can only be deleted once the software has been built and installed.&lt;br /&gt;
&lt;br /&gt;
=== Source Code Extraction ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/src/geant4-prerequisites/qt&lt;br /&gt;
tar -xvz -f qtbase-opensource-src-5.6.0.tar.gz&lt;br /&gt;
mv qtbase-opensource-src-5.6.0 qt-5.6.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build And Install ===&lt;br /&gt;
&lt;br /&gt;
These instructions assume the code has already been built for the &#039;&#039;&#039;Development&#039;&#039;&#039; environment before building for the &#039;&#039;&#039;Production&#039;&#039;&#039; environment, so some of the commands for the &#039;&#039;&#039;Production&#039;&#039;&#039; install are omitted.  &lt;br /&gt;
Although it is highly discouraged to install straight to the &#039;&#039;&#039;Production&#039;&#039;&#039; environment without first compiling a &#039;&#039;&#039;Development&#039;&#039;&#039; version, it is possible to do so by adding in the directory creation commands at the start. &lt;br /&gt;
&lt;br /&gt;
==== Development Environment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build&lt;br /&gt;
mkdir -pv qt/qt-5.6.0&lt;br /&gt;
cd qt/qt-5.6.0&lt;br /&gt;
../../../src/geant4-prerequisites/qt/qt-5.6.0/configure -prefix /unix/pbt/software/dev/qt-5.6.0 -release -opensource -confirm-licence -nomake tests -nomake examples -optimized-qmake -opengl -qt-xcb&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Production Environment ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /unix/pbt/software/build/qt/qt-5.6.0&lt;br /&gt;
../../../src/geant4-prerequisites/qt/qt-5.6.0/configure -prefix /unix/pbt/software/prod-sl6 -release -opensource -confirm-licence -nomake tests -nomake examples -optimized-qmake -opengl -qt-xcb&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>LawrenceDeacon</name></author>
	</entry>
</feed>