Rivet Instructions

These instructions will be useful for anyone wanting to manually download and install a fully comprehensive version of Rivet complete with AGILe and a Pythia generator. It meant to be a self-contained set up.

Download and Installation

First Dependencies


First, make a local directory /home/RIVET/. The first two items you will want to install into this directory are gsl and boost.

For gsl-1.16: first, make a directory gsl-1.16 in /home/RIVET/ and download gsl-latest.tar.gz into /home/RIVET/gsl-1.16/ (you can download this or any other version here). Then run

gzip -d gsl-latest.tar.gz
tar -xf gsl-latest.tar
./configure --exec-prefix=/home/RIVET/gsl-1.16/ --prefix=/home/RIVET/gsl-1.16
make
make install


For boost: again, make a directory boost_1_57_0 in /home/RIVET/ and download boost_1_57_0.tar.gz from this link to that directory. Then run

gzip -d boost_1_57_0.tar.gz
tar -xf boost_1_57_0.tar
./boostrap.sh --prefix=/home/RIVET/boost_1_57_0/
./b2 install --prefix=/home/RIVET/boost_1_57_0/

Note here that the b2 command may take a while (~30-45 minutes).

Remaining Dependencies


Once you've installed gsl and boost, the next step is to install HepMC, fastjet, yaml, YODA, and AGILe. The following instructions outline these procedures:

For HepMC: Make a directory HepMC-2.06.09 in /home/RIVET/ and download HepMC-2.06.09 from this link to that directory. Then run

gzip -d HepMC -2.06.09.tar.gz
tar -xf HepMC -2.06.09.tar
./configure --prefix=/home/RIVET/HepMC-2.06.09/ --with-momentum=GEV --with-length=MM
make && make install


For fastjet: Make a directory fastjet-3.1.1 and fastjet-install in /home/RIVET/ and download fastjet-3.1.1 from this link to that directory. Then run

gzip -d fastjet-3.1.1.tar.gz
tar -xf fastjet-3.1.1.tar
./configure --prefix=/home/RIVET/fastjet-install/ --enable-allcxxplugins --enable-shared
make && make install

For yaml: Make a directory yaml-cpp-0.5.1 in /home/RIVET/ and run (in that directory)

wget https://yaml-cpp.googlecode.com/files/yaml-cpp-0.5.1.tar.gz
gzip -d yaml-cpp-0.5.1.tar.gz 
tar -xf yaml-cpp-0.5.1.tar 
cd yaml-cpp-0.5.1/
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/home/RIVET/yaml-cpp-0.5.1/
make && make install

For YODA: Make a directory YODA-1.3.0 and YODA-install in /home/RIVET/ and run (in YODA-1.3.0)

wget http://www.hepforge.org/archive/yoda/YODA-1.3.0.tar.gz
gzip -d YODA-1.3.0.tar.gz
tar -xf YODA-1.3.0.tar
mkdir YODA-install
cd YODA-1.3.0
./configure --prefix=/home/RIVET/YODA-install/ --with-boost=/home/RIVET/boost_1_57_0/
make && make install
source yodaenv.sh

You may want to add this final source file to your bashrc for easier access later.

For AGILe: Make a directory AGILe-1.4.1 and AGILe-install in /home/RIVET/ and download AGILe from this link to /home/RIVET/AGILe-1.4.1/. Then run

./configure --prefix=/home/RIVET/AGILe-install/ BOOSTPATH=/home/RIVET/boost_1_57_0/ HEPMCPATH=/home/RIVET/HepMC-2.06.09/
make
make check
make install
source agileenv.sh

You may want to source agileenv.sh in your bashrc to make Rivet easier to use later. At this point, AGILe will work, but you will not have access to any generators. In your /home/RIVET/AGILe-1.4.1/ directory, make a new directory called =genserg and enter it. Then run

wget http://svn.hepforge.org/agile/genser/agile-genser-bootstrap
chmod a+x agile-genser-bootstrap
tar -zxvf pythia6-423.2-src.tgz
mkdir downloads
cp -r pythia6/ downloads/ 
./agile-genser-bootstrap 
cd pythia6/423.2
./configure
make
make check
make install
./agile-genser-bootstrap 
export AGILE_GEN_PATH=/home/druekeel/Work5/RIVET/AGILe-1.4.1/Genser/pythia6/

This will make Pythia6 an available generator for AGILe. Other generators are available here. The examples below will use Pythia6. Here again, it may be beneficial to add the AGILE_GEN_PATH to your bashrc.

Downloading and Installing Rivet


Now we are finally ready to download Rivet
itself, having just downloaded all of its dependencies. To download Rivet, make a directory Rivet-2.2.0 and Rivet-install in /home/RIVET/ and, in /home/RIVET/Rivet-2.2.0/, run

wget http://www.hepforge.org/archive/rivet/Rivet-2.2.0.tar.gz
gzip -d Rivet-2.2.0.tar.gz
tar -xf Rivet-2.2.0.tar
rm Rivet-2.2.0.tar
mkdir Rivet-install
cd Rivet-2.2.0/
./configure --prefix=/home/RIVET/Rivet-install/ --with-yoda=/home/RIVET/YODA-install/ --with-yaml_cpp=/home/RIVET/yaml-cpp-0.5.1/ --with-hepmc=/home/RIVET/HepMC-2.06.09/ --with-fastjet=/home/RIVET/fastjet-install --with-boost=/home/RIVET/boost_1_57_0/ --with-gsl=/home/RIVET/gsl-1.16/
make && make install

Note here that the make will take a little while to complete. Finally, run

source rivetenv.sh

You may also want to add this line to your bashrc.

To ensure everything is running properly now, try running the following commands:

rivet --help
rivet --list-analyses
rivet --show analysis MC_GENERIC
agile-runmc --list-gens

Tab completion should be available in all cases. The final command should list Pythia6 (or whatever generator(s) you installed in your genser path).

Examples

Example 1


Now we are ready to move on to a basic example to ensure everything is working properly. The first example will generate plots based on a pre-made Rivet analysis and with events generated through the Rivet-Pythia interface. To begin, make a test directory (/home/RIVET/test/) and enter it. We will run the test with a fifo to ensure that both Rivet and Pythia are run, and that the compiler doesn't just stop after it generates the events. So we will run

mkfifo fifo.hepmc
agile-runmc Pythia6:423 --beams=TVT:1800 -n 500000 -o fifo.hepmc &
rivet --analysis=CDF_2001_S4751469 fifo.hepmc

Note here that it will take a while to run this code with 500000 events, so generating fewer may be a better idea if you are trying to run things quickly. In addition, you can easily change the parameters for the beams or analysis if you wish. The output of this is a Rivet.yoda file. You can make a human-readable file from this using

yoda2flat Rivet.yoda

which creates a Rivet.dat file. In addition, we will want to create plots based on our output. To do this, we run

yoda2aida Rivet.yoda

which outputs a Rivet.aida file (all plotting with Rivet is done through Aida, so this step is necessary). Finally, run

rivet-mkhtml Rivet.aida:'test'

This final line will create a directory called plots containing another directory with the name of the analysis we used and a file index.html. The analysis directory has a variety of .dat, .pdf, and .png images as well as another index.html file. The images produced are paper-ready, and have a legend labeled 'test'.

Example 2


This is all well and good, but often we want to use Rivet to run over pre-existing files. This second example will allow you to use Rivet to run over .lhe files.

To begin, we need to download an lhef to hepmc converter. In /home/RIVET/, make a directory lhef2hepmc and copy all of the files from here into it. Then run

make HEPMC_PREFIX=/home/HepMC-2.06.09/
make test

Assuming you downloaded the ttbar.lhe file from the given link, these lines will generate a Rivet.yoda file from ttbar.lhe using a fifo. Now, exit this directory and make another test directory (/home/RIVET/test2/). Choose your favorite .lhe file and copy it into this directory. Then run

mkfifo fifo.hepmc
cat unweighted_events.lhe | ../../lhef2hepmcfile/lhef2hepmc 
../../lhef2hepmcfile/lhef2hepmc unweighted_events.lhe unweighted_events.hepmc && rm unweighted_events.hepmc
../../lhef2hepmcfile/lhef2hepmc unweighted_events.lhe -
which rivet && { ../../lhef2hepmcfile/lhef2hepmc unweighted_events.lhe fifo.hepmc & rivet -a MC_GENERIC fifo.hepmc; }

Here, the cat command will take a while to run, the which rivet command runs Rivet on the .lhe file, and the end result is a Rivet.yoda file. As before, we can now generate plots by converting the output to Aida and running the rivet-mkhtml command outlined in the previous example.

-- ElizabethDrueke - 02 Mar 2015
Topic revision: r1 - 02 Mar 2015, ElizabethDrueke
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback