Ninja is hosted by Hepforge, IPPP Durham


This is the development page for the Ninja project. Ninja is a public C++ library which implements the Integrand Reduction via Laurent Expansion method for the computation of one-loop integrals.

On top of its main algorithm, the library contains several tools which might be useful for the solution of various kinds of problems. Among these tools there are:

  • C++ classes and routines for real and complex momenta
  • C++ classes and routines for massless spinors and polarization vectors
  • a C++ implementation of the RAMBO phase-space generator (based on the Fortran-90 implementation of GoSam, which in turn is based on the original Fortran-77 implementation by R. Kleiss, W. J. Stirling and S. D. Ellis)
  • a C++ wrapper of the OneLOop library of A. van Hameren for the computation of Master Integrals: the wrapper includes a cache of computed integrals which can significantly improve the performance of complex computations

Please contact the author if you have questions or issues with the library.


Ninja has been designed and implemented by:

  • Tiziano Peraro <tiziano.peraro[AT]>

Other developers:

  • Pierpaolo Mastrolia <pierpaolo.mastrolia[AT]>
  • Giovanni Ossola <gossola[AT]>

Former developers:

  • Edoardo Mirabella


Latest release:

Older versions:


You can also obtain the latest version of Ninja from the public Mercurial repository, with the commands

    hg clone my_ninja
    cd my_ninja
    autoreconf -i

where my_ninja is a directory where the code should be downloaded. You can update to the latest version at any time with

    hg pull
    hg update
    autoreconf -i


The algorithm implemented in Ninja is based on:

  • P. Mastrolia, E. Mirabella and T. Peraro, “Integrand reduction of one-loop scattering amplitudes through Laurent series expansion,” JHEP 1206 (2012) 095, arXiv:1203.0291 [hep-ph].
  • T. Peraro, “Ninja: Automated Integrand Reduction via Laurent Expansion for One-Loop Amplitudes,” Comput. Phys. Commun. 185 (2014) 2771, arXiv:1403.1229 [hep-ph].

The interface with the one-loop package GoSam is based on:

  • H. van Deurzen, G. Luisoni, P. Mastrolia, E. Mirabella, G. Ossola and T. Peraro, “Multi-leg One-loop Massive Amplitudes from Integrand Reduction via Laurent Expansion,” JHEP 1403 (2014) 115, arXiv:1312.6678 [hep-ph].

The interface for tensor integrands, currently used by MadLoop, is based on:

Libraries used by Ninja:

Projects which use Ninja: