```// @(#)root/minuit2:\$Id\$
// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005

/**********************************************************************
*                                                                    *
* Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
*                                                                    *
**********************************************************************/

#ifndef ROOT_Minuit2_MnMinos
#define ROOT_Minuit2_MnMinos

#include "Minuit2/MnStrategy.h"

#include <utility>

namespace ROOT {

namespace Minuit2 {

class FCNBase;
class FunctionMinimum;
class MinosError;
class MnCross;

//__________________________________________________________________
/**
API class for Minos Error analysis (asymmetric errors);
minimization has to be done before and Minimum must be valid;
possibility to ask only for one side of the Minos Error;
*/

class MnMinos {

public:

/// construct from FCN + Minimum + strategy
MnMinos(const FCNBase& fcn, const FunctionMinimum& min, unsigned int stra = 1);

/// construct from FCN + Minimum + strategy
MnMinos(const FCNBase& fcn, const FunctionMinimum& min, const MnStrategy& stra);

~MnMinos() {}

/// returns the negative (pair.first) and the positive (pair.second)
/// Minos Error of the Parameter
std::pair<double,double> operator()(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;

/// calculate one side (negative or positive Error) of the Parameter
/// give as input (optionally) maxcalls and tolerance
double Lower(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;
double Upper(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;

MnCross Loval(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;
MnCross Upval(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;

/// ask for MinosError (Lower + Upper)
/// can be printed via std::cout
MinosError Minos(unsigned int, unsigned int maxcalls = 0, double toler = 0.1) const;

protected:

/// internal method to get crossing value via MnFunctionCross
MnCross FindCrossValue(int dir , unsigned int, unsigned int maxcalls, double toler) const;

private:

const FCNBase& fFCN;
const FunctionMinimum& fMinimum;
MnStrategy fStrategy;
};

}  // namespace Minuit2

}  // namespace ROOT

#endif  // ROOT_Minuit2_MnMinos
```
MnMinos.h:1
MnMinos.h:2
MnMinos.h:3
MnMinos.h:4
MnMinos.h:5
MnMinos.h:6
MnMinos.h:7
MnMinos.h:8
MnMinos.h:9
MnMinos.h:10
MnMinos.h:11
MnMinos.h:12
MnMinos.h:13
MnMinos.h:14
MnMinos.h:15
MnMinos.h:16
MnMinos.h:17
MnMinos.h:18
MnMinos.h:19
MnMinos.h:20
MnMinos.h:21
MnMinos.h:22
MnMinos.h:23
MnMinos.h:24
MnMinos.h:25
MnMinos.h:26
MnMinos.h:27
MnMinos.h:28
MnMinos.h:29
MnMinos.h:30
MnMinos.h:31
MnMinos.h:32
MnMinos.h:33
MnMinos.h:34
MnMinos.h:35
MnMinos.h:36
MnMinos.h:37
MnMinos.h:38
MnMinos.h:39
MnMinos.h:40
MnMinos.h:41
MnMinos.h:42
MnMinos.h:43
MnMinos.h:44
MnMinos.h:45
MnMinos.h:46
MnMinos.h:47
MnMinos.h:48
MnMinos.h:49
MnMinos.h:50
MnMinos.h:51
MnMinos.h:52
MnMinos.h:53
MnMinos.h:54
MnMinos.h:55
MnMinos.h:56
MnMinos.h:57
MnMinos.h:58
MnMinos.h:59
MnMinos.h:60
MnMinos.h:61
MnMinos.h:62
MnMinos.h:63
MnMinos.h:64
MnMinos.h:65
MnMinos.h:66
MnMinos.h:67
MnMinos.h:68
MnMinos.h:69
MnMinos.h:70
MnMinos.h:71
MnMinos.h:72
MnMinos.h:73
MnMinos.h:74
MnMinos.h:75
MnMinos.h:76
MnMinos.h:77
MnMinos.h:78
MnMinos.h:79