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_FumiliBuilder 11 #define ROOT_Minuit2_FumiliBuilder 12 13 #include "Minuit2/MinimumBuilder.h" 14 #include "Minuit2/VariableMetricEDMEstimator.h" 15 #include "Minuit2/FumiliErrorUpdator.h" 16 #include "Minuit2/MnFcn.h" 17 #include "Minuit2/FunctionMinimum.h" 18 19 #include <vector> 20 21 namespace ROOT { 22 23 namespace Minuit2 { 24 25 /** 26 27 Builds the FunctionMinimum using the Fumili method. 28 29 @author Andras Zsenei, Creation date: 29 Sep 2004 30 31 @see <A HREF="http://www.cern.ch/winkler/minuit/tutorial/mntutorial.pdf">MINUIT Tutorial</A> on function minimization, 32 section 5 33 34 @ingroup Minuit 35 36 \todo the role of the strategy in Fumili 37 38 */ 39 40 class FumiliBuilder : public MinimumBuilder { 41 42 public: FumiliBuilder()43 FumiliBuilder() : fEstimator(VariableMetricEDMEstimator()), fErrorUpdator(FumiliErrorUpdator()) {} 44 ~FumiliBuilder()45 ~FumiliBuilder() {} 46 47 /** 48 49 Class the member function calculating the Minimum and verifies the result 50 depending on the strategy. 51 52 @param fMnFcn the function to be minimized. 53 54 @param fGradienCalculator not used in Fumili. 55 56 @param fMinimumSeed the seed generator. 57 58 @param fMnStrategy the strategy describing the number of function calls 59 allowed for Gradient calculations. 60 61 @param maxfcn maximum number of function calls after which the calculation 62 will be stopped even if it has not yet converged. 63 64 @param edmval expected vertical distance to the Minimum. 65 66 @return Returns the function Minimum found. 67 68 69 \todo Complete the documentation by understanding what is the reason to 70 have two Minimum methods. 71 72 */ 73 74 virtual FunctionMinimum Minimum(const MnFcn &fMnFcn, const GradientCalculator &fGradienCalculator, 75 const MinimumSeed &fMinimumSeed, const MnStrategy &fMnStrategy, unsigned int maxfcn, 76 double edmval) const; 77 78 /** 79 80 Calculates the Minimum based on the Fumili method 81 82 @param fMnFcn the function to be minimized. 83 84 @param fGradienCalculator not used in Fumili 85 86 @param fMinimumSeed the seed generator. 87 88 @param states vector containing the state result of each iteration 89 90 @param maxfcn maximum number of function calls after which the calculation 91 will be stopped even if it has not yet converged. 92 93 @param edmval expected vertical distance to the Minimum 94 95 @return Returns the function Minimum found. 96 97 @see <A HREF="http://www.cern.ch/winkler/minuit/tutorial/mntutorial.pdf">MINUIT Tutorial</A> on function 98 minimization, section 5 99 100 101 \todo some nice Latex based formula here... 102 103 */ 104 105 FunctionMinimum Minimum(const MnFcn &fMnFcn, const GradientCalculator &fGradienCalculator, 106 const MinimumSeed &fMinimumSeed, std::vector<MinimumState> &states, unsigned int maxfcn, 107 double edmval) const; 108 109 /** 110 111 Accessor to the EDM (expected vertical distance to the Minimum) estimator. 112 113 @return The EDM estimator used in the builder. 114 115 \todo Maybe a little explanation concerning EDM in all relevant classes. 116 117 */ 118 Estimator()119 const VariableMetricEDMEstimator &Estimator() const { return fEstimator; } 120 121 /** 122 123 Accessor to the Error updator of the builder. 124 125 @return The FumiliErrorUpdator used by the FumiliBuilder. 126 127 */ 128 ErrorUpdator()129 const FumiliErrorUpdator &ErrorUpdator() const { return fErrorUpdator; } 130 131 private: 132 VariableMetricEDMEstimator fEstimator; 133 FumiliErrorUpdator fErrorUpdator; 134 }; 135 136 } // namespace Minuit2 137 138 } // namespace ROOT 139 140 #endif // ROOT_Minuit2_FumiliBuilder 141