\section{marlintpc\-:\-:Track\-Fitter\-Simple\-Chi\-Square\-Pads Class Reference}
\label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads}\index{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads@{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads}}


$\chi^2$ fitter which takes into account the pad geometry.  




{\ttfamily \#include $<$Track\-Fitter\-Simple\-Chi\-Square\-Pads.\-h$>$}

Inheritance diagram for marlintpc\-:\-:Track\-Fitter\-Simple\-Chi\-Square\-Pads\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classmarlintpc_1_1TrackFitterSimpleChiSquarePads}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Track\-Fitter\-Simple\-Chi\-Square\-Pads} (gear\-::\-T\-P\-C\-Parameters const $\ast$gear\-T\-P\-C\-Parameters, double trans\-Defocussing, double long\-Defocussing, double trans\-Diffusion, double long\-Diffusion)
\begin{DoxyCompactList}\small\item\em The constructor needs the pad geometry, which is taken grom G\-E\-A\-R. \end{DoxyCompactList}\item 
virtual std\-::string {\bf get\-Revision} () const \label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads_a07c151953c7b138e5fad3668feb095f5}

\begin{DoxyCompactList}\small\item\em returns the revision of this implementation and of the \doxyref{Track\-Fitter\-Base}{p.}{classmarlintpc_1_1TrackFitterBase} it is derrived from \end{DoxyCompactList}\item 
virtual unsigned char {\bf get\-Fitter\-Type} () const \label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads_a4fc5a344d87be30c5d5fa7a75912da24}

\begin{DoxyCompactList}\small\item\em Information what fitter implementation this is. \end{DoxyCompactList}\item 
virtual Double\-Vec {\bf calculate\-Residuals} (E\-V\-E\-N\-T\-::\-Track const $\ast$test\-Track, unsigned int test\-Hit\-Number, E\-V\-E\-N\-T\-::\-Track const $\ast$reference\-Track=N\-U\-L\-L) const 
\begin{DoxyCompactList}\small\item\em Return the distance of the hit {\ttfamily test\-Hit\-Number} of the test\-Track to the point of closest approach on the reference\-Track wrt. the hit. \end{DoxyCompactList}\item 
virtual Double\-Vec {\bf calculate\-Residuals} (E\-V\-E\-N\-T\-::\-Tracker\-Hit const $\ast$test\-Hit, E\-V\-E\-N\-T\-::\-Track const $\ast$track\-Without\-Test\-Hit) const 
\begin{DoxyCompactList}\small\item\em Return the distance of the given hit to the test track where this hit has been removed. \end{DoxyCompactList}\item 
virtual I\-M\-P\-L\-::\-Track\-Impl $\ast$ {\bf fit\-Track} (E\-V\-E\-N\-T\-::\-Track const $\ast$seed\-Track) const 
\begin{DoxyCompactList}\small\item\em Perform the actual fitting. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static {\bf Track\-Fitter\-Base} $\ast$ {\bf get\-Instance} (L\-C\-Parameters const $\ast$parameters)\label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads_ac92a9ad30bca7ec3b2b7728f3d41f18c}

\begin{DoxyCompactList}\small\item\em Well defined interface to create a new instance of the track fitter. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void {\bf initialise\-G\-E\-A\-R\-Geometry} (gear\-::\-T\-P\-C\-Parameters const $\ast$gear\-T\-P\-C\-Parameters)\label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads_a43514f37d2039a7e3f2654aadbb9ea80}

\begin{DoxyCompactList}\small\item\em Called from both constructors to set the G\-E\-A\-R information (originally there were two, right now this is obsolete) \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
gear\-::\-T\-P\-C\-Parameters const $\ast$ {\bf \-\_\-\-T\-P\-C\-Parameters}\label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads_a2597f1aafe11cee75ec613f9b64a5448}

