\section{marlintpc\-:\-:Topo\-Finder Class Reference}
\label{classmarlintpc_1_1TopoFinder}\index{marlintpc\-::\-Topo\-Finder@{marlintpc\-::\-Topo\-Finder}}


\doxyref{Topo\-Finder}{p.}{classmarlintpc_1_1TopoFinder} contains finding algorithms for clusters of Tracker\-Pulses.  




{\ttfamily \#include $<$Topo\-Finder.\-h$>$}

Inheritance diagram for marlintpc\-:\-:Topo\-Finder\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classmarlintpc_1_1TopoFinder}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
std\-::string {\bf get\-Revision} ()
\begin{DoxyCompactList}\small\item\em Get the revision of the \doxyref{Topo\-Finder}{p.}{classmarlintpc_1_1TopoFinder}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static void {\bf add\-Tracker\-Hit\-Vecs} (E\-V\-E\-N\-T\-::\-Tracker\-Hit\-Vec $\ast$$\ast$vector\-To\-Add\-To, E\-V\-E\-N\-T\-::\-Tracker\-Hit\-Vec $\ast$$\ast$vector\-To\-Be\-Added)
\begin{DoxyCompactList}\small\item\em A helper function to add the contents of one Tracker\-Hit\-Vec to another. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Topo\-Finder} ()\label{classmarlintpc_1_1TopoFinder_a8bce35f1842a2d93e1986f5f65e9937b}

\begin{DoxyCompactList}\small\item\em The constructor. \end{DoxyCompactList}\item 
E\-V\-E\-N\-T\-::\-Tracker\-Hit $\ast$ {\bf find\-Hit} (std\-::multimap$<$ gear\-::\-Global\-Pad\-Index, E\-V\-E\-N\-T\-::\-Tracker\-Pulse $\ast$ $>$\-::iterator current\-Pulse\-Iter)
\begin{DoxyCompactList}\small\item\em Find the hit which contains the given pulse. \end{DoxyCompactList}\item 
std\-::list$<$ E\-V\-E\-N\-T\-::\-Tracker\-Pulse $\ast$ $>$ {\bf find\-Neighbouring\-Pulses} (gear\-::\-Global\-Pad\-Index current\-Pad\-Index, E\-V\-E\-N\-T\-::\-Tracker\-Pulse $\ast$current\-Pulse, const gear\-::\-T\-P\-C\-Module \&module)
\begin{DoxyCompactList}\small\item\em Iteratively searches for pulses that are on neighbouring pads. \end{DoxyCompactList}\item 
E\-V\-E\-N\-T\-::\-Tracker\-Hit\-Vec $\ast$ {\bf find\-Hits\-In\-Neighbouring\-Rows} (E\-V\-E\-N\-T\-::\-Tracker\-Hit $\ast$hit, int module\-I\-D)
\begin{DoxyCompactList}\small\item\em Find Hits in the neighbouring rows. \end{DoxyCompactList}\item 
E\-V\-E\-N\-T\-::\-Tracker\-Hit\-Vec $\ast$ {\bf find\-Hits\-In\-Range} (gear\-::\-Global\-Pad\-Index index1, gear\-::\-Global\-Pad\-Index index2, float min\-A\-D\-C\-Index, float max\-A\-D\-C\-Index)
\begin{DoxyCompactList}\small\item\em Find all the hits in the given pad range. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
int {\bf \-\_\-max\-Empty\-Pads}\label{classmarlintpc_1_1TopoFinder_a453126d142ac2efbfabf72a0e6ac1231}

\begin{DoxyCompactList}\small\item\em Maximum number of consecuitve empty pads in cluster. \end{DoxyCompactList}\item 
int {\bf \-\_\-min\-Hit\-Size}\label{classmarlintpc_1_1TopoFinder_a8d30823b67e9684fc5de4ce4f82bc245}

\begin{DoxyCompactList}\small\item\em Minimum number of pads per hit. \end{DoxyCompactList}\item 
float {\bf \-\_\-max\-Time\-Spread}\label{classmarlintpc_1_1TopoFinder_add55bf6fa2f7062a0e3b4848843db48d}

\begin{DoxyCompactList}\small\item\em Maximum time between pulses in a cluster in ?? \end{DoxyCompactList}\item 
int {\bf \-\_\-min\-Track\-Hits}\label{classmarlintpc_1_1TopoFinder_ad4ddf1c388fc1f01a96af9d6c967ac52}

