\section{marlintpc\-:\-:A\-D\-C\-Pulse Class Reference}
\label{classmarlintpc_1_1ADCPulse}\index{marlintpc\-::\-A\-D\-C\-Pulse@{marlintpc\-::\-A\-D\-C\-Pulse}}


A base class interface which holds the raw data of the pulse and represents the A\-D\-C and its shaping amplifier.  




{\ttfamily \#include $<$A\-D\-C\-Pulse.\-h$>$}

Inheritance diagram for marlintpc\-:\-:A\-D\-C\-Pulse\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classmarlintpc_1_1ADCPulse}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bfseries A\-D\-C\-Pulse} (double frequency\-M\-Hz, int A\-D\-C\-Max\-Value, int threshold)\label{classmarlintpc_1_1ADCPulse_a96fd07791ce97bd15a3c94857cd8d9fe}

\item 
virtual double {\bf get\-End\-Time} () const \label{classmarlintpc_1_1ADCPulse_a5a90e46808d49e7fa018bb557812770f}

\begin{DoxyCompactList}\small\item\em Get the end time of the last bin in the pulse (in ns) \end{DoxyCompactList}\item 
virtual int {\bf get\-Start\-Bin} () const 
\item 
virtual int {\bf get\-Channel\-Number} () const \label{classmarlintpc_1_1ADCPulse_ab13b87a5aad302065e6acfc08732215b}

\begin{DoxyCompactList}\small\item\em Returns the channel number. \end{DoxyCompactList}\item 
virtual int {\bf get\-Module\-I\-D} () const \label{classmarlintpc_1_1ADCPulse_a24a2d40a9c97777a5d45674c876a7b18}

\begin{DoxyCompactList}\small\item\em Returns the module I\-D. \end{DoxyCompactList}\item 
virtual void {\bf clear} (int new\-Channel\-Number, int mod\-I\-D=0, int noise\-Switch=0, double noise\-Level=0.\-0, double noise\-Width=0.\-0, double noise\-Cutoff=4.\-0)\label{classmarlintpc_1_1ADCPulse_ab5f240dda2617db34f201c92bc8c129d}

\begin{DoxyCompactList}\small\item\em Clear the data vector, set start\-Bin to -\/1, set the new channel number, set random noise parameters. \end{DoxyCompactList}\item 
virtual void {\bf add} (double start\-Time, int n\-Electrons)=0
\begin{DoxyCompactList}\small\item\em Add signal from charge (n\-Electrons) arriving. \end{DoxyCompactList}\item 
virtual void {\bf set\-Jitter\-Values} (std\-::map$<$ int, double $>$ time\-Jitter)\label{classmarlintpc_1_1ADCPulse_a5e71302f29138ca03342dc26fe3eaa13}

\begin{DoxyCompactList}\small\item\em clock jitter values for an event \end{DoxyCompactList}\item 
virtual const std\-::vector\\*
$<$ float $>$ \& {\bf get\-Raw\-Data\-Vec} () const \label{classmarlintpc_1_1ADCPulse_a9db2e9bc358aeacae066f83f1191668f}

\begin{DoxyCompactList}\small\item\em Provides access to the raw data of the pulse. \end{DoxyCompactList}\item 
virtual std\-::list\\*
$<$ E\-V\-E\-N\-T\-::\-Tracker\-Raw\-Data $\ast$ $>$ {\bf get\-L\-C\-I\-O\-Raw\-Data} () const 
\begin{DoxyCompactList}\small\item\em Returns a vector of Tracker\-Raw\-Data objects to be stored in an lcio file. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::vector$<$ float $>$ {\bf \-\_\-raw\-Data}\label{classmarlintpc_1_1ADCPulse_abdc6ee9c2fe52dd6a5245ff19baaca94}

\begin{DoxyCompactList}\small\item\em The raw data of the pulse, still in floats to avoid rounding errors. \end{DoxyCompactList}\item 
double {\bf \-\_\-frequency\-G\-Hz}\label{classmarlintpc_1_1ADCPulse_af47922f68b64c8569eaccc3fdd5955da}

\begin{DoxyCompactList}\small\item\em Readout frequency of the A\-D\-C in G\-Hz. \end{DoxyCompactList}\item 
int {\bf \-\_\-\-A\-D\-C\-Max\-Value}\label{classmarlintpc_1_1ADCPulse_adf38627473d4c9f37c5862c716b5b3fd}

