\section{O\-P\-A\-L\-Fitter\-G\-S\-L Class Reference}
\label{classOPALFitterGSL}\index{O\-P\-A\-L\-Fitter\-G\-S\-L@{O\-P\-A\-L\-Fitter\-G\-S\-L}}


Description of the fit algorithm and interface\-:  




{\ttfamily \#include $<$O\-P\-A\-L\-Fitter\-G\-S\-L.\-h$>$}

Inheritance diagram for O\-P\-A\-L\-Fitter\-G\-S\-L\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classOPALFitterGSL}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual double {\bf fit} ()
\item 
virtual int {\bf get\-Error} () const 
\begin{DoxyCompactList}\small\item\em Return error code. \end{DoxyCompactList}\item 
virtual double {\bf get\-Probability} () const \label{classOPALFitterGSL_a50ae2d664ed79482db943066ecaf4bfa}

\begin{DoxyCompactList}\small\item\em Get the fit probability of the last fit. \end{DoxyCompactList}\item 
virtual double {\bf get\-Chi2} () const \label{classOPALFitterGSL_a90f6bea108359eef491993d8871e08d5}

\begin{DoxyCompactList}\small\item\em Get the chi$\ast$$\ast$2 of the last fit. \end{DoxyCompactList}\item 
virtual int {\bf get\-Do\-F} () const \label{classOPALFitterGSL_a6f8aa0503ba737871d85c7989963e3dd}

\begin{DoxyCompactList}\small\item\em Get the number of degrees of freedom of the last fit. \end{DoxyCompactList}\item 
virtual int {\bf get\-Iterations} () const \label{classOPALFitterGSL_acdf9e7dbc32815f6a92b328dc4525e6b}

\begin{DoxyCompactList}\small\item\em Get the number of iterations of the last fit. \end{DoxyCompactList}\item 
virtual int {\bf get\-Ncon} () const \label{classOPALFitterGSL_acff359bc5a9a0472d6d6b7ec64778e91}

\begin{DoxyCompactList}\small\item\em Get the number of hard constraints of the last fit. \end{DoxyCompactList}\item 
virtual int {\bf get\-Nsoft} () const \label{classOPALFitterGSL_a577ac5880e4c90acb183adf5e62b9023}

\begin{DoxyCompactList}\small\item\em Get the number of soft constraints of the last fit. \end{DoxyCompactList}\item 
virtual int {\bf get\-Npar} () const \label{classOPALFitterGSL_a8ee9f85c0e071040687d58258a9e661a}

\begin{DoxyCompactList}\small\item\em Get the number of all parameters of the last fit. \end{DoxyCompactList}\item 
virtual int {\bf get\-Nunm} () const \label{classOPALFitterGSL_a1e371b9d465bf480bae04953b28a28d4}

\begin{DoxyCompactList}\small\item\em Get the number of unmeasured parameters of the last fit. \end{DoxyCompactList}\item 
virtual bool {\bfseries initialize} ()\label{classOPALFitterGSL_ac97eea1ed4fd1e7ec94f59d42b9718a4}

\item 
virtual void {\bf set\-Debug} (int debuglevel)\label{classOPALFitterGSL_aef97e987be7df80e134fa9fc675a2dfd}

\begin{DoxyCompactList}\small\item\em Set the Debug Level. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
enum \{ {\bfseries N\-P\-A\-R\-M\-A\-X} =50, 
{\bfseries N\-C\-O\-N\-M\-A\-X} =20, 
{\bfseries N\-U\-N\-M\-M\-A\-X} =20
 \}
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual bool {\bfseries update\-Fit\-Objects} (double etaxi[$\,$])\label{classOPALFitterGSL_acac6e3744e4f6a33f13d9214ca8a51cd}