\begin{DoxyCompactList}\small\item\em A pointer to the G\-E\-A\-R T\-P\-C parameters. \end{DoxyCompactList}\item 
gear\-::\-Pad\-Row\-Layout2\-D const $\ast$ {\bf \-\_\-pad\-Layout}\label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads_a971c928a34a86329464f18aa10c03b3d}

\begin{DoxyCompactList}\small\item\em A pointer to the G\-E\-A\-R pad layout. \end{DoxyCompactList}\item 
int {\bf \-\_\-pad\-Layout\-Type}\label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads_a3f804f7366901fa2325616e94789f2ce}

\begin{DoxyCompactList}\small\item\em The type of pad layout (Pad\-Row\-Layout2\-D\-::\-C\-A\-R\-T\-E\-S\-I\-A\-N or Pad\-Row\-Layout2\-D\-::\-P\-O\-L\-A\-R) \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
$\chi^2$ fitter which takes into account the pad geometry. 

It reimplements the {\ttfamily get\-Residuals} functions to calculate the residuals along the pad rows and not perpendicular to the track.

Currently the actual fitter is not implemented yet. But one can instanciate the fitter to use the {\ttfamily get\-Residuals} functions, which is reimplemented to caculate the residuals along the pad rows.

\begin{DoxyRefDesc}{Todo}
\item[{\bf Todo}]\-: Implement the fitter function. \end{DoxyRefDesc}


\subsection{Constructor \& Destructor Documentation}
\index{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads@{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads}!Track\-Fitter\-Simple\-Chi\-Square\-Pads@{Track\-Fitter\-Simple\-Chi\-Square\-Pads}}
\index{Track\-Fitter\-Simple\-Chi\-Square\-Pads@{Track\-Fitter\-Simple\-Chi\-Square\-Pads}!marlintpc::TrackFitterSimpleChiSquarePads@{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads}}
\subsubsection[{Track\-Fitter\-Simple\-Chi\-Square\-Pads}]{\setlength{\rightskip}{0pt plus 5cm}marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads (
\begin{DoxyParamCaption}
\item[{gear\-::\-T\-P\-C\-Parameters const $\ast$}]{gear\-T\-P\-C\-Parameters, }
\item[{double}]{trans\-Defocussing, }
\item[{double}]{long\-Defocussing, }
\item[{double}]{trans\-Diffusion, }
\item[{double}]{long\-Diffusion}
\end{DoxyParamCaption}
)}\label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads_a98a5b9cd124cd66b7d4aea597a0433fc}


The constructor needs the pad geometry, which is taken grom G\-E\-A\-R. 

In addition it requires the defocussing and diffusion parameters for the chi square function. 

References marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-::\-\_\-z\-Anode, and initialise\-G\-E\-A\-R\-Geometry().



Referenced by get\-Instance().



