Rivet 3.x is a major new release series, in which we've made some big changes that affect the programming interface (or "API") exposed to analysis authors. Fear not: the changes are simple, and all beneficial to routine writers... it's just the need for transition that's a bit unfortunate. Here is a very quick guide for updating your analysis code from v2 to v3:
addProjection(...)
function no longer exists: replace uses of this with declare(...)
.applyProjection()
should now be apply()
. Fewer characters to type: yay!_h_xxx = bookHisto1D(...)
to book(_h_xxx, ...)
_h_xxx->fill(x, event.weight())
becomes _h_xxx->fill(x)
.We recommend that anyone writing a new analysis should start by running the rivet-mkanalysis
script rather than directly copying an old analysis code: we update the templates generated by the script as new API features and ideas occur, and it always represents best-practice. You can still copy-paste chunks from your old analysis as you need them, modulo the unavoidable API changes above.