00001 // @(#)root/minuit2:$Id: MnParameterScan.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_MnParameterScan 00011 #define ROOT_Minuit2_MnParameterScan 00012 00013 #include "Minuit2/MnConfig.h" 00014 #include "Minuit2/MnUserParameters.h" 00015 00016 #include <vector> 00017 #include <utility> 00018 00019 namespace ROOT { 00020 00021 namespace Minuit2 { 00022 00023 00024 class FCNBase; 00025 00026 /** Scans the values of FCN as a function of one Parameter and retains the 00027 best function and Parameter values found. 00028 */ 00029 00030 class MnParameterScan { 00031 00032 public: 00033 00034 MnParameterScan(const FCNBase&, const MnUserParameters&); 00035 00036 MnParameterScan(const FCNBase&, const MnUserParameters&, double); 00037 00038 ~MnParameterScan() {} 00039 00040 // returns pairs of (x,y) points, x=parameter Value, y=function Value of FCN 00041 std::vector<std::pair<double, double> > operator()(unsigned int par, unsigned int maxsteps = 41, double low = 0., double high = 0.); 00042 00043 const MnUserParameters& Parameters() const {return fParameters;} 00044 double Fval() const {return fAmin;} 00045 00046 private: 00047 00048 const FCNBase& fFCN; 00049 MnUserParameters fParameters; 00050 double fAmin; 00051 }; 00052 00053 } // namespace Minuit2 00054 00055 } // namespace ROOT 00056 00057 #endif // ROOT_Minuit2_MnParameterScan