\section{T\-P\-C\-Digi\-Processor Class Reference}
\label{classTPCDigiProcessor}\index{T\-P\-C\-Digi\-Processor@{T\-P\-C\-Digi\-Processor}}


====== \doxyref{T\-P\-C\-Digi\-Processor}{p.}{classTPCDigiProcessor} ====== \par
  




{\ttfamily \#include $<$T\-P\-C\-Digi\-Processor.\-h$>$}

Inheritance diagram for T\-P\-C\-Digi\-Processor\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classTPCDigiProcessor}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual Processor $\ast$ {\bfseries new\-Processor} ()\label{classTPCDigiProcessor_aaacc2b580e8eddd098187efdf1b8a93a}

\item 
virtual void {\bf init} ()
\begin{DoxyCompactList}\small\item\em Called at the begin of the job before anything is read. \end{DoxyCompactList}\item 
virtual void {\bf process\-Run\-Header} (L\-C\-Run\-Header $\ast$run)\label{classTPCDigiProcessor_ad3334e7193b3ca0a909dafb84a33f1db}

\begin{DoxyCompactList}\small\item\em Called for every run. \end{DoxyCompactList}\item 
virtual void {\bf process\-Event} (L\-C\-Event $\ast$evt)\label{classTPCDigiProcessor_ad96379f3e2ba7ed61019c72dcd604efa}

\begin{DoxyCompactList}\small\item\em Called for every event -\/ the working horse. \end{DoxyCompactList}\item 
virtual void {\bfseries check} (L\-C\-Event $\ast$evt)\label{classTPCDigiProcessor_a25e756b3c6b26e00015b5ecbfd790664}

\item 
virtual void {\bf end} ()\label{classTPCDigiProcessor_a3f11ecee53f879223ece80f3ce8e11e2}

\begin{DoxyCompactList}\small\item\em Called after data processing for clean up. \end{DoxyCompactList}\item 
void {\bfseries write\-Voxel\-To\-Hit} ({\bf Voxel\-\_\-tpc} $\ast$a\-Voxel)\label{classTPCDigiProcessor_affcdcc7587d99141efb44bc9445ce535}

\item 
void {\bfseries write\-Merged\-Voxels\-To\-Hit} (std\-::vector$<$ {\bf Voxel\-\_\-tpc} $\ast$ $>$ $\ast$hit\-List)\label{classTPCDigiProcessor_a65684ff621e4fee3ced3462a42f7df8f}

\item 
void {\bfseries plot\-Helix\-Hit\-Residual} (M\-C\-Particle $\ast$mcp, C\-L\-H\-E\-P\-::\-Hep3\-Vector $\ast$this\-Point\-R\-Phi)\label{classTPCDigiProcessor_ab1df22aa4a73175c28467bc94185c85d}

\item 
double {\bfseries get\-Pad\-Phi} (C\-L\-H\-E\-P\-::\-Hep3\-Vector $\ast$this\-Point\-R\-Phi, C\-L\-H\-E\-P\-::\-Hep3\-Vector $\ast$first\-Point\-R\-Phi, C\-L\-H\-E\-P\-::\-Hep3\-Vector $\ast$middle\-Point\-R\-Phi, C\-L\-H\-E\-P\-::\-Hep3\-Vector $\ast$last\-Point\-R\-Phi)\label{classTPCDigiProcessor_a65a473b06a45804d58068c6deeec4506}

\item 
double {\bfseries get\-Pad\-Theta} (C\-L\-H\-E\-P\-::\-Hep3\-Vector $\ast$first\-Point\-R\-Phi, C\-L\-H\-E\-P\-::\-Hep3\-Vector $\ast$middle\-Point\-R\-Phi, C\-L\-H\-E\-P\-::\-Hep3\-Vector $\ast$last\-Point\-R\-Phi)\label{classTPCDigiProcessor_acc675c04072845139cbd168538fbde97}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::string {\bf \-\_\-pad\-Row\-Hit\-Col\-Name}\label{classTPCDigiProcessor_ae6ae5709d3cc7a5535dfed89e8bf9761}

\begin{DoxyCompactList}\small\item\em Input collection name. \end{DoxyCompactList}\item 
std\-::string {\bfseries \-\_\-space\-Point\-Col\-Name}\label{classTPCDigiProcessor_a473f61c1d5a86ea55f1eed539883411b}

\item 
std\-::string {\bfseries \-\_\-low\-Pt\-Hitscol\-Name}\label{classTPCDigiProcessor_a94078adff750ca4aac7c5440a543c4d0}

\item 
std\-::string {\bf \-\_\-\-T\-P\-C\-Tracker\-Hits\-Col}\label{classTPCDigiProcessor_a72dcab3d95179f9012ebbf7426d0aa88}

