\section{marlintpc\-:\-:T\-P\-C\-Electronics\-Processor Class Reference}
\label{classmarlintpc_1_1TPCElectronicsProcessor}\index{marlintpc\-::\-T\-P\-C\-Electronics\-Processor@{marlintpc\-::\-T\-P\-C\-Electronics\-Processor}}


This processor applies the electronics shaping to the incoming electron signals.  




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

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

\item 
virtual void {\bfseries init} ()\label{classmarlintpc_1_1TPCElectronicsProcessor_ad751e0a103daea935688307cdc7fd0fe}

\item 
virtual void {\bf process\-Run\-Header} (lcio\-::\-L\-C\-Run\-Header $\ast$run)\label{classmarlintpc_1_1TPCElectronicsProcessor_a1203993469ff471c08e016ea82653185}

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

\begin{DoxyCompactList}\small\item\em Called for every event -\/ the working horse. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
static bool {\bf voxel\-Pad\-Comp} (const std\-::pair$<$ {\bf Voxel\-T\-P\-C\-::\-Voxel\-Index}, int $>$ \&left, const std\-::pair$<$ {\bf Voxel\-T\-P\-C\-::\-Voxel\-Index}, int $>$ \&right)\label{classmarlintpc_1_1TPCElectronicsProcessor_af2820d87d57976a9c74ce0e8d5f526cb}

\begin{DoxyCompactList}\small\item\em function to sort the list of std\-::pair$<$ Voxel\-T\-P\-C\-::\-Voxel\-Index, int $>$ by pad index, then time \end{DoxyCompactList}\item 
static bool {\bf voxel\-Time\-Comp} (const std\-::pair$<$ {\bf Voxel\-T\-P\-C\-::\-Voxel\-Index}, int $>$ \&left, const std\-::pair$<$ {\bf Voxel\-T\-P\-C\-::\-Voxel\-Index}, int $>$ \&right)\label{classmarlintpc_1_1TPCElectronicsProcessor_af70e32900b0d6594f6ee6b6cc64ec9dc}

\begin{DoxyCompactList}\small\item\em function to sort the list of std\-::pair$<$ Voxel\-T\-P\-C\-::\-Voxel\-Index, int $>$ by time, then pad index \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
bool {\bfseries \-\_\-output\-Is\-Persistent}\label{classmarlintpc_1_1TPCElectronicsProcessor_ac86c720f0ee2a6f1d221db296824961c}

\item 
std\-::string {\bf \-\_\-input\-Col\-Name}\label{classmarlintpc_1_1TPCElectronicsProcessor_a8603b0667bca1f53a1d1586238af570c}

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

\begin{DoxyCompactList}\small\item\em Name of output collection. \end{DoxyCompactList}\item 
double {\bf \-\_\-frequency}\label{classmarlintpc_1_1TPCElectronicsProcessor_a72962d64901aa0ee60bbd09b9ce749c6}

\begin{DoxyCompactList}\small\item\em Readout frequency of the A\-D\-C. \end{DoxyCompactList}\item 
double {\bf \-\_\-rise\-Time}\label{classmarlintpc_1_1TPCElectronicsProcessor_a41526c8aad9ea0b1aa53c5aa9c16e789}

\begin{DoxyCompactList}\small\item\em Rise time of the signal. \end{DoxyCompactList}\item 
double {\bfseries \-\_\-asym}\label{classmarlintpc_1_1TPCElectronicsProcessor_ae5992b72e62262a24bb57ea68ea59bba}

\item 
int {\bf \-\_\-\-A\-D\-C\-Max\-Value}\label{classmarlintpc_1_1TPCElectronicsProcessor_ac6644550ca7cc48dbfe2d1d0d909e38d}

