/usr/include/root/RooMinimizerFcn.h is in libroot-roofit-dev 5.34.30-0ubuntu8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | /*****************************************************************************
* Project: RooFit *
* Package: RooFitCore *
* @(#)root/roofitcore:$Id$
* Authors: *
* AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it *
* *
* *
* Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
*****************************************************************************/
#ifndef __ROOFIT_NOROOMINIMIZER
#ifndef ROO_MINIMIZER_FCN
#define ROO_MINIMIZER_FCN
#include "Math/IFunction.h"
#include "Fit/ParameterSettings.h"
#include "Fit/FitResult.h"
#include "TMatrixDSym.h"
#include "RooAbsReal.h"
#include "RooArgList.h"
#include <iostream>
#include <fstream>
class RooMinimizer;
class RooMinimizerFcn : public ROOT::Math::IBaseFunctionMultiDim {
public:
RooMinimizerFcn(RooAbsReal *funct, RooMinimizer *context,
bool verbose = false);
RooMinimizerFcn(const RooMinimizerFcn& other);
virtual ~RooMinimizerFcn();
virtual ROOT::Math::IBaseFunctionMultiDim* Clone() const;
virtual unsigned int NDim() const { return _nDim; }
RooArgList* GetFloatParamList() { return _floatParamList; }
RooArgList* GetConstParamList() { return _constParamList; }
RooArgList* GetInitFloatParamList() { return _initFloatParamList; }
RooArgList* GetInitConstParamList() { return _initConstParamList; }
void SetEvalErrorWall(Bool_t flag) { _doEvalErrorWall = flag ; }
void SetPrintEvalErrors(Int_t numEvalErrors) { _printEvalErrors = numEvalErrors ; }
Bool_t SetLogFile(const char* inLogfile);
std::ofstream* GetLogFile() { return _logfile; }
void SetVerbose(Bool_t flag=kTRUE) { _verbose = flag ; }
Double_t& GetMaxFCN() { return _maxFCN; }
Int_t GetNumInvalidNLL() { return _numBadNLL; }
Bool_t Synchronize(std::vector<ROOT::Fit::ParameterSettings>& parameters,
Bool_t optConst, Bool_t verbose);
void BackProp(const ROOT::Fit::FitResult &results);
void ApplyCovarianceMatrix(TMatrixDSym& V);
Int_t evalCounter() const { return _evalCounter ; }
void zeroEvalCount() { _evalCounter = 0 ; }
private:
Double_t GetPdfParamVal(Int_t index);
Double_t GetPdfParamErr(Int_t index);
void SetPdfParamErr(Int_t index, Double_t value);
void ClearPdfParamAsymErr(Int_t index);
void SetPdfParamErr(Int_t index, Double_t loVal, Double_t hiVal);
inline Bool_t SetPdfParamVal(const Int_t &index, const Double_t &value) const;
virtual double DoEval(const double * x) const;
void updateFloatVec() ;
private:
mutable Int_t _evalCounter ;
RooAbsReal *_funct;
RooMinimizer *_context;
mutable double _maxFCN;
mutable int _numBadNLL;
mutable int _printEvalErrors;
Bool_t _doEvalErrorWall;
int _nDim;
std::ofstream *_logfile;
bool _verbose;
RooArgList* _floatParamList;
std::vector<RooAbsArg*> _floatParamVec ;
RooArgList* _constParamList;
RooArgList* _initFloatParamList;
RooArgList* _initConstParamList;
};
#endif
#endif
|