MnScan.cxx

Go to the documentation of this file.
00001 // @(#)root/minuit2:$Id: MnScan.cxx 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 #include "Minuit2/MnScan.h"
00011 #include "Minuit2/MnParameterScan.h"
00012 
00013 namespace ROOT {
00014 
00015    namespace Minuit2 {
00016 
00017 
00018 std::vector<std::pair<double, double> > MnScan::Scan(unsigned int par, unsigned int maxsteps, double low, double high) {
00019    // perform a scan of the function in the parameter par
00020    MnParameterScan scan(fFCN, fState.Parameters());
00021    double amin = scan.Fval();
00022    
00023    std::vector<std::pair<double, double> > result = scan(par, maxsteps, low, high);
00024    if(scan.Fval() < amin) {
00025       fState.SetValue(par, scan.Parameters().Value(par));
00026       amin = scan.Fval();
00027    }
00028    
00029    return result;
00030 }
00031 
00032    }  // namespace Minuit2
00033 
00034 }  // namespace ROOT

Generated on Tue Jul 5 14:37:10 2011 for ROOT_528-00b_version by  doxygen 1.5.1