14 #ifndef __ROOFIT_NOROOMINIMIZER
16 #ifndef ROO_MINIMIZER_FCN
17 #define ROO_MINIMIZER_FCN
33 class RooMinimizerFcn :
public ROOT::Math::IBaseFunctionMultiDim {
37 RooMinimizerFcn(RooAbsReal *funct, RooMinimizer *context,
38 bool verbose =
false);
39 RooMinimizerFcn(
const RooMinimizerFcn& other);
40 virtual ~RooMinimizerFcn();
42 virtual ROOT::Math::IBaseFunctionMultiDim* Clone()
const;
43 virtual unsigned int NDim()
const {
return _nDim; }
45 RooArgList* GetFloatParamList() {
return _floatParamList; }
46 RooArgList* GetConstParamList() {
return _constParamList; }
47 RooArgList* GetInitFloatParamList() {
return _initFloatParamList; }
48 RooArgList* GetInitConstParamList() {
return _initConstParamList; }
50 void SetEvalErrorWall(Bool_t flag) { _doEvalErrorWall = flag ; }
51 void SetPrintEvalErrors(Int_t numEvalErrors) { _printEvalErrors = numEvalErrors ; }
52 Bool_t SetLogFile(
const char* inLogfile);
53 std::ofstream* GetLogFile() {
return _logfile; }
54 void SetVerbose(Bool_t flag=kTRUE) { _verbose = flag ; }
56 Double_t& GetMaxFCN() {
return _maxFCN; }
57 Int_t GetNumInvalidNLL() {
return _numBadNLL; }
59 Bool_t Synchronize(std::vector<ROOT::Fit::ParameterSettings>& parameters,
60 Bool_t optConst, Bool_t verbose);
61 void BackProp(
const ROOT::Fit::FitResult &results);
62 void ApplyCovarianceMatrix(TMatrixDSym& V);
64 Int_t evalCounter()
const {
return _evalCounter ; }
65 void zeroEvalCount() { _evalCounter = 0 ; }
70 Double_t GetPdfParamVal(Int_t index);
71 Double_t GetPdfParamErr(Int_t index);
72 void SetPdfParamErr(Int_t index, Double_t value);
73 void ClearPdfParamAsymErr(Int_t index);
74 void SetPdfParamErr(Int_t index, Double_t loVal, Double_t hiVal);
76 inline Bool_t SetPdfParamVal(
const Int_t &index,
const Double_t &value)
const;
79 virtual double DoEval(
const double * x)
const;
80 void updateFloatVec() ;
84 mutable Int_t _evalCounter ;
87 RooMinimizer *_context;
89 mutable double _maxFCN;
90 mutable int _numBadNLL;
91 mutable int _printEvalErrors;
92 Bool_t _doEvalErrorWall;
95 std::ofstream *_logfile;
98 RooArgList* _floatParamList;
99 std::vector<RooAbsArg*> _floatParamVec ;
100 RooArgList* _constParamList;
101 RooArgList* _initFloatParamList;
102 RooArgList* _initConstParamList;