\begin{DoxyCompactList}\small\item\em The maximum of the dynamic range in A\-D\-C counts. \end{DoxyCompactList}\item 
int {\bf \-\_\-n\-Electrons\-Dynamic\-Range}
\begin{DoxyCompactList}\small\item\em The number of electrons which correspond. \end{DoxyCompactList}\item 
double {\bf \-\_\-voxel\-Z\-Length}\label{classmarlintpc_1_1TPCElectronicsProcessor_af3cd1b2454c8d3917a4210ebf3824665}

\begin{DoxyCompactList}\small\item\em Length of a voxel in ns. \end{DoxyCompactList}\item 
int {\bf \-\_\-\-A\-D\-C\-Threshold}\label{classmarlintpc_1_1TPCElectronicsProcessor_a20d6b35aec3ce148be1a5c3e3cf9ecbc}

\begin{DoxyCompactList}\small\item\em The threshold of the A\-D\-C (in A\-D\-C counts) \end{DoxyCompactList}\item 
int {\bf \-\_\-minimum\-Pulse\-Height}\label{classmarlintpc_1_1TPCElectronicsProcessor_a43d8128b08d7b2aef2756601aad05f0a}

\begin{DoxyCompactList}\small\item\em The minimal value for the highest sample value in a pulse. \end{DoxyCompactList}\item 
int {\bf \-\_\-electronics\-Switch}
\begin{DoxyCompactList}\small\item\em Switch between different electronics implementations\-: \end{DoxyCompactList}\item 
double {\bf \-\_\-peaking\-Time}\label{classmarlintpc_1_1TPCElectronicsProcessor_ade89b5b5369232a7d5d633bdde9f901f}

\begin{DoxyCompactList}\small\item\em Peaking time A\-L\-T\-R\-O electronics (time from start of pulse to maximum) \end{DoxyCompactList}\item 
int {\bf \-\_\-noise\-Switch}
\begin{DoxyCompactList}\small\item\em Switch between different noise model for pedestal width distribution\-: \end{DoxyCompactList}\item 
double {\bf \-\_\-clock\-Jitter}\label{classmarlintpc_1_1TPCElectronicsProcessor_a4d8cad5f6a01a9361017f947969d5d20}

\begin{DoxyCompactList}\small\item\em Time jitter for the digitisation in nanoseconds. \end{DoxyCompactList}\item 
std\-::map$<$ int, double $>$ {\bfseries \-\_\-time\-Jitter}\label{classmarlintpc_1_1TPCElectronicsProcessor_a1c4ed0f19ea5ff85eb21c092a6a2628a}

\item 
double {\bf \-\_\-noise\-Level}\label{classmarlintpc_1_1TPCElectronicsProcessor_ad84f3bb87d920d3a7a2d2874e1d3ce84}

\begin{DoxyCompactList}\small\item\em Central value of the pedestal width used to add noise to the A\-D\-C spectrum. \end{DoxyCompactList}\item 
double {\bf \-\_\-noise\-Width}\label{classmarlintpc_1_1TPCElectronicsProcessor_a04c2cded1914cea2c4033e6b31c944db}

\begin{DoxyCompactList}\small\item\em Width of the pedestal width distribution used to add noise to the A\-D\-C spectrum. \end{DoxyCompactList}\item 
double {\bf \-\_\-noise\-Cutoff}\label{classmarlintpc_1_1TPCElectronicsProcessor_a2aa0383088b3c9e122d213b2f58b738a}

\begin{DoxyCompactList}\small\item\em Cutoff for random pedestal width -\/ e.\-g. to discard tails from the Landau distribution, since really noisy channels probably wouldn't be used in the data either. (default\-: 4) \end{DoxyCompactList}\item 
{\bf A\-D\-C\-Pulse} $\ast$ {\bf pulse}\label{classmarlintpc_1_1TPCElectronicsProcessor_acf5825064e58b4ec63b134be29fc3386}

\begin{DoxyCompactList}\small\item\em The instance of the \doxyref{A\-D\-C\-Pulse}{p.}{classmarlintpc_1_1ADCPulse}, as pointer since it can only be initialised in the init() \end{DoxyCompactList}\item 
bool {\bf \-\_\-improve\-Memory\-Footprint}\label{classmarlintpc_1_1TPCElectronicsProcessor_ac705468d2ccf974a3a375910ef3ccb01}

