ROOT   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
37 MinosError& operator=(const MinosError& ) = default;
38
41 fMinValue = err.fMinValue;
42 fUpper = err.fUpper;
43 fLower = err.fLower;
44 return *this;
45 }
46
47 std::pair<double,double> operator()() const {
48 return std::pair<double,double>(Lower(), Upper());
49 }
50 double Lower() const {
52 return -1.*LowerState().Error(Parameter())*(1. + fLower.Value());
53 }
54 double Upper() const {
56 return UpperState().Error(Parameter())*(1. + fUpper.Value());
57 }
58 unsigned int Parameter() const {return fParameter;}
59 const MnUserParameterState& LowerState() const {return fLower.State();}
60 const MnUserParameterState& UpperState() const {return fUpper.State();}
61 bool IsValid() const {return fLower.IsValid() && fUpper.IsValid();}
62 bool LowerValid() const {return fLower.IsValid();}
63 bool UpperValid() const {return fUpper.IsValid();}
64 bool AtLowerLimit() const {return fLower.AtLimit();}
65 bool AtUpperLimit() const {return fUpper.AtLimit();}
66 bool AtLowerMaxFcn() const {return fLower.AtMaxFcn();}
67 bool AtUpperMaxFcn() const {return fUpper.AtMaxFcn();}
68 bool LowerNewMin() const {return fLower.NewMinimum();}
69 bool UpperNewMin() const {return fUpper.NewMinimum();}
70 unsigned int NFcn() const {return fUpper.NFcn() + fLower.NFcn();}
71 double Min() const {return fMinValue;}
72
73private:
74
75 unsigned int fParameter;
76 double fMinValue;
79};
80
81 } // namespace Minuit2
82
83} // namespace ROOT
84
85#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:54
double Min() const
Definition: MinosError.h:71
unsigned int fParameter
Definition: MinosError.h:75
MinosError(unsigned int par, double min, const MnCross &low, const MnCross &up)
Definition: MinosError.h:31
bool UpperValid() const
Definition: MinosError.h:63
MinosError & operator()(const MinosError &err)
Definition: MinosError.h:39
unsigned int NFcn() const
Definition: MinosError.h:70
bool LowerValid() const
Definition: MinosError.h:62
unsigned int Parameter() const
Definition: MinosError.h:58
bool UpperNewMin() const
Definition: MinosError.h:69
const MnUserParameterState & UpperState() const
Definition: MinosError.h:60
bool AtUpperLimit() const
Definition: MinosError.h:65
bool AtLowerMaxFcn() const
Definition: MinosError.h:66
std::pair< double, double > operator()() const
Definition: MinosError.h:47
const MnUserParameterState & LowerState() const
Definition: MinosError.h:59
bool AtUpperMaxFcn() const
Definition: MinosError.h:67
MinosError(const MinosError &err)
Definition: MinosError.h:35
bool LowerNewMin() const
Definition: MinosError.h:68
bool AtLowerLimit() const
Definition: MinosError.h:64
MinosError & operator=(const MinosError &)=default
double Lower() const
Definition: MinosError.h:50
bool AtLimit() const
Definition: MnCross.h:64
const MnUserParameterState & State() const
Definition: MnCross.h:62
unsigned int NFcn() const
Definition: MnCross.h:67
bool AtMaxFcn() const
Definition: MnCross.h:65
bool IsValid() const
Definition: MnCross.h:63
bool NewMinimum() const
Definition: MnCross.h:66
double Value() const
Definition: MnCross.h:61
class which holds the external user and/or internal Minuit representation of the parameters and error...
const MinuitParameter & Parameter(unsigned int i) const
VSD Structures.
Definition: StringConv.hxx:21