Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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