Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
MnHesse.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_MnHesse
11#define ROOT_Minuit2_MnHesse
12
13#include "Minuit2/MnConfig.h"
14#include "Minuit2/MnStrategy.h"
15
16#include <vector>
17
18namespace ROOT {
19
20namespace Minuit2 {
21
22class FCNBase;
23class MnUserParameterState;
24class MnUserParameters;
25class MnUserCovariance;
26class MnUserTransformation;
27class MinimumState;
28class MnMachinePrecision;
29class MnFcn;
30class FunctionMinimum;
31
32//_______________________________________________________________________
33/**
34 API class for calculating the numerical covariance matrix
35 (== 2x Inverse Hessian == 2x Inverse 2nd derivative); can be used by the
36 user or Minuit itself
37 */
38
39class MnHesse {
40
41public:
42 /// default constructor with default strategy
44
45 /// constructor with user-defined strategy level
46 MnHesse(unsigned int stra) : fStrategy(MnStrategy(stra)) {}
47
48 /// conctructor with specific strategy
49 MnHesse(const MnStrategy &stra) : fStrategy(stra) {}
50
52
53 ///
54 /// low-level API
55 ///
56 /// FCN + parameters + errors
57 MnUserParameterState operator()(const FCNBase &, const std::vector<double> &, const std::vector<double> &,
58 unsigned int maxcalls = 0) const;
59 /// FCN + parameters + covariance
60 MnUserParameterState operator()(const FCNBase &, const std::vector<double> &, unsigned int nrow,
61 const std::vector<double> &, unsigned int maxcalls = 0) const;
62 /// FCN + parameters + MnUserCovariance
64 operator()(const FCNBase &, const std::vector<double> &, const MnUserCovariance &, unsigned int maxcalls = 0) const;
65 ///
66 /// high-level API
67 ///
68 /// FCN + MnUserParameters
69 MnUserParameterState operator()(const FCNBase &, const MnUserParameters &, unsigned int maxcalls = 0) const;
70 /// FCN + MnUserParameters + MnUserCovariance
72 operator()(const FCNBase &, const MnUserParameters &, const MnUserCovariance &, unsigned int maxcalls = 0) const;
73 /// FCN + MnUserParameterState
74 MnUserParameterState operator()(const FCNBase &, const MnUserParameterState &, unsigned int maxcalls = 0) const;
75 ///
76 /// API to use MnHesse after minimization when function mimimum is avalilable, otherwise information on the last
77 /// state will be lost. (It would be needed to re-call the gradient and spend extra useless function calls) The
78 /// Function Minimum is updated (modified) by adding the Hesse results as last state of minimization
79 ///
80 void operator()(const FCNBase &, FunctionMinimum &, unsigned int maxcalls = 0) const;
81
82 /// internal interface
83 ///
85 operator()(const MnFcn &, const MinimumState &, const MnUserTransformation &, unsigned int maxcalls = 0) const;
86
87 /// forward interface of MnStrategy
88 unsigned int Ncycles() const { return fStrategy.HessianNCycles(); }
89 double Tolerstp() const { return fStrategy.HessianStepTolerance(); }
90 double TolerG2() const { return fStrategy.HessianG2Tolerance(); }
91
92private:
94};
95
96} // namespace Minuit2
97
98} // namespace ROOT
99
100#endif // ROOT_Minuit2_MnHesse
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
Definition FCNBase.h:45
class holding the full result of the minimization; both internal and external (MnUserParameterState) ...
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Wrapper class to FCNBase interface used internally by Minuit.
Definition MnFcn.h:30
API class for calculating the numerical covariance matrix (== 2x Inverse Hessian == 2x Inverse 2nd de...
Definition MnHesse.h:39
MnHesse(const MnStrategy &stra)
conctructor with specific strategy
Definition MnHesse.h:49
MnHesse()
default constructor with default strategy
Definition MnHesse.h:43
double Tolerstp() const
Definition MnHesse.h:89
unsigned int Ncycles() const
forward interface of MnStrategy
Definition MnHesse.h:88
MnUserParameterState operator()(const FCNBase &, const std::vector< double > &, const std::vector< double > &, unsigned int maxcalls=0) const
low-level API
Definition MnHesse.cxx:28
MnStrategy fStrategy
Definition MnHesse.h:93
MnHesse(unsigned int stra)
constructor with user-defined strategy level
Definition MnHesse.h:46
double TolerG2() const
Definition MnHesse.h:90
API class for defining three levels of strategies: low (0), medium (1), high (>=2); acts on: Migrad (...
Definition MnStrategy.h:27
double HessianG2Tolerance() const
Definition MnStrategy.h:46
double HessianStepTolerance() const
Definition MnStrategy.h:45
unsigned int HessianNCycles() const
Definition MnStrategy.h:44
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...
class which holds the external user and/or internal Minuit representation of the parameters and error...
API class for the user interaction with the parameters; serves as input to the minimizer as well as o...
class dealing with the transformation between user specified parameters (external) and internal param...
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...