\section{marlintpc\-:\-:A\-L\-T\-R\-O\-A\-D\-C\-Pulse Class Reference}
\label{classmarlintpc_1_1ALTROADCPulse}\index{marlintpc\-::\-A\-L\-T\-R\-O\-A\-D\-C\-Pulse@{marlintpc\-::\-A\-L\-T\-R\-O\-A\-D\-C\-Pulse}}


Implementation of the A\-L\-T\-R\-O electronics shaping and A\-D\-C.  




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

Inheritance diagram for marlintpc\-:\-:A\-L\-T\-R\-O\-A\-D\-C\-Pulse\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classmarlintpc_1_1ALTROADCPulse}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf A\-L\-T\-R\-O\-A\-D\-C\-Pulse} (double frequency\-M\-Hz, double peaking\-Time, double n\-Electrons\-Dynamic\-Range, int A\-D\-C\-Max\-Value, int threshold)
\begin{DoxyCompactList}\small\item\em The constructor. \end{DoxyCompactList}\item 
void {\bf add} (double start\-Time, int n\-Electrons)
\begin{DoxyCompactList}\small\item\em Add signal from charge (n\-Electrons) arriving. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
double {\bf \-\_\-gamma4} (double x, double A\-D\-C\-Charge\-Value, double start\-Time)\label{classmarlintpc_1_1ALTROADCPulse_a1b3bacd4c938324e90a0ff1c84dcd387}

\begin{DoxyCompactList}\small\item\em gamma4 shaping function \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
double {\bf \-\_\-g4\-Par1}\label{classmarlintpc_1_1ALTROADCPulse_ab24f7deb5fe59eb24e19d2267c1141ae}

\begin{DoxyCompactList}\small\item\em shaping function order \end{DoxyCompactList}\item 
double {\bf \-\_\-g4exp\-Par1}\label{classmarlintpc_1_1ALTROADCPulse_aa861b0c4e3afe3e3878b3d5b4cce8098}

\begin{DoxyCompactList}\small\item\em helper variable to avoid recalculation\-: exp(shaping function order) \end{DoxyCompactList}\item 
double {\bf \-\_\-peaking\-Time}\label{classmarlintpc_1_1ALTROADCPulse_add02b4bb932e79f09fe60d9fd5be5fcd}

\begin{DoxyCompactList}\small\item\em Peaking time A\-L\-T\-R\-O electronics in ns(time from start of pulse to maximum) \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Implementation of the A\-L\-T\-R\-O electronics shaping and A\-D\-C. 

the A\-D\-C and its shaping amplifier.

The shaping is implemented with a Gamma4 function. The height is given by the number of electrons.

Charge arriving at different times can be added to one pulse. However, there are two limitations to get proper results\-: \begin{DoxyItemize}
\item The (start) time of the new charge must not be later than the end of the charge already stored in the pulse. In this case the pulses would in reality be separated. The calling code has to check this, otherwise you will get an exception. \item The (start) time of the new charge must not be earlier than the start time of the existing pulse. Although the pulses might overlap in reality there is the problem that the data vector would have to be reorganised. The calling code can simply avoid this by sorting the charges by time before adding them. Like this it is also ensured that the overlap detection is working (correct end time of all charges that have arrived before).\end{DoxyItemize}
For convenience this class also holds the channel number. 

\subsection{Constructor \& Destructor Documentation}
\index{marlintpc\-::\-A\-L\-T\-R\-O\-A\-D\-C\-Pulse@{marlintpc\-::\-A\-L\-T\-R\-O\-A\-D\-C\-Pulse}!A\-L\-T\-R\-O\-A\-D\-C\-Pulse@{A\-L\-T\-R\-O\-A\-D\-C\-Pulse}}
\index{A\-L\-T\-R\-O\-A\-D\-C\-Pulse@{A\-L\-T\-R\-O\-A\-D\-C\-Pulse}!marlintpc::ALTROADCPulse@{marlintpc\-::\-A\-L\-T\-R\-O\-A\-D\-C\-Pulse}}
\subsubsection[{A\-L\-T\-R\-O\-A\-D\-C\-Pulse}]{\setlength{\rightskip}{0pt plus 5cm}marlintpc\-::\-A\-L\-T\-R\-O\-A\-D\-C\-Pulse\-::\-A\-L\-T\-R\-O\-A\-D\-C\-Pulse (
\begin{DoxyParamCaption}
\item[{double}]{frequency\-M\-Hz, }
\item[{double}]{peaking\-Time, }
\item[{double}]{n\-Electrons\-Dynamic\-Range, }
\item[{int}]{A\-D\-C\-Max\-Value, }
\item[{int}]{threshold}
\end{DoxyParamCaption}
)}\label{classmarlintpc_1_1ALTROADCPulse_a17653e2db22cb9d455416996dab78cc0}


The constructor. 


\begin{DoxyParams}{Parameters}
{\em frequency} & A\-D\-C readout frequency in M\-Hz \\
\hline
{\em peaking\-Time} & Peaking time A\-L\-T\-R\-O electronics in ns (time from start of pulse to maximum) \\
\hline
{\em n\-Electrons\-Dynamic\-Range} & The number of electrons which correspond to the dynamic range of the A\-D\-C (A\-D\-C\-Max\-Value) \\
\hline
{\em A\-D\-C\-Max\-Value} & The dynamic range of the A\-D\-C in A\-D\-C counts \\
\hline
{\em threshold} & Minimum number of A\-D\-C counts for a sample to be accepted.\par
 {\bfseries Attention\-:} A threshold of 0 turns off part of the zero suppression. 1 is the smallest reasonable value.\par
 The parameter intentionally is an int. It will be converted to float internally. \\
\hline
\end{DoxyParams}


References marlintpc\-::\-A\-D\-C\-Pulse\-::\-\_\-\-A\-D\-C\-Charge\-Factor, marlintpc\-::\-A\-D\-C\-Pulse\-::\-\_\-\-A\-D\-C\-Max\-Value, \-\_\-g4exp\-Par1, \-\_\-g4\-Par1, and marlintpc\-::\-A\-D\-C\-Pulse\-::\-\_\-use\-Jitter.



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


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

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

Implements {\bf marlintpc\-::\-A\-D\-C\-Pulse} \doxyref{}{p.}{classmarlintpc_1_1ADCPulse_aec84a44253426af2320fd23dcf31e86e}.



References marlintpc\-::\-A\-D\-C\-Pulse\-::\-\_\-\-A\-D\-C\-Charge\-Factor, marlintpc\-::\-A\-D\-C\-Pulse\-::\-\_\-frequency\-G\-Hz, \-\_\-gamma4(), \-\_\-peaking\-Time, marlintpc\-::\-A\-D\-C\-Pulse\-::\-\_\-raw\-Data, marlintpc\-::\-A\-D\-C\-Pulse\-::\-\_\-start\-Bin, marlintpc\-::\-A\-D\-C\-Pulse\-::\-\_\-time\-Jitter, marlintpc\-::\-A\-D\-C\-Pulse\-::\-\_\-use\-Jitter, and marlintpc\-::\-A\-D\-C\-Pulse\-::get\-End\-Time().



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