![]() |
|
|||
File indexing completed on 2025-09-17 09:14:06
0001 // @(#)root/minuit2:$Id$ 0002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005 0003 0004 /********************************************************************** 0005 * * 0006 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT * 0007 * * 0008 **********************************************************************/ 0009 0010 #ifndef ROOT_Minuit2_FumiliBuilder 0011 #define ROOT_Minuit2_FumiliBuilder 0012 0013 #include "Minuit2/MinimumBuilder.h" 0014 #include "Minuit2/VariableMetricEDMEstimator.h" 0015 #include "Minuit2/FumiliErrorUpdator.h" 0016 #include "Minuit2/FunctionMinimum.h" 0017 0018 #include <vector> 0019 0020 namespace ROOT { 0021 0022 namespace Minuit2 { 0023 0024 class MnFcn; 0025 0026 /** 0027 0028 Builds the FunctionMinimum using the Fumili method. 0029 0030 @author Andras Zsenei, Creation date: 29 Sep 2004 0031 0032 @see <A HREF="http://www.cern.ch/winkler/minuit/tutorial/mntutorial.pdf">MINUIT Tutorial</A> on function minimization, 0033 section 5 0034 0035 @ingroup Minuit 0036 0037 \todo the role of the strategy in Fumili 0038 0039 */ 0040 0041 class FumiliBuilder : public MinimumBuilder { 0042 0043 public: 0044 0045 enum FumiliMethodType { kLineSearch = 0, kTrustRegion = 1, kTrustRegionScaled = 2}; 0046 0047 void SetMethod(FumiliMethodType type) { fMethodType = type;} 0048 0049 /** 0050 0051 Class the member function calculating the Minimum and verifies the result 0052 depending on the strategy. 0053 0054 @param fMnFcn the function to be minimized. 0055 0056 @param fGradienCalculator not used in Fumili. 0057 0058 @param fMinimumSeed the seed generator. 0059 0060 @param fMnStrategy the strategy describing the number of function calls 0061 allowed for Gradient calculations. 0062 0063 @param maxfcn maximum number of function calls after which the calculation 0064 will be stopped even if it has not yet converged. 0065 0066 @param edmval expected vertical distance to the Minimum. 0067 0068 @return Returns the function Minimum found. 0069 0070 0071 \todo Complete the documentation by understanding what is the reason to 0072 have two Minimum methods. 0073 0074 */ 0075 0076 FunctionMinimum Minimum(const MnFcn &fMnFcn, const GradientCalculator &fGradienCalculator, 0077 const MinimumSeed &fMinimumSeed, const MnStrategy &fMnStrategy, unsigned int maxfcn, 0078 double edmval) const override; 0079 0080 /** 0081 0082 Calculates the Minimum based on the Fumili method 0083 0084 @param fMnFcn the function to be minimized. 0085 0086 @param fGradienCalculator not used in Fumili 0087 0088 @param fMinimumSeed the seed generator. 0089 0090 @param states vector containing the state result of each iteration 0091 0092 @param maxfcn maximum number of function calls after which the calculation 0093 will be stopped even if it has not yet converged. 0094 0095 @param edmval expected vertical distance to the Minimum 0096 0097 @return Returns the function Minimum found. 0098 0099 @see <A HREF="http://www.cern.ch/winkler/minuit/tutorial/mntutorial.pdf">MINUIT Tutorial</A> on function 0100 minimization, section 5 0101 0102 0103 \todo some nice Latex based formula here... 0104 0105 */ 0106 0107 FunctionMinimum Minimum(const MnFcn &fMnFcn, const GradientCalculator &fGradienCalculator, 0108 const MinimumSeed &fMinimumSeed, std::vector<MinimumState> &states, unsigned int maxfcn, 0109 double edmval) const; 0110 0111 /** 0112 0113 Accessor to the EDM (expected vertical distance to the Minimum) estimator. 0114 0115 @return The EDM estimator used in the builder. 0116 0117 \todo Maybe a little explanation concerning EDM in all relevant classes. 0118 0119 */ 0120 0121 const VariableMetricEDMEstimator &Estimator() const { return fEstimator; } 0122 0123 /** 0124 0125 Accessor to the Error updator of the builder. 0126 0127 @return The FumiliErrorUpdator used by the FumiliBuilder. 0128 0129 */ 0130 0131 const FumiliErrorUpdator &ErrorUpdator() const { return fErrorUpdator; } 0132 0133 private: 0134 VariableMetricEDMEstimator fEstimator; 0135 FumiliErrorUpdator fErrorUpdator; 0136 FumiliMethodType fMethodType = kTrustRegion; // use Trust region as default method 0137 }; 0138 0139 } // namespace Minuit2 0140 0141 } // namespace ROOT 0142 0143 #endif // ROOT_Minuit2_FumiliBuilder
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |