nuisance is hosted by Hepforge, IPPP Durham
NUISANCE
  • To build against NEUT, NuWro, or GENIE, NUISANCE requires a full installation of the relevant generator.
  • Please see our generator guides on how to set them up, or simply email us.

Getting the code

NUISANCE can be downloaded from our git repository at github. The clone will default to the head development version:

To clone with ssh:
$ git clone git@github.com:NUISANCEMC/nuisance.git

To clone with https:
$ git clone https://github.com/NUISANCEMC/nuisance.git


External dependencies

NUISANCE's only external dependency is ROOT.

For minimisation routines, we require v5.34/19 and above.

  • How to check your ROOT version:
    $ root-config --version

  • Using a lower patch than ROOT 5.34/19 forces omission of the minimisation code from the NUISANCE build and only builds comparison routines.
    This is because ROOT restructured the Math::Minimizer interface in v5.34/19.

Most dependencies are already met by the recommended installation method, although we explicitly use Minuit2 for minimisation.

Turning ON minimisation in NUISANCE

The NUISANCE build enables minimization routines if it can find Minuit2 in your $ root-config --features.

You can also force it by include a preprocessor define:

  • To force NUISANCE to compile WITH minimizer, add
    $ -DUSE_MINIMIZER=1
    to your cmake build defines.
  • e.g. for GENIE
    $ cmake ../ -DUSE_GENIE=1 -DUSE_MINIMIZER=1

Turning OFF minimisation in NUISANCE

NUISANCE supports turning off the Minuit2 libraries if you only want to do generator comparisons and no minimisation, or if you're having trouble with your Minuit2 installation.

If cmake can't find Minuit2 it'll default to turning off the code that depends on Minuit2, but the option can also be forced. This is done on compile time of NUISANCE by a preprocessor define:

  • To force NUISANCE to compile WITHOUT minimizer, add
    $ -DUSE_MINIMIZER=0
    to your cmake build defines.
  • e.g. for GENIE
    $ cmake ../ -DUSE_GENIE=1 -DUSE_MINIMIZER=0

Your ROOT install should now be ready for some NUISANCE! (If not, please email us).

Troubleshooting Minuit2 installation

To check if Minuit2 has been enabled in your ROOT package:

  • Check your ROOT environment:
    $ echo $ROOTSYS $ which root-config
  • If not found, source your ROOT environment:
    $ source /PATH/TO/YOUR/ROOT/bin/thisroot.sh
  • Check ROOT features:
    $ root-config --features | grep 'minuit2'
  • If not found, recompile ROOT with Minuit2 on:
    $ cd $ROOTSYS $ ./configure --enable-minuit2 $ make
  • or if you compiled with cmake:
    $ cd $ROOTSYS $ cmake . -Dminuit2:BOOL=ON $ make

Compiling against generators

Compiling against GENIE

  • Get a GENIE copy (including reweighting engine) and compile it to your liking (or use a preinstalled distributed version, e.g. through UPS)
  • First test your GENIE environment:
    $ which genie-config $ echo $GENIE
    If these don't return what you expect, you've set up GENIE wrong
  • Get the NUISANCE code:
    $ git clone https://phab.hepforge.org/source/nuisancegit.git
  • Build NUISANCE:
    Note: for many recent NUISANCE versions we provide a template of this in myenv.sh (which sets up environment variables for the generators) and freshbuild.sh (which sets up the NUISANCE make process through CMake). Please read and edit these to your liking and/or do this:
    $ cd nuisance $ mkdir build $ cd build $ cmake ../ -DUSE_GENIE=1 $ make $ make docs $ make install $ source $(uname)/setup.sh
  • Check the NUISANCE environment:
    $ which nuiscomp

Generic compiling against other generators

Checking your environment pre-build

  • Check generator environment variables, e.g.
    $ echo $NEUT_ROOT $ echo $NUWRO $ echo $PYTHIA6
  • Check ROOT environment variables:
    $ which root-config $ echo $ROOTSYS
  • Make NUISANCE build directory:
    Note: for many recent NUISANCE versions we provide a template of this in myenv.sh (which sets up environment variables for the generators) and freshbuild.sh (which sets up the NUISANCE make process through CMake). Please read and edit these to your liking and/or do this:
    $ cd MY_NUISANCE_INSTALL $ mkdir build $ cd build
  • Set the compiler flags for the generators:
    $ cmake -DUSE_NuWro=1 -DUSE_NEUT=1 -DUSE_GENIE=1 -DUSE_GiBUU=1 -DUSE_NUANCE=1 ../ -DUSE_GENERATOR tells the compiler to compile against chosen generator, granted environment variables are set. The default is to set generators to 0.

    E.g. $ cmake ../ -DUSE_NUWRO=1 enables NuWro alone.

    Furthermore, NUISANCE can build GiBUU with $-DBUILD_GiBUU=1 in cmake command.
  • Build NUISANCE:
    $ make (exeutables and libraries)
    $ make docs (doxygen documentation)
    $ make install (install to build location)

The build also generates $(uname)/setup.sh. The file contains exports of generator environment variables available at last compilation time.

Doing source $(uname)/setup.sh is all you need before running NUISANCE applications.


Wrapping up

NUISANCE has now hopefully compiled properly. Now is the time to venture into the exciting land of neutrino scattering physics! Good luck, have fun!

NUISANCE comes with usage examples, which we're continously expanding.

We welcome any feedback!