What Rivet is
Rivet is a library and set of programs which produce simulated distributions which can be directly compared to measured data for MC validation and tuning studies. It can also be used without reference data to compare two or more generators to each other for regression testing or tune comparison. The Rivet library contains the tools needed to calculate physical observables from HepMC files or objects, a large set of important experimental analyses, and histogramming tools for data comparison and presentation.
Some neat features of Rivet:
- Separation of generator steering and event analysis
- Automated binning of MC histograms from data --- no more off-by-one errors or hard-coded bin-edge arrays!
- Data import directly from HepData
- Generator-independent implementations of many standard observable calculations
- Hundreds of important data analyses from LEP, HERA, RHIC, KEK-B, Tevatron Runs I & II, LHC experiments, and more
- User-implemented analyses can be used as "plugins" without modifying the Rivet code.
Also provided are command line utilities for merging several generator/tune histograms (and/or reference data) into one histo file and for producing production-quality comparison plots (and Web galleries of such plots).
Installation and getting started
If you want to use Rivet for validation and data/MC comparisons the most important things to understand are RivetProjections which calculate event properties in an efficient and robust way, and RivetAnalysis which book histograms from HepData files, apply projections to a HepMC event, and fill new histograms.
What Rivet is not
It is not a generator steering and main program
Rivet is a generator-independent library and does not directly interface to MC generator codes, or depend upon them: event information is transmitted via the generic HepMC format and code library.
Most modern shower MC generators can produce event output in the HepMC format: for example this is true for Herwig, Pythia and Sherpa. For the older Fortran-based shower generators, the AGILe library may be useful as a C++ command-line tool for running and configuring old shower generators from the LCG/Genser collection -- but note that it has not received many updates since the major LHC experiment migrations to the C++ generation in ~2012.
Typically we write a HepMC data stream to a Unix FIFO "file", and Rivet reads from the other end of that pipe. It is also possible to avoid the I/O load by directly passing HepMC code objects between the generators and Rivet in C++ code, and the modern shower generators all have built-in support for running Rivet in this way.
For partonic event generators which do not simulate a showering/hadronisation process, the normal procedure is to feed their parton-level events through a shower event generator and into Rivet. In the few cases where it is useful to directly analyse partonic events in Rivet (with care!), the =lhef2hepmc= tool may prove useful: https://rivet.hepforge.org/hg/contrib/file/tip/lhef2hepmc
It is not a tuning tool
Rivet is useful for comparison and validation, but does not directly predict better generator tunes. However, Rivet is the standard input mechanism to the Professor tuning system, supplying the generator and reference data against which goodness of fit measures are calculated and minimised.