FastJet on RCF

Below are instructions for installing and running FastJet on RCF. Starting from the instructions Joel Mazer wrote for his Star-JetFramework code located here.

1. download FastJet 3.0+, for example using

wget http://fastjet.fr/repo/fastjet-3.3.2.tar.gz

while in a terminal on RCF. Make a folder called fastjet-install in the same location as the .tar.gz file.

2.

RCAS & PDSF both require 32-bit build to fit into other software framework. To force this install on the 64-bit systems, please follow the below prescription to avoid headaches.

FASTJET installation example:
 

tar zxvf fastjet-3.3.2.tar.gz
cd fastjet-3.3.2/
./configure --prefix=$PWD/../fastjet-install CXXFLAGS="-m32 -fPIC -fno-inline" CFLAGS="-m32 -fPIC -fno-inline" LDFLAGS="-m32"
make
make check
make install

if you need FJ contrib packages, these can be downloaded with
 

wget http://fastjet.hepforge.org/contrib/downloads/fjcontrib-1.041.tar.gz
 

FastJet contrib installation example:

tar zxvf fjcontrib-1.041.tar.gz
cd fjcontrib-1.041
./configure --fastjet-config=$PWD/../fastjet-3.3.2/fastjet-config --prefix=$PWD/../fastjet-install CXXFLAGS="-m32 -fPIC -fno-inline" CFLAGS="-m32 -fPIC -fno-inline" LDFLAGS="-m32"

make 
make install 
make fragile-shared 
make fragile-shared-install
 

3. unset flags after:

unset CXXFLAGS CFLAGS LDFLAGS

4. You will additionally need to set FastJet environmental variables in your startup file

for .cshrc

setenv FASTJET "/path/to/fastjet-install"
setenv FASTJETLIB "/path/to/fastjet-install/lib/"
setenv FASTJET_CONTRIB "/path/to/fjcontrib"

#for path and library path, of course they should be added to any other paths you have already added here
setenv LD_LIBRARY_PATH "${FASTJETLIB}:${LD_LIBRARY_PATH}"
setenv PATH "${FASTJET}/bin:${PATH}"

for .bashrc

export FASTJET='/path/to/your/FastJet/fastjet-install'
export FASTJET_CONTRIB='/path/to/your/FastJet/fjcontrib-1.041'

5. For any Makefile, include fastjet libraries and includes as normal, ex.

JETLIBS = -L$(FASTJETLIB) -ldl -lfastjet -lfastjetplugins -lfastjettools -lsiscone -lsiscone_spherical
JETINCS = -I$(FASTJET)/include/

6. For includes, use a separate FJ_includes.h file like the one attached here, and include this in any compiled code that uses FastJet. I have no idea what any of this does really, I took it from Joel Mazer's code, but it wouldn't compile without doing the includes this way. Instead of including individual FastJet header files separately, one just includes the FJ_includes.h file whenever needed.

7. Finally, if you are using the standard StPicoEvent code with an additional jet class, or if you need to run any macro using fastjet, you will need to explicitly load the libraries. This requires you to have set the softlinks in your macro directory, or to provide complete paths to the libraries.

  gSystem->Load("fastjetlib/libfastjet.so");
  gSystem->Load("fastjetlib/libfastjettools.so");
  gSystem->Load("fastjetlib/libfastjetplugins.so");
  gSystem->Load("fastjetlib/libsiscone.so");

 
Once these libraries are loaded, the analysis should run and you should be able to use FastJet.