private:
TMinuit TMinuit(const TMinuit& m) public:
TMinuit TMinuit() TMinuit TMinuit(Int_t maxpar) virtual void ~TMinuit() virtual void BuildArrays(Int_t maxpar = 15) TClass* Class() virtual Int_t Command(const char* command) virtual TObject* Contour(Int_t npoints = 10, Int_t pa1 = 0, Int_t pa2 = 1) virtual Int_t DefineParameter(Int_t parNo, const char* name, Double_t initVal, Double_t initErr, Double_t lowerLimit, Double_t upperLimit) virtual void DeleteArrays() virtual Int_t FixParameter(Int_t parNo) Int_t GetMaxIterations() TMethodCall* GetMethodCall() virtual Int_t GetNumFixedPars() virtual Int_t GetNumFreePars() virtual Int_t GetNumPars() TObject* GetObjectFit() virtual Int_t GetParameter(Int_t parNo, Double_t& currentValue, Double_t& currentError) Int_t GetStatus() virtual TClass* IsA() const virtual Int_t Migrad() virtual void mnamin() virtual void mnbins(Double_t a1, Double_t a2, Int_t naa, Double_t& bl, Double_t& bh, Int_t& nb, Double_t& bwid) virtual void mncalf(Double_t* pvec, Double_t& ycalf) virtual void mncler() virtual void mncntr(Int_t ke1, Int_t ke2, Int_t& ierrf) virtual void mncomd(const char* crdbin, Int_t& icondn) virtual void mncont(Int_t ke1, Int_t ke2, Int_t nptu, Double_t* xptu, Double_t* yptu, Int_t& ierrf) 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) virtual void mncros(Double_t& aopt, Int_t& iercr) virtual void mncuve() virtual void mnderi() virtual void mndxdi(Double_t pint, Int_t ipar, Double_t& dxdi) virtual void mneig(Double_t* a, Int_t ndima, Int_t n, Int_t mits, Double_t* work, Double_t precis, Int_t& ifault) virtual void mnemat(Double_t* emat, Int_t ndim) virtual void mnerrs(Int_t number, Double_t& eplus, Double_t& eminus, Double_t& eparab, Double_t& gcc) virtual void mneval(Double_t anext, Double_t& fnext, Int_t& ierev) virtual void mnexcm(TString comand, Double_t* plist, Int_t llist, Int_t& ierflg) virtual void mnexin(Double_t* pint) virtual void mnfixp(Int_t iint, Int_t& ierr) virtual void mnfree(Int_t k) virtual void mngrad() virtual void mnhelp(TString comd) virtual void mnhes1() virtual void mnhess() virtual void mnimpr() virtual void mninex(Double_t* pint) virtual void mninit(Int_t i1, Int_t i2, Int_t i3) virtual void mnlims() virtual void mnline(Double_t* start, Double_t fstart, Double_t* step, Double_t slope, Double_t toler) virtual void mnmatu(Int_t kode) virtual void mnmigr() virtual void mnmnos() virtual void mnmnot(Int_t ilax, Int_t ilax2, Double_t& val2pl, Double_t& val2mi) virtual void mnparm(Int_t k, TString cnamj, Double_t uk, Double_t wk, Double_t a, Double_t b, Int_t& ierflg) virtual void mnpars(TString& crdbuf, Int_t& icondn) virtual void mnpfit(Double_t* parx2p, Double_t* pary2p, Int_t npar2p, Double_t* coef2p, Double_t& sdev2p) virtual void mnpint(Double_t& pexti, Int_t i, Double_t& pinti) virtual void mnplot(Double_t* xpt, Double_t* ypt, char* chpt, Int_t nxypt, Int_t npagwd, Int_t npagln) virtual void mnpout(Int_t iuext, TString& chnam, Double_t& val, Double_t& err, Double_t& xlolim, Double_t& xuplim, Int_t& iuint) virtual void mnprin(Int_t inkode, Double_t fval) virtual void mnpsdf() virtual void mnrazz(Double_t ynew, Double_t* pnew, Double_t* y, Int_t& jh, Int_t& jl) virtual void mnrn15(Double_t& val, Int_t& inseed) virtual void mnrset(Int_t iopt) virtual void mnsave() virtual void mnscan() virtual void mnseek() virtual void mnset() virtual void mnsimp() virtual void mnstat(Double_t& fmin, Double_t& fedm, Double_t& errdef, Int_t& npari, Int_t& nparx, Int_t& istat) virtual void mntiny(Double_t epsp1, Double_t& epsbak) Bool_t mnunpt(TString& cfname) virtual void mnvert(Double_t* a, Int_t l, Int_t m, Int_t n, Int_t& ifail) virtual void mnwarn(const char* copt, const char* corg, const char* cmes) virtual void mnwerr() virtual Int_t Release(Int_t parNo) virtual Int_t SetErrorDef(Double_t up) virtual void SetFCN(void* fcn) virtual void SetFCN(void (*)(Int_t&, Double_t*, Double_t&f, Double_t*, Int_t) fcn) virtual void SetMaxIterations(Int_t maxiter = 500) virtual void SetObjectFit(TObject* obj) virtual Int_t SetPrintLevel(Int_t printLevel = 0) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)Data Members
public:
Int_t fEmpty Initialization flag (1 = Minuit initialized) Int_t fMaxpar Maximum number of parameters TString* fCpnam Array of parameters names Double_t* fU External (visible to user in FCN) value of parameters Double_t* fAlim Lower limits for parameters. If zero no limits Double_t* fBlim Upper limits for parameters Double_t* fErp Positive Minos errors if calculated Double_t* fErn Negative Minos errors if calculated Double_t* fWerr External parameters error (standard deviation, defined by UP) Double_t* fGlobcc Global Correlation Coefficients Int_t* fNvarl parameters flag (-1=undefined, 0=constant..) Int_t* fNiofex Internal parameters number, or zero if not currently variable Int_t* fNexofi External parameters number for currently variable parameters Double_t* fX Internal parameters values Double_t* fXt Internal parameters values X saved as Xt Double_t* fDirin (Internal) step sizes for current step Double_t* fXs Internal parameters values saved for fixed params Double_t* fXts Internal parameters values X saved as Xt for fixed params Double_t* fDirins (Internal) step sizes for current step for fixed params Double_t* fGrd First derivatives Double_t* fG2 Double_t* fGstep Step sizes Double_t* fGin Double_t* fDgrd Uncertainties Double_t* fGrds Double_t* fG2s Double_t* fGsteps Int_t* fIpfix List of fixed parameters Int_t fNpfix Number of fixed parameters Double_t* fVhmat (Internal) error matrix stored as Half MATrix, since it is symmetric Double_t* fVthmat VHMAT is sometimes saved in VTHMAT, especially in MNMNOT Double_t* fP Double_t* fPstar Double_t* fPstst Double_t* fPbar Double_t* fPrho Minimum point of parabola Int_t fMaxint Maximum number of internal parameters Int_t fNpar Number of free parameters (total number of pars = fNpar + fNfix) Int_t fMaxext Maximum number of external parameters Int_t fMaxIterations Maximum number of iterations Int_t fNu Int_t fIsysrd standardInput unit Int_t fIsyswr standard output unit Int_t fIsyssa Int_t fNpagwd Page width Int_t fNpagln Number of lines per page Int_t fNewpag Int_t fIstkrd[10] Int_t fNstkrd Int_t fIstkwr[10] Int_t fNstkwr TString fCfrom TString fCstatu TString fCtitl TString fCword TString fCundef TString fCvrsn TString fCovmes[4] Int_t fISW[7] Array of switches Int_t fIdbg[11] Array of internal debug switches Int_t fNblock Number of Minuit data blocks Int_t fIcomnd Number of commands Double_t fAmin Minimum value found for FCN Double_t fUp FCN+-UP defines errors (for chisquare fits UP=1) Double_t fEDM Estimated vertical distance to the minimum Double_t fFval3 Double_t fEpsi Double_t fApsi Double_t fDcovar Relative change in covariance matrix Int_t fNfcn Number of calls to FCN Int_t fNfcnmx Maximum number of calls to FCN Int_t fNfcnlc Int_t fNfcnfr Int_t fItaur Int_t fIstrat Int_t fNwrmes[2] Double_t* fWord7 Bool_t fLwarn true if warning messges are to be put out (default=true) Bool_t fLrepor true if exceptional conditions are put out (default=false) Bool_t fLimset true if a parameter is up against limits (for MINOS) Bool_t fLnolim true if there are no limits on any parameters (not yet used) Bool_t fLnewmn true if the previous process has unexpectedly improved FCN Bool_t fLphead true if a heading should be put out for the next parameter definition Double_t fEpsmac machine precision for floating points: Double_t fEpsma2 sqrt(fEpsmac) Double_t fVlimlo Double_t fVlimhi Double_t fUndefi Undefined number = -54321 Double_t fBigedm Big EDM = 123456 Double_t fUpdflt Double_t* fXpt X array of points for contours Double_t* fYpt Y array of points for contours char* fChpt Character to be plotted at the X,Y contour positions Double_t fXmidcr Double_t fYmidcr Double_t fXdircr Double_t fYdircr Int_t fKe1cr Int_t fKe2cr TString* fOrigin TString* fWarmes Int_t fNfcwar[20] Int_t fIcirc[2] Int_t fStatus Status flag for the last called Minuit function TObject* fObjectFit Pointer to object being fitted TMethodCall* fMethodCall Pointer to MethodCall in case of interpreted function void (*)(Int_t&npar, Double_t*gin, Double_t&f, Double_t*u, Int_t flag)* fFCN
*-*-*-*-*-*-*-*-*-*-*-*The Minimization package*-*--*-*-*-*-*-*-*-*-*-*-* *-* ======================== * *-* * *-* This package was originally written in Fortran by Fred James * *-* and part of PACKLIB (patch D506) * *-* * *-* It has been converted to a C++ class by R.Brun * *-* The current implementation in C++ is a straightforward conversion * *-* of the original Fortran version: The main changes are: * *-* * *-* - The variables in the various Minuit labelled common blocks * *-* have been changed to the TMinuit class data members. * *-* - The include file Minuit.h has been commented as much as possible* *-* using existing comments in the code or the printed documentation* *-* - The original Minuit subroutines are now member functions. * *-* - Constructors and destructor have been added. * *-* - Instead of passing the FCN function in the argument * *-* list, the addresses of this function is stored as pointer * *-* in the data members of the class. This is by far more elegant * *-* and flexible in an interactive environment. * *-* The member function SetFCN can be used to define this pointer. * *-* - The ROOT static function Printf is provided to replace all * *-* format statements and to print on currently defined output file.* *-* - The derived class TMinuitOld contains obsolete routines from * *-* the Fortran based version. * *-* - The functions SetObjFit(TObject *obj) and GetObjFit() can be * *-* used inside the FCN function to set/get a referenced object * *-* instead of using global variables. * *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* /*
The MINUIT package acts on a multiparameter Fortran function to which one must give the generic name FCN. In the ROOT implementation, the function FCN is defined via the MINUIT SetFCN member function when an Histogram.Fit command is invoked. The value of FCN will in general depend on one or more variable parameters.
To take a simple example, in case of ROOT histograms (classes TH1C,TH1S,TH1F,TH1D) the Fit function defines the Minuit fitting function as being H1FitChisquare or H1FitLikelihood depending on the options selected. H1FitChisquare calculates the chisquare between the user fitting function (gaussian, polynomial, user defined,etc) and the data for given values of the parameters. It is the task of MINUIT to find those values of the parameters which give the lowest value of chisquare.
For variable parameters with limits, MINUIT uses the following transformation:
P = arcsin(2((P -a)/(b- a))-1) P = a+((b- a)/(2))(sinP +1) int ext ext int
so that the internal value P can take on any value, while the external int value P can take on values only between the lower limit a and the ext upper limit b. Since the transformation is necessarily non-linear, it would transform a nice linear problem into a nasty non-linear one, which is the reason why limits should be avoided if not necessary. In addition, the transformation does require some computer time, so it slows down the computation a little bit, and more importantly, it introduces additional numerical inaccuracy into the problem in addition to what is introduced in the numerical calculation of the FCN value. The effects of non-linearity and numerical roundoff both become more important as the external value gets closer to one of the limits (expressed as the distance to nearest limit divided by distance between limits). The user must therefore be aware of the fact that, for example, if he puts limits of 10 (0,10 ) on a parameter, then the values 0.0 and 1. 0 will be indistinguishable to the accuracy of most machines.
The transformation also affects the parameter error matrix, of course, so MINUIT does a transformation of the error matrix (and the ``parabolic'' parameter errors) when there are parameter limits. Users should however realize that the transformation is only a linear approximation, and that it cannot give a meaningful result if one or more parameters is very close to a limit, where partial P /partial P #0. Therefore, it is ext int recommended that:
MINUIT offers the user a choice of several minimization algorithms. The MIGRAD algorithm is in general the best minimizer for nearly all functions. It is a variable-metric method with inexact line search, a stable metric updating scheme, and checks for positive-definiteness. Its main weakness is that it depends heavily on knowledge of the first derivatives, and fails miserably if they are very inaccurate.
If parameter limits are needed, in spite of the side effects, then the user should be aware of the following techniques to alleviate problems caused by limits:
If MIGRAD converges normally to a point where no parameter is near one of its limits, then the existence of limits has probably not prevented MINUIT from finding the right minimum. On the other hand, if one or more parameters is near its limit at the minimum, this may be because the true minimum is indeed at a limit, or it may be because the minimizer has become ``blocked'' at a limit. This may normally happen only if the parameter is so close to a limit (internal value at an odd multiple of #((pi)/(2)) that MINUIT prints a warning to this effect when it prints the parameter values. The minimizer can become blocked at a limit, because at a limit the derivative seen by the minimizer partial F/partial P is zero no matter int what the real derivative partial F/partial P is. ext
((partial F)/(partial P ))= ((partial F)/(partial P ))((partial P )/(partial P )) =((partial F)/(partial P ))= 0 int ext ext int ext
In the best case, where the minimum is far from any limits, MINUIT will correctly transform the error matrix, and the parameter errors it reports should be accurate and very close to those you would have got without limits. In other cases (which should be more common, since otherwise you wouldn't need limits), the very meaning of parameter errors becomes problematic. Mathematically, since the limit is an absolute constraint on the parameter, a parameter at its limit has no error, at least in one direction. The error matrix, which can assign only symmetric errors, then becomes essentially meaningless.
There are two kinds of problems that can arise: the reliability of MINUIT's error estimates, and their statistical interpretation, assuming they are accurate.
For discussuion of basic concepts, such as the meaning of the elements of the error matrix, or setting of exact confidence levels (see [bib-EADIE]).
MINUIT always carries around its own current estimates of the parameter errors, which it will print out on request, no matter how accurate they are at any given point in the execution. For example, at initialization, these estimates are just the starting step sizes as specified by the user. After a HESSE step, the errors are usually quite accurate, unless there has been a problem. MINUIT, when it prints out error values, also gives some indication of how reliable it thinks they are. For example, those marked CURRENT GUESS ERROR are only working values not to be believed, and APPROXIMATE ERROR means that they have been calculated but there is reason to believe that they may not be accurate.
If no mitigating adjective is given, then at least MINUIT believes the errors are accurate, although there is always a small chance that MINUIT has been fooled. Some visible signs that MINUIT may have been fooled are:
The best way to be absolutely sure of the errors, is to use ``independent'' calculations and compare them, or compare the calculated errors with a picture of the function. Theoretically, the covariance matrix for a ``physical'' function must be positive-definite at the minimum, although it may not be so for all points far away from the minimum, even for a well-determined physical problem. Therefore, if MIGRAD reports that it has found a non-positive-definite covariance matrix, this may be a sign of one or more of the following:
On its way to the minimum, MIGRAD may have traversed a region which has unphysical behaviour, which is of course not a serious problem as long as it recovers and leaves such a region.
If the matrix is not positive-definite even at the minimum, this may mean that the solution is not well-defined, for example that there are more unknowns than there are data points, or that the parameterization of the fit contains a linear dependence. If this is the case, then MINUIT (or any other program) cannot solve your problem uniquely, and the error matrix will necessarily be largely meaningless, so the user must remove the underdeterminedness by reformulating the parameterization. MINUIT cannot do this itself.
It is possible that the apparent lack of positive-definiteness is in fact only due to excessive roundoff errors in numerical calculations in the user function or not enough precision. This is unlikely in general, but becomes more likely if the number of free parameters is very large, or if the parameters are badly scaled (not all of the same order of magnitude), and correlations are also large. In any case, whether the non-positive-definiteness is real or only numerical is largely irrelevant, since in both cases the error matrix will be unreliable and the minimum suspicious.
For questions of parameter dependence, see the discussion above on positive-definiteness.
Possible other mathematical problems are the following:
Be especially careful of exponential and factorial functions which get big very quickly and lose accuracy.
The function may have unphysical local minima, especially at infinity in some variables.
*/
*-*-*-*-*-*-*-*-*-*-*Minuit normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-* *-* ========================
*-*-*-*-*-*-*-*-*-*-*Minuit normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-* *-* ======================== maxpar is the maximum number of parameters used with this TMinuit object. maxpar must < kMAXDIM=100
Private TMinuit copy ctor. TMinuit can not be copied.
*-*-*-*-*-*-*-*-*-*-*Minuit default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-* *-* =========================
*-*-*-*-*-*-*Create internal Minuit arrays for the maxpar parameters*-*-*-* *-* =======================================================
execute a Minuit command Equivalent to MNEXCM except that the command is given as a character string. See TMinuit::mnhelp for the full list of available commands Returns the status of the execution: = 0: command executed normally 1: command is blank, ignored 2: command line unreadable, ignored 3: unknown command, ignored 4: abnormal termination (e.g., MIGRAD not converged) 5: command is a request to read PARAMETER definitions 6: 'SET INPUT' command 7: 'SET TITLE' command 8: 'SET COVAR' command 9: reserved 10: END command 11: EXIT or STOP command 12: RETURN command *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Creates a TGraph object describing the n-sigma contour of a TMinuit fit. The contour of the parameters pa1 and pa2 is calculated unsing npoints (>=4) points. The TMinuit status will be 0 on success and -1 if errors in the calling sequence (pa1, pa2 not variable) 1 if less than four points can be found 2 if npoints<4 n>3 if only n points can be found (n < npoints) The status can be obtained via TMinuit::GetStatus(). To get the n-sigma contour the ERRDEF parameter in Minuit has to set to n^2. The fcn function has to be set before the routine is called. The TGraph object is created via the interpreter. The user must cast it to a TGraph*
Define a parameter
*-*-*-*-*-*-*-*-*-*-*-*Delete internal Minuit arrays*-*-*-*-*-*-*-*-* *-* =============================
fix a parameter
return parameter value and error
returns the number of currently fixed parameters
returns the number of currently free parameters
returns the total number of parameters that have been defined. (fixed and free)
invokes the MIGRAD minimizer
release a parameter
*-*-*-*-*-*-*To set the address of the minimization function*-*-*-*-*-*-*-* *-* =============================================== *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*To set the address of the minimization function*-*-*-*-*-*-*-* *-* =============================================== this function is called by CINT instead of the function above *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*-*-*Initialize AMIN*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* *-* =============== *-*C Called from many places. Initializes the value of AMIN by *-*C calling the user function. Prints out the function value and *-*C parameter values if Print Flag value is high enough. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*Compute reasonable histogram intervals*-*-*-*-*-*-*-*-* *-* ====================================== *-* Function TO DETERMINE REASONABLE HISTOGRAM INTERVALS *-* GIVEN ABSOLUTE UPPER AND LOWER BOUNDS A1 AND A2 *-* AND DESIRED MAXIMUM NUMBER OF BINS NAA *-* PROGRAM MAKES REASONABLE BINNING FROM BL TO BH OF WIDTH BWID *-* F. JAMES, AUGUST, 1974 , stolen for Minuit, 1988 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*Transform FCN to find further minima*-*-*-*-*-*-*-*-*-* *-* ==================================== *-* Called only from MNIMPR. Transforms the function FCN *-* by dividing out the quadratic part in order to find further *-* minima. Calculates ycalf = (f-fmin)/(x-xmin)*v*(x-xmin) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*Resets the parameter list to UNDEFINED*-*-*-*-*-*-*-* *-* ====================================== *-* Called from MINUIT and by option from MNEXCM *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*Print function contours in two variables, on line printer*-*-*-*-* *-* ========================================================= *-* *-* input arguments: parx, pary, devs, ngrid *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*Reads a command string and executes*-*-*-*-*-*-*-*-*-* *-* =================================== *-* Called by user. 'Reads' a command string and executes. *-* Equivalent to MNEXCM except that the command is given as a *-* character string. *-* *-* ICONDN = 0: command executed normally *-* 1: command is blank, ignored *-* 2: command line unreadable, ignored *-* 3: unknown command, ignored *-* 4: abnormal termination (e.g., MIGRAD not converged) *-* 5: command is a request to read PARAMETER definitions *-* 6: 'SET INPUT' command *-* 7: 'SET TITLE' command *-* 8: 'SET COVAR' command *-* 9: reserved *-* 10: END command *-* 11: EXIT or STOP command *-* 12: RETURN command *-* *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*Find points along a contour where FCN is minimum*-*-*-*-*-*-* *-* ================================================ *-* Find NPTU points along a contour where the function *-* FMIN (X(KE1),X(KE2)) = AMIN+UP *-* where FMIN is the minimum of FCN with respect to all *-* the other NPAR-2 variable parameters (if any). *-* IERRF on return will be equal to the number of points found: *-* NPTU if normal termination with NPTU points found *-* -1 if errors in the calling sequence (KE1, KE2 not variable) *-* 0 if less than four points can be found (using MNMNOT) *-* n>3 if only n points can be found (n < NPTU) *-* *-* input arguments: parx, pary, devs, ngrid *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*-*Cracks the free-format input*-*-*-*-*-*-*-*-*-*-*-*-* *-* ============================ *-* Cracks the free-format input, expecting zero or more *-* alphanumeric fields (which it joins into COMAND(1:LNC)) *-* followed by one or more numeric fields separated by *-* blanks and/or one comma. The numeric fields are put into *-* the LLIST (but at most MXP) elements of PLIST. *-* IERR = 0 if no errors, *-* = 1 if error(s). *-* *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*Find point where MNEVAL=AMIN+UP*-*-*-*-*-*-*-*-*-*-*-* *-* =============================== *-* Find point where MNEVAL=AMIN+UP, along the line through *-* XMIDCR,YMIDCR with direction XDIRCR,YDIRCR, where X and Y *-* are parameters KE1CR and KE2CR. If KE2CR=0 (from MINOS), *-* only KE1CR is varied. From MNCONT, both are varied. *-* Crossing point is at *-* (U(KE1),U(KE2)) = (XMID,YMID) + AOPT*(XDIR,YDIR) *-* *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*Makes sure that the current point is a local minimum*-*-*-*-* *-* ==================================================== *-* Makes sure that the current point is a local *-* minimum and that the error matrix exists, *-* or at least something good enough for MINOS and MNCONT *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*Calculates the first derivatives of FCN (GRD)*-*-*-*-*-*-*-* *-* ============================================= *-* Calculates the first derivatives of FCN (GRD), *-* either by finite differences or by transforming the user- *-* supplied derivatives to internal coordinates, *-* according to whether ISW(3) is zero or one. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*Calculates the transformation factor between ext/internal values*-* *-* ===================================================================== *-* calculates the transformation factor between external and *-* internal parameter values. this factor is one for *-* parameters which are not limited. called from MNEMAT. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*-*Compute matrix eigen values*-*-*-*-*-*-*-*-*-*-*-*-* *-* ===========================
*-*-*-*-*-*Calculates the external error matrix from the internal matrix*-* *-* ============================================================= *-* Calculates the external error matrix from the internal *-* to be called by user. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*Utility routine to get MINOS errors*-*-*-*-*-*-*-*-*-*-* *-* =================================== *-* Called by user. *-* NUMBER is the parameter number *-* values returned by MNERRS: *-* EPLUS, EMINUS are MINOS errors of parameter NUMBER, *-* EPARAB is 'parabolic' error (from error matrix). *-* (Errors not calculated are set = 0) *-* GCC is global correlation coefficient from error matrix *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*Evaluates the function being analyzed by MNCROS*-*-*-*-*-*-*-* *-* =============================================== *-* Evaluates the function being analyzed by MNCROS, which is *-* generally the minimum of FCN with respect to all remaining *-* variable parameters. The class data members contains the *-* data necessary to know the values of U(KE1CR) and U(KE2CR) *-* to be used, namely U(KE1CR) = XMIDCR + ANEXT*XDIRCR *-* and (if KE2CR .NE. 0) U(KE2CR) = YMIDCR + ANEXT*YDIRCR *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*Interprets a command and takes appropriate action*-*-*-*-*-*-*-* *-* ================================================= *-* either directly by skipping to the corresponding code in *-* MNEXCM, or by setting up a call to a function *-* *-* recognized MINUIT commands: *-* obsolete commands: *-* IERFLG is now (94.5) defined the same as ICONDN in MNCOMD *-* = 0: command executed normally *-* 1: command is blank, ignored *-* 2: command line unreadable, ignored *-* 3: unknown command, ignored *-* 4: abnormal termination (e.g., MIGRAD not converged) *-* 9: reserved *-* 10: END command *-* 11: EXIT or STOP command *-* 12: RETURN command *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*Transforms the external parameter values U to internal values*-*-* *-* ============================================================= *-* Transforms the external parameter values U to internal *-* values in the dense array PINT. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*Removes parameter IINT from the internal parameter list*-*-* *-* ======================================================= *-* and arranges the rest of the list to fill the hole. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*Restores one or more fixed parameter(s) to variable status*-*-*-*-*-* *-* ========================================================== *-* Restores one or more fixed parameter(s) to variable status *-* by inserting it into the internal parameter list at the *-* appropriate place. *-* *-* K = 0 means restore all parameters *-* K = 1 means restore the last parameter fixed *-* K = -I means restore external parameter I (if possible) *-* IQ = fix-location where internal parameters were stored *-* IR = external number of parameter being restored *-* IS = internal number of parameter being restored *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*Interprets the SET GRAD command*-*-*-*-*-*-*-*-*-*-*-*-* *-* =============================== *-* Called from MNSET *-* Interprets the SET GRAD command, which informs MINUIT whether *-* the first derivatives of FCN will be calculated by the user *-* inside FCN. It can check the user derivative calculation *-* by comparing it with a finite difference approximation. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*HELP routine for MINUIT interactive commands*-*-*-*-*-*-*-*-* *-* ============================================ *-* *-* COMD ='* ' prints a global help for all commands *-* COMD =Command_name: print detailed help for one command. *-* Note that at least 3 characters must be given for the command *-* name. *-* *-* Author: Rene Brun *-* comments extracted from the MINUIT documentation file. *-* *-* *-* command name ASSUMED to be in upper case *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*Calculates the full second-derivative matrix of FCN*-*-*-*-*-*-*-* *-* =================================================== *-* by taking finite differences. When calculating diagonal *-* elements, it may iterate so that step size is nearly that *-* which gives function change= UP/10. The first derivatives *-* of course come as a free side effect, but with a smaller *-* step size in order to obtain a known accuracy. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*Calculate first derivatives (GRD) and uncertainties (DGRD)*-*-*-*-*-* *-* ========================================================== *-* and appropriate step sizes GSTEP *-* Called from MNHESS and MNGRAD *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*Attempts to improve on a good local minimum*-*-*-*-*-*-*-*-*-* *-* =========================================== *-* Attempts to improve on a good local minimum by finding a *-* better one. The quadratic part of FCN is removed by MNCALF *-* and this transformed function is minimized using the simplex *-* method from several random starting points. *-* ref. -- Goldstein and Price, Math.Comp. 25, 569 (1971) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*Transforms from internal coordinates (PINT) to external (U)*-*-*-* *-* =========================================================== *-* The minimizing routines which work in *-* internal coordinates call this routine before calling FCN. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*Main initialization member function for MINUIT*-*-*-*-*-*-*-*-* *-* ============================================== *-* It initializes some constants *-* (including the logical I/O unit nos.), *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*Interprets the SET LIM command, to reset the parameter limits*-*-*-* *-* ============================================================= *-* Called from MNSET *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*Perform a line search from position START*-*-*-*-*-*-*-* *-* ========================================= *-* along direction STEP, where the length of vector STEP *-* gives the expected position of minimum. *-* FSTART is value of function at START *-* SLOPE (if non-zero) is df/dx along STEP at START *-* TOLER is initial tolerance of minimum in direction STEP *-* *-* SLAMBG and ALPHA control the maximum individual steps allowed. *-* The first step is always =1. The max length of second step is SLAMBG. *-* The max size of subsequent steps is the maximum previous successful *-* step multiplied by ALPHA + the size of most recent successful step, *-* but cannot be smaller than SLAMBG. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*Prints the covariance matrix v when KODE=1*-*-*-*-*-*-*-*-* *-* ========================================== *-* always prints the global correlations, and *-* calculates and prints the individual correlation coefficients *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*Performs a local function minimization*-*-*-*-*-*-*-*-*-* *-* ====================================== *-* Performs a local function minimization using basically the *-* method of Davidon-Fletcher-Powell as modified by Fletcher *-* ref. -- Fletcher, Comp.J. 13,317 (1970) "switching method" *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*Performs a MINOS error analysis*-*-*-*-*-*-*-*-*-*-*-* *-* =============================== *-* Performs a MINOS error analysis on those parameters for *-* which it is requested on the MINOS command by calling *-* MNMNOT for each parameter requested. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*Performs a MINOS error analysis on one parameter*-*-*-*-*-*-*-*-* *-* ================================================ *-* The parameter ILAX is varied, and the minimum of the *-* function with respect to the other parameters is followed *-* until it crosses the value FMIN+UP. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*Implements one parameter definition*-*-*-*-*-*-*-*-*-*-*-* *-* =================================== *-* Called from MNPARS and user-callable *-* Implements one parameter definition, that is: *-* K (external) parameter number *-* CNAMK parameter name *-* UK starting value *-* WK starting step size or uncertainty *-* A, B lower and upper physical parameter limits *-* and sets up (updates) the parameter lists. *-* Output: IERFLG=0 if no problems *-* >0 if MNPARM unable to implement definition *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*Implements one parameter definition*-*-*-*-*-*-*-*-*-*-*-*-* *-* =========== ======================= *-* Called from MNREAD and user-callable *-* Implements one parameter definition, that is: *-* parses the string CRDBUF and calls MNPARM *-* *-* output conditions: *-* ICONDN = 0 all OK *-* ICONDN = 1 error, attempt to define parameter is ignored *-* ICONDN = 2 end of parameter definitions *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*To fit a parabola to npar2p points*-*-*-*-*-*-*-*-*-*-* *-* ================================== *-* npar2p no. of points *-* parx2p(i) x value of point i *-* pary2p(i) y value of point i *-* *-* coef2p(1...3) coefficients of the fitted parabola *-* y=coef2p(1) + coef2p(2)*x + coef2p(3)*x**2 *-* sdev2p= variance *-* method : chi**2 = min equation solved explicitly *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*Calculates the internal parameter value PINTI*-*-*-*-*-*-*-* *-* ============================================= *-* corresponding to the external value PEXTI for parameter I. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*Plots points in array xypt onto one page with labelled axes*-*-*-*-* *-* =========================================================== *-* NXYPT is the number of points to be plotted *-* XPT(I) = x-coord. of ith point *-* YPT(I) = y-coord. of ith point *-* CHPT(I) = character to be plotted at this position *-* the input point arrays XPT, YPT, CHPT are destroyed. *-* *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*Provides the user with information concerning the current status*-*-* *-* ================================================================ *-* of parameter number IUEXT. Namely, it returns: *-* CHNAM: the name of the parameter *-* VAL: the current (external) value of the parameter *-* ERR: the current estimate of the parameter uncertainty *-* XLOLIM: the lower bound (or zero if no limits) *-* XUPLIM: the upper bound (or zero if no limits) *-* IUINT: the internal parameter number (or zero if not variable, *-* or negative if undefined). *-* Note also: If IUEXT is negative, then it is -internal parameter *-* number, and IUINT is returned as the EXTERNAL number. *-* Except for IUINT, this is exactly the inverse of MNPARM *-* User-called *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*Prints the values of the parameters at the time of the call*-*-*-*-* *-* =========================================================== *-* also prints other relevant information such as function value, *-* estimated distance to minimum, parameter errors, step sizes. *-* *-* According to the value of IKODE, the printout is: *-* IKODE=INKODE= 0 only info about function value *-* 1 parameter values, errors, limits *-* 2 values, errors, step sizes, internal values *-* 3 values, errors, step sizes, first derivs. *-* 4 values, parabolic errors, MINOS errors *-* when INKODE=5, MNPRIN chooses IKODE=1,2, or 3, according to ISW(2) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*Calculates the eigenvalues of v to see if positive-def*-*-*-*-* *-* ====================================================== *-* if not, adds constant along diagonal to make positive. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*Called only by MNSIMP (and MNIMPR) to add a new point*-*-*-*-*-*-* *-* ===================================================== *-* and remove an old one from the current simplex, and get the *-* estimated distance to minimum. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*This is a super-portable random number generator*-*-*-*-*-*-* *-* ================================================ *-* It should not overflow on any 32-bit machine. *-* The cycle is only ~10**9, so use with care! *-* Note especially that VAL must not be undefined on input. *-* Set Default Starting Seed *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*Resets function value and errors to UNDEFINED*-*-*-*-*-*-*-* *-* ============================================= *-* If IOPT=1, *-* If IOPT=0, sets only MINOS errors to undefined *-* Called from MNCLER and whenever problem changes, for example *-* after SET LIMITS, SET PARAM, CALL FCN 6 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*Writes current parameter values and step sizes onto file ISYSSA*-*-* *-* =============================================================== *-* in format which can be reread by Minuit for restarting. *-* The covariance matrix is also output if it exists. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*Scans the values of FCN as a function of one parameter*-*-*-*-*-* *-* ====================================================== *-* and plots the resulting values as a curve using MNPLOT. *-* It may be called to scan one parameter or all parameters. *-* retains the best function and parameter values found. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*Performs a rough (but global) minimization by monte carlo search*-* *-* ================================================================ *-* Each time a new minimum is found, the search area is shifted *-* to be centered at the best value. Random points are chosen *-* uniformly over a hypercube determined by current step sizes. *-* The Metropolis algorithm accepts a worse point with probability *-* exp(-d/UP), where d is the degradation. Improved points *-* are of course always accepted. Actual steps are random *-* multiples of the nominal steps (DIRIN). *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*Interprets the commands that start with SET and SHOW*-*-*-*-*-*-* *-* ==================================================== *-* Called from MNEXCM *-* file characteristics for SET INPUT *-* 'SET ' or 'SHOW', 'ON ' or 'OFF', 'SUPPRESSED' or 'REPORTED ' *-* explanation of print level numbers -1:3 and strategies 0:2 *-* identification of debug options *-* things that can be set or shown *-* options not intended for normal users *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*Minimization using the simplex method of Nelder and Mead*-*-*-*-* *-* ======================================================== *-* Performs a minimization using the simplex method of Nelder *-* and Mead (ref. -- Comp. J. 7,308 (1965)). *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*To find the machine precision*-*-*-*-*-*-*-*-*-*-*-*-*-*-* *-* ============================= *-* Compares its argument with the value 1.0, and returns *-* the value .TRUE. if they are equal. To find EPSMAC *-* safely by foiling the Fortran optimizer *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*Returns .TRUE. if CFNAME contains unprintable characters*-*-*-* *-* ======================================================== *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*-*Inverts a symmetric matrix*-*-*-*-*-*-*-*-*-*-*-*-* *-* ========================== *-* inverts a symmetric matrix. matrix is first scaled to *-* have all ones on the diagonal (equivalent to change of units) *-* but no pivoting is done since matrix is positive-definite. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*-*Prints Warning messages*-*-*-*-*-*-*-*-*-*-*-*-*-* *-* ======================= *-* If COPT='W', CMES is a WARning message from CORG. *-* If COPT='D', CMES is a DEBug message from CORG. *-* If SET WARnings is in effect (the default), this routine *-* prints the warning message CMES coming from CORG. *-* If SET NOWarnings is in effect, the warning message is *-* stored in a circular buffer of length MAXMES. *-* If called with CORG=CMES='SHO', it prints the messages in *-* the circular buffer, FIFO, and empties the buffer. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*Calculates the WERR, external parameter errors*-*-*-*-*-*-* *-* ============================================== *-* and the global correlation coefficients, to be called *-* whenever a new covariance matrix is available. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
TMethodCall* GetMethodCall() TObject* GetObjectFit() Int_t GetMaxIterations() Int_t GetStatus() void SetMaxIterations(Int_t maxiter = 500) void SetObjectFit(TObject* obj) TClass* Class() TClass* IsA() const void ShowMembers(TMemberInspector& insp, char* parent) void Streamer(TBuffer& b)