\begin{DoxyCompactList}\small\item\em Flag whether to use the memory saving shortcut. \end{DoxyCompactList}\item 
double {\bf \-\_\-integration\-Time}\label{classmarlintpc_1_1TPCElectronicsProcessor_ad070b884d4f0995b0570ea93fce69899}

\begin{DoxyCompactList}\small\item\em Integration\-Time of the electronics. Voxel within this time window will be shaped in one go. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This processor applies the electronics shaping to the incoming electron signals. 

The signal shape is a gaussian which is cut off at +-\/ 3 $\sigma$. The width of the gaussian is defined as $\sigma$ = rise time / 3. The electronics amplification is calculated from the number of of electrons and the number of A\-D\-C counts which correspond to the dynamic range of the A\-D\-C.

In order to use the Improve\-Memory\-Footprint option this processor has to be run together with (after) the \doxyref{Charge\-Distribution\-Processor}{p.}{classmarlintpc_1_1ChargeDistributionProcessor} in the same Marlin run. The \doxyref{Charge\-Distribution\-Processor}{p.}{classmarlintpc_1_1ChargeDistributionProcessor} also needs the Improve\-Memory\-Footprint option to be turned on. \doxyref{Mokka\-To\-Voxel\-Processor}{p.}{classmarlintpc_1_1MokkaToVoxelProcessor} does not support this option yet.

\subparagraph*{Input -\/ Prerequisites}

Collection of \doxyref{T\-P\-C\-Voxel}{p.}{classmarlintpc_1_1TPCVoxel} with charges on pads

\subparagraph*{Output}

Collection with T\-P\-C\-Raw\-Data


\begin{DoxyParams}{Parameters}
{\em Input\-Collection\-Name} & Name of input collection, (default\-: \doxyref{T\-P\-C\-Voxel}{p.}{classmarlintpc_1_1TPCVoxel}) \\
\hline
{\em Output\-Collection\-Name} & Name of output collection, (default\-: Tracker\-Raw\-Data) \\
\hline
{\em Write\-Output\-To\-Storage} & Output collection will be written if set to true (default\-: true) \\
\hline
{\em Readout\-Frequency} & The frequency of readout electronics in M\-Hz (default\-: 40.). \\
\hline
{\em Rise\-Time} & Signal rise time in ns (default\-: 60.). \\
\hline
{\em Asymmetry} & Signal asymmetry around center of gaussian shape (default\-: 1.). \\
\hline
{\em A\-D\-C\-Max\-Value} & Dynamic range of the A\-D\-C in A\-D\-C counts (default\-: 1023) \\
\hline
{\em N\-Electrons\-Dynamic\-Range} & Dynamic range of the A\-D\-C in electrons (default\-: 1e6) \\
\hline
{\em Voxel\-Z\-Length} & Length of a voxel in ns (default\-: 1.); \\
\hline
{\em Threshold} & Minimum number auf A\-D\-C counts for a sample to be accepted (default\-: 1, just zero suppression)\par
 {\bfseries Attention\-:} A threshold of 0 turns off part of the zero suppressesion. 1 is the smallest resonable value. \\
