Building ======== First you have to install the gsl and nlopt libraries. On Fedora you can install these with the following command: $ yum install gsl gsl-devel NLopt NLopt-devel You can also install these packages yourself. For instructions, see below (Installing GSL and Installing NLopt). Then, to build everything you just type: $ make Some of the test programs also require plot and gnuplot which can be installed with: $ yum install plotutils gnuplot Installing GSL ============== To install GSL in your home directory, you can run the following commands: $ curl -O -L ftp://ftp.gnu.org/gnu/gsl/gsl-2.5.tar.gz $ tar -xzvf gsl-2.5.tar.gz $ cd gsl-2.5 $ mkdir $HOME/local $ ./configure --prefix=$HOME/local $ make $ make install Installing NLopt ================ $ curl -O -L https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz $ tar -xzvf v2.5.0.tar.gz $ cd nlopt-2.5.0 $ mkdir build $ cd build $ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local .. $ make $ make install To use gsl and nlopt installed locally, you will have to edit the Makefile and add the following to the CFLAGS and LDLIBS variables: CFLAGS=-I$(HOME)/local/include LDLIBS=-L$(HOME)/local/lib -L$(HOME)/local/lib64 and also edit the -lnopt_cxx line to just be -lnlopt. You will also need to edit ~/.bash_profile and add the following line: export LD_LIBRARY_PATH=$HOME/local/lib:$HOME/local/lib64 Installing NLopt for the grid ============================= When running the fitter on the grid, it's necessary to compile NLopt as a static library. $ curl -O -L https://github.com/stevengj/nlopt/archive/v2.6.1.tar.gz $ tar -xzvf v2.6.1.tar.gz $ cd nlopt-2.6.1 $ mkdir build $ cd build $ cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_INSTALL_PREFIX=$HOME/local -DBUILD_SHARED_LIBS=OFF .. $ make $ make install and then you have to edit the Makefile to add: CFLAGS=-fdiagnostics-color -O2 -Wall -g -DSWAP_BYTES -I/home/tlatorre/local/include LDLIBS=-fdiagnostics-color -lm -L/home/tlatorre/local/lib64 -l:libnlopt.a -L/home/tlatorre/local/lib -l:libgsl.a -l:libgslcblas.a -lstdc++ Fitting Events ============== You can fit events from SNOMAN data structure files by running the following command: $ ./src/fit [input file] -o [output file] and then plot the fit results by using the plot script: $ ./utils/plot.py [output file] The plot script relies on the MC information in the SNOMAN file, so make sure that SNOMAN is set up to output MC info when you simulate events (see the next section). Simulating Events with SNOMAN =============================
{
gROOT->ProcessLine(".L fileio/root.C+g");
}