\begin{DoxyCompactList}\small\item\em Minimum number of hits on track. \end{DoxyCompactList}\item 
int {\bf \-\_\-max\-Skip\-Rows}\label{classmarlintpc_1_1TopoFinder_ac1cb2f7bb5116038b0cc1d3dac957527}

\begin{DoxyCompactList}\small\item\em Maximum number of empty rows. \end{DoxyCompactList}\item 
float {\bf \-\_\-v\-Drift}\label{classmarlintpc_1_1TopoFinder_a5ea562bd19498a7869c41b4e4a759723}

\begin{DoxyCompactList}\small\item\em Optional\-: Set drift velocity in case there is no conditions data. \end{DoxyCompactList}\item 
float {\bf \-\_\-z\-Anode}\label{classmarlintpc_1_1TopoFinder_acf5174f3bbbb96cd766a1e1c9d5aa3c2}

\begin{DoxyCompactList}\small\item\em The position of the readout anode (positive value, T\-P\-C currently assumed to be symmetrical) \end{DoxyCompactList}\item 
int {\bf \-\_\-negative\-Z\-Direction}
\begin{DoxyCompactList}\small\item\em Flag to determine if the second half T\-P\-C is reconstructed, which looks in the negative z direction. \end{DoxyCompactList}\item 
std\-::multimap\\*
$<$ gear\-::\-Global\-Pad\-Index, \\*
E\-V\-E\-N\-T\-::\-Tracker\-Pulse $\ast$ $>$ $\ast$ {\bf \-\_\-pulses\-By\-Index}
\begin{DoxyCompactList}\small\item\em A multimap containing the pad index and the corresponding pulse. \end{DoxyCompactList}\item 
unsigned int {\bf \-\_\-recursion\-Counter}
\begin{DoxyCompactList}\small\item\em A nested helper class for sorting gear\-::\-Global\-Pad\-Index. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\doxyref{Topo\-Finder}{p.}{classmarlintpc_1_1TopoFinder} contains finding algorithms for clusters of Tracker\-Pulses. 

It operates on a std\-::multimap$<$int, Tracker\-Pulse$\ast$$>$ which contains the pulses to search in a multimap sorted by the corresponding pad index. \begin{DoxyAttention}{Attention}
!! Be careful with the iterators! They are deleted from the map and are invalid afterwards!!
\end{DoxyAttention}
\begin{DoxyAuthor}{Author}
Martin Killenberg, University of Bonn
\end{DoxyAuthor}
This class is not a processor, but called from them. 

