\section{marlintpc\-:\-:Time\-Pix\-Local\-Road\-Search\-Processor Class Reference}
\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor}\index{marlintpc\-::\-Time\-Pix\-Local\-Road\-Search\-Processor@{marlintpc\-::\-Time\-Pix\-Local\-Road\-Search\-Processor}}


Track finder for Time\-Pix data based on local road search.  




{\ttfamily \#include $<$Time\-Pix\-Local\-Road\-Search\-Processor.\-h$>$}

Inheritance diagram for marlintpc\-:\-:Time\-Pix\-Local\-Road\-Search\-Processor\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classmarlintpc_1_1TimePixLocalRoadSearchProcessor}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual Processor $\ast$ {\bfseries new\-Processor} ()\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_a084c269fa280c5dc04655d9c1c4ddffc}

\item 
{\bf Time\-Pix\-Local\-Road\-Search\-Processor} ()\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_abf19d4a743c35ff3409c473ab99865fe}

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

\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_1TimePixLocalRoadSearchProcessor_a1a1d171e75c195d57f070a35949594d3}

\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_1TimePixLocalRoadSearchProcessor_a4ac72f4eb7bfad2b533b83e128977ecd}

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

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

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

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

\begin{DoxyCompactList}\small\item\em scale factor for magnetic field (default\-: 1.\-0) \end{DoxyCompactList}\item 
int {\bf \-\_\-min\-Track\-Level}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_aeae3937cafa7f1d68620c2b005d17015}

\begin{DoxyCompactList}\small\item\em min. track level for output (default 1) \end{DoxyCompactList}\item 
int {\bf \-\_\-mp\-Size}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_aad2f6f18ad5a4974b7ade3963475a52c}

\begin{DoxyCompactList}\small\item\em macro pixel (bin) size (default\-: 32) \end{DoxyCompactList}\item 
double {\bf \-\_\-min\-Zmeas}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_a23c3e31fa08f29a59cfd7610a65349f0}

\begin{DoxyCompactList}\small\item\em min. measured Z value (default 0.) \end{DoxyCompactList}\item 
double {\bf \-\_\-max\-Zmeas}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_af900f353076266537b2c7bd364858062}

\begin{DoxyCompactList}\small\item\em max. measured Z value (default 600.) \end{DoxyCompactList}\item 
double {\bf \-\_\-sigma\-Z}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_ae3486bea9e373bed988cc2335b6dac3f}

\begin{DoxyCompactList}\small\item\em resolution in Z (default\-: 3.\-0) \end{DoxyCompactList}\item 
double {\bf \-\_\-x\-Offset}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_aabc1ef8c0df9b1a0eaba3182cbc68557}

\begin{DoxyCompactList}\small\item\em offset in x of (local) coordinate system (default 0.) \end{DoxyCompactList}\item 
double {\bf \-\_\-y\-Offset}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_a168ae0f00476a0dbbe233d45e4c72c51}

\begin{DoxyCompactList}\small\item\em offset in y of (local) coordinate system (default 1500.) \end{DoxyCompactList}\item 
int {\bf \-\_\-max\-Mult}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_a1ea770a9ec69b4c5ec0b6dcc166442bc}

\begin{DoxyCompactList}\small\item\em max. multiplicity for road seeding bins (default\-: 3) \end{DoxyCompactList}\item 
int {\bf \-\_\-min\-Pixels}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_ad59ebadc35a3c6d718189d52cd2c4d39}

\begin{DoxyCompactList}\small\item\em min. number of pixels for road seeding maxro pixel (default\-: 3) \end{DoxyCompactList}\item 
int {\bf \-\_\-min\-Dist}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_a347adea83d0ef24ebff4c7ff2199f3ca}

\begin{DoxyCompactList}\small\item\em min. distance for road seeding bins (default\-: 2) \end{DoxyCompactList}\item 
double {\bf \-\_\-max\-Pull2\-X\-Y}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_a6678f4204e2feef09fc5da8d2da43e6e}

\begin{DoxyCompactList}\small\item\em max. pull squared to road in X\-Y (default\-: 15.) \end{DoxyCompactList}\item 
double {\bf \-\_\-max\-Pull2\-Z}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_adbdafc6dbea3f7f8d1001ff8b8e2d0cc}

\begin{DoxyCompactList}\small\item\em max. pull squared to road in Z (default\-: 15.) \end{DoxyCompactList}\item 
double {\bf \-\_\-max\-Chi2}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_aac8753e79a38451347d0ba66675d6f42}

\begin{DoxyCompactList}\small\item\em max. Chi2/\-Ndf for road (default 5.) \end{DoxyCompactList}\item 
double {\bf \-\_\-max\-Svar}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_af9f432b91097b2d0a484d8a10adfe093}

\begin{DoxyCompactList}\small\item\em max. relative arc-\/length variance for road (default\-: 0.\-15) \end{DoxyCompactList}\item 
double {\bf \-\_\-max\-Gap}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_a561554505d2fa5a317b18b1bc982016d}