\begin{DoxyCompactList}\small\item\em Output collection name. \end{DoxyCompactList}\item 
std\-::string {\bfseries \-\_\-out\-Rel\-Col\-Name}\label{classTPCDigiProcessor_a6b70807e264bf46d1bfe6a47df244590}

\item 
bool {\bfseries \-\_\-use\-\_\-raw\-\_\-hits\-\_\-to\-\_\-store\-\_\-simhit\-\_\-pointer}\label{classTPCDigiProcessor_a4d7418389ae5420918abd3133ac8c294}

\item 
int {\bfseries \-\_\-reject\-Cell\-I\-D0}\label{classTPCDigiProcessor_a6b4f45bf2515e3e886ded2a87478df84}

\item 
float {\bfseries \-\_\-pad\-Width}\label{classTPCDigiProcessor_a39cba3212e6e85a8773ee2ec5da16471}

\item 
int {\bfseries \-\_\-n\-Run}\label{classTPCDigiProcessor_a2fb34c7d7bff7a4fbe24032a4a54c779}

\item 
int {\bfseries \-\_\-n\-Evt}\label{classTPCDigiProcessor_a32f55c56298ce8a24c7c77a33c086e6b}

\item 
E\-V\-E\-N\-T\-::\-M\-C\-Particle $\ast$ {\bfseries \-\_\-mcp}\label{classTPCDigiProcessor_a8386bd3ed428fb061bc83f1306a9cc74}

\item 
E\-V\-E\-N\-T\-::\-M\-C\-Particle $\ast$ {\bfseries \-\_\-previous\-M\-C\-P}\label{classTPCDigiProcessor_a6d9b0fb325ea0e94577e22ba2bfa180e}

\item 
E\-V\-E\-N\-T\-::\-M\-C\-Particle $\ast$ {\bfseries \-\_\-next\-M\-C\-P}\label{classTPCDigiProcessor_ac2fa1397aa8e4237c3e2bb150a0cf060}

\item 
E\-V\-E\-N\-T\-::\-M\-C\-Particle $\ast$ {\bfseries \-\_\-n\-Minus2\-M\-C\-P}\label{classTPCDigiProcessor_a20c8ec6d0ceaee3a18e5d1745573907f}

\item 
E\-V\-E\-N\-T\-::\-M\-C\-Particle $\ast$ {\bfseries \-\_\-n\-Plus2\-M\-C\-P}\label{classTPCDigiProcessor_ac057e39da18d77b167d70e8c1e99b32b}

\item 
Sim\-Tracker\-Hit $\ast$ {\bfseries \-\_\-\-Sim\-T\-Hit}\label{classTPCDigiProcessor_a6800556b0c589930e783aab9205a9efd}

\item 
Sim\-Tracker\-Hit $\ast$ {\bfseries \-\_\-previous\-Sim\-T\-Hit}\label{classTPCDigiProcessor_a61f7b8048d413f8e418ea441b0ccdd85}

\item 
Sim\-Tracker\-Hit $\ast$ {\bfseries \-\_\-next\-Sim\-T\-Hit}\label{classTPCDigiProcessor_a5d598e8735f59e92420a5f80e8660af6}

\item 
Sim\-Tracker\-Hit $\ast$ {\bfseries \-\_\-n\-Plus2\-Sim\-Hit}\label{classTPCDigiProcessor_aec278c0d04ced85a5337679f41d9f5ee}

\item 
Sim\-Tracker\-Hit $\ast$ {\bfseries \-\_\-n\-Minus2\-Sim\-Hit}\label{classTPCDigiProcessor_a0ab42f15c9f21e57be2d6c94126fe6aa}

\item 
gsl\-\_\-rng $\ast$ {\bfseries \-\_\-random}\label{classTPCDigiProcessor_a5592306eff35a521acaa2538083f8884}

\item 
bool {\bfseries \-\_\-dont\-Encode\-Side}\label{classTPCDigiProcessor_ac5436e45540ef3e8425668aba2df2797}

\item 
float {\bfseries \-\_\-point\-Reso\-R\-Phi0}\label{classTPCDigiProcessor_ac188ecc5478e634b587c425cf0eb2fc7}

\item 
float {\bfseries \-\_\-point\-Reso\-Pad\-Phi}\label{classTPCDigiProcessor_a3e0ad91f946fc4dafcefdd09730443be}

\item 
float {\bfseries \-\_\-diff\-R\-Phi}\label{classTPCDigiProcessor_aeade46e9a28bf8bee8f3b622790ac7bf}

\item 
int {\bfseries \-\_\-n\-Eff}\label{classTPCDigiProcessor_acab8263bbc56e09d16ac41b86735ff7f}

