Installation notes for the simulation of the High
Resolution Array at the RIBF
Martha Liliana Cortés
INFN - Laboratori Nazionali di Legnaro
May 7, 2019

1Disclaimer

I write here based on my experience. It does not mean that this is the best way to get things done.
This installation was tested with:• Ubuntu 16.04.6 LTS• g++ (Ubuntu 5.4.0-6ubuntu1 16.04.11) 5.4.0 20160609

2

Install Geant4

Get Geant 4.10.4.p03 from https://geant4.web.cern.ch/support/download archive
Due to backwards compatibility issues, this is the required version of Geant4!
Instructions on how to install can be found in
http://geant4-userdoc.web.cern.ch/geant4-userdoc/
UsersGuides/InstallationGuide/html/index.html.
Here I list the main steps:• Get the required software:– cmake 2.8 or higher: sudo apt-get install cmake– gcc (≥5.0). Check with gcc --version and g++ --version– OpenGL/MesaGL: sudo apt-get install libgl1-mesa-dev mesa-common-dev
You can check the installation by typing glxinfo | grep -i opengl and seeing some lines
containing “OpenGL”– Qt4: sudo apt install libqt4-designer libqt4-opengl libqt4-svg libqtgui4 libqtwebkit4– Xmi libraries: sudo apt-get install libxmu-dev libxi-dev– gv: sudo apt install gv• Get the additional sorftware– DAWN:∗ Get the source of DAWN 3.90b from http://geant4.kek.jp/ tanaka/DAWN/About DAWN.html∗ Make sure you have Tcl/Tk by typing ”wish” in a shell and seeing a window opening∗ Be sure to have a tcsl shell: sudo apt-get install tcsh
∗ Select the postscript viewer: tcsh and then setenv DAWN PS PREVIEWER "okular"(I chose okular)∗ Decompress DAWN: tar -xvzf dawn 3 90b.tgz
Copy the decompressed folder to the path of your preference. For me: /home/liliana/Packages

1∗ Inside the DAWN folder:make clean
make guiclean./configure (answer the questions as you prefer. I put no flags)
makemake install (depending where you chose to install it you may need to be su)
Be sure that your installation folder is in the PATH!
Test by typying dawn primitives.prim– HepRep:∗ Download the file from: http://www.slac.stanford.edu/ perl/HepRApp/HepRApp.jar∗ Put the HepRApp.jar wherever you want
∗ Open HepRep with: java -jar HepRApp.jar∗ If you do not have java, install the Java Runtime Environment withsudo apt-get install default-jre– WIRED:∗ Download Jas3 from http://jas.freehep.org/jas3/Download.html∗ Unpack the file and copy it to the place of your preference (for me /home/liliana/Packages)∗ inside the folder, run ./jas3∗ make a link (or copy) to this executable so it is in your PATH
∗ To instal Wired:Open Jas3Open View − > Plugin Manager
Go to the tab called ”Available” and select WIRED4. Instal it and restart.
This should also install WIRED 4 Base Library and HepRep plugins.
• Install Geant4.10.4– I make a folder called Packages/Geant4.10.4, and inside put the folder containing the sourcecode of geant, which i got in the first step
– Inside the same folder, I make two more folders, one called ”install” and one called ”build”.
The structure is:
Packages/Geant4.10.4/geant4.10.4.p03
Packages/Geant4.10.4/build
Packages/Geant4.10.4/install– inside the build folder I run the cmake command as (include download of the data and openGLsupport):
cmake -DCMAKE INSTALL PREFIX=/home/liliana/Packages/Geant4.10.4/install-DGEANT4 INSTALL DATA=ON -DGEANT4 USE OPENGL X11=ON -DGEANT4 USE SYSTEM EXPAT=OFF/home/liliana/Packages/Geant4.10.4/geant4.10.04.p03– make -j6– make install• Setting variables and running a example– To setup the environment fo to the install/bin and run .

geant4.sh– If you are planning to compile with GNUmakefile and not cmake (as is the case for thissimulation), go to
install/share/geant4make/ and dosource geant4make.shThis will setup the binmake.gmk that is needed for GNUmakefile. In this script, the default
path to put the compiled applications is set. By default it is in ∼/geant4 workdir.
I prefere to change it, but up to you! In case you want to do it, replace
if test "x$G4WORKDIR" = "x" ; then2

export G4WORKDIR=$HOME/geant4 workdir
fiWithexport G4WORKDIR=/home/liliana/Packages/Geant4.10.4/bin(or wherever you want). This folder should also be in your PATH
– go to examples folder Geant4.10.4/geant4.10.4.p03/examples/basic/B1/ (for example)
type make
After compiling, type exampleB1 and see the result.
Be sure that you have the visualization software also in the PATH!

3

Running the HR-simulation• Be sure that you set the environment variable correctly. The script geant4.10.4 can be useful toset them up• Get the code and untar it• Inside the Frankenball folder type make
• Type UCFrankenball
Idle>
Idle> /control/execute vis.mac
Idle> exit
• It all works fine, you should have an eps file with the gemetry like this:3