\begin{DoxyCompactList}\small\item\em max. (arc-\/length) gap for road (default\-: 4.\-0) \end{DoxyCompactList}\item 
int {\bf \-\_\-octo\-Offset}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_a9cd400c8523185617ec9b472839b7af6}

\begin{DoxyCompactList}\small\item\em octoboard number offset (in module=(octo+offset)/scale) (default 8) \end{DoxyCompactList}\item 
int {\bf \-\_\-octo\-Scale}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_ab9bc629d2fdf9eef72bb15ac23f3cc8b}

\begin{DoxyCompactList}\small\item\em octoboard number scale (in module=(octo+offset)/scale) (default 12) \end{DoxyCompactList}\item 
double {\bf \-\_\-chi2\-Cut\-Chip}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_a7d33a0ba5b8afcd7d242b6cdb2ace8a4}

\begin{DoxyCompactList}\small\item\em max. Chi2/\-Ndf for chip segment matching (default\-: 30.) \end{DoxyCompactList}\item 
double {\bf \-\_\-chi2\-Cut\-Octo}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_afdbd533eff544c225dbf24226fc16cb7}

\begin{DoxyCompactList}\small\item\em max. Chi2/\-Ndf for octoboard segment matching (default\-: 30.) \end{DoxyCompactList}\item 
double {\bf \-\_\-chi2\-Cut\-Mod}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_aaf16e856935ce932baf146b70009345a}

\begin{DoxyCompactList}\small\item\em max. Chi2/\-Ndf for module segment matching (default\-: 50.) \end{DoxyCompactList}\item 
double {\bf \-\_\-dist\-Cut}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_a38a537198df009ab9e4de387d15af63e}

\begin{DoxyCompactList}\small\item\em max. relative (to track length sum) distance (of centers) for segment matching (default\-: 2.\-0) \end{DoxyCompactList}\item 
bool {\bf \-\_\-ref\-At\-P\-C\-A}\label{classmarlintpc_1_1TimePixLocalRoadSearchProcessor_ab951be8cb03deb5a0f89ca6a0ea649c8}

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


\subsection{Detailed Description}
Track finder for Time\-Pix data based on local road search. 

Local road search with 'macro' pixels to construct tracks from space points.

For each timepix chip the pixel space is reorganized into larger bins (e.\-g. of size 32$\ast$32 pixels) (to reduce the combinatorics). Each bin can contain several 'macro' pixels seperated in drift time (Z). The macro pixel position (and shape) is definded by the center of gravity (and variance) of the positions of the contributing pixels. Qualified pairs of macro pixels (cut on contents and distance) are used to define (linear) search roads. Road consistent with a track segment (in longitudinal and transverse direction) define macro pixel segments. With each found segment the road search is stopped, the corresponding macro pixels removed (marked as used) and the road search is restarted with the remaining macro pixels. In a hierarchical way (to reduce combinatorics and extrapolation) the macro pixel segment are combined into larger segments\-: chips to octoboards, octoboards to (mechnical) modules and finally all modules. For this equivalence classes of matching segments are used. The matching is defined by the compatibility of the track parameters of two segments at their (relative) midpoint. The (local) coordinates may be shifted by an (X\-Y) offset into a new system. Track directions are defined relative to the origin of that system.


