Skip to content
Snippets Groups Projects
Commit fdd07a35 authored by Lorenzo Moneta's avatar Lorenzo Moneta
Browse files

- fix a memory leak by deleting the RoOFitResult created from RooMinimizer

 - some fixes for printout and tolerance


git-svn-id: http://root.cern.ch/svn/root/trunk@43228 27541ba8-7e3a-0410-8455-c3a389f83636
parent fbad27d6
No related branches found
No related tags found
No related merge requests found
......@@ -274,15 +274,15 @@ Double_t AsymptoticCalculator::EvaluateNLL(RooAbsPdf & pdf, RooAbsData& data,
else {
int minimPrintLevel = ROOT::Math::MinimizerOptions::DefaultPrintLevel();
if (verbose > 1) minimPrintLevel = verbose;
int minimPrintLevel = verbose;
RooMinimizer minim(*nll);
int strategy = ROOT::Math::MinimizerOptions::DefaultStrategy();
minim.setStrategy( strategy);
// use tolerance - but never smaller than 1 (default in RooMinimizer)
double tol = ROOT::Math::MinimizerOptions::DefaultTolerance();
if (tol > 1.) minim.setEps( tol );
tol = std::max(tol,1.0); // 1.0 is the minimum value used in RooMinimizer
minim.setEps( tol );
//LM: RooMinimizer.setPrintLevel has +1 offset - so subtruct here -1
minim.setPrintLevel(minimPrintLevel-1);
int status = -1;
......@@ -334,6 +334,7 @@ Double_t AsymptoticCalculator::EvaluateNLL(RooAbsPdf & pdf, RooAbsData& data,
}
minim.optimizeConst(false);
if (result) delete result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment