\section{Ki\-Track\-:\-:Segment\-Builder Class Reference}
\label{classKiTrack_1_1SegmentBuilder}\index{Ki\-Track\-::\-Segment\-Builder@{Ki\-Track\-::\-Segment\-Builder}}


This classe builds the Cellular \doxyref{Automaton}{p.}{classKiTrack_1_1Automaton} from the hits.  




{\ttfamily \#include $<$Segment\-Builder.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Segment\-Builder} (std\-::map$<$ int, std\-::vector$<$ {\bf I\-Hit} $\ast$ $>$ $>$ map\-\_\-sector\-\_\-hits)
\item 
void {\bf add\-Criterion} ({\bf I\-Criterion} $\ast$criterion)\label{classKiTrack_1_1SegmentBuilder_a601c3e030fc8dd6487b31f789105f84c}

\begin{DoxyCompactList}\small\item\em Adds a criterion. \end{DoxyCompactList}\item 
void {\bf add\-Criteria} (std\-::vector$<$ {\bf I\-Criterion} $\ast$ $>$ criteria)\label{classKiTrack_1_1SegmentBuilder_a2c7849131287056acb502ccaa3dd0631}

\begin{DoxyCompactList}\small\item\em Adds criteria. \end{DoxyCompactList}\item 
void {\bf add\-Sector\-Connector} ({\bf I\-Sector\-Connector} $\ast$connector)\label{classKiTrack_1_1SegmentBuilder_afeedf1664686fb7e740c61cdf4d38fe4}

\begin{DoxyCompactList}\small\item\em Adds a hit\-Connector. \end{DoxyCompactList}\item 
{\bf Automaton} {\bf get1\-Seg\-Automaton} ()
\end{DoxyCompactItemize}


\subsection{Detailed Description}
This classe builds the Cellular \doxyref{Automaton}{p.}{classKiTrack_1_1Automaton} from the hits. 

It can be used to take all the aut\-Hits stored in a map$<$ int , vector $<$ I\-Hits $>$ $>$ and makes 1-\/hit-\/segments out of them ( see the class \doxyref{Segment}{p.}{classKiTrack_1_1Segment} for more info on them ).

The created 1-\/segments then are connected.

For the rules of connecting criteria and hit\-Connectors can be added to the object\-:


\begin{DoxyItemize}
\item a hit\-Connector takes the sector of the segment ( for example a cell\-I\-D0 or a layer number or an own code ) and returns all the sectors we might connect to. So there we get the information like\-: \char`\"{}this segment can be connected
to layer 3 and 4, module 7,8,9 in forward direction\char`\"{}.
\item the criteria take two segments and return whether they are compatible or not. A criterion could check for anything, that is stored in the segments. For example\-: if the line formed from two 1-\/hit segments passes close by the I\-P might be a criterion for very stiff tracks.
\end{DoxyItemize}

So the hit\-Connectors tell us were to look and the criteria whether to connect. If two 1-\/hit segments are found, that are compatible, they will be connected. Connected means\-: The inner 1-\/segment will save the outer one as a parent and the outer one will save the inner one as a child.

All this (except adding hit\-Connectors and \doxyref{Criteria}{p.}{classKiTrack_1_1Criteria}) is done in the method get1\-Seg\-Automaton.

This method finally then returns an automaton (segments sorted by their layers), ready to be used. 

\subsection{Constructor \& Destructor Documentation}
\index{Ki\-Track\-::\-Segment\-Builder@{Ki\-Track\-::\-Segment\-Builder}!Segment\-Builder@{Segment\-Builder}}
\index{Segment\-Builder@{Segment\-Builder}!KiTrack::SegmentBuilder@{Ki\-Track\-::\-Segment\-Builder}}
\subsubsection[{Segment\-Builder}]{\setlength{\rightskip}{0pt plus 5cm}Segment\-Builder\-::\-Segment\-Builder (
\begin{DoxyParamCaption}
\item[{std\-::map$<$ int, std\-::vector$<$ {\bf I\-Hit} $\ast$ $>$ $>$}]{map\-\_\-sector\-\_\-hits}
\end{DoxyParamCaption}
)}\label{classKiTrack_1_1SegmentBuilder_a4301c5f2dcbd4c28a8885c352de4d5ad}

\begin{DoxyParams}{Parameters}
{\em ftd\-Rep} & the F\-T\-D\-Representation to take the aut\-Hits from \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\index{Ki\-Track\-::\-Segment\-Builder@{Ki\-Track\-::\-Segment\-Builder}!get1\-Seg\-Automaton@{get1\-Seg\-Automaton}}
\index{get1\-Seg\-Automaton@{get1\-Seg\-Automaton}!KiTrack::SegmentBuilder@{Ki\-Track\-::\-Segment\-Builder}}
\subsubsection[{get1\-Seg\-Automaton}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Automaton} Segment\-Builder\-::get1\-Seg\-Automaton (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classKiTrack_1_1SegmentBuilder_a50011ea58c302277abb48170a088c01f}
\begin{DoxyReturn}{Returns}
An automaton containing all the hits from the F\-T\-D\-Representation sorted now by layers. (attention\-: those are not necessarily the same layers as the F\-T\-D layers). Also they are connected. 
\end{DoxyReturn}


References Ki\-Track\-::\-Automaton\-::add\-Segment(), Ki\-Track\-::\-Segment\-::get\-Info(), and Ki\-Track\-::\-I\-Criterion\-::get\-Name().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Segment\-Builder.\-h\item 
Segment\-Builder.\-cc\end{DoxyCompactItemize}