\end{DoxyCompactItemize}
\subsection*{Static Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
static void {\bfseries ini\-\_\-gsl\-\_\-permutation} (gsl\-\_\-permutation $\ast$\&p, unsigned int size)\label{classOPALFitterGSL_ae65159534c2a9b0308acbea3ffb9944f}

\item 
static void {\bfseries ini\-\_\-gsl\-\_\-vector} (gsl\-\_\-vector $\ast$\&v, int unsigned size)\label{classOPALFitterGSL_ac96481e2f28ef5b422914063be3b922e}

\item 
static void {\bfseries ini\-\_\-gsl\-\_\-matrix} (gsl\-\_\-matrix $\ast$\&m, int unsigned size1, unsigned int size2)\label{classOPALFitterGSL_ad0406cdd9d3d297ffe3da4986aa0f223}

\item 
static void {\bfseries debug\-\_\-print} (gsl\-\_\-matrix $\ast$m, const char $\ast$name)\label{classOPALFitterGSL_af2d5738706093e99d60c9f9739e55ecb}

\item 
static void {\bfseries debug\-\_\-print} (gsl\-\_\-vector $\ast$v, const char $\ast$name)\label{classOPALFitterGSL_af9d61fc3a0e9dbee00fb91e69708885c}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
int {\bfseries npar}\label{classOPALFitterGSL_a8fcfb128c1cf8dc16df45617bdd76992}

\item 
int {\bfseries nmea}\label{classOPALFitterGSL_adb9673829ec9a8b71ddffbf4b97ea4d9}

\item 
int {\bfseries nunm}\label{classOPALFitterGSL_a74f35c35d7349529456009147bdcc5f7}

\item 
int {\bfseries ncon}\label{classOPALFitterGSL_ae513ec6cdc9374d2da4a21e84aad6fde}

\item 
int {\bfseries ierr}\label{classOPALFitterGSL_a3170d61899d18e1084ce5500ec8f4ded}

\item 
int {\bfseries nit}\label{classOPALFitterGSL_a50ef617213798e3990d64165a615c640}

\item 
double {\bfseries fitprob}\label{classOPALFitterGSL_a7e2771daabda40c35d64feb38fd300ea}

\item 
double {\bfseries chi2}\label{classOPALFitterGSL_a434863855ab009ef942bfff9ab065011}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
Description of the fit algorithm and interface\-: 

The O\-P\-A\-L\-Fitter object holds a set (fitobjects) of \doxyref{Base\-Fit\-Object}{p.}{classBaseFitObject} objects, which represent the objects (particles, jets) whose fourvectors shall be fitted. It also holds a set (constraints) of \doxyref{Base\-Constraint}{p.}{classBaseConstraint} objects that represent the constraints (momentum or mass constraints).

O\-P\-A\-L\-Fitter\-::initialize goes over the list of fit objects and determines the number of parameters (measured and unmeasured), and assigns global numbers to them.

O\-P\-A\-L\-Fitter\-::fit first initializes the global parameter numbering using O\-P\-A\-L\-Fitter\-::initialize.

Then it initializes vectors etaxi ( $ \eta\xi$) and y ( $ \vec y$) with the current parameter values.

Next it initializes the matrix Feta that represents $d \vec F / d \vec \eta\xi$

Used methods in O\-P\-A\-L\-Fitter\-::initialize\-:
\begin{DoxyItemize}
\item \doxyref{Base\-Fit\-Object\-::get\-N\-Par}{p.}{classBaseFitObject_aea621f2e892d28f5e81dbb94d50bfddc}
\item Base\-Fit\-Object\-::get\-Measured
\item \doxyref{Base\-Fit\-Object\-::set\-Global\-Par\-Num}{p.}{classBaseFitObject_a333e5378b6922796ada555d99f91d419}
\end{DoxyItemize}

Used methods in O\-P\-A\-L\-Fitter\-::update\-Fit\-Objects\-:
\begin{DoxyItemize}
\item \doxyref{Base\-Fit\-Object\-::get\-Global\-Par\-Num}{p.}{classBaseFitObject_ac85f2532ef25edf41a7aaa40e0d77678}
\item \doxyref{Base\-Fit\-Object\-::set\-Param}{p.}{classBaseFitObject_a9be5ac872480a86a69ea0e9b81d1375c}
\end{DoxyItemize}

Used methods in O\-P\-A\-L\-Fitter\-::fit\-:
\begin{DoxyItemize}
\item \doxyref{Base\-Fit\-Object\-::get\-N\-Par}{p.}{classBaseFitObject_aea621f2e892d28f5e81dbb94d50bfddc}
\item \doxyref{Base\-Fit\-Object\-::get\-Global\-Par\-Num}{p.}{classBaseFitObject_ac85f2532ef25edf41a7aaa40e0d77678}
\item \doxyref{Base\-Fit\-Object\-::get\-Param}{p.}{classBaseFitObject_a0aabb1a02f1dcf3cb96cb37a40471e5f}
\item \doxyref{Base\-Fit\-Object\-::add\-To\-Glob\-Cov}{p.}{classBaseFitObject_a12f26034935179f8d416a3eb21a7fc79}
\item \doxyref{Base\-Fit\-Object\-::operator$<$$<$}{p.}{classBaseFitObject_af607d21ae2ebffc1396e5ed938b073c6}
\item \doxyref{Base\-Fit\-Object\-::set\-Error}{p.}{classBaseFitObject_ab80d7a1df00899687e28760da5de8558}
\item \doxyref{Base\-Constraint\-::get\-Derivatives}{p.}{classBaseConstraint_a01d60bff974a2926521838c640373d7f}
\item \doxyref{Base\-Constraint\-::get\-Value}{p.}{classBaseConstraint_a0adad38f6a9d934b5a41cbc96d5488ee}
\end{DoxyItemize}

Interaction between Constraints and Particles

The Fitter does not care how the constraints and \doxyref{Base\-Fit\-Object}{p.}{classBaseFitObject} objects interact. The constraints are expressed in terms of four-\/vector components of the Base\-Fit\-Objects. A constraint object keeps a set of \doxyref{Base\-Fit\-Object}{p.}{classBaseFitObject} objects, and, using the chain rule, calculates its derivatives w.\-r.\-t. the global parameters. 

\subsection{Member Function Documentation}
\index{O\-P\-A\-L\-Fitter\-G\-S\-L@{O\-P\-A\-L\-Fitter\-G\-S\-L}!fit@{fit}}
\index{fit@{fit}!OPALFitterGSL@{O\-P\-A\-L\-Fitter\-G\-S\-L}}
\subsubsection[{fit}]{\setlength{\rightskip}{0pt plus 5cm}double O\-P\-A\-L\-Fitter\-G\-S\-L\-::fit (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classOPALFitterGSL_a78b73dafb74dd51dad1e0ef5fdd2cb2f}
initialize Fetaxi ( = d F / d eta,xi) 

Implements {\bf Base\-Fitter} \doxyref{}{p.}{classBaseFitter}.



References Base\-Fitter\-::cov, Base\-Fitter\-::cov\-Dim, Base\-Fitter\-::cov\-Valid, Base\-Tracer\-::finish(), Base\-Tracer\-::initialize(), and Base\-Tracer\-::step().

\index{O\-P\-A\-L\-Fitter\-G\-S\-L@{O\-P\-A\-L\-Fitter\-G\-S\-L}!get\-Error@{get\-Error}}
\index{get\-Error@{get\-Error}!OPALFitterGSL@{O\-P\-A\-L\-Fitter\-G\-S\-L}}
\subsubsection[{get\-Error}]{\setlength{\rightskip}{0pt plus 5cm}int O\-P\-A\-L\-Fitter\-G\-S\-L\-::get\-Error (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classOPALFitterGSL_a38a7f707e31fe37305b2096661779427}


Return error code. 

Error code meanings\-:
\begin{DoxyItemize}
\item 0\-: No error
\item 1\-: out of iterations
\item 2\-: crazy chi$^\wedge$2
\item 3\-: minimum step size reached, chi\-K still increasing
\item 4\-: (step size decreased)
\item 5\-: (keep going)Get the error code of the last fit\-: 0=O\-K, 1=failed 
\end{DoxyItemize}

Implements {\bf Base\-Fitter} \doxyref{}{p.}{classBaseFitter}.



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
{\bf O\-P\-A\-L\-Fitter\-G\-S\-L.\-h}\item 
{\bf O\-P\-A\-L\-Fitter\-G\-S\-L.\-cc}\end{DoxyCompactItemize}
