Logo ROOT  
Reference Guide
MnScan.cxx
Go to the documentation of this file.
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 #include "Minuit2/MnScan.h"
12 
13 namespace ROOT {
14 
15  namespace Minuit2 {
16 
17 
18 std::vector<std::pair<double, double> > MnScan::Scan(unsigned int par, unsigned int maxsteps, double low, double high) {
19  // perform a scan of the function in the parameter par
20  MnParameterScan scan(fFCN, fState.Parameters());
21  double amin = scan.Fval();
22 
23  std::vector<std::pair<double, double> > result = scan(par, maxsteps, low, high);
24  if(scan.Fval() < amin) {
25  fState.SetValue(par, scan.Parameters().Value(par));
26  amin = scan.Fval();
27  }
28 
29  return result;
30 }
31 
32  } // namespace Minuit2
33 
34 } // namespace ROOT
ROOT::Minuit2::MnApplication::fFCN
const FCNBase & fFCN
Definition: MnApplication.h:83
ROOT::Minuit2::MnScan::Scan
std::vector< std::pair< double, double > > Scan(unsigned int par, unsigned int maxsteps=41, double low=0., double high=0.)
Definition: MnScan.cxx:26
MnScan.h
ROOT::Minuit2::MnUserParameterState::SetValue
void SetValue(unsigned int, double)
Definition: MnUserParameterState.cxx:299
MnParameterScan.h
ROOT::Minuit2::MnApplication::fState
MnUserParameterState fState
Definition: MnApplication.h:84
ROOT::Minuit2::MnUserParameterState::Parameters
const MnUserParameters & Parameters() const
Definition: MnUserParameterState.h:94
ROOT
VSD Structures.
Definition: StringConv.hxx:21