\section{marlintpc\-:\-:Row\-Triplet\-Based\-Track\-Finder\-Processor Class Reference}
\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor}\index{marlintpc\-::\-Row\-Triplet\-Based\-Track\-Finder\-Processor@{marlintpc\-::\-Row\-Triplet\-Based\-Track\-Finder\-Processor}}


Track finder based on triplets of rows.  




{\ttfamily \#include $<$Row\-Triplet\-Based\-Track\-Finder\-Processor.\-h$>$}

Inheritance diagram for marlintpc\-:\-:Row\-Triplet\-Based\-Track\-Finder\-Processor\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual Processor $\ast$ {\bfseries new\-Processor} ()\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a619a62639bdd95d65be658ee5dd40d7c}

\item 
{\bf Row\-Triplet\-Based\-Track\-Finder\-Processor} ()\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a3d374eb3be75cf5a0d1d8fb02b6d19c9}

\begin{DoxyCompactList}\small\item\em Construct processor. \end{DoxyCompactList}\item 
virtual void {\bf init} ()\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a56b1634a86b89227a8acf40e3f0e9173}

\begin{DoxyCompactList}\small\item\em Initialize processor. \end{DoxyCompactList}\item 
virtual void {\bfseries process\-Run\-Header} (E\-V\-E\-N\-T\-::\-L\-C\-Run\-Header $\ast$run)\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_ad3dd01d5dff917769ec96c9ff7b0d6f3}

\item 
virtual void {\bf process\-Event} (E\-V\-E\-N\-T\-::\-L\-C\-Event $\ast$evt)
\begin{DoxyCompactList}\small\item\em Process event. \end{DoxyCompactList}\item 
virtual void {\bfseries check} (E\-V\-E\-N\-T\-::\-L\-C\-Event $\ast$evt)\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a703b8d0ab98032538565dd7649755993}

\item 
virtual void {\bfseries end} ()\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_ad1e61d9f0b29c6893b0923a83a148d79}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::string {\bf \-\_\-input\-Col\-Name}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a778e3ec3c2170878f557f054ac700a1d}

\begin{DoxyCompactList}\small\item\em Name of the input collection. \end{DoxyCompactList}\item 
std\-::string {\bf \-\_\-output\-Col\-Name}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a6098c59c8f9dfbc62b09824ba00173f8}

\begin{DoxyCompactList}\small\item\em Name of the output collection. \end{DoxyCompactList}\item 
double {\bf \-\_\-bfield\-Scale\-Factor}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a04811ff775230ea72638fbb35ebfccc5}

\begin{DoxyCompactList}\small\item\em scale factor for magnetic field (default\-: 1.\-0) \end{DoxyCompactList}\item 
double {\bf \-\_\-dist\-Cut}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a766610da7310dc9561098fda9280bd65}

\begin{DoxyCompactList}\small\item\em Coarse cut on X\-Y and Z residuals for triplet preselection. \end{DoxyCompactList}\item 
double {\bf \-\_\-trp\-Cut}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a47a31256dcaeca50cea06f7a9c3d9d3d}

\begin{DoxyCompactList}\small\item\em Chi2 cut for triplet definition on X\-Y and Z residuals. \end{DoxyCompactList}\item 
double {\bf \-\_\-pos\-Cut}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_aa3bf929b8cc82e980794abd0870989e2}

\begin{DoxyCompactList}\small\item\em Chi2 cut for triplet position matching in X\-Y and Z. \end{DoxyCompactList}\item 
double {\bf \-\_\-dir\-Cut}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a7fc1e83014b5807d50fd222a7997189d}

\begin{DoxyCompactList}\small\item\em Chi2 cut for triplet direction matching in X\-Y and Z. \end{DoxyCompactList}\item 
double {\bf \-\_\-seg\-Cut}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a5683254decd2bbd6c49f2a9cc15140eb}

\begin{DoxyCompactList}\small\item\em Chi2/\-Ndf cut for segment matching (Ndf=4 for B off, 5 for B on) \end{DoxyCompactList}\item 
double {\bf \-\_\-unused\-Cut}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a0627d965a611010cda9b35e92475ca86}