\subsection{Member Function Documentation}
\index{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads@{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads}!calculate\-Residuals@{calculate\-Residuals}}
\index{calculate\-Residuals@{calculate\-Residuals}!marlintpc::TrackFitterSimpleChiSquarePads@{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads}}
\subsubsection[{calculate\-Residuals}]{\setlength{\rightskip}{0pt plus 5cm}E\-V\-E\-N\-T\-::\-Double\-Vec marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads\-::calculate\-Residuals (
\begin{DoxyParamCaption}
\item[{E\-V\-E\-N\-T\-::\-Track const $\ast$}]{test\-Track, }
\item[{unsigned int}]{test\-Hit\-Number, }
\item[{E\-V\-E\-N\-T\-::\-Track const $\ast$}]{reference\-Track = {\ttfamily NULL}}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads_abf256296cc8e3390cc1682f222ac2f5c}


Return the distance of the hit {\ttfamily test\-Hit\-Number} of the test\-Track to the point of closest approach on the reference\-Track wrt. the hit. 

If no reference\-Track is given the distance to the test\-Track is returned.

Throws E\-V\-E\-N\-T\-::\-Data\-Not\-Available\-Exception in case there is no hit number \char`\"{}test\-Hit\-Number\char`\"{} on test\-Hit.

Calls calculate\-Residual(\-E\-V\-E\-N\-T\-::\-Tracker\-Hit $\ast$test\-Hit, E\-V\-E\-N\-T\-::\-Track $\ast$track\-Without\-Test\-Hit) in this implementation. 

Reimplemented from {\bf marlintpc\-::\-Track\-Fitter\-Base} \doxyref{}{p.}{classmarlintpc_1_1TrackFitterBase_a9718344fa5cb48f5ef2814a4745ba0fe}.

\index{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads@{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads}!calculate\-Residuals@{calculate\-Residuals}}
\index{calculate\-Residuals@{calculate\-Residuals}!marlintpc::TrackFitterSimpleChiSquarePads@{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads}}
\subsubsection[{calculate\-Residuals}]{\setlength{\rightskip}{0pt plus 5cm}E\-V\-E\-N\-T\-::\-Double\-Vec marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads\-::calculate\-Residuals (
\begin{DoxyParamCaption}
\item[{E\-V\-E\-N\-T\-::\-Tracker\-Hit const $\ast$}]{test\-Hit, }
\item[{E\-V\-E\-N\-T\-::\-Track const $\ast$}]{track\-Without\-Test\-Hit}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads_a4ee3f02c7193c58e873430d1085c440f}


Return the distance of the given hit to the test track where this hit has been removed. 

The residual is calculated as the distance along the pad row. 

Reimplemented from {\bf marlintpc\-::\-Track\-Fitter\-Base} \doxyref{}{p.}{classmarlintpc_1_1TrackFitterBase_ad537cbc80f8aff3a4866e59ccca249dd}.



References \-\_\-pad\-Layout, \-\_\-pad\-Layout\-Type, marlintpc\-::\-Intersection\-Calculator\-::circle\-\_\-circle(), marlintpc\-::\-Intersection\-Calculator\-::circle\-\_\-straight\-Line\-\_\-phi(), marlintpc\-::\-Track\-Fitter\-Base\-::distance\-On\-Circle(), and marlintpc\-::\-Intersection\-Calculator\-::horizonal\-Line\-\_\-circle().

\index{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads@{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads}!fit\-Track@{fit\-Track}}
\index{fit\-Track@{fit\-Track}!marlintpc::TrackFitterSimpleChiSquarePads@{marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads}}
\subsubsection[{fit\-Track}]{\setlength{\rightskip}{0pt plus 5cm}I\-M\-P\-L\-::\-Track\-Impl $\ast$ marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-Pads\-::fit\-Track (
\begin{DoxyParamCaption}
\item[{E\-V\-E\-N\-T\-::\-Track const $\ast$}]{seed\-Track}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classmarlintpc_1_1TrackFitterSimpleChiSquarePads_a4a7a1b9c0818fe96974d43157bae913b}


Perform the actual fitting. 

Uses \doxyref{Track\-Fitter\-Simple\-Chi\-Square\-::fit\-Track}{p.}{classmarlintpc_1_1TrackFitterSimpleChiSquare_a2233e24d5667f734015ea5cb092f1624}, using the residuals from this class, and then setting the correct fitter type. 

Reimplemented from {\bf marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square} \doxyref{}{p.}{classmarlintpc_1_1TrackFitterSimpleChiSquare_a2233e24d5667f734015ea5cb092f1624}.



References marlintpc\-::\-Track\-Fitter\-Simple\-Chi\-Square\-::fit\-Track(), get\-Fitter\-Type(), and marlintpc\-::\-Track\-Fitter\-Base\-::set\-Track\-Fitter\-Type().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Track\-Fitter\-Simple\-Chi\-Square\-Pads.\-h\item 
Track\-Fitter\-Simple\-Chi\-Square\-Pads.\-cc\end{DoxyCompactItemize}