\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`\"{}\-F\-H\-T\-Tracks\char`\"{}) \\
\hline
{\em \char`\"{}\-Macro\-Pixel\-Size\char`\"{}\-:int} & {\ttfamily Optional} parameter, macro pixel (bin) size (default 32) \\
\hline
{\em \char`\"{}\-Min\-Track\-Level\char`\"{}\-:int} & {\ttfamily Optional} parameter, min. track level for output (default 1) (0\-: single chip segment finder, 1,2,3\-: chip,octoboard,module combiner) \\
\hline
{\em \char`\"{}\-Min\-Zmeas\char`\"{}\-:double} & {\ttfamily Optional} parameter, min. measured Z value (default 0.\-0) \\
\hline
{\em \char`\"{}\-Max\-Zmeas\char`\"{}\-:double} & {\ttfamily Optional} parameter, max. measured Z value (default 600.) \\
\hline
{\em \char`\"{}\-Sigma\-Z\char`\"{}\-:double} & {\ttfamily Optional} parameter, resolution in Z (for clustering) (default 3.\-0) \\
\hline
{\em \char`\"{}\-Xoffset\char`\"{}\-:double} & {\ttfamily Optional} parameter, offset in x of (local) coordinate system (default 0.) \\
\hline
{\em \char`\"{}\-Yoffset\char`\"{}\-:double} & {\ttfamily Optional} parameter, offset in y of (local) coordinate system (default 1500.) \\
\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`\"{}\-Max\-Mult\char`\"{}\-:int} & {\ttfamily Optional} parameter, max. multiplicity for road seeding bins (default 3) \\
\hline
{\em \char`\"{}\-Min\-Pixels\char`\"{}\-:int} & {\ttfamily Optional} parameter, min. number of pixels for road seeding maxro pixel (default 3) \\
\hline
{\em \char`\"{}\-Min\-Dist\char`\"{}\-:int} & {\ttfamily Optional} parameter, min. distance for road seeding bins (default 2) \\
\hline
{\em \char`\"{}\-Max\-Pull2\-X\-Y\char`\"{}\-:double} & {\ttfamily Optional} parameter, max. pull squared to road in X\-Y (default 15.) \\
\hline
{\em \char`\"{}\-Max\-Pull2\-Z\char`\"{}\-:double} & {\ttfamily Optional} parameter, max. pull squared to road in Z (default 15.) \\
\hline
{\em \char`\"{}\-Max\-Chi2\char`\"{}\-:double} & {\ttfamily Optional} parameter, max. Chi2/\-Ndf for road (default 5.\-0) \\
\hline
{\em \char`\"{}\-Max\-Svar\char`\"{}\-:double} & {\ttfamily Optional} parameter, max. relative arc-\/length variance for road (default 0.\-15) \\
\hline
{\em \char`\"{}\-Max\-Gap\char`\"{}\-:double} & {\ttfamily Optional} parameter, max. (arc-\/length) gap for road (default 4.\-0) \\
\hline
{\em \char`\"{}\-Chi2\-Cut\-Chip\char`\"{}\-:double} & {\ttfamily Optional} parameter, max. Chi2/\-Ndf for chip segment matching (default 30.) \\
\hline
{\em \char`\"{}\-Chi2\-Cut\-Octo\char`\"{}\-:double} & {\ttfamily Optional} parameter, max. Chi2/\-Ndf for octoboard segment matching (default 30.) \\
\hline
{\em \char`\"{}\-Chi2\-Cut\-Mod\char`\"{}\-:double} & {\ttfamily Optional} parameter, max. Chi2/\-Ndf for module segment matching (default 50.) \\
\hline
{\em \char`\"{}\-Dist\-Cut\char`\"{}\-:double} & {\ttfamily Optional} parameter, max. relative (to track length sum) distance (of centers) for segment matching (default 2.\-0) \\
\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 (160604)
\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 variable octoboard to (mechanical) module mapping (from G\-E\-A\-R file?)
\end{DoxyItemize}\end{DoxyRefDesc}


A detailed description is available as {\tt lcnote} L\-C-\/\-T\-O\-O\-L-\/2016-\/xxx. 

\subsection{Member Function Documentation}
\index{marlintpc\-::\-Time\-Pix\-Local\-Road\-Search\-Processor@{marlintpc\-::\-Time\-Pix\-Local\-Road\-Search\-Processor}!process\-Event@{process\-Event}}
\index{process\-Event@{process\-Event}!marlintpc::TimePixLocalRoadSearchProcessor@{marlintpc\-::\-Time\-Pix\-Local\-Road\-Search\-Processor}}
\subsubsection[{process\-Event}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-Time\-Pix\-Local\-Road\-Search\-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_1TimePixLocalRoadSearchProcessor_a2bfd70a1f3143ea93aec42ce4b78cd64}


Process event. 


\begin{DoxyItemize}
\item Prepare input\-: map of chips with vectors of pixels
\item Create macro pixels for each chip
\item Find segments on each chip
\item Combine segments (chip -\/$>$ octoboard -\/$>$ module -\/$>$ track)
\item Fill output collection. 
\end{DoxyItemize}

References \-\_\-bfield\-Scale\-Factor, \-\_\-chi2\-Cut\-Chip, \-\_\-chi2\-Cut\-Mod, \-\_\-chi2\-Cut\-Octo, \-\_\-dist\-Cut, \-\_\-input\-Col\-Name, \-\_\-max\-Chi2, \-\_\-max\-Gap, \-\_\-max\-Mult, \-\_\-max\-Pull2\-X\-Y, \-\_\-max\-Pull2\-Z, \-\_\-max\-Svar, \-\_\-max\-Zmeas, \-\_\-min\-Dist, \-\_\-min\-Pixels, \-\_\-min\-Track\-Level, \-\_\-min\-Zmeas, \-\_\-mp\-Size, \-\_\-octo\-Offset, \-\_\-octo\-Scale, \-\_\-output\-Col\-Name, \-\_\-ref\-At\-P\-C\-A, \-\_\-sigma\-Z, \-\_\-x\-Offset, \-\_\-y\-Offset, marlintpc\-::tp\-\_\-\-Pixel\-Chip\-::find\-Segments(), marlintpc\-::tp\-\_\-\-Pixel\-Chip\-::get\-Num\-Bins(), and marlintpc\-::tp\-\_\-\-Pixel\-Segment\-Combiner\-::run().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Time\-Pix\-Local\-Road\-Search\-Processor.\-h\item 
Time\-Pix\-Local\-Road\-Search\-Processor.\-cc\end{DoxyCompactItemize}
