Wrapper around MINUIT.
Definition at line 46 of file MinuitWrapper.h.
Public Member Functions | |
| MinuitWrapper (IFitterTarget &target, Int_t maxpar) | |
| constructor | |
| virtual | ~MinuitWrapper () |
| void | Clear (Option_t *=nullptr) |
| reset the fitter environment | |
| TObject * | Clone (char const *) const |
| produces a clone of this MinuitWrapper | |
| Int_t | Eval (Int_t, Double_t *, Double_t &, Double_t *, Int_t) |
| std::vector<Double_t> parameters( npar ); | |
| Int_t | ExecuteCommand (const char *command, Double_t *args, Int_t nargs) |
| Execute a fitter command; command : command string args : list of nargs command arguments. | |
| Int_t | GetErrors (Int_t ipar, Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc) |
| return current errors for a parameter | |
| Int_t | GetStats (Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx) |
| return global fit parameters | |
| virtual TClass * | IsA () const |
| void | SetFitterTarget (IFitterTarget &target) |
| Int_t | SetParameter (Int_t ipar, const char *parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh) |
| set initial values for a parameter | |
| virtual void | Streamer (TBuffer &) |
| Stream an object of class TObject. | |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TMinuit | |
| TMinuit () | |
| Minuit normal constructor. | |
| TMinuit (Int_t maxpar) | |
| Minuit normal constructor. | |
| ~TMinuit () override | |
| Minuit default destructor. | |
| virtual void | BuildArrays (Int_t maxpar=15) |
| Create internal Minuit arrays for the maxpar parameters. | |
| TObject * | Clone (const char *newname="") const override |
| Make a clone of an object using the Streamer facility. | |
| virtual Int_t | Command (const char *command) |
| Execute a Minuit command. | |
| virtual TObject * | Contour (Int_t npoints=10, Int_t pa1=0, Int_t pa2=1) |
| Creates a TGraph object describing the n-sigma contour of a TMinuit fit. | |
| virtual Int_t | DefineParameter (Int_t parNo, const char *name, Double_t initVal, Double_t initErr, Double_t lowerLimit, Double_t upperLimit) |
| Define a parameter. | |
| virtual void | DeleteArrays () |
| Delete internal Minuit arrays. | |
| virtual Int_t | FixParameter (Int_t parNo) |
| fix a parameter | |
| Int_t | GetMaxIterations () const |
| TMethodCall * | GetMethodCall () const |
| virtual Int_t | GetNumFixedPars () const |
| returns the number of currently fixed parameters | |
| virtual Int_t | GetNumFreePars () const |
| returns the number of currently free parameters | |
| virtual Int_t | GetNumPars () const |
| returns the total number of parameters that have been defined as fixed or free. | |
| TObject * | GetObjectFit () const |
| virtual Int_t | GetParameter (Int_t parNo, Double_t ¤tValue, Double_t ¤tError) const |
| return parameter value and error | |
| virtual TObject * | GetPlot () const |
| Int_t | GetStatus () const |
| TClass * | IsA () const override |
| virtual Int_t | Migrad () |
| invokes the MIGRAD minimizer | |
| virtual void | mnamin () |
| Initialize AMIN. | |
| virtual void | mnbins (Double_t a1, Double_t a2, Int_t naa, Double_t &bl, Double_t &bh, Int_t &nb, Double_t &bwid) |
| Compute reasonable histogram intervals. | |
| virtual void | mncalf (Double_t *pvec, Double_t &ycalf) |
| Transform FCN to find further minima. | |
| virtual void | mncler () |
| Resets the parameter list to UNDEFINED. | |
| virtual void | mncntr (Int_t ke1, Int_t ke2, Int_t &ierrf) |
| Print function contours in two variables, on line printer. | |
| virtual void | mncomd (const char *crdbin, Int_t &icondn) |
| Reads a command string and executes. | |
| virtual void | mncont (Int_t ke1, Int_t ke2, Int_t nptu, Double_t *xptu, Double_t *yptu, Int_t &ierrf) |
| Find points along a contour where FCN is minimum. | |
| virtual void | mncrck (TString crdbuf, Int_t maxcwd, TString &comand, Int_t &lnc, Int_t mxp, Double_t *plist, Int_t &llist, Int_t &ierr, Int_t isyswr) |
| Cracks the free-format input. | |
| virtual void | mncros (Double_t &aopt, Int_t &iercr) |
| Find point where MNEVAL=AMIN+UP. | |
| virtual void | mncuve () |
| Makes sure that the current point is a local minimum. | |
| virtual void | mnderi () |
| Calculates the first derivatives of FCN (GRD) | |
| virtual void | mndxdi (Double_t pint, Int_t ipar, Double_t &dxdi) |
| Calculates the transformation factor between ext/internal values. | |
| virtual void | mneig (Double_t *a, Int_t ndima, Int_t n, Int_t mits, Double_t *work, Double_t precis, Int_t &ifault) |
| Compute matrix eigen values. | |
| virtual void | mnemat (Double_t *emat, Int_t ndim) |
| Calculates the external error matrix from the internal matrix. | |
| virtual void | mnerrs (Int_t number, Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &gcc) |
| Utility routine to get MINOS errors. | |
| virtual void | mneval (Double_t anext, Double_t &fnext, Int_t &ierev) |
| Evaluates the function being analysed by MNCROS. | |
| virtual void | mnexcm (const char *comand, Double_t *plist, Int_t llist, Int_t &ierflg) |
| Interprets a command and takes appropriate action. | |
| virtual void | mnexin (Double_t *pint) |
| Transforms the external parameter values U to internal values. | |
| virtual void | mnfixp (Int_t iint, Int_t &ierr) |
| Removes parameter IINT from the internal parameter list. | |
| virtual void | mnfree (Int_t k) |
| Restores one or more fixed parameter(s) to variable status. | |
| virtual void | mngrad () |
| Interprets the SET GRAD command. | |
| virtual void | mnhelp (const char *command="") |
| interface to Minuit help | |
| virtual void | mnhelp (TString comd) |
| HELP routine for MINUIT interactive commands. | |
| virtual void | mnhes1 () |
| Calculate first derivatives (GRD) and uncertainties (DGRD) | |
| virtual void | mnhess () |
| Calculates the full second-derivative matrix of FCN. | |
| virtual void | mnimpr () |
| Attempts to improve on a good local minimum. | |
| virtual void | mninex (Double_t *pint) |
| Transforms from internal coordinates (PINT) to external (U) | |
| virtual void | mninit (Int_t i1, Int_t i2, Int_t i3) |
| Main initialization member function for MINUIT. | |
| virtual void | mnlims () |
| Interprets the SET LIM command, to reset the parameter limits. | |
| virtual void | mnline (Double_t *start, Double_t fstart, Double_t *step, Double_t slope, Double_t toler) |
| Perform a line search from position START. | |
| virtual void | mnmatu (Int_t kode) |
| Prints the covariance matrix v when KODE=1. | |
| virtual void | mnmigr () |
| Performs a local function minimization. | |
| virtual void | mnmnos () |
| Performs a MINOS error analysis. | |
| virtual void | mnmnot (Int_t ilax, Int_t ilax2, Double_t &val2pl, Double_t &val2mi) |
| Performs a MINOS error analysis on one parameter. | |
| virtual void | mnparm (Int_t k, TString cnamj, Double_t uk, Double_t wk, Double_t a, Double_t b, Int_t &ierflg) |
| Implements one parameter definition. | |
| virtual void | mnpars (TString &crdbuf, Int_t &icondn) |
| Implements one parameter definition. | |
| virtual void | mnpfit (Double_t *parx2p, Double_t *pary2p, Int_t npar2p, Double_t *coef2p, Double_t &sdev2p) |
| To fit a parabola to npar2p points. | |
| virtual void | mnpint (Double_t &pexti, Int_t i, Double_t &pinti) |
| Calculates the internal parameter value PINTI. | |
| virtual void | mnplot (Double_t *xpt, Double_t *ypt, char *chpt, Int_t nxypt, Int_t npagwd, Int_t npagln) |
| Plots points in array xypt onto one page with labelled axes. | |
| virtual void | mnpout (Int_t iuext, TString &chnam, Double_t &val, Double_t &err, Double_t &xlolim, Double_t &xuplim, Int_t &iuint) const |
| Provides the user with information concerning the current status. | |
| virtual void | mnprin (Int_t inkode, Double_t fval) |
| Prints the values of the parameters at the time of the call. | |
| virtual void | mnpsdf () |
| Calculates the eigenvalues of v to see if positive-def. | |
| virtual void | mnrazz (Double_t ynew, Double_t *pnew, Double_t *y, Int_t &jh, Int_t &jl) |
| Called only by MNSIMP (and MNIMPR) to add a new point. | |
| virtual void | mnrn15 (Double_t &val, Int_t &inseed) |
| This is a super-portable random number generator. | |
| virtual void | mnrset (Int_t iopt) |
| Resets function value and errors to UNDEFINED. | |
| virtual void | mnsave () |
| Writes current parameter values and step sizes onto file ISYSSA. | |
| virtual void | mnscan () |
| Scans the values of FCN as a function of one parameter. | |
| virtual void | mnseek () |
| Performs a rough (but global) minimization by monte carlo search. | |
| virtual void | mnset () |
| Interprets the commands that start with SET and SHOW. | |
| virtual void | mnsimp () |
| Minimization using the simplex method of Nelder and Mead. | |
| virtual void | mnstat (Double_t &fmin, Double_t &fedm, Double_t &errdef, Int_t &npari, Int_t &nparx, Int_t &istat) |
| Returns concerning the current status of the minimization. | |
| virtual void | mntiny (Double_t epsp1, Double_t &epsbak) |
| To find the machine precision. | |
| Bool_t | mnunpt (TString &cfname) |
| Returns .TRUE. | |
| virtual void | mnvert (Double_t *a, Int_t l, Int_t m, Int_t n, Int_t &ifail) |
| Inverts a symmetric matrix. | |
| virtual void | mnwarn (const char *copt, const char *corg, const char *cmes) |
| Prints Warning messages. | |
| virtual void | mnwerr () |
| Calculates the WERR, external parameter errors. | |
| virtual Int_t | Release (Int_t parNo) |
| release a parameter | |
| virtual Int_t | SetErrorDef (Double_t up) |
| To get the n-sigma contour the error def parameter "up" has to set to n^2. | |
| virtual void | SetFCN (void(*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t)) |
| To set the address of the minimization function. | |
| virtual void | SetGraphicsMode (Bool_t mode=kTRUE) |
| virtual void | SetMaxIterations (Int_t maxiter=500) |
| virtual void | SetObjectFit (TObject *obj) |
| virtual Int_t | SetPrintLevel (Int_t printLevel=0) |
| set Minuit print level. | |
| void | Streamer (TBuffer &) override |
| Stream an object of class TObject. | |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TNamed | |
| TNamed () | |
| TNamed (const char *name, const char *title) | |
| TNamed (const TNamed &named) | |
| TNamed copy ctor. | |
| TNamed (const TString &name, const TString &title) | |
| virtual | ~TNamed () |
| TNamed destructor. | |
| void | Clear (Option_t *option="") override |
| Set name and title to empty strings (""). | |
| TObject * | Clone (const char *newname="") const override |
| Make a clone of an object using the Streamer facility. | |
| Int_t | Compare (const TObject *obj) const override |
| Compare two TNamed objects. | |
| void | Copy (TObject &named) const override |
| Copy this to obj. | |
| virtual void | FillBuffer (char *&buffer) |
| Encode TNamed into output buffer. | |
| const char * | GetName () const override |
| Returns name of object. | |
| const char * | GetTitle () const override |
| Returns title of object. | |
| ULong_t | Hash () const override |
| Return hash value for this object. | |
| TClass * | IsA () const override |
| Bool_t | IsSortable () const override |
| void | ls (Option_t *option="") const override |
| List TNamed name and title. | |
| TNamed & | operator= (const TNamed &rhs) |
| TNamed assignment operator. | |
| void | Print (Option_t *option="") const override |
| Print TNamed name and title. | |
| virtual void | SetName (const char *name) |
| Set the name of the TNamed. | |
| virtual void | SetNameTitle (const char *name, const char *title) |
| Set all the TNamed parameters (name and title). | |
| virtual void | SetTitle (const char *title="") |
| Set the title of the TNamed. | |
| virtual Int_t | Sizeof () const |
| Return size of the TNamed part of the TObject. | |
| void | Streamer (TBuffer &) override |
| Stream an object of class TObject. | |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TObject | |
| TObject () | |
| TObject constructor. | |
| TObject (const TObject &object) | |
| TObject copy ctor. | |
| virtual | ~TObject () |
| TObject destructor. | |
| void | AbstractMethod (const char *method) const |
| Use this method to implement an "abstract" method that you don't want to leave purely abstract. | |
| virtual void | AppendPad (Option_t *option="") |
| Append graphics object to current pad. | |
| virtual void | Browse (TBrowser *b) |
| Browse object. May be overridden for another default action. | |
| ULong_t | CheckedHash () |
| Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. | |
| virtual const char * | ClassName () const |
| Returns name of class to which the object belongs. | |
| virtual void | Delete (Option_t *option="") |
| Delete this object. | |
| virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
| Computes distance from point (px,py) to the object. | |
| virtual void | Draw (Option_t *option="") |
| Default Draw method for all objects. | |
| virtual void | DrawClass () const |
| Draw class inheritance tree of the class to which this object belongs. | |
| virtual TObject * | DrawClone (Option_t *option="") const |
Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1). | |
| virtual void | Dump () const |
| Dump contents of object on stdout. | |
| virtual void | Error (const char *method, const char *msgfmt,...) const |
| Issue error message. | |
| virtual void | Execute (const char *method, const char *params, Int_t *error=nullptr) |
| Execute method on this object with the given parameter string, e.g. | |
| virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr) |
| Execute method on this object with parameters stored in the TObjArray. | |
| virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
| Execute action corresponding to an event at (px,py). | |
| virtual void | Fatal (const char *method, const char *msgfmt,...) const |
| Issue fatal error message. | |
| virtual TObject * | FindObject (const char *name) const |
| Must be redefined in derived classes. | |
| virtual TObject * | FindObject (const TObject *obj) const |
| Must be redefined in derived classes. | |
| virtual Option_t * | GetDrawOption () const |
| Get option used by the graphics system to draw this object. | |
| virtual const char * | GetIconName () const |
| Returns mime type name of object. | |
| virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
| Returns string containing info about the object at position (px,py). | |
| virtual Option_t * | GetOption () const |
| virtual UInt_t | GetUniqueID () const |
| Return the unique object id. | |
| virtual Bool_t | HandleTimer (TTimer *timer) |
| Execute action in response of a timer timing out. | |
| Bool_t | HasInconsistentHash () const |
| Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. | |
| virtual void | Info (const char *method, const char *msgfmt,...) const |
| Issue info message. | |
| virtual Bool_t | InheritsFrom (const char *classname) const |
| Returns kTRUE if object inherits from class "classname". | |
| virtual Bool_t | InheritsFrom (const TClass *cl) const |
| Returns kTRUE if object inherits from TClass cl. | |
| virtual void | Inspect () const |
| Dump contents of this object in a graphics canvas. | |
| void | InvertBit (UInt_t f) |
| Bool_t | IsDestructed () const |
| IsDestructed. | |
| virtual Bool_t | IsEqual (const TObject *obj) const |
| Default equal comparison (objects are equal if they have the same address in memory). | |
| virtual Bool_t | IsFolder () const |
| Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). | |
| R__ALWAYS_INLINE Bool_t | IsOnHeap () const |
| R__ALWAYS_INLINE Bool_t | IsZombie () const |
| void | MayNotUse (const char *method) const |
| Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). | |
| virtual Bool_t | Notify () |
| This method must be overridden to handle object notification. | |
| void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
| Use this method to declare a method obsolete. | |
| void | operator delete (void *ptr) |
| Operator delete. | |
| void | operator delete[] (void *ptr) |
| Operator delete []. | |
| void * | operator new (size_t sz) |
| void * | operator new (size_t sz, void *vp) |
| void * | operator new[] (size_t sz) |
| void * | operator new[] (size_t sz, void *vp) |
| TObject & | operator= (const TObject &rhs) |
| TObject assignment operator. | |
| virtual void | Paint (Option_t *option="") |
| This method must be overridden if a class wants to paint itself. | |
| virtual void | Pop () |
| Pop on object drawn in a pad to the top of the display list. | |
| virtual Int_t | Read (const char *name) |
| Read contents of object with specified name from the current directory. | |
| virtual void | RecursiveRemove (TObject *obj) |
| Recursively remove this object from a list. | |
| void | ResetBit (UInt_t f) |
| virtual void | SaveAs (const char *filename="", Option_t *option="") const |
| Save this object in the file specified by filename. | |
| virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
| Save a primitive as a C++ statement(s) on output stream "out". | |
| void | SetBit (UInt_t f) |
| void | SetBit (UInt_t f, Bool_t set) |
| Set or unset the user status bits as specified in f. | |
| virtual void | SetDrawOption (Option_t *option="") |
| Set drawing option for object. | |
| virtual void | SetUniqueID (UInt_t uid) |
| Set the unique object id. | |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
| virtual void | SysError (const char *method, const char *msgfmt,...) const |
| Issue system error message. | |
| R__ALWAYS_INLINE Bool_t | TestBit (UInt_t f) const |
| Int_t | TestBits (UInt_t f) const |
| virtual void | UseCurrentStyle () |
| Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. | |
| virtual void | Warning (const char *method, const char *msgfmt,...) const |
| Issue warning message. | |
| virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) |
| Write this object to the current directory. | |
| virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const |
| Write this object to the current directory. | |
Static Public Member Functions | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
Static Public Member Functions inherited from TMinuit | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
Static Public Member Functions inherited from TNamed | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
Static Public Member Functions inherited from TObject | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
| static Longptr_t | GetDtorOnly () |
| Return destructor only flag. | |
| static Bool_t | GetObjectStat () |
| Get status of object stat flag. | |
| static void | SetDtorOnly (void *obj) |
| Set destructor only flag. | |
| static void | SetObjectStat (Bool_t stat) |
| Turn on/off tracking of objects in the TObjectTable. | |
Private Attributes | |
| IFitterTarget & | fFitterTarget |
| fitter Target | |
| Int_t | fNumPar |
| number of parameters | |
| std::vector< Double_t > | fParameters |
| vector holding the current parameters | |
#include <TMVA/MinuitWrapper.h>
| TMVA::MinuitWrapper::MinuitWrapper | ( | IFitterTarget & | target, |
| Int_t | maxpar | ||
| ) |
constructor
Definition at line 38 of file MinuitWrapper.cxx.
|
inlinevirtual |
Definition at line 51 of file MinuitWrapper.h.
|
static |
|
inlinestaticconstexpr |
Definition at line 69 of file MinuitWrapper.h.
|
virtual |
reset the fitter environment
Reimplemented from TObject.
Definition at line 74 of file MinuitWrapper.cxx.
|
virtual |
produces a clone of this MinuitWrapper
Reimplemented from TObject.
Definition at line 132 of file MinuitWrapper.cxx.
|
inlinestatic |
Definition at line 69 of file MinuitWrapper.h.
|
virtual |
std::vector<Double_t> parameters( npar );
Reimplemented from TMinuit.
Definition at line 51 of file MinuitWrapper.cxx.
Execute a fitter command; command : command string args : list of nargs command arguments.
Definition at line 64 of file MinuitWrapper.cxx.
| Int_t TMVA::MinuitWrapper::GetErrors | ( | Int_t | ipar, |
| Double_t & | eplus, | ||
| Double_t & | eminus, | ||
| Double_t & | eparab, | ||
| Double_t & | globcc | ||
| ) |
return current errors for a parameter
Definition at line 105 of file MinuitWrapper.cxx.
| Int_t TMVA::MinuitWrapper::GetStats | ( | Double_t & | amin, |
| Double_t & | edm, | ||
| Double_t & | errdef, | ||
| Int_t & | nvpar, | ||
| Int_t & | nparx | ||
| ) |
return global fit parameters
Definition at line 90 of file MinuitWrapper.cxx.
|
inlinevirtual |
Reimplemented from TObject.
Definition at line 69 of file MinuitWrapper.h.
|
inline |
Definition at line 54 of file MinuitWrapper.h.
| Int_t TMVA::MinuitWrapper::SetParameter | ( | Int_t | ipar, |
| const char * | parname, | ||
| Double_t | value, | ||
| Double_t | verr, | ||
| Double_t | vlow, | ||
| Double_t | vhigh | ||
| ) |
set initial values for a parameter
Definition at line 121 of file MinuitWrapper.cxx.
|
virtual |
|
inline |
Definition at line 69 of file MinuitWrapper.h.
|
private |
fitter Target
Definition at line 65 of file MinuitWrapper.h.
|
private |
number of parameters
Definition at line 67 of file MinuitWrapper.h.
|
private |
vector holding the current parameters
Definition at line 66 of file MinuitWrapper.h.