\item 
float {\bfseries \-\_\-point\-Reso\-Z0}\label{classTPCDigiProcessor_a577fce53d2f6dffb4d8d3fd799837152}

\item 
float {\bfseries \-\_\-diff\-Z}\label{classTPCDigiProcessor_ab81ae7f33c751ae9145c862062047fe1}

\item 
float {\bfseries \-\_\-binning\-Z}\label{classTPCDigiProcessor_a4275710a5fd3ad4fab52bfe57232f54d}

\item 
float {\bfseries \-\_\-binning\-R\-Phi}\label{classTPCDigiProcessor_a1cac2b4d993afb19ea264593cd65a1f6}

\item 
float {\bfseries \-\_\-double\-Hit\-Res\-Z}\label{classTPCDigiProcessor_a815c8f1a5ddb9e5cf6e0093e117b983f}

\item 
float {\bfseries \-\_\-double\-Hit\-Res\-R\-Phi}\label{classTPCDigiProcessor_a4ed60aba99a8a357ef72a16e248c670f}

\item 
int {\bfseries \-\_\-max\-Merge}\label{classTPCDigiProcessor_ab36ab71fcb5de0bc0dd6c4f1606b56df}

\item 
int {\bfseries \-\_\-n\-Rechits}\label{classTPCDigiProcessor_ac834bbe51912dc364f68e36290cb933c}

\item 
std\-::vector$<$ std\-::vector\\*
$<$ {\bf Voxel\-\_\-tpc} $\ast$ $>$ $>$ {\bfseries \-\_\-tpc\-Row\-Hits}\label{classTPCDigiProcessor_a5c2e8147072538b1e567f2f7027996a8}

\item 
std\-::map$<$ {\bf Voxel\-\_\-tpc} \\*
$\ast$, Sim\-Tracker\-Hit $\ast$ $>$ {\bfseries \-\_\-tpc\-Hit\-Map}\label{classTPCDigiProcessor_a107975af8dca90d247298ebd1a6b182c}

\item 
std\-::vector$<$ float $>$ {\bfseries \-\_\-length}\label{classTPCDigiProcessor_ac44e19488d6a6c649fbb4a2cf6c1c18f}

\item 
int {\bfseries lenpos}\label{classTPCDigiProcessor_a256ad84519a8dff9487c73b286e5cd0b}

\item 
L\-C\-Collection\-Vec $\ast$ {\bfseries \-\_\-trkhit\-Vec}\label{classTPCDigiProcessor_ac3ffdd3a0a121cc9d9792c3b9625e3f9}

\item 
L\-C\-Collection\-Vec $\ast$ {\bfseries \-\_\-rel\-Col}\label{classTPCDigiProcessor_a0e70b8a18d9ca5ff91548bf253955fcf}

\item 
Cell\-I\-D\-Encoder$<$ Tracker\-Hit\-Impl $>$ $\ast$ {\bfseries \-\_\-cellid\-\_\-encoder}\label{classTPCDigiProcessor_ac43f2c4a8c048293e66df217eee996ab}

\item 
int {\bfseries \-\_\-\-N\-Sim\-T\-P\-C\-Hits}\label{classTPCDigiProcessor_ad94b97bd5cf3627a6c1927b9c8d97470}

\item 
int {\bfseries \-\_\-\-N\-Background\-Sim\-T\-P\-C\-Hits}\label{classTPCDigiProcessor_a7165dfa74c37d19f32c86a323427408d}

\item 
int {\bfseries \-\_\-\-N\-Physics\-Sim\-T\-P\-C\-Hits}\label{classTPCDigiProcessor_a94040818e1aa25fb81e7cb36fbc93866}

\item 
int {\bfseries \-\_\-\-N\-Physics\-Above02\-Ge\-V\-Sim\-T\-P\-C\-Hits}\label{classTPCDigiProcessor_a5fa04225ab6bd0fbbb656b36e7b9797a}

\item 
int {\bfseries \-\_\-\-N\-Physics\-Above1\-Ge\-V\-Sim\-T\-P\-C\-Hits}\label{classTPCDigiProcessor_a007a74b77fe31a041bf166d72bcfe055}

\item 
int {\bfseries \-\_\-\-N\-Rec\-T\-P\-C\-Hits}\label{classTPCDigiProcessor_a2de7b530bc8b35e47bfcffea1114cd4f}

\item 
int {\bfseries \-\_\-\-N\-Lost\-Physics\-T\-P\-C\-Hits}\label{classTPCDigiProcessor_a4f89ce35d325ffca4dc376098b3e4bc8}

