// @(#)root/minuit2:$Id$ // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005 /********************************************************************** * * * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT * * * **********************************************************************/ #include "Quad4F.h" #include "Minuit2/FunctionMinimum.h" #include "Minuit2/MnMigrad.h" #include "Minuit2/MnHesse.h" #include "Minuit2/MnUserParameters.h" #include "Minuit2/MnPrint.h" // #include "TimingUtilities/PentiumTimer.h" // StackAllocator gStackAllocator; using namespace ROOT::Minuit2; int main() { Quad4F fcn; // PentiumTimer stopwatch; // stopwatch.start(); // long long int start = stopwatch.lap().ticks(); // long long int stop = stopwatch.lap().ticks(); // std::cout<<"stop-start: "< par(4); std::vector err(4); for(int i = 0; i < 4; i++) { par[i] = 1.; err[i] = 0.1; } MnMigrad migrad(fcn, par, err); FunctionMinimum min = migrad(); std::cout<<"minimum: "< par(4); std::vector err(4); for(int i = 0; i < 4; i++) { par[i] = 1.; err[i] = 0.1; } MnMigrad migrad(fcn, par, err); double edm = 1.e-1; FunctionMinimum min = migrad(20, edm); std::cout<<"minimum: "< par(4); std::vector err(4); for(int i = 0; i < 4; i++) { par[i] = 1.; err[i] = 0.1; } MnMigrad migrad(fcn, par, err); int niter = 2; FunctionMinimum min = migrad(niter, 1.e-5); std::cout<<"minimum: "<