forked from GooFit/GooFit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFitManagerMinuit1.hh
34 lines (30 loc) · 920 Bytes
/
FitManagerMinuit1.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef FITMANAGER_MINUIT1_HH
#define FITMANAGER_MINUIT1_HH
#include "TMinuit.h"
extern PdfBase* pdfPointer;
extern int numPars;
#ifdef OMP_ON
#pragma omp threadprivate (numPars)
#pragma omp threadprivate (pdfPointer)
#endif
void FitFun(int &npar, double *gin, double &fun, double *fp, int iflag);
class FitManager {
public:
enum FitAlgorithm { MIGRAD, SEEK };
FitManager (PdfBase* dat);
~FitManager ();
void setMaxCalls (double mxc) {overrideCallLimit = mxc;}
void setupMinuit ();
void runSeek();
void runMigrad ();
void fit (FitAlgorithm algo = MIGRAD, Int_t strategy = 2);
TMinuit* getMinuitObject () {return minuit;}
void getMinuitValues () const;
void getMinosErrors() const;
void getMinuitStatus(double& fmin, double& fedm, double& errdef, int& npari, int& nparx, int& istat) const;
TMinuit* minuit;
PdfBase *getPdfPointer();
private:
double overrideCallLimit;
};
#endif