\begin{DoxyCompactList}\small\item\em Chi2 cut for matching unused hits in X\-Y and Z. \end{DoxyCompactList}\item 
int {\bf \-\_\-max\-Gap}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a69da79ae0ad7b1ba958cccf3855912f6}

\begin{DoxyCompactList}\small\item\em Cut for (row) distance to segment for matching unused hits in X\-Y and Z. \end{DoxyCompactList}\item 
bool {\bf \-\_\-encoded\-Module\-I\-D}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_a4c893b78887995fe5b6d0c09d4130229}

\begin{DoxyCompactList}\small\item\em Module I\-D is encoded in Cell\-I\-D0. \end{DoxyCompactList}\item 
bool {\bf \-\_\-ref\-At\-P\-C\-A}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_aac01daf5a9ffb3000a9cb422c7b53818}

\begin{DoxyCompactList}\small\item\em Use Pca as reference point (else 1. hit) \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Track finder based on triplets of rows. 

Inspired by H1 pattern recognition by V. Blobel (Univ. Hamburg).

Input are the (position, measurement direction and errors) of the T\-P\-C hits and module parameters (offset and extend) from G\-E\-A\-R.

In each module (with hits)\-:
\begin{DoxyItemize}
\item Triplets of hits in adjacent even or odd rows are constructed
\item Triplets matching in position and direction are connected to segments
\item Segments with compatible track parameters are merged
\item Unused hits are added to matching segments
\end{DoxyItemize}

Segments from each module are combined with compatible segments from the corresponding neighbouring modules to build track candidates. As reference point for the track canidates the first hit is used (optional\-: P\-C\-A).

The hits on the track candidates are ordered by row number, no multiple hits in a row are allowed. All matching criteria use chi2 cuts based on the hit measurement errors. The calculation of the measurement (pad) direction in X\-Y uses \char`\"{}module.\-get\-Local\-Pad\-Layout().\-get\-Coordinate\-Type()\char`\"{} to select polar or cartesian pad row geometry.


