MINT2
Minimiser.cpp
Go to the documentation of this file.
1 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
2 // status: Mon 9 Feb 2009 19:17:55 GMT
3 #include <Mint/Minimiser.h>
5 #include <Mint/FitParameter.h>
6 
7 #include <TGraph.h>
8 #include <TH2D.h>
9 #include <TFile.h>
10 
11 #include <Mint/TwoDArray.h>
12 
13 #include <iostream>
14 #include <utility>
15 #include <deque>
16 
17 using namespace std;
18 using namespace MINT;
19 
20 Minimiser* Minimiser::_defaultMinimiser=0;
21 int Minimiser::_defaultMaxCalls=100000; // 100k (a lot!)
22 
23 Minimiser* Minimiser::getDefaultMinimiser(){
24 
25  if(0 == _defaultMinimiser){
26  _defaultMinimiser = new Minimiser;
27  }
28  return _defaultMinimiser;
29 }
30 
31 
32 Minimiser::Minimiser(IMinimisable* fitFunction, const double errdef)
33  : TMinuit(0)
34  , ierflg(0)
35  , _useAnalyticGradient(false)
36  , _theFunction(fitFunction)
37  , _maxCalls(_defaultMaxCalls)
38  , _printLevel(3)
39  , _errdef(errdef)
40 {
41  if(0 != theFunction()){
42  init();
43  }
44 }
45 
47 }
48 
49 void Minimiser::setMaxCalls(int maxCalls){
50  _maxCalls = maxCalls;
51 }
53  return _maxCalls;
54 }
55 
56 Int_t Minimiser::Eval(Int_t npar
57  , Double_t* grad
58  , Double_t& fval
59  , Double_t* par
60  , Int_t flag
61  ){
62  bool dbThis=false;
63  if(dbThis) cout << "Eval got called " << endl;
64  if(! this->OK()){
65  cout << "ERROR in Minimiser::Eval (file: Minimiser.C)"
66  << " Got called although I'm not OK" << endl;
67  fval = -9999;
68  return -1;
69  }
70  this->updateFitParameters(par);
71  fval = this->getFCNVal();
72  if (flag == 4) {
74  //calculate GRAD, the first derivatives of FVAL
75  vector<double> gradient(npar);
76  this->FCNGradient(gradient);
77  for(unsigned int i = 0; i < static_cast<unsigned int>(npar); i++){
78  grad[i]=gradient[i];
79  }
80  }
81  }
82  return -1;
83  (void)npar;
84 }
85 
87  fStatus = 0;
88  fEmpty = 0;
89  fObjectFit = 0;
90  fMethodCall = 0;
91  fPlot = 0;
92  fGraphicsMode = kTRUE;
93  SetMaxIterations();
94  mninit(5,6,7);
95 }
96 
97 bool Minimiser::MakeSpace(int needSpace){
98  //return true;
99 
100  this->DeleteArrays();
101  this->BuildArrays(needSpace + 2); // +2 for good luck
102  TMinInit();
103  return true;
104 }
106  bool dbThis=true;
107  if(dbThis) cout << "Minimiser::init(): you called me" << endl;
108  if(0 == theFunction()){
109  std::cout << "ERROR IN Minimiser::init():"
110  << " the function-ptr is empty."
111  << " I won't do anything for now."
112  << std::endl;
113  return false;
114  }
115  if(dbThis) cout << " ... calling theFunction()->beginFit()" << endl;
116  theFunction()->beginFit();
117 
119  if(0 == _parSet){
120  std::cout << "ERROR IN Minimiser::init():"
121  << " theFunction()->getParSet() returned empty pointer"
122  << " I won't do anything for now."
123  << std::endl;
124  return false;
125  }
126 
127  MakeSpace(nPars());
128 
129  if(dbThis) cout << "... made space, now initialising variables" << endl;
131  if(dbThis) cout << " initialised variables." << endl;
132 
134 
135  if(dbThis) cout << "Minimiser::init(): returning true" << endl;
136  return true;
137 }
138 
140  if(0==fcn) return false;
141  // detachParameters();
142  _theFunction = fcn;
143  return init();
144 }
145 unsigned int Minimiser::nPars() const{
146  if(0 == _parSet) return 0;
147  return _parSet->size();
148 }
150  if(0 == _parSet) return 0;
151  if(i >= nPars()) return 0;
152  return _parSet->getParPtr(i);
153 }
154 const IMinuitParameter* Minimiser::getParPtr(unsigned int i) const{
155  if(0 == _parSet) return 0;
156  if(i >= nPars()) return 0;
157  return _parSet->getParPtr(i);
158 }
159 
160 /*
161 bool Minimiser::detachParameters(){
162  if(! parsOK()) return false;
163 
164  for(unsigned int i=0; i < nPars(); i++){
165  getParPtr(i)->associate(0, i);
166  }
167  return true;
168 }
169 */
171  bool dbThis=false;
172  if(! parsOK()) return false;
173 
174  bool success=true;
175  if(dbThis) {
176  cout << "Minimiser::initialiseVariables() called. " << endl;
177  cout << "\n\t(declaring them to MINUIT)" << endl;
178  }
179 
180  //remove hidden MinuitParameter
181  for(unsigned int i=0; i < nPars(); i++){
182  if(getParPtr(i)->hidden()){
183  if(dbThis) cout << i << ")" << getParPtr(i)->name() << endl;
184  parSet()->unregister(getParPtr(i));
185  i--;
186  }
187  }
188 
189  //temporarilyQuiet();
190  for(unsigned int i=0; i < nPars(); i++){
191  int ierflag=0;
192  //if(! getParPtr(i)->hidden()){ //hidden MinuitParamter already removed
193  if(dbThis) cout << i << ")" << getParPtr(i)->name() << endl;
194  double step = getParPtr(i)->stepInit();
195  if(getParPtr(i)->iFixInit()) step=0;
196  this->mnparm( i
197  , getParPtr(i)->name().c_str()
198  , getParPtr(i)->meanInit()
199  , step
200  , getParPtr(i)->minInit()
201  , getParPtr(i)->maxInit()
202  , ierflag);
203  //if(getParPtr(i)->iFixInit()) FixParameter(i);
204  //}
205  //getParPtr(i)->associate(this, i);
206  success &= ! ierflag;
207  }
208  if(dbThis){
209  cout << "Minimiser::initialiseVariables():"
210  << "done declaring variables, now:"
211  << "theFunction()->parametersChanged();"
212  << endl;
213  }
215  if(dbThis) cout << "Minimiser::initialiseVariables():"
216  << " all done - returning " << success << endl;
217  //resetPrintLevel();
218  return success;
219 }
220 
222  if(! parsOK())return false;
223 
224  Double_t mean, err, errN, errP;
225  Double_t gcc;
226  for(unsigned int i=0; i < nPars(); i++){
227  //if(! getParPtr(i)->hidden()){
228  this->mnerrs(i, errP, errN, err, gcc);
229  this->GetParameter(i, mean, err);
230  mean += this->getParPtr(i)->blinding();
231  this->getParPtr(i)->setResult(mean, err, errP, errN);
232  //}
233  }
235  return true;
236 }
237 
238 bool Minimiser::updateFitParameters(Double_t* par){
239  if(! parsOK())return false;
240 
241  for(unsigned int i=0; i < nPars(); i++){
242  //if(! getParPtr(i)->hidden()){
243  //getParPtr(i)->setCurrentFitVal(par[i]);
244  getParPtr(i)->setCurrentFitVal(par[i] + this->getParPtr(i)->blinding());
245  //}
246  }
248  return true;
249 }
251  if(! parsOK())return false;
253  theFunction()->endFit();
255  return true;
256 }
257 
258 bool Minimiser::parsOK() const{
259  if(0 == _parSet) return false;
260  if(0 == nPars()) return false;
261  return true;
262 }
263 bool Minimiser::fcnOK() const{
264  if(0 == theFunction()) return false;
265  return true;
266 }
267 
268 bool Minimiser::OK() const{
269  return parsOK() && fcnOK();
270 }
271 
273  if(! this->OK()){
274  cout << "ERROR IN Minimiser::getFCNVal()"
275  << " I'm not OK!!" << endl;
276  return -9999.0;
277  }
278  return theFunction()->getVal();
279 }
280 
281 void Minimiser::FCNGradient(vector<double>& grad){
282  if(! this->OK()){
283  cout << "ERROR IN Minimiser::FCNGradient()"
284  << " I'm not OK!!" << endl;
285  }
286  return theFunction()->Gradient(grad);
287 }
288 
289 bool Minimiser::setPrintLevel(int level){
290  if(level >=0 )_printLevel=level;
291  arglist[0] = _printLevel;
292  TMinuit::mnexcm("SET PRINTOUT", arglist , 1, ierflg);
293  return (! ierflg);
294 }
296  arglist[0] = -1;
297  TMinuit::mnexcm("SET PRINTOUT", arglist , 1, ierflg);
298  return (! ierflg);
299 }
301  return setPrintLevel(-9999);
302 }
304  bool success = true;
305  success &= setPrintLevel();
306  arglist[0] = _errdef ;
307  TMinuit::mnexcm("SET ERR", arglist , 1, ierflg);
308  success &= (! ierflg);
309  arglist[0] = 1;
310  TMinuit::mnexcm("SET STRATEGY", arglist , 1, ierflg);
311  success &= (! ierflg);
312  if(_useAnalyticGradient)TMinuit::mnexcm("SET GRADIENT", arglist , 1, ierflg);
313  else TMinuit::mnexcm("SET NOGRADIENT", arglist , 1, ierflg);
314  return success;
315 }
316 
318  bool dbThis=true;
319  bool success=true;
320  arglist[0] = _maxCalls; arglist[1] = 1.e-2;
321  if(dbThis) cout << "calling MIGRAD" << endl;
322  TMinuit::mnexcm("MIGRAD", arglist ,2,ierflg);
323  if(dbThis) cout << "did that. How did I do? ierflg=" << ierflg << endl;
324  success &= (! ierflg);
325  return success;
326 }
328  // thanks to Daniel Johnson for contributing this.
329  bool dbThis=false;
330  bool success=true;
331  arglist[0] = _maxCalls; arglist[1] = 1.e-2;
332  if(dbThis) cout << "calling MINOS" << endl;
333  TMinuit::mnexcm("MINOS", arglist ,2,ierflg);
334  if(dbThis) cout << "did that. How did I do? ierflg=" << ierflg << endl;
335  success &= (! ierflg);
336  return success;
337 }
338 
339 bool Minimiser::CallSimplex(int maxCalls, double tolerance ){
340  bool dbThis=true;
341  bool success=true;
342  bool useAnalyticGradient = _useAnalyticGradient;
343  _useAnalyticGradient = false;
344  arglist[0] = maxCalls; arglist[1] = tolerance;
345  if(dbThis) cout << "calling SIMPLEX" << endl;
346  TMinuit::mnexcm("SIMPLEX", arglist ,2,ierflg);
347  if(dbThis) cout << "did that. How did I do? ierflg=" << ierflg << endl;
348  success &= (! ierflg);
349  _useAnalyticGradient = useAnalyticGradient;
350  return success;
351 }
352 
353 bool Minimiser::CallSeek(int maxCalls, int devs){
354  bool dbThis=true;
355  bool success=true;
356  bool useAnalyticGradient = _useAnalyticGradient;
357  _useAnalyticGradient = false;
358  arglist[0] = maxCalls; arglist[1] = devs;
359  if(dbThis) cout << "calling SEEK" << endl;
360  TMinuit::mnexcm("SEEK", arglist ,2,ierflg);
361  if(dbThis) cout << "did that. How did I do? ierflg=" << ierflg << endl;
362  success &= (! ierflg);
363  _useAnalyticGradient = useAnalyticGradient;
364  return success;
365 }
366 
367 bool Minimiser::CallImprove(int maxCalls, int searches ){
368  bool dbThis=true;
369  bool success=true;
370  bool useAnalyticGradient = _useAnalyticGradient;
371  _useAnalyticGradient = false;
372  arglist[0] = maxCalls; arglist[1] = searches;
373  if(dbThis) cout << "calling IMPROVE" << endl;
374  TMinuit::mnexcm("IMPROVE", arglist ,2,ierflg);
375  if(dbThis) cout << "did that. How did I do? ierflg=" << ierflg << endl;
376  success &= (! ierflg);
377  _useAnalyticGradient = useAnalyticGradient;
378  return success;
379 }
380 
382  bool dbThis=false;
383  bool success=true;
384  success &= SetSomeMinuitOptions();
385  theFunction()->beginFit();
386  success &= this->initialiseVariables();
387  if(dbThis) cout << "re-initialised variables" << endl;
388  return success;
389 }
390 
392  bool dbThis=false;
393  bool success = true;
394  if(dbThis) cout << "Minimiser::doFit() called" << endl;
395  success &= prepFit();
396  if(dbThis) cout << "... called prepFit " << success << endl;
397  success &= CallMigrad();
398  if(dbThis) cout << "... called MIGRAD" << success << endl;
399  scanMarked();
400  if(dbThis) cout << "... scanned" << success << endl;
401  success &= this->endOfFit();
402  return success;
403 }
405  bool dbThis=false;
406  bool success = true;
407  success &= prepFit();
408  success &= CallMinos();
409  if(dbThis) cout << "called MINOS" << endl;
410  scanMarked();
411  success &= this->endOfFit();
412  return success;
413 }
414 
415 bool Minimiser::doSeekFit(int maxCalls, int devs){
416  bool dbThis=false;
417  bool success = true;
418  success &= prepFit();
419  success &= CallSeek(maxCalls, devs);
420  if(dbThis) cout << "called SEEK" << endl;
421  //scanMarked();
422  success &= this->endOfFit();
423  return success;
424 }
425 
426 bool Minimiser::doSimplexFit(int maxCalls, double tolerance){
427  bool dbThis=false;
428  bool success = true;
429  success &= prepFit();
430  success &= CallSimplex(maxCalls, tolerance);
431  if(dbThis) cout << "called SIMPLEX" << endl;
432  //scanMarked();
433  success &= this->endOfFit();
434  return success;
435 }
436 
437 
439  bool sc=true;
440  if(0 == nPars()) return false;
441  for(unsigned int i=0; i < nPars(); i++){
443  if(0 == p || (! p->scan()) ) continue;
444  sc &= (bool) scan(i, p->scanMin(), p->scanMax());
445  }
446  return sc;
447 }
449  bool sc=true;
450  if(0 == nPars()) return false;
451  for(unsigned int i=0; i < nPars(); i++){
453  if(0 == p) continue;
454  sc &= (bool) scan(i, p->scanMin(), p->scanMax());
455  }
456  return sc;
457 }
458 
459 TGraph* Minimiser::scan(IMinuitParameter& fp, double from, double to){
460  if(fp.parSet() != this->parSet()){
461  cout << "ERROR Minimiser::scanParameter: "
462  << " You are trying to scan a parameter that is"
463  << " associated to a different fit (different fit parameter set)"
464  << " will not do it."
465  << " The parameter you tried was: " << endl;
466  fp.print();
467  cout << endl;
468  return 0;
469  }
470  return scan(fp.parSetIndex(), from, to);
471 }
472 
473 TGraph* Minimiser::scan(int i, double from, double to){
474  // note that the index i is the one in the parameter list
475  // which goes from 0 to n-1 (i.e. C-style).
476  // This corresponds to Minuit's parameter number i+1.
477  // (so if you want Minuit's fit parameter 1, pass it 1-1=0)
478  IMinuitParameter* p = getParPtr(i);
479  if(0 == p) return 0;
480 
481  double points = 100;
482  string fname = "scan_" + p->name() + ".root";
483 
484  Double_t arglist[10] = {0};
485  Int_t ierflg=0;
486 
487  arglist[0]=i+1; arglist[1]=points; arglist[2]=from; arglist[3]=to;
488  this->mnexcm("SCAN", arglist, 4, ierflg);
489  TGraph *gr = (TGraph*) this->GetPlot();
490  if(0 == gr){
491  cout << " didn't get plot " << endl;
492  }else{
493  TFile fscan(fname.c_str(), "RECREATE");
494  fscan.cd();
495  gr->Write();
496  fscan.Close();
497  }
498  return gr;
499 }
500 
501 void Minimiser::printResultVsInput(std::ostream& os) const{
502  if(0 == _parSet) return;
504 }
505 
506 TMatrixTSym<double> Minimiser::covMatrix() {
507  // only entries for variable parameters.
508  // if you want rows and columns to correspond
509  // to parameter numbers in MinuitParameterSets
510  // use covMatrixFull.
511  unsigned int internalPars = fNpar;
512 
513  TwoDArray<double> m1(internalPars, internalPars, 0.0);
514 
515  this->mnemat(&m1[0][0], internalPars);
516  TMatrixTSym<double> matrix(internalPars);
517  for(unsigned int i=0; i < internalPars; i++){
518  for(unsigned int j=i; j < internalPars; j++){
519  matrix(i,j) = matrix(j,i) = m1[i][j];
520  }
521  }
522  return matrix;
523 }
524 
525 TMatrixTSym<double> Minimiser::covMatrixFull() {
526  // rows and columns correspond to external parameter numbers
527  // (if you have many fixed parameters, you'll get a lot of zeros)
528 
529  bool dbThis=false;
530 
531  unsigned int internalPars = fNpar;
532 
533  TwoDArray<double> m1(internalPars, internalPars, 0.0);
534 
535  this->mnemat(&m1[0][0], internalPars);
536  TMatrixTSym<double> matrix(nPars());
537  for(unsigned int i=0; i < internalPars; i++){
538  for(unsigned int j=i; j < internalPars; j++){
539  int ex_i = fNexofi[i] -1;
540  int ex_j = fNexofi[j] -1;
541  if(dbThis){
542  cout << "Minimiser::covMatrixFull(): doing: "
543  << "matrix(" << ex_i<< ", " << ex_j << " )"
544  << " = matrix(" << ex_j << ", " << ex_i << ")"
545  << " = m1[" << i << "][" << j<< "];"
546  << " = " << m1[i][j]
547  << endl;
548  }
549  matrix(ex_i,ex_j) = matrix(ex_j,ex_i) = m1[i][j];
550  }
551  }
552  return matrix;
553 }
554 
556  double fmin, fedm, errdef ;
557  int npari, nparx, status ;
558  mnstat( fmin, fedm, errdef, npari, nparx, status ) ;
559  return status ;
560 }
561 
563  return status() == stat ;
564 }
565 
567  return status() >= stat ;
568 }
569 
571  int stat = status() ;
572  cout << "Fit status: " << stat << endl ;
573  switch(stat) {
574  case NOTCALCULATED :
575  cout << "FAILED: Covariance matrix not calculated at all." << endl ;
576  break ;
577  case NOTACCURATE :
578  cout << "FAILED: Covariance matrix approximation only, not accurate." << endl ;
579  break ;
580  case NOTPOSDEF :
581  cout << "FAILED: Full covariance matrix, but forced positive-definite." << endl ;
582  break ;
583  case CONVERGED :
584  cout << "CONVERGED: Full accurate covariance matrix." << endl ;
585  break ;
586  default :
587  cout << "UNKNOWN." << endl ;
588  }
589  return stat ;
590 }
591 
594 }
595 
596 TGraph* Minimiser::contour(unsigned iparx, unsigned ipary, float nsigma, unsigned npoints) {
597  // Cache the initial values and errors.
598  deque<deque<double> > initvals ;
599  for(unsigned i = 0 ; i < parSet()->size() ; ++i){
600  FitParameter* par = (FitParameter*)getParPtr(i) ;
601  initvals.push_back(deque<double>()) ;
602  deque<double>& parvals = initvals.back() ;
603  parvals.push_back(par->mean()) ;
604  parvals.push_back(par->err()) ;
605  parvals.push_back(par->errPos()) ;
606  parvals.push_back(par->errNeg()) ;
607  }
608 
609  FitParameter* parx = (FitParameter*)getParPtr(iparx) ;
610  FitParameter* pary = (FitParameter*)getParPtr(ipary) ;
611 
612  float errdef = _errdef * nsigma * nsigma ;
613  SetErrorDef(errdef) ;
614  TGraph* graph = (TGraph*)Contour(npoints, iparx, ipary) ;
615  SetErrorDef(_errdef) ;
616  ostringstream title ;
617  title << pary->name() << "_vs_" << parx->name() << "_" << nsigma << "_sigma_contour" ;
618  string titlestr(title.str()) ;
619  graph->SetName(titlestr.c_str()) ;
620 
621 
622  for(unsigned i = 0 ; i < parSet()->size() ; ++i)
623  getParPtr(i)->setResult(initvals[i][0], initvals[i][1], initvals[i][2], initvals[i][3]) ;
625 
626  return graph ;
627 }
bool CallSeek(int maxCalls=100, int devs=5)
Definition: Minimiser.cpp:353
TMatrixTSym< double > covMatrixFull()
Definition: Minimiser.cpp:525
virtual const MinuitParameterSet * parSet() const =0
bool isConverged()
Definition: Minimiser.cpp:592
int getMaxCalls() const
Definition: Minimiser.cpp:52
void FCNGradient(std::vector< double > &grad)
Definition: Minimiser.cpp:281
virtual double scanMin() const =0
IMinimisable * _theFunction
Definition: Minimiser.h:33
bool isStatusAtLeast(Minimiser::FitStatus)
Definition: Minimiser.cpp:566
const MinuitParameterSet * parSet() const
Definition: Minimiser.h:63
FAILED: Covariance matrix approximation only, not accurate.
Definition: Minimiser.h:123
virtual void endFit()=0
bool _useAnalyticGradient
Definition: Minimiser.h:26
bool doSimplexFit(int maxCalls=300, double tolerance=1.)
Definition: Minimiser.cpp:426
bool initialiseVariables()
Definition: Minimiser.cpp:170
bool setCovMatrix(const CovMatrix &)
Set the covariance matrix.
MinuitParameterSet * _parSet
Definition: Minimiser.h:30
IMinuitParameter * getParPtr(unsigned int i)
unsigned int size() const
TGraph * scan(int i, double from=0, double to=0)
Definition: Minimiser.cpp:473
bool updateFitParameters(Double_t *p)
Definition: Minimiser.cpp:238
virtual const std::string & name() const =0
bool fcnOK() const
Definition: Minimiser.cpp:263
IMinimisable * theFunction()
Definition: Minimiser.h:60
double _errdef
Definition: Minimiser.h:37
virtual ~Minimiser()
Definition: Minimiser.cpp:46
void printResultVsInput(std::ostream &os=std::cout) const
Definition: Minimiser.cpp:501
virtual void Gradient(std::vector< double > &grad)
Definition: IMinimisable.h:24
bool unregister(IMinuitParameter *patPtr)
double getFCNVal()
Definition: Minimiser.cpp:272
bool CallSimplex(int maxCalls=300, double tolerance=1.)
Definition: Minimiser.cpp:339
virtual const std::string & name() const
Definition: FitParameter.h:144
virtual bool scan() const =0
virtual double blinding() const =0
FAILED: Full covariance matrix, but forced positive-definite.
Definition: Minimiser.h:124
double mean() const
bool OK() const
Definition: Minimiser.cpp:268
TGraph * contour(unsigned, unsigned, float nsigma=1., unsigned npoints=40)
Definition: Minimiser.cpp:596
void printResultVsInput(std::ostream &os=std::cout) const
virtual bool hidden() const =0
IMinuitParameter * getParPtr(unsigned int i)
Definition: Minimiser.cpp:149
virtual double stepInit() const =0
Int_t Eval(Int_t npar, Double_t *grad, Double_t &fval, Double_t *par, Int_t flag)
Definition: Minimiser.cpp:56
virtual void beginFit()=0
bool setPrintLevel(int level=-1)
Definition: Minimiser.cpp:289
bool attachFunction(IMinimisable *fcn)
Definition: Minimiser.cpp:139
bool parsOK() const
Definition: Minimiser.cpp:258
bool isStatus(Minimiser::FitStatus)
Definition: Minimiser.cpp:562
virtual void print(std::ostream &os=std::cout) const =0
double err() const
void setMaxCalls(int maxCalls)
Definition: Minimiser.cpp:49
bool temporarilyQuiet()
Definition: Minimiser.cpp:295
virtual bool useAnalyticGradient()
Definition: IMinimisable.h:31
TMatrixTSym< double > covMatrix()
Definition: Minimiser.cpp:506
virtual double getVal()=0
bool MakeSpace(int needSpace)
Definition: Minimiser.cpp:97
virtual MinuitParameterSet * getParSet()=0
virtual void parametersChanged()=0
Double_t arglist[10]
Definition: Minimiser.h:23
bool SetSomeMinuitOptions()
Definition: Minimiser.cpp:303
virtual void setResult(double fitMean, double fitErr, double fitErrPos, double fitErrNeg)=0
virtual int parSetIndex() const =0
virtual void setCurrentFitVal(double pval)=0
bool doSeekFit(int maxCalls=100, int devs=5)
Definition: Minimiser.cpp:415
unsigned int nPars() const
Definition: Minimiser.cpp:145
virtual double scanMax() const =0
CONVERGED: Full accurate covariance matrix.
Definition: Minimiser.h:125
FAILED: Covariance matrix not calculated at all.
Definition: Minimiser.h:122
bool resetPrintLevel()
Definition: Minimiser.cpp:300
bool CallImprove(int maxCalls=1500, int searches=5)
Definition: Minimiser.cpp:367
bool setParametersToResult()
Definition: Minimiser.cpp:221