00001 // @(#)root/minuit2:$Id: FumiliBuilder.h 20880 2007-11-19 11:23:41Z rdm $ 00002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005 00003 00004 /********************************************************************** 00005 * * 00006 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT * 00007 * * 00008 **********************************************************************/ 00009 00010 #ifndef ROOT_Minuit2_FumiliBuilder 00011 #define ROOT_Minuit2_FumiliBuilder 00012 00013 #include "Minuit2/MinimumBuilder.h" 00014 #include "Minuit2/VariableMetricEDMEstimator.h" 00015 #include "Minuit2/FumiliErrorUpdator.h" 00016 #include "Minuit2/MnFcn.h" 00017 #include "Minuit2/FunctionMinimum.h" 00018 00019 namespace ROOT { 00020 00021 namespace Minuit2 { 00022 00023 00024 /** 00025 00026 Builds the FunctionMinimum using the Fumili method. 00027 00028 @author Andras Zsenei, Creation date: 29 Sep 2004 00029 00030 @see <A HREF="http://www.cern.ch/winkler/minuit/tutorial/mntutorial.pdf">MINUIT Tutorial</A> on function minimization, section 5 00031 00032 @ingroup Minuit 00033 00034 \todo the role of the strategy in Fumili 00035 00036 */ 00037 00038 00039 00040 class FumiliBuilder : public MinimumBuilder { 00041 00042 public: 00043 00044 FumiliBuilder() : fEstimator(VariableMetricEDMEstimator()), 00045 fErrorUpdator(FumiliErrorUpdator()) {} 00046 00047 ~FumiliBuilder() {} 00048 00049 00050 /** 00051 00052 Class the member function calculating the Minimum and verifies the result 00053 depending on the strategy. 00054 00055 @param fMnFcn the function to be minimized. 00056 00057 @param fGradienCalculator not used in Fumili. 00058 00059 @param fMinimumSeed the seed generator. 00060 00061 @param fMnStrategy the strategy describing the number of function calls 00062 allowed for Gradient calculations. 00063 00064 @param maxfcn maximum number of function calls after which the calculation 00065 will be stopped even if it has not yet converged. 00066 00067 @param edmval expected vertical distance to the Minimum. 00068 00069 @return Returns the function Minimum found. 00070 00071 00072 \todo Complete the documentation by understanding what is the reason to 00073 have two Minimum methods. 00074 00075 */ 00076 00077 virtual FunctionMinimum Minimum(const MnFcn& fMnFcn, const GradientCalculator& fGradienCalculator, const MinimumSeed& fMinimumSeed, const MnStrategy& fMnStrategy, unsigned int maxfcn, double edmval) const; 00078 00079 00080 /** 00081 00082 Calculates the Minimum based on the Fumili method 00083 00084 @param fMnFcn the function to be minimized. 00085 00086 @param fGradienCalculator not used in Fumili 00087 00088 @param fMinimumSeed the seed generator. 00089 00090 @param states vector containing the state result of each iteration 00091 00092 @param maxfcn maximum number of function calls after which the calculation 00093 will be stopped even if it has not yet converged. 00094 00095 @param edmval expected vertical distance to the Minimum 00096 00097 @return Returns the function Minimum found. 00098 00099 @see <A HREF="http://www.cern.ch/winkler/minuit/tutorial/mntutorial.pdf">MINUIT Tutorial</A> on function minimization, section 5 00100 00101 00102 \todo some nice Latex based formula here... 00103 00104 */ 00105 00106 FunctionMinimum Minimum(const MnFcn& fMnFcn, const GradientCalculator& fGradienCalculator, const MinimumSeed& fMinimumSeed, std::vector<MinimumState> & states, unsigned int maxfcn, double edmval) const; 00107 00108 00109 /** 00110 00111 Accessor to the EDM (expected vertical distance to the Minimum) estimator. 00112 00113 @return The EDM estimator used in the builder. 00114 00115 \todo Maybe a little explanation concerning EDM in all relevant classes. 00116 00117 */ 00118 00119 const VariableMetricEDMEstimator& Estimator() const {return fEstimator;} 00120 00121 00122 /** 00123 00124 Accessor to the Error updator of the builder. 00125 00126 @return The FumiliErrorUpdator used by the FumiliBuilder. 00127 00128 */ 00129 00130 const FumiliErrorUpdator& ErrorUpdator() const {return fErrorUpdator;} 00131 00132 00133 private: 00134 00135 VariableMetricEDMEstimator fEstimator; 00136 FumiliErrorUpdator fErrorUpdator; 00137 }; 00138 00139 } // namespace Minuit2 00140 00141 } // namespace ROOT 00142 00143 #endif // ROOT_Minuit2_FumiliBuilder