\hline
{\em Noise\-Switch} & Switch between different noise model for pedestal width distribution (0=no noise, 1=gaussian, 2=landau) \\
\hline
{\em Clock\-Jitter} & Clock jitter for the digitisation in nanoseconds (default\-: 0) \\
\hline
{\em Noise\-Level} & Central value of the pedestal width used to add noise to the A\-D\-C spectrum (mean for the gaussian noise width distribution, most probable value for the landau (which is, by the way, (almost but) not exactly the parameter root calls \char`\"{}\-M\-P\-V\char`\"{} if you fit your distribution with a Landau, see e.\-g. the T\-Math documentation...) \\
\hline
{\em Noise\-Width} & Width of the pedestal width distribution used to add noise to the A\-D\-C spectrum \\
\hline
{\em Noise\-Cutoff} & Cutoff for random pedestal width -\/ e.\-g. to discard tails from the Landau distribution, since really noisy channels probably wouldn't be used in the data either. (default\-: 4)\\
\hline
{\em Minimum\-Pulse\-Height} & Minimal value of the highest sample in a pulse (default\-: 1) \\
\hline
{\em Improve\-Memory\-Footprint} & Flag whether to use Charge\-Distribution\-Processor\-::fetch\-Voxel\-Collection instead of the input collection (default\-:false)\\
\hline
\end{DoxyParams}
\begin{DoxyAuthor}{Author}
Astrid Muennich, R\-W\-T\-H Aachen 

Thorsten Krautscheid, University of Bonn 

Martin Killenberg, C\-E\-R\-N 
\end{DoxyAuthor}


\subsection{Member Data Documentation}
\index{marlintpc\-::\-T\-P\-C\-Electronics\-Processor@{marlintpc\-::\-T\-P\-C\-Electronics\-Processor}!\-\_\-electronics\-Switch@{\-\_\-electronics\-Switch}}
\index{\-\_\-electronics\-Switch@{\-\_\-electronics\-Switch}!marlintpc::TPCElectronicsProcessor@{marlintpc\-::\-T\-P\-C\-Electronics\-Processor}}
\subsubsection[{\-\_\-electronics\-Switch}]{\setlength{\rightskip}{0pt plus 5cm}int marlintpc\-::\-T\-P\-C\-Electronics\-Processor\-::\-\_\-electronics\-Switch\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1TPCElectronicsProcessor_aa56ba2dc597d847675db95f1ca29ccc6}


Switch between different electronics implementations\-: 

0=Gaussian shaping, 1=A\-L\-T\-R\-O electronics 

Referenced by process\-Event().

\index{marlintpc\-::\-T\-P\-C\-Electronics\-Processor@{marlintpc\-::\-T\-P\-C\-Electronics\-Processor}!\-\_\-n\-Electrons\-Dynamic\-Range@{\-\_\-n\-Electrons\-Dynamic\-Range}}
\index{\-\_\-n\-Electrons\-Dynamic\-Range@{\-\_\-n\-Electrons\-Dynamic\-Range}!marlintpc::TPCElectronicsProcessor@{marlintpc\-::\-T\-P\-C\-Electronics\-Processor}}
\subsubsection[{\-\_\-n\-Electrons\-Dynamic\-Range}]{\setlength{\rightskip}{0pt plus 5cm}int marlintpc\-::\-T\-P\-C\-Electronics\-Processor\-::\-\_\-n\-Electrons\-Dynamic\-Range\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1TPCElectronicsProcessor_a3c0a5764ed89583a8bea57eb601761e3}


The number of electrons which correspond. 

to the dynamic range of the A\-D\-C \index{marlintpc\-::\-T\-P\-C\-Electronics\-Processor@{marlintpc\-::\-T\-P\-C\-Electronics\-Processor}!\-\_\-noise\-Switch@{\-\_\-noise\-Switch}}
\index{\-\_\-noise\-Switch@{\-\_\-noise\-Switch}!marlintpc::TPCElectronicsProcessor@{marlintpc\-::\-T\-P\-C\-Electronics\-Processor}}
\subsubsection[{\-\_\-noise\-Switch}]{\setlength{\rightskip}{0pt plus 5cm}int marlintpc\-::\-T\-P\-C\-Electronics\-Processor\-::\-\_\-noise\-Switch\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1TPCElectronicsProcessor_a27a7e186c4fbdcb6ccd6acd47b784081}


Switch between different noise model for pedestal width distribution\-: 

0=no noise, 1=gaussian, 2=landau 

Referenced by process\-Event().



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