Logo ROOT   6.16/01
Reference Guide
MinosError.h
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
10#ifndef ROOT_Minuit2_MinosError
11#define ROOT_Minuit2_MinosError
12
13#include "Minuit2/MnCross.h"
14#include <iostream>
15
16namespace ROOT {
17
18 namespace Minuit2 {
19
20//____________________________________________________________________________________
21/**
22 Class holding the result of Minos (lower and upper values) for a specific parameter
23 */
24
26
27public:
28
30
31 MinosError(unsigned int par, double min, const MnCross& low, const MnCross& up) : fParameter(par), fMinValue(min), fUpper(up), fLower(low) {}
32
34
36
39 fMinValue = err.fMinValue;
40 fUpper = err.fUpper;
41 fLower = err.fLower;
42 return *this;
43 }
44
45 std::pair<double,double> operator()() const {
46 return std::pair<double,double>(Lower(), Upper());
47 }
48 double Lower() const {
50 return -1.*LowerState().Error(Parameter())*(1. + fLower.Value());
51 }
52 double Upper() const {
54 return UpperState().Error(Parameter())*(1. + fUpper.Value());
55 }
56 unsigned int Parameter() const {return fParameter;}
57 const MnUserParameterState& LowerState() const {return fLower.State();}
58 const MnUserParameterState& UpperState() const {return fUpper.State();}
59 bool IsValid() const {return fLower.IsValid() && fUpper.IsValid();}
60 bool LowerValid() const {return fLower.IsValid();}
61 bool UpperValid() const {return fUpper.IsValid();}
62 bool AtLowerLimit() const {return fLower.AtLimit();}
63 bool AtUpperLimit() const {return fUpper.AtLimit();}
64 bool AtLowerMaxFcn() const {return fLower.AtMaxFcn();}
65 bool AtUpperMaxFcn() const {return fUpper.AtMaxFcn();}
66 bool LowerNewMin() const {return fLower.NewMinimum();}
67 bool UpperNewMin() const {return fUpper.NewMinimum();}
68 unsigned int NFcn() const {return fUpper.NFcn() + fLower.NFcn();}
69 double Min() const {return fMinValue;}
70
71private:
72
73 unsigned int fParameter;
74 double fMinValue;
77};
78
79 } // namespace Minuit2
80
81} // namespace ROOT
82
83#endif // ROOT_Minuit2_MinosError
Class holding the result of Minos (lower and upper values) for a specific parameter.
Definition: MinosError.h:25
double Upper() const
Definition: MinosError.h:52
double Min() const
Definition: MinosError.h:69
unsigned int fParameter
Definition: MinosError.h:73
MinosError(unsigned int par, double min, const MnCross &low, const MnCross &up)
Definition: MinosError.h:31
bool UpperValid() const
Definition: MinosError.h:61
MinosError & operator()(const MinosError &err)
Definition: MinosError.h:37
unsigned int NFcn() const
Definition: MinosError.h:68
bool LowerValid() const
Definition: MinosError.h:60
unsigned int Parameter() const
Definition: MinosError.h:56
bool UpperNewMin() const
Definition: MinosError.h:67
const MnUserParameterState & UpperState() const
Definition: MinosError.h:58
bool AtUpperLimit() const
Definition: MinosError.h:63
bool AtLowerMaxFcn() const
Definition: MinosError.h:64
std::pair< double, double > operator()() const
Definition: MinosError.h:45
const MnUserParameterState & LowerState() const
Definition: MinosError.h:57
bool AtUpperMaxFcn() const
Definition: MinosError.h:65
MinosError(const MinosError &err)
Definition: MinosError.h:35
bool LowerNewMin() const
Definition: MinosError.h:66
bool AtLowerLimit() const
Definition: MinosError.h:62
double Lower() const
Definition: MinosError.h:48
bool AtLimit() const
Definition: MnCross.h:62
const MnUserParameterState & State() const
Definition: MnCross.h:60
unsigned int NFcn() const
Definition: MnCross.h:65
bool AtMaxFcn() const
Definition: MnCross.h:63
bool IsValid() const
Definition: MnCross.h:61
bool NewMinimum() const
Definition: MnCross.h:64
double Value() const
Definition: MnCross.h:59
class which holds the external user and/or internal Minuit representation of the parameters and error...
const MinuitParameter & Parameter(unsigned int i) const
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21