\subsection{Member Function Documentation}
\index{marlintpc\-::\-Topo\-Finder@{marlintpc\-::\-Topo\-Finder}!add\-Tracker\-Hit\-Vecs@{add\-Tracker\-Hit\-Vecs}}
\index{add\-Tracker\-Hit\-Vecs@{add\-Tracker\-Hit\-Vecs}!marlintpc::TopoFinder@{marlintpc\-::\-Topo\-Finder}}
\subsubsection[{add\-Tracker\-Hit\-Vecs}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-Topo\-Finder\-::add\-Tracker\-Hit\-Vecs (
\begin{DoxyParamCaption}
\item[{E\-V\-E\-N\-T\-::\-Tracker\-Hit\-Vec $\ast$$\ast$}]{vector\-To\-Add\-To, }
\item[{E\-V\-E\-N\-T\-::\-Tracker\-Hit\-Vec $\ast$$\ast$}]{vector\-To\-Be\-Added}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}\label{classmarlintpc_1_1TopoFinder_a17dc0a7c5fbb649e27bc4bafc0fbceac}


A helper function to add the contents of one Tracker\-Hit\-Vec to another. 

Be aware that you need handlers of Tracker\-Hit\-Vec because the pointers are modified! \begin{DoxyAttention}{Attention}
vector\-To\-Be\-Added is 0 after calling this function! 
\end{DoxyAttention}


Referenced by find\-Hits\-In\-Neighbouring\-Rows().

\index{marlintpc\-::\-Topo\-Finder@{marlintpc\-::\-Topo\-Finder}!find\-Hit@{find\-Hit}}
\index{find\-Hit@{find\-Hit}!marlintpc::TopoFinder@{marlintpc\-::\-Topo\-Finder}}
\subsubsection[{find\-Hit}]{\setlength{\rightskip}{0pt plus 5cm}E\-V\-E\-N\-T\-::\-Tracker\-Hit $\ast$ marlintpc\-::\-Topo\-Finder\-::find\-Hit (
\begin{DoxyParamCaption}
\item[{std\-::multimap$<$ gear\-::\-Global\-Pad\-Index, E\-V\-E\-N\-T\-::\-Tracker\-Pulse $\ast$ $>$\-::iterator}]{current\-Pulse\-Iter}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1TopoFinder_a3a538f7c79c53fbeb54449fcecfccd45}


Find the hit which contains the given pulse. 

It looks for pulses in neighbouring pads. 

References \-\_\-min\-Hit\-Size, \-\_\-negative\-Z\-Direction, \-\_\-pulses\-By\-Index, \-\_\-v\-Drift, \-\_\-z\-Anode, and find\-Neighbouring\-Pulses().



Referenced by find\-Hits\-In\-Range(), and marlintpc\-::\-Hit\-Track\-Finder\-Topo\-Processor\-::process\-Event().

\index{marlintpc\-::\-Topo\-Finder@{marlintpc\-::\-Topo\-Finder}!find\-Hits\-In\-Neighbouring\-Rows@{find\-Hits\-In\-Neighbouring\-Rows}}
\index{find\-Hits\-In\-Neighbouring\-Rows@{find\-Hits\-In\-Neighbouring\-Rows}!marlintpc::TopoFinder@{marlintpc\-::\-Topo\-Finder}}
\subsubsection[{find\-Hits\-In\-Neighbouring\-Rows}]{\setlength{\rightskip}{0pt plus 5cm}E\-V\-E\-N\-T\-::\-Tracker\-Hit\-Vec $\ast$ marlintpc\-::\-Topo\-Finder\-::find\-Hits\-In\-Neighbouring\-Rows (
\begin{DoxyParamCaption}
\item[{E\-V\-E\-N\-T\-::\-Tracker\-Hit $\ast$}]{hit, }
\item[{int}]{module\-I\-D}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1TopoFinder_abdd3ab3d73061c68b7683c5ff00bde57}


Find Hits in the neighbouring rows. 

If empty rows are allowed this does not necessarrily mean next neighbouring rows. (Empty row means there is no hit in this row which matches the given hit. It does not have to be completely empty.) 

References \-\_\-max\-Skip\-Rows, \-\_\-recursion\-Counter, add\-Tracker\-Hit\-Vecs(), and find\-Hits\-In\-Range().



Referenced by marlintpc\-::\-Hit\-Track\-Finder\-Topo\-Processor\-::process\-Event().

\index{marlintpc\-::\-Topo\-Finder@{marlintpc\-::\-Topo\-Finder}!find\-Hits\-In\-Range@{find\-Hits\-In\-Range}}
\index{find\-Hits\-In\-Range@{find\-Hits\-In\-Range}!marlintpc::TopoFinder@{marlintpc\-::\-Topo\-Finder}}
\subsubsection[{find\-Hits\-In\-Range}]{\setlength{\rightskip}{0pt plus 5cm}E\-V\-E\-N\-T\-::\-Tracker\-Hit\-Vec $\ast$ marlintpc\-::\-Topo\-Finder\-::find\-Hits\-In\-Range (
\begin{DoxyParamCaption}
\item[{gear\-::\-Global\-Pad\-Index}]{index1, }
\item[{gear\-::\-Global\-Pad\-Index}]{index2, }
\item[{float}]{min\-A\-D\-C\-Index, }
\item[{float}]{max\-A\-D\-C\-Index}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1TopoFinder_a8106fb4211c622f742ca594861359d6c}


Find all the hits in the given pad range. 

There might be more than one hit in case of a looper or an interaction. 

References \-\_\-pulses\-By\-Index, and find\-Hit().



Referenced by find\-Hits\-In\-Neighbouring\-Rows().

\index{marlintpc\-::\-Topo\-Finder@{marlintpc\-::\-Topo\-Finder}!find\-Neighbouring\-Pulses@{find\-Neighbouring\-Pulses}}
\index{find\-Neighbouring\-Pulses@{find\-Neighbouring\-Pulses}!marlintpc::TopoFinder@{marlintpc\-::\-Topo\-Finder}}
\subsubsection[{find\-Neighbouring\-Pulses}]{\setlength{\rightskip}{0pt plus 5cm}std\-::list$<$ Tracker\-Pulse $\ast$ $>$ marlintpc\-::\-Topo\-Finder\-::find\-Neighbouring\-Pulses (
\begin{DoxyParamCaption}
\item[{gear\-::\-Global\-Pad\-Index}]{current\-Pad\-Index, }
\item[{E\-V\-E\-N\-T\-::\-Tracker\-Pulse $\ast$}]{current\-Pulse, }
\item[{const gear\-::\-T\-P\-C\-Module \&}]{module}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1TopoFinder_ab9c32319cba28a008a112d5c9817dbee}


Iteratively searches for pulses that are on neighbouring pads. 

Erase the iterator of this pulse from the global map before calling this function to avoid finding it twice. The reference to the module is passed so it does not have to be retrieved over and over again... 

References \-\_\-max\-Empty\-Pads, and \-\_\-pulses\-By\-Index.



Referenced by find\-Hit().

\index{marlintpc\-::\-Topo\-Finder@{marlintpc\-::\-Topo\-Finder}!get\-Revision@{get\-Revision}}
\index{get\-Revision@{get\-Revision}!marlintpc::TopoFinder@{marlintpc\-::\-Topo\-Finder}}
\subsubsection[{get\-Revision}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string marlintpc\-::\-Topo\-Finder\-::get\-Revision (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classmarlintpc_1_1TopoFinder_a5c119af1573fc1feb2508e52c4bdfa58}


Get the revision of the \doxyref{Topo\-Finder}{p.}{classmarlintpc_1_1TopoFinder}. 

Use this information in the processor which uses or is derived from this class\-: \begin{DoxyVerb}run->parameters().setValue( _processorName + "_revision",
*                          std::string("$Rev:$  using TopoFinder " + myTopoFinder->getRevision()));
*  \end{DoxyVerb}
 

Referenced by marlintpc\-::\-Hit\-Track\-Finder\-Topo\-Processor\-::process\-Run\-Header().



\subsection{Member Data Documentation}
\index{marlintpc\-::\-Topo\-Finder@{marlintpc\-::\-Topo\-Finder}!\-\_\-negative\-Z\-Direction@{\-\_\-negative\-Z\-Direction}}
\index{\-\_\-negative\-Z\-Direction@{\-\_\-negative\-Z\-Direction}!marlintpc::TopoFinder@{marlintpc\-::\-Topo\-Finder}}
\subsubsection[{\-\_\-negative\-Z\-Direction}]{\setlength{\rightskip}{0pt plus 5cm}int marlintpc\-::\-Topo\-Finder\-::\-\_\-negative\-Z\-Direction\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1TopoFinder_aff551b03a72b90cc8e6e0df15c97a418}


Flag to determine if the second half T\-P\-C is reconstructed, which looks in the negative z direction. 

In this case the x and z coordinate are multiplied with -\/1 (endplate rotated by 180 degress around y axis wrt. first endplate) 

Referenced by find\-Hit(), and marlintpc\-::\-Hit\-Track\-Finder\-Topo\-Processor\-::\-Hit\-Track\-Finder\-Topo\-Processor().

\index{marlintpc\-::\-Topo\-Finder@{marlintpc\-::\-Topo\-Finder}!\-\_\-pulses\-By\-Index@{\-\_\-pulses\-By\-Index}}
\index{\-\_\-pulses\-By\-Index@{\-\_\-pulses\-By\-Index}!marlintpc::TopoFinder@{marlintpc\-::\-Topo\-Finder}}
\subsubsection[{\-\_\-pulses\-By\-Index}]{\setlength{\rightskip}{0pt plus 5cm}std\-::multimap$<$gear\-::\-Global\-Pad\-Index, E\-V\-E\-N\-T\-::\-Tracker\-Pulse$\ast$$>$$\ast$ marlintpc\-::\-Topo\-Finder\-::\-\_\-pulses\-By\-Index\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1TopoFinder_a5b017326f67326db8da65df42e2cd66f}


A multimap containing the pad index and the corresponding pulse. 

Sorted by pad index. 

Referenced by find\-Hit(), find\-Hits\-In\-Range(), find\-Neighbouring\-Pulses(), and marlintpc\-::\-Hit\-Track\-Finder\-Topo\-Processor\-::process\-Event().

\index{marlintpc\-::\-Topo\-Finder@{marlintpc\-::\-Topo\-Finder}!\-\_\-recursion\-Counter@{\-\_\-recursion\-Counter}}
\index{\-\_\-recursion\-Counter@{\-\_\-recursion\-Counter}!marlintpc::TopoFinder@{marlintpc\-::\-Topo\-Finder}}
\subsubsection[{\-\_\-recursion\-Counter}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int marlintpc\-::\-Topo\-Finder\-::\-\_\-recursion\-Counter\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1TopoFinder_a192f909850e0da8c8f4e8a29697d5047}


A nested helper class for sorting gear\-::\-Global\-Pad\-Index. 

They are sorted by module\-I\-D, and within module\-I\-D in pad\-Index 

Referenced by find\-Hits\-In\-Neighbouring\-Rows().



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