added Minuit2 Hesse
This commit is contained in:
parent
4f66c78e4a
commit
b96ac14a18
@ -92,6 +92,7 @@ short term:
|
||||
**DONE** 08-09-01
|
||||
|
||||
* PFitter.cpp: implement HESSE
|
||||
**DONE** 08-09-01
|
||||
|
||||
* implement FFT with msr-interface
|
||||
|
||||
|
@ -36,6 +36,7 @@ using namespace std;
|
||||
#include <math.h>
|
||||
|
||||
#include "Minuit2/FunctionMinimum.h"
|
||||
#include "Minuit2/MnHesse.h"
|
||||
#include "Minuit2/MnMinimize.h"
|
||||
#include "Minuit2/MnMigrad.h"
|
||||
#include "Minuit2/MnMinos.h"
|
||||
@ -311,6 +312,23 @@ bool PFitter::ExecuteHesse()
|
||||
if (fFcnMin)
|
||||
fMnUserParams = fFcnMin->UserParameters();
|
||||
|
||||
// create the hesse object
|
||||
ROOT::Minuit2::MnHesse hesse;
|
||||
|
||||
// call hesse
|
||||
ROOT::Minuit2::MnUserParameterState mnState = hesse((*fFitterFcn), fMnUserParams);
|
||||
|
||||
if (!mnState.IsValid()) {
|
||||
cout << endl << "**WARNING** PFitter::ExecuteHesse(): Hesse encountered some problems!";
|
||||
cout << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// fill parabolic errors
|
||||
for (unsigned int i=0; i<fParams.size(); i++) {
|
||||
fRunInfo->SetMsrParamStep(i, mnState.Error(i));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user