\begin{DoxyCompactList}\small\item\em The maximum of the dynamic range in A\-D\-C counts. \end{DoxyCompactList}\item 
int {\bf \-\_\-start\-Bin}\label{classmarlintpc_1_1ADCPulse_a2287c53c0184faf6a161c1c818ce32df}

\begin{DoxyCompactList}\small\item\em The bin number of the first entry in the data vector. \end{DoxyCompactList}\item 
int {\bf \-\_\-channel\-Number}\label{classmarlintpc_1_1ADCPulse_a4b80ff9a18882bc3b17041aad9ff5a5d}

\begin{DoxyCompactList}\small\item\em The channel in which the pulse is simulated. \end{DoxyCompactList}\item 
int {\bfseries \-\_\-module\-I\-D}\label{classmarlintpc_1_1ADCPulse_a14264f02551dc1418efcbbcd758ba95c}

\item 
double {\bf \-\_\-\-A\-D\-C\-Charge\-Factor}
\begin{DoxyCompactList}\small\item\em The factor to multiply the number of electron per bin to obtain. \end{DoxyCompactList}\item 
float {\bf \-\_\-\-A\-D\-C\-Threshold}\label{classmarlintpc_1_1ADCPulse_aeefbc92ed6510140f43c9f078fe83059}

\begin{DoxyCompactList}\small\item\em The threshold of the A\-D\-C (in A\-D\-C counts) \end{DoxyCompactList}\item 
bool {\bf \-\_\-add\-Noise}\label{classmarlintpc_1_1ADCPulse_aa626071a2cab9f8b6818af28f6b7786e}

\begin{DoxyCompactList}\small\item\em whether to add noise to the A\-D\-C signal or not \end{DoxyCompactList}\item 
double {\bf \-\_\-pad\-Noise}\label{classmarlintpc_1_1ADCPulse_adfc380f6b2ddcf16b699c97a4750e497}

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

\begin{DoxyCompactList}\small\item\em if clock jitter should be used \end{DoxyCompactList}\item 
std\-::map$<$ int, double $>$ {\bf \-\_\-time\-Jitter}\label{classmarlintpc_1_1ADCPulse_ac77e5309c7061fb816c5f3b861012b46}

\begin{DoxyCompactList}\small\item\em clock jitter\-: map of z\-Bin, jitter \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
A base class interface which holds the raw data of the pulse and represents the A\-D\-C and its shaping amplifier. 

Implementations of specific electronics is done e.\-g. in \doxyref{Gaussian\-A\-D\-C\-Pulse}{p.}{classmarlintpc_1_1GaussianADCPulse} and \doxyref{A\-L\-T\-R\-O\-A\-D\-C\-Pulse}{p.}{classmarlintpc_1_1ALTROADCPulse} 

\subsection{Member Function Documentation}
\index{marlintpc\-::\-A\-D\-C\-Pulse@{marlintpc\-::\-A\-D\-C\-Pulse}!add@{add}}
\index{add@{add}!marlintpc::ADCPulse@{marlintpc\-::\-A\-D\-C\-Pulse}}
\subsubsection[{add}]{\setlength{\rightskip}{0pt plus 5cm}virtual void marlintpc\-::\-A\-D\-C\-Pulse\-::add (
\begin{DoxyParamCaption}
\item[{double}]{start\-Time, }
\item[{int}]{n\-Electrons}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [pure virtual]}}\label{classmarlintpc_1_1ADCPulse_aec84a44253426af2320fd23dcf31e86e}


Add signal from charge (n\-Electrons) arriving. 

at {\ttfamily start\-Time} to the pulse 

Implemented in {\bf marlintpc\-::\-Gaussian\-A\-D\-C\-Pulse} \doxyref{}{p.}{classmarlintpc_1_1GaussianADCPulse_af9794317d8d1ff9731f11e584190eb84}, and {\bf marlintpc\-::\-A\-L\-T\-R\-O\-A\-D\-C\-Pulse} \doxyref{}{p.}{classmarlintpc_1_1ALTROADCPulse_aa2e649f3b0a0454dff305f2ea9c9b427}.



Referenced by marlintpc\-::\-T\-P\-C\-Electronics\-Processor\-::process\-Event().

