3. PHENIX specific offline software: PHOOL installation
This step describes how to set up and compile PHOOL software. I will use the pad chambers as an example.
Since many scripts expect to find perl in the /usr/local/bin/ directory, create the soft link (check first if you already have a link):

> ln -s /usr/bin/perl /usr/local/bin/perl

Some codes use the CERN libraries and expect to find them under /cern/pro/lib. Thus we need another soft link:

> ln -s /afs/rhic/asis/@sys/cern /cern

3.1 PHOOL for ordinary users
At this stage, you no longer need to be root user anymore, so switch user to your personal account now. The next couple of steps need to be done in order.

* Set the enviroment variable PH_HOME in your login script as:

(on a local machine, outside BNL, if your home directory resides in /home)
setenv PH_HOME "/home/${USER}/phool"

(on an rcas machine)
setenv PH_HOME "/phenix/workarea/${USER}/phool"

* Source the PHENIX setup script in your login script:

source /opt/phenix/bin/phenix_setup.csh

* Since you might want to compile code, you have to tell where the build libraries should be installed. Put the following at the end of your login script:

which sets up the $PH_HOME/install/i686-pc-linux-gnu/pad directory for compilation.

* Compile and install your code with

> make
> make install

Remote users: The 'make' command will take a while to execute. Especially the last step when it builds the executable from the object files. Many libraries are stored at BNL and takes some time to fetch.

* Before we can run the compiled code, we need to set up the workarea environment. Follow the instructions "Running the CAMERA Reconstruction Chain on Real Data". For simulated data files, look for camTask*.C or padTask*.C in /phenix/workarea/nilsson/phool/work-sim/. These files will change from time to time.