AlternativeStatistics

Introduction

To describe alternative statistics procedure as part of CSC note exercise. Tools used. TMVA, MadTools

MadTools

Thanks to Vladimir for the link.

Main reference

PhyStat2003 Conf Paper

Note on FFT

Pre-Installing MadTools

For MadTools to work as desired one should at least install fftw2.1.5 and cln-1.1.13 libraries. By default they install in /usr/local/lib ( This requires root privilege ) One can also install them in desired directories by configuring with --prefix= (dir path)

Before configuring MadTool setup, ensure that ROOT environment - ROOTSYS, PATH and LD_LIBRARY_PATH are set Then modify LD_LIBRARY_PATH to include path for fftw and cln libraries.

You are set to setup MadTools now.

Installing them on OSX 10.4.X

Install fftw2.1.5. Straightforward Installation. It will do so in /usr/local/lib Requires root Install cln-1.1.13. Straightforward Installation. It will do so in /usr/local/lib and header files in /usr/local/include/cln Requires Root


Assuming ROOT is installed $HOME/root_514/root


Go to Madtools dir

./configure --with-rootdir=$HOME/root_514/root If you install cln too, then ./configure --with-rootdir=$HOME/root_514/root --disable-clntest

( clntest does not run, but it compiles )

Now do the following changes.

Changed the makefile in run, PlotTools, StatTools

Only change the INCFLAGS as per in all three makefiles in these three directories.

#INCFLAGS=-I/Users/vikas/root_514/root/include -I../ #Changed by VB for compilation on MAC. April 30, 2007 INCFLAGS=-I/Users/vikas/root_514/root/include -I../ -I/usr/include/c++/4.0.0 -I/usr/include/c++/4.0.0/i686-apple-darwin8 -I/usr/include

(one may want to tweak INCFLAGS for her own custom OSX)

Now do small modifications in source codes.

Changed StatTools/TStatisitcsFactory.h
On Line 14
  #if __GNUC_MINOR__ == 0 // I am using 4.0.0. So minor is 0 and VB would like
//    namespace Sgi = std;               // GCC 3.0
    namespace Sgi = ::__gnu_cxx;       // GCC 3.1 and later    // added by VB 30 April 2007

And in file PlotTools/TSummaryPlotFactory.h
On line 13
  #if __GNUC_MINOR__ == 0
//    namespace Sgi = std;               // GCC 3.0
    namespace Sgi = ::__gnu_cxx;       // GCC 3.1 and later

Added a line in PlotTools/TLuminosityPlot.cpp
#include "math.h"

Added a line in StatTools/TDistribution.cpp
#include "math.h"

Added a line in StatTools/TStatistics.cpp
#include "math.h"

Added a line in StatTools/TErrorMatrix.cpp
#include "math.h"

Now do

make

It should work.

Installing them on SLC4 (32 bit platform)

Install fftw2.1.5. Straightforward Installation. It will do so in /usr/local/lib Requires root Install cln-1.1.13. Straightforward Installation. It will do so in /usr/local/lib and header files in /usr/local/include/cln Requires Root


Assuming ROOT is installed $HOME/root_514/root. It is BETTER to use pre-compiled ROOT binaries for SLC4 with gcc34.


Go to Madtools dir

./configure --with-rootdir=$HOME/root_514/root If you install cln too, then ./configure --with-rootdir=$HOME/root_514/root --disable-clntest

( clntest does not run, but it compiles )

Now do the following changes.

Changed the Makefile in run, PlotTools, StatTools

Only change the INCFLAGS as per the following in all three makefiles in these three directories.

Add the following paths to INCFLAGS

-I/Users/vikas/root_514/root/include -I../ -I/usr/include/c++/3.4.6 -I/usr/include/c++/3.4.6/i386-redhat-linux -I/usr/include (whatever is your ROOT path) #Changed by VB for compilation on SLC4. June 02, 2008

Now do small modifications in source codes.

Add

#include "math.h"

in the following source codes

PlotTools/TLuminosityPlot.cpp

PlotTools/DiscoveryPlot.cpp

StatTools/TDistribution.cpp

StatTools/TStatistics.cpp

StatTools/TErrorMatrix.cpp

StatTools/THypothesis.cpp

StatTools/TLikelihoodRatioFFT.cpp

StatTools/TLikelihoodRatioFFT_cln.cpp

Now do

make

It should work.

Installing them on SLC3

It should be straightforward.


./configure --with-rootdir=(path) --with-fftwdir=(path) --with-cln-prefix=(path)

If fftw and cln are in default path - /usr/local/lib - then last two options can be skipped.

Installing them on lxplus (NOT FULLY TESTED)

Why do I mention lxplus. Because it is on 64 bit platform using SLC4 There are issues with libraries.

Here is the trick to install Madtool on such a platform. Here I do not care about fftw and cln libraries for the moment.


Go to MadTools directory

./configure --with-rootdir=/afs/cern.ch/sw/lcg/external/root/5.16.00/slc4_amd64_gcc34_dbg/root

Edit following files

emacs PlotTools/TLuminosityPlot.cpp

emacs PlotTools/TDiscoveryPlot.cpp

emacs StatTools/TDistribution.cpp

emacs StatTools/THypothesis.cpp

emacs StatTools/TStatistics.cpp

emacs StatTools/TErrorMatrix.cpp

to add

#include "math.h"

( Optional : Perhaps some library can be included in configure / Makefile to avoid it.)

Now edit Makefile in run directory

emacs run/Makefile

In second line of LIBS+= 
add

-lNet -lRIO before -lTree

Now do

make

It should install it.

But without fftw library Madtool may not work properly.

NOTE : lxplus has fftw version 3 library but Madtool explicitly says to use version 2. I have not tested if fftw and cln libraries install seamlessly on lxplus 64 bits


-- VikasBansal - 04 May 2007

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2008-06-02 - VikasBansal
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback