# DF JLab Software Install Instructions

These instructions are for installing the software on Ubuntu 16.04. It is assumed that you start in a directory named JLabSoftware which contains the directories CED, COATJAVA, DB, and GEMC

# CE 2.2

These instructions set up the common environment and GEMC with it. Skip if you don't intend on installing GEMC.

The CE is dependent on the following packages which can be easily installed by sudo apt-get install <package>:

• g++
• mysql-client
• libmysqlclient-dev
• libx11-dev
• libxext-dev
• libglu1-mesa-dev
• libxt-dev
• libxmu-dev
• libxrender-dev
• libexpat1-dev
• libxft-dev
• tcsh
• cmake
• git
• libafterimage-dev
• scons
• gawk

Now, assuming you're in the JLabSoftware directory:

cd GEMC
mkdir 2.2
wget http://www.jlab.org/12gev_phys/packages/sources/ceInstall/ceInstall_2.2.tar.gz
tar -zxpf ceInstall_2.2.tar.gz --strip-components 1 -C 2.2


Go to the home directory and open .bashrc in your preferred text editor. Add the following to the bottom of the file:

export JLAB_ROOT=/path/to/JLabSoftware/GEMC
export JLAB_VERSION=2.2
source $JLAB_ROOT/$JLAB_VERSION/ce/jlab.sh


Now close the terminal and open a fresh one. You should see something like:

!! Attention:  BANKS  installation check /opt/jlab_software/2.2/Darwin_macosx10.13-x86_64-clang9.0.0/banks/1.4/bin  not found


Now cd $JLAB_ROOT/2.2/ce and open settings.xcconfig in a text editor. Change the geant4 version to whatever is the latest version from here. Do the same with the file versions.env. You should now be able to run tcsh$JLAB_ROOT/$JLAB_VERSION/install/go_all. Remember to also run ./$JLAB_ROOT/$JLAB_VERSION/install/qt-opensource-linux-x64-<version number>.run The common environment should now be installed. Ensure that the message that displays when opening a new terminal reflects that. # GEMC These instructions setup GEMC and the clas12Tags repository so that you may easily start simulating clas12 runs. If you haven't already, first complete the CE install above, then: cd$JLAB_ROOT
git clone https://github.com/gemc/clas12Tags
cd clas12Tags/4a.2.3/source/physics


Here you are going to open PhysicsList.cc and uncomment the line auto theParticleIterator = GetParticleIterator();. Then:

cd ../..
scons -j4 OPT=1


This should result in an exectuable file simply called gemc in the directory 4a.2.3/source. When running GEMC, you will be wanting to run this file. So, either always use the full path to target this executable, or set the environmental variable \$GEMC to the absolute path to it.

# COATJAVA

All of these assume that you start in the JLabSoftware/COATJAVA directory.

## Release Versions

cp ~/Downloads/clas12-offline-software-<version>.tar.gz .
tar -xzf clas12-offline-software-<version>.tar.gz
cd clas12-offline-software-<version>
bash build-coatjava.sh


The tools should be in the directory ./coatjava/bin

Note: While this appears to build correctly, it would seem that I must use bash instead of ./ to run any of the executables in bin.

## Official Github Version

mkdir clas12-offline-software-official
git clone https://github.com/JeffersonLab/clas12-offline-software.git clas12-offline-software-official
cd clas12-offlone-software-official
./build-coatjava.sh


First, create a Github account if you don't already have one. Then go to Github and hit the fork button. You should now have a repository at https://github.com/<your-username>/clas12-offline-software.

git clone https://github.com/<your-username>/clas12-offline-software
cd clas-12-offline-software
./build-coatjava.sh
==Netbeans Setup Instructions==
=CED=
Staring from the directory JLabSoftware:
<pre>
cd CED
wget https://userweb.jlab.org/~heddle/ced/builds/ced.1.003d.tar.gz
tar -xzf ced.1.003d.tar.gz
cd cedbuild
sudo chmod 764 ced.sh


You should now be able to run CED by using ./ced.sh

Note: For some reason I don't appear to have the full functionality I would expect (e.g. magnification doesn't seem to work).