MnContours.h

Go to the documentation of this file.
00001 // @(#)root/minuit2:$Id: MnContours.h 21530 2007-12-20 11:14:35Z moneta $
00002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005  
00003 
00004 /**********************************************************************
00005  *                                                                    *
00006  * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
00007  *                                                                    *
00008  **********************************************************************/
00009 
00010 #ifndef ROOT_Minuit2_MnContours
00011 #define ROOT_Minuit2_MnContours
00012 
00013 
00014 #include "Minuit2/MnConfig.h"
00015 #include "Minuit2/MnStrategy.h"
00016 
00017 #include <vector>
00018 #include <utility>
00019 
00020 namespace ROOT {
00021 
00022    namespace Minuit2 {
00023 
00024 
00025 class FCNBase;
00026 class FunctionMinimum;
00027 class ContoursError;
00028 
00029 //_____________________________________________________________
00030 /**
00031    API class for Contours Error analysis (2-dim errors);
00032    minimization has to be done before and Minimum must be valid;
00033    possibility to ask only for the points or the points and associated Minos
00034    errors;
00035  */
00036 
00037 class MnContours {
00038 
00039 public:
00040 
00041    /// construct from FCN + Minimum
00042    MnContours(const FCNBase& fcn, const FunctionMinimum& min) : fFCN(fcn), fMinimum(min), fStrategy(MnStrategy(1)) {} 
00043 
00044    /// construct from FCN + Minimum + strategy
00045    MnContours(const FCNBase& fcn, const FunctionMinimum& min, unsigned int stra) : fFCN(fcn), fMinimum(min), fStrategy(MnStrategy(stra)) {} 
00046 
00047    /// construct from FCN + Minimum + strategy
00048    MnContours(const FCNBase& fcn, const FunctionMinimum& min, const MnStrategy& stra) : fFCN(fcn), fMinimum(min), fStrategy(stra) {} 
00049 
00050    ~MnContours() {}
00051 
00052    /// ask for one Contour (points only) from number of points (>=4) and parameter indeces
00053    std::vector<std::pair<double,double> > operator()(unsigned int, unsigned int, unsigned int npoints = 20) const;
00054 
00055    /// ask for one Contour ContoursError (MinosErrors + points)
00056    /// from number of points (>=4) and parameter indeces
00057    /// can be printed via std::cout
00058    ContoursError Contour(unsigned int, unsigned int, unsigned int npoints = 20) const;
00059 
00060    const MnStrategy& Strategy() const {return fStrategy;}
00061 
00062 private:
00063 
00064    const FCNBase& fFCN;
00065    const FunctionMinimum& fMinimum;
00066    MnStrategy fStrategy;
00067 };
00068 
00069   }  // namespace Minuit2
00070 
00071 }  // namespace ROOT
00072 
00073 #endif  // ROOT_Minuit2_MnContours

Generated on Tue Jul 5 14:25:43 2011 for ROOT_528-00b_version by  doxygen 1.5.1