ROOT   Reference Guide
Searching...
No Matches
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
15#include "Minuit2/MnMatrix.h"
16#include "Minuit2/MnPrint.h"
17
18namespace ROOT {
19namespace Minuit2 {
20
22{
23 // evaluate analytical gradient. take care of parameter transformations
24
27
28 MnAlgebraicVector v(par.Vec().size());
29 for (unsigned int i = 0; i < par.Vec().size(); i++) {
30 unsigned int ext = fTransformation.ExtOfInt(i);
32 // double dd = (fTransformation.Parameter(ext).Upper() -
33 // fTransformation.Parameter(ext).Lower())*0.5*cos(par.Vec()(i));
34 // const ParameterTransformation * pt = fTransformation.transformation(ext);
35 // double dd = pt->dInt2ext(par.Vec()(i), fTransformation.Parameter(ext).Lower(),
36 // fTransformation.Parameter(ext).Upper() );
37 double dd = fTransformation.DInt2Ext(i, par.Vec()(i));
38 v(i) = dd * grad[ext];
39 } else {
41 }
42 }
43
45 print.Debug("User given gradient in Minuit2", v);
46
48}
49
51{
52 // needed from base class
53 return (*this)(par);
54}
55
57{
58 // check to be sure FCN implements analytical gradient
60}
61
62} // namespace Minuit2
63
64} // namespace ROOT
virtual FunctionGradient operator()(const MinimumParameters &) const
virtual std::vector< double > Gradient(const std::vector< double > &) const =0