\index{marlintpc\-::\-A\-D\-C\-Pulse@{marlintpc\-::\-A\-D\-C\-Pulse}!get\-L\-C\-I\-O\-Raw\-Data@{get\-L\-C\-I\-O\-Raw\-Data}}
\index{get\-L\-C\-I\-O\-Raw\-Data@{get\-L\-C\-I\-O\-Raw\-Data}!marlintpc::ADCPulse@{marlintpc\-::\-A\-D\-C\-Pulse}}
\subsubsection[{get\-L\-C\-I\-O\-Raw\-Data}]{\setlength{\rightskip}{0pt plus 5cm}std\-::list$<$ E\-V\-E\-N\-T\-::\-Tracker\-Raw\-Data $\ast$ $>$ marlintpc\-::\-A\-D\-C\-Pulse\-::get\-L\-C\-I\-O\-Raw\-Data (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classmarlintpc_1_1ADCPulse_af91632c9e109e87d1a7e19442d76a36b}


Returns a vector of Tracker\-Raw\-Data objects to be stored in an lcio file. 

With the pointer to the object the calling code also gets the ownership. When converting to Tracker\-Raw\-Data all samples below the A\-D\-C threshold are removed and the signal is split into several pulses, so there are no empty samples. In addition, random noise can be added to the signal 

References \-\_\-\-A\-D\-C\-Max\-Value, \-\_\-\-A\-D\-C\-Threshold, \-\_\-add\-Noise, \-\_\-channel\-Number, \-\_\-pad\-Noise, \-\_\-raw\-Data, and \-\_\-start\-Bin.



Referenced by marlintpc\-::\-T\-P\-C\-Electronics\-Processor\-::process\-Event().

\index{marlintpc\-::\-A\-D\-C\-Pulse@{marlintpc\-::\-A\-D\-C\-Pulse}!get\-Start\-Bin@{get\-Start\-Bin}}
\index{get\-Start\-Bin@{get\-Start\-Bin}!marlintpc::ADCPulse@{marlintpc\-::\-A\-D\-C\-Pulse}}
\subsubsection[{get\-Start\-Bin}]{\setlength{\rightskip}{0pt plus 5cm}virtual int marlintpc\-::\-A\-D\-C\-Pulse\-::get\-Start\-Bin (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}\label{classmarlintpc_1_1ADCPulse_a693db6407924e1e439a2466ed7705de9}
$<$ Returns the bin number of the first data bin in the pulse 

References \-\_\-start\-Bin.



Referenced by marlintpc\-::\-T\-P\-C\-Electronics\-Processor\-::process\-Event().



\subsection{Member Data Documentation}
\index{marlintpc\-::\-A\-D\-C\-Pulse@{marlintpc\-::\-A\-D\-C\-Pulse}!\-\_\-\-A\-D\-C\-Charge\-Factor@{\-\_\-\-A\-D\-C\-Charge\-Factor}}
\index{\-\_\-\-A\-D\-C\-Charge\-Factor@{\-\_\-\-A\-D\-C\-Charge\-Factor}!marlintpc::ADCPulse@{marlintpc\-::\-A\-D\-C\-Pulse}}
\subsubsection[{\-\_\-\-A\-D\-C\-Charge\-Factor}]{\setlength{\rightskip}{0pt plus 5cm}double marlintpc\-::\-A\-D\-C\-Pulse\-::\-\_\-\-A\-D\-C\-Charge\-Factor\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1ADCPulse_a1e3ab5ad8e7d9685173b8e73b56deeb1}


The factor to multiply the number of electron per bin to obtain. 

the A\-D\-C counts. This is the calibration factor between the number of primary electrons and the sum of A\-D\-C counts the pulse. It's the same as the factor between the A\-D\-C value of the peak maximum and the number of electrons in the maximum bin 

Referenced by marlintpc\-::\-A\-L\-T\-R\-O\-A\-D\-C\-Pulse\-::add(), marlintpc\-::\-Gaussian\-A\-D\-C\-Pulse\-::add(), marlintpc\-::\-A\-L\-T\-R\-O\-A\-D\-C\-Pulse\-::\-A\-L\-T\-R\-O\-A\-D\-C\-Pulse(), and marlintpc\-::\-Gaussian\-A\-D\-C\-Pulse\-::\-Gaussian\-A\-D\-C\-Pulse().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
A\-D\-C\-Pulse.\-h\item 
A\-D\-C\-Pulse.\-cc\end{DoxyCompactItemize}
