This quick start guide assumes that you have ROOT installed, with the ROOTSYS environment variable set, and ROOT binaries and libraries appended to your PATH and LD_LIBRARY_PATH. If you do not have the RooFit library on your computer you will either need to recompile ROOT to include RooFit, or download and compile RooFit stand alone [if not - see the note below]. You will need ROOT version 5.20 or above to use AFit. It is always recommended to take the latest version of code, and use the corresponding version of ROOT with that code.
Once you download and unpack AFit, you will need to compile the library using
cd AFit gmake -f GNUmakefile.standalone
this should compile the AFit library in the AFit/tmp directory. The compilation will have been successful if you see the shared library file AFit/tmp/libAFit.so.
Once you have compiled the shared library, you will need to ensure that this is loaded into ROOT. AFit depends on both RooFit and TMVA. You will be able to load AFit into your ROOT session by issuing the following commands:
gSystem->Load("libRooFit"); gSystem->Load("libTMVA"); gSystem->Load("FULLPATH/AFit/tmp/libAFit.so");
where FULLPATH is the full path to your local copy of AFit. Once these libraries have been loaded, you will be able to use AFit. Please see the AFit User Guide for examples on how to use AFit.
If you are using a stand-alone version of RooFit, instead of the version bundled with ROOT, you will need
to uncomment the line
//#define __BABARROOFIT__
before compiling AFit. AFit assumes that the AFit/tmp directory is the same one as used for RooFitCore and RooFitModels, so you may need to ensure that you make the appropriate symbolic link. Once this has been done, you should be able to follow the instructions above. This option for compilation is not recommended, and one should always try to compile AFit with the version of ROOT, RooFit and TMVA that it has already been validated with.
As a first example you can try opening root, and running the muon lifetime example with
gSystem->Load("libRooFit"); gSystem->Load("libTMVA"); gSystem->Load("FULLPATH/AFit/tmp/libAFit.so"); .x FULLPATH/AFit/example/MuonLifetime.cc
If this example works correctly you should find the file AFit/example/MuonLifetime.eps will have been produced.
Please see the AFit User Guide for from examples and information on how to use AFit. The example macros and configuration files can be found in AFit/examples.
This page is maintained by Adrian Bevan.