ROOT
6.08/07
Reference Guide
math
minuit2
src
MnStrategy.cxx
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
#include "
Minuit2/MnStrategy.h
"
11
12
namespace
ROOT
{
13
14
namespace
Minuit2 {
15
16
17
18
MnStrategy::MnStrategy
() : fStoreLevel(1) {
19
//default strategy
20
SetMediumStrategy
();
21
}
22
23
24
MnStrategy::MnStrategy
(
unsigned
int
stra) :
fStoreLevel
(1) {
25
//user defined strategy (0, 1, >=2)
26
if
(stra == 0)
SetLowStrategy
();
27
else
if
(stra == 1)
SetMediumStrategy
();
28
else
SetHighStrategy
();
29
}
30
31
void
MnStrategy::SetLowStrategy
() {
32
// set low strategy (0) values
33
fStrategy
= 0;
34
SetGradientNCycles
(2);
35
SetGradientStepTolerance
(0.5);
36
SetGradientTolerance
(0.1);
37
SetHessianNCycles
(3);
38
SetHessianStepTolerance
(0.5);
39
SetHessianG2Tolerance
(0.1);
40
SetHessianGradientNCycles
(1);
41
}
42
43
void
MnStrategy::SetMediumStrategy
() {
44
// set minimum strategy (1) the default
45
fStrategy
= 1;
46
SetGradientNCycles
(3);
47
SetGradientStepTolerance
(0.3);
48
SetGradientTolerance
(0.05);
49
SetHessianNCycles
(5);
50
SetHessianStepTolerance
(0.3);
51
SetHessianG2Tolerance
(0.05);
52
SetHessianGradientNCycles
(2);
53
}
54
55
void
MnStrategy::SetHighStrategy
() {
56
// set high strategy (2)
57
fStrategy
= 2;
58
SetGradientNCycles
(5);
59
SetGradientStepTolerance
(0.1);
60
SetGradientTolerance
(0.02);
61
SetHessianNCycles
(7);
62
SetHessianStepTolerance
(0.1);
63
SetHessianG2Tolerance
(0.02);
64
SetHessianGradientNCycles
(6);
65
}
66
67
}
// namespace Minuit2
68
69
}
// namespace ROOT
ROOT::Minuit2::MnStrategy::SetHessianG2Tolerance
void SetHessianG2Tolerance(double toler)
Definition:
MnStrategy.h:66
ROOT
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition:
StringConv.hxx:21
ROOT::Minuit2::MnStrategy::SetHessianNCycles
void SetHessianNCycles(unsigned int n)
Definition:
MnStrategy.h:64
ROOT::Minuit2::MnStrategy::SetMediumStrategy
void SetMediumStrategy()
Definition:
MnStrategy.cxx:43
ROOT::Minuit2::MnStrategy::SetLowStrategy
void SetLowStrategy()
Definition:
MnStrategy.cxx:31
ROOT::Minuit2::MnStrategy::SetHessianGradientNCycles
void SetHessianGradientNCycles(unsigned int n)
Definition:
MnStrategy.h:67
ROOT::Minuit2::MnStrategy::SetGradientStepTolerance
void SetGradientStepTolerance(double stp)
Definition:
MnStrategy.h:61
ROOT::Minuit2::MnStrategy::SetHessianStepTolerance
void SetHessianStepTolerance(double stp)
Definition:
MnStrategy.h:65
ROOT::Minuit2::MnStrategy::SetGradientTolerance
void SetGradientTolerance(double toler)
Definition:
MnStrategy.h:62
ROOT::Minuit2::MnStrategy::fStoreLevel
int fStoreLevel
Definition:
MnStrategy.h:83
MnStrategy.h
ROOT::Minuit2::MnStrategy::SetHighStrategy
void SetHighStrategy()
Definition:
MnStrategy.cxx:55
ROOT::Minuit2::MnStrategy::fStrategy
unsigned int fStrategy
Definition:
MnStrategy.h:74
ROOT::Minuit2::MnStrategy::SetGradientNCycles
void SetGradientNCycles(unsigned int n)
Definition:
MnStrategy.h:60
ROOT::Minuit2::MnStrategy::MnStrategy
MnStrategy()
Definition:
MnStrategy.cxx:18