\item 
int {\bfseries \-\_\-\-N\-Lost\-Physics\-Above02\-Ge\-V\-Pt\-T\-P\-C\-Hits}\label{classTPCDigiProcessor_a5ff3a687509d67c60d83061830ae91fd}

\item 
int {\bfseries \-\_\-\-N\-Lost\-Physics\-Above1\-Ge\-V\-Pt\-T\-P\-C\-Hits}\label{classTPCDigiProcessor_a5a563cfc53d8588ca4be030513e23506}

\item 
int {\bfseries \-\_\-\-N\-Revomed\-Hits}\label{classTPCDigiProcessor_adac7e75556b80bf6b464673243d9f40f}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
====== \doxyref{T\-P\-C\-Digi\-Processor}{p.}{classTPCDigiProcessor} ====== \par
 

This Processor depends on Circle.\-h from Marlin\-Util

Caution\-: This digitiser presently does not process space-\/point like Sim\-Tracker\-Hits which have been flagged with Cell\-I\-Ds set to the negetive row number. This must be implemented in future. Produces T\-P\-C Tracker\-Hit collection from Sim\-Tracker\-Hit collection, smeared in r-\/phi and z. Double hits are identified but are currently not added to the collection. This may be change at a later date when criteria for their seperation is defined. The resolutions are defined in the G\-E\-A\-R stearing file.

Resolution in r-\/phi is calculated according to the formular \par
 sigma\-\_\-\{point\}$^\wedge$2 = sigma\-\_\-0$^\wedge$2 + Cd$^\wedge$2/\-N\-\_\-\{eff\} $\ast$ L\-\_\-\{drift\} Cd$^\wedge$2/\-N\-\_\-\{eff\}\} = 25$^\wedge$2/(22/sin(theta)$\ast$h/6mm) Cd = 25 ( microns / cm$^\wedge$(1/2) ) (this is for B=4\-T, h is the pad height = pad-\/row pitch in mm, theta is the polar angle)

At the moment resolution in z assumed to be independent of drift length. \par


The type of T\-P\-C Tracker\-Hit is set to 500 via method Tracker\-Hit\-Impl\-::set\-Type(int type) \par
 \subparagraph*{Input collections and prerequisites}

Processor requires collections of Sim\-Tracker\-Hits in T\-P\-C \par
 \subparagraph*{Output}

Processor produces collection of digitized Tracker\-Hits in T\-P\-C \par
 
\begin{DoxyParams}{Parameters}
{\em Collection\-Name} & The name of input Sim\-Tracker\-Hit collection \par
 (default name S\-Tpc01\-\_\-\-T\-P\-C) \\
\hline
{\em Reject\-Cell\-I\-D0} & Whether or not to reject Sim\-Tracker\-Hits with Cell I\-D 0. Mokka drivers T\-P\-C00-\/\-T\-P\-C03 encoded the pad row number in the cell I\-D, which should always be non-\/zero anyway. Drivers T\-P\-C04 and T\-P\-C05 do not simulate pad rows and thus have the cell I\-D set to zero for all hits. You will need to set Reject\-Cell\-I\-D0 to 0 in order to use this processor with these drivers, but note that the implications for track reconstruction are not strictly defined. Mokka driver T\-P\-C06 uses a mixed approach with one hit per pad row having non-\/zero cell I\-D, extra hits having 0 cell I\-D. Typically, unless you use T\-P\-C04 or T\-P\-C05, you should not touch this parameter. \par
 (default value 1) \\
\hline
{\em T\-P\-C\-Tracker\-Hits\-Col} & The name of output collection of Tracker\-Hits \par
 (default name T\-P\-C\-Tracker\-Hits) \par
 \par
 \\
\hline
\end{DoxyParams}
\begin{DoxyAuthor}{Authors}
S. Aplin, D\-E\-S\-Y and A.\-Raspereza, M\-P\-I
\end{DoxyAuthor}
Changed 7/9/07 so that the const and diffusion resolution terms are taken as processor parameters rather than the gear file. The parameters \-\_\-pix\-Z and pix\-R\-P were also changed from gear parameters to processor parameters {\tt clare.\-lynch@bristol.\-ac.\-uk} 

\subsection{Member Function Documentation}
\index{T\-P\-C\-Digi\-Processor@{T\-P\-C\-Digi\-Processor}!init@{init}}
\index{init@{init}!TPCDigiProcessor@{T\-P\-C\-Digi\-Processor}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}virtual void T\-P\-C\-Digi\-Processor\-::init (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classTPCDigiProcessor_a095e7269d75fdb0994dd62879b135f52}


Called at the begin of the job before anything is read. 

Use to initialize the processor, e.\-g. book histograms. 

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
T\-P\-C\-Digi\-Processor.\-h\end{DoxyCompactItemize}
