Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:25

0001 // @(#)root/minuit2:$Id$
0002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005
0003 
0004 /**********************************************************************
0005  *                                                                    *
0006  * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
0007  *                                                                    *
0008  **********************************************************************/
0009 
0010 #ifndef ROOT_Minuit2_MnMinos
0011 #define ROOT_Minuit2_MnMinos
0012 
0013 #include "Minuit2/MnStrategy.h"
0014 
0015 #include <utility>
0016 
0017 namespace ROOT {
0018 
0019 namespace Minuit2 {
0020 
0021 class FCNBase;
0022 class FunctionMinimum;
0023 class MinosError;
0024 class MnCross;
0025 
0026 //__________________________________________________________________
0027 /**
0028     API class for Minos Error analysis (asymmetric errors);
0029     minimization has to be done before and Minimum must be valid;
0030     possibility to ask only for one side of the Minos Error;
0031  */
0032 
0033 class MnMinos {
0034 
0035 public:
0036    /// construct from FCN + Minimum + strategy
0037    MnMinos(const FCNBase &fcn, const FunctionMinimum &min, unsigned int stra = 1);
0038 
0039    /// construct from FCN + Minimum + strategy
0040    MnMinos(const FCNBase &fcn, const FunctionMinimum &min, const MnStrategy &stra);
0041 
0042    ~MnMinos() {}
0043 
0044    /// returns the negative (pair.first) and the positive (pair.second)
0045    /// Minos Error of the Parameter
0046    std::pair<double, double> operator()(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;
0047 
0048    /// calculate one side (negative or positive Error) of the Parameter
0049    /// give as input (optionally) maxcalls and tolerance
0050    double Lower(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;
0051    double Upper(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;
0052 
0053    MnCross Loval(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;
0054    MnCross Upval(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;
0055 
0056    /// ask for MinosError (Lower + Upper)
0057    /// can be printed via std::cout
0058    MinosError Minos(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;
0059 
0060 protected:
0061    /// internal method to get crossing value via MnFunctionCross
0062    MnCross FindCrossValue(int dir, unsigned int, unsigned int maxcalls, double toler) const;
0063 
0064 private:
0065    const FCNBase &fFCN;
0066    const FunctionMinimum &fMinimum;
0067    MnStrategy fStrategy;
0068 };
0069 
0070 } // namespace Minuit2
0071 
0072 } // namespace ROOT
0073 
0074 #endif // ROOT_Minuit2_MnMinos