MnMinos.h

Go to the documentation of this file.
00001 // @(#)root/minuit2:$Id: MnMinos.h 23654 2008-05-06 07:30:34Z 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_MnMinos
00011 #define ROOT_Minuit2_MnMinos
00012 
00013 #include "Minuit2/MnStrategy.h"
00014 
00015 #include <utility>
00016 
00017 namespace ROOT {
00018 
00019    namespace Minuit2 {
00020 
00021 
00022 class FCNBase;
00023 class FunctionMinimum;
00024 class MinosError;
00025 class MnCross;
00026 
00027 //__________________________________________________________________
00028 /** 
00029     API class for Minos Error analysis (asymmetric errors);
00030     minimization has to be done before and Minimum must be valid;
00031     possibility to ask only for one side of the Minos Error;
00032  */
00033 
00034 class MnMinos {
00035 
00036 public:
00037 
00038 
00039    /// construct from FCN + Minimum + strategy
00040    MnMinos(const FCNBase& fcn, const FunctionMinimum& min, unsigned int stra = 1);  
00041 
00042    /// construct from FCN + Minimum + strategy
00043    MnMinos(const FCNBase& fcn, const FunctionMinimum& min, const MnStrategy& stra); 
00044 
00045    ~MnMinos() {}
00046   
00047    /// returns the negative (pair.first) and the positive (pair.second) 
00048    /// Minos Error of the Parameter
00049    std::pair<double,double> operator()(unsigned int, unsigned int maxcalls = 0) const;
00050 
00051    /// calculate one side (negative or positive Error) of the Parameter
00052    double Lower(unsigned int, unsigned int maxcalls = 0) const;
00053    double Upper(unsigned int, unsigned int maxcalls = 0) const;
00054 
00055    MnCross Loval(unsigned int, unsigned int maxcalls = 0) const;
00056    MnCross Upval(unsigned int, unsigned int maxcalls = 0) const;
00057 
00058    /// ask for MinosError (Lower + Upper)
00059    /// can be printed via std::cout  
00060    MinosError Minos(unsigned int, unsigned int maxcalls = 0) const;
00061 
00062 protected: 
00063    
00064    /// internal method to get crossing value via MnFunctionCross
00065    MnCross FindCrossValue(int dir , unsigned int, unsigned int maxcalls = 0) const;
00066   
00067 private:
00068   
00069    const FCNBase& fFCN;
00070    const FunctionMinimum& fMinimum;
00071    MnStrategy fStrategy;
00072 };
00073 
00074   }  // namespace Minuit2
00075 
00076 }  // namespace ROOT
00077 
00078 #endif  // ROOT_Minuit2_MnMinos

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