\begin{DoxyParams}{Parameters}
{\em \char`\"{}\-Input\-Hits\char`\"{}\-:string} & The name of the input collection of T\-P\-C hits (default\-: \char`\"{}\-T\-P\-C\-Hits\char`\"{}) \\
\hline
{\em \char`\"{}\-Output\-Tracks\char`\"{}\-:string} & The name of the output collection with the found tracks (default\-: \char`\"{}\-Triplet\-Tracks\char`\"{}) \\
\hline
{\em \char`\"{}\-B\-Field\-Scale\-Factor\char`\"{}\-:double} & {\ttfamily Optional} parameter, scales magnetic field (map), use 1.\-0 (default) for field O\-N or 0.\-0 for field O\-F\-F \\
\hline
{\em \char`\"{}\-Triplet\-Pre\-Selection\-Dist\-Cut\char`\"{}\-:double} & {\ttfamily Optional} parameter, coarse cut on X\-Y and Z residuals for triplet preselection (default 10.) \\
\hline
{\em \char`\"{}\-Triplet\-Definition\-Chi2\-Cut\char`\"{}\-:double} & {\ttfamily Optional} parameter, Chi2 cut for triplet definition on X\-Y and Z residuals (default 20.) \\
\hline
{\em \char`\"{}\-Triplet\-Position\-Matching\-Chi2\-Cut\char`\"{}\-:double} & {\ttfamily Optional} parameter, Chi2 cut for triplet position matching in X\-Y and Z (default 20.) \\
\hline
{\em \char`\"{}\-Triplet\-Direction\-Matching\-Chi2\-Cut\char`\"{}\-:double} & {\ttfamily Optional} parameter, Chi2 cut for triplet direction matching in X\-Y and Z (default 20.) \\
\hline
{\em \char`\"{}\-Segment\-Matching\-Chi2\-Cut\char`\"{}\-:double} & {\ttfamily Optional} parameter, Chi2/\-Ndf cut for segment matching (Ndf=4 for B off, 5 for B on) (default 30.) \\
\hline
{\em \char`\"{}\-Unused\-Hit\-Matching\-Chi2\-Cut\char`\"{}\-:double} & {\ttfamily Optional} parameter, Chi2 cut for matching unused hits in X\-Y and Z (default 20.) \\
\hline
{\em \char`\"{}\-Unused\-Hit\-Max\-Gap\-Cut\-:int} & {\ttfamily Optional} parameter, maximal (row) gap for matching unused hits in X\-Y and Z (default 4) \\
\hline
{\em \char`\"{}\-Encoded\-Module\-I\-D\char`\"{}\-:bool} & {\ttfamily Optional} parameter, flag for encoding of module I\-D in Cell\-I\-D0 (default true) \\
\hline
{\em \char`\"{}\-Reference\-Point\-At\-Pca\char`\"{}\-:bool} & {\ttfamily Optional} parameter, use P\-C\-A as reference point, else 1. hit (default false)\\
\hline
\end{DoxyParams}
\begin{DoxyAuthor}{Author}
C. Kleinwort (130729)
\end{DoxyAuthor}
\begin{DoxyParagraph}{Credits\-:}
The processor skeleton was generated by the script {\ttfamily create\-Processor.\-py} 
\end{DoxyParagraph}
\begin{DoxyRefDesc}{Todo}
\item[{\bf Todo}]
\begin{DoxyItemize}
\item definition of module neighbourhood from P\-O\-L\-A\-R module extend ?
\item better resolve equivalent (indirectly matching) overlapping segments ?
\end{DoxyItemize}\end{DoxyRefDesc}


A detailed description is available as {\tt lcnote} L\-C-\/\-T\-O\-O\-L-\/2014-\/004. Changes with respect to this note\-:
\begin{DoxyItemize}
\item Triplet measurement direction is average of outer hits instead of center hit (, already used for doublets).
\item Segment fit is iterated as weights depend on track direction (due to radial hit error). 
\end{DoxyItemize}

\subsection{Member Function Documentation}
\index{marlintpc\-::\-Row\-Triplet\-Based\-Track\-Finder\-Processor@{marlintpc\-::\-Row\-Triplet\-Based\-Track\-Finder\-Processor}!process\-Event@{process\-Event}}
\index{process\-Event@{process\-Event}!marlintpc::RowTripletBasedTrackFinderProcessor@{marlintpc\-::\-Row\-Triplet\-Based\-Track\-Finder\-Processor}}
\subsubsection[{process\-Event}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-Row\-Triplet\-Based\-Track\-Finder\-Processor\-::process\-Event (
\begin{DoxyParamCaption}
\item[{E\-V\-E\-N\-T\-::\-L\-C\-Event $\ast$}]{evt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classmarlintpc_1_1RowTripletBasedTrackFinderProcessor_ae0b8501e7d4fa5d006bc61b65ac6425d}


Process event. 


\begin{DoxyItemize}
\item Prepare input\-: map of modules with maps of rows with vectors of hits
\item For each module independently build track segments from triplets.
\end{DoxyItemize}
\begin{DoxyEnumerate}
\item Look for triplets.
\item Look for segments = triplet chains.
\item Link segments (in module).
\item Link unused hits to segments.
\end{DoxyEnumerate}
\begin{DoxyItemize}
\item Link segments between modules.
\item Fill output collection. 
\end{DoxyItemize}

References \-\_\-bfield\-Scale\-Factor, \-\_\-dir\-Cut, \-\_\-dist\-Cut, \-\_\-encoded\-Module\-I\-D, \-\_\-input\-Col\-Name, \-\_\-max\-Gap, \-\_\-output\-Col\-Name, \-\_\-pos\-Cut, \-\_\-ref\-At\-P\-C\-A, \-\_\-seg\-Cut, \-\_\-trp\-Cut, \-\_\-unused\-Cut, marlintpc\-::simple\-Equi\-Classes\-::add\-Index(), marlintpc\-::simple\-Equi\-Classes\-::add\-Match(), marlintpc\-::simple\-Equi\-Classes\-::get\-Classes(), marlintpc\-::rb\-\_\-\-Segment\-::get\-Ndf(), and marlintpc\-::rb\-\_\-\-Doublet\-::match().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Row\-Triplet\-Based\-Track\-Finder\-Processor.\-h\item 
Row\-Triplet\-Based\-Track\-Finder\-Processor.\-cc\end{DoxyCompactItemize}
