\section{marlintpc\-:\-:Pulse\-Finder\-Processor Class Reference}
\label{classmarlintpc_1_1PulseFinderProcessor}\index{marlintpc\-::\-Pulse\-Finder\-Processor@{marlintpc\-::\-Pulse\-Finder\-Processor}}


This processor creates lcio\-::\-Tracker\-Pulse objects from lcio\-::\-Tracker\-Data.  




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

Inheritance diagram for marlintpc\-:\-:Pulse\-Finder\-Processor\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classmarlintpc_1_1PulseFinderProcessor}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual Processor $\ast$ {\bfseries new\-Processor} ()\label{classmarlintpc_1_1PulseFinderProcessor_a6904ec05a5b9295e20da409338febe62}

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

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

\item 
virtual void {\bfseries process\-Event} (lcio\-::\-L\-C\-Event $\ast$evt)\label{classmarlintpc_1_1PulseFinderProcessor_a924fe4445b65d9c423e71a7266dcdb36}

\item 
virtual void {\bfseries check} (lcio\-::\-L\-C\-Event $\ast$evt)\label{classmarlintpc_1_1PulseFinderProcessor_ada448d6497345d039035026bfd8a82d5}

\item 
virtual void {\bfseries end} ()\label{classmarlintpc_1_1PulseFinderProcessor_a71475038713b0b459d59c64a7baf96f0}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::string {\bf \-\_\-input\-Col\-Name}\label{classmarlintpc_1_1PulseFinderProcessor_a4e908f4359cd690c803ac24c37c9a866}

\begin{DoxyCompactList}\small\item\em name of the collection, where input data are stored \end{DoxyCompactList}\item 
std\-::string {\bf \-\_\-output\-Data\-Col\-Name}\label{classmarlintpc_1_1PulseFinderProcessor_ae1db6943a6df82fb62f99c07d6b76afa}

\begin{DoxyCompactList}\small\item\em name of the collection, where Tracker\-Data are stored \end{DoxyCompactList}\item 
std\-::string {\bf \-\_\-output\-Pulse\-Col\-Name}\label{classmarlintpc_1_1PulseFinderProcessor_a6ce843a59840a39f722e5d46172902fc}

\begin{DoxyCompactList}\small\item\em name of the collection, where Tracker\-Pulse are stored \end{DoxyCompactList}\item 
std\-::string {\bf \-\_\-pedestal\-Col\-Name}\label{classmarlintpc_1_1PulseFinderProcessor_a62c1667d4728016cbfb06b25cfea1b73}

\begin{DoxyCompactList}\small\item\em the name of the pedestal collection \end{DoxyCompactList}\item 
std\-::string {\bf \-\_\-electr\-Para\-Obj\-Name}\label{classmarlintpc_1_1PulseFinderProcessor_a02f462afecd1ec694cb5416a3b3fe0a9}

\begin{DoxyCompactList}\small\item\em Name of the conditions object in which the parameters of the read out electronics is stored. \end{DoxyCompactList}\item 
std\-::string {\bf \-\_\-electr\-Para\-Col\-Name}\label{classmarlintpc_1_1PulseFinderProcessor_af3489c134e86dac246cba2f7a90c1171}

\begin{DoxyCompactList}\small\item\em Name of the conditions collection in which the parameters of the read out electronics is stored. \end{DoxyCompactList}\item 
bool {\bf \-\_\-output\-Is\-Persistent}
\begin{DoxyCompactList}\small\item\em Set this flag to use the amplitude (maximum bin value) of the pulse as the charge. \end{DoxyCompactList}\item 
bool {\bf \-\_\-force\-Spectrum\-Save}\label{classmarlintpc_1_1PulseFinderProcessor_a3f1d3a9bba8903083f0b2e85b42210b9}

\begin{DoxyCompactList}\small\item\em if not 0 the A\-D\-C spectrum will be saved for all pulses \end{DoxyCompactList}\item 
bool {\bf \-\_\-switch\-Off\-Splitting}\label{classmarlintpc_1_1PulseFinderProcessor_a42cde68ddc727a74e491545b944c6bfd}

\begin{DoxyCompactList}\small\item\em if not 0 pulses will not be split \end{DoxyCompactList}\item 
int {\bf \-\_\-charge\-Calculation\-Mode}\label{classmarlintpc_1_1PulseFinderProcessor_a9c6208b97f4e326c3dcf63bc949bc9a1}

\begin{DoxyCompactList}\small\item\em the mode to calulate the charge \end{DoxyCompactList}\item 
int {\bf \-\_\-time\-Calculation\-Mode}\label{classmarlintpc_1_1PulseFinderProcessor_a7324abf4d31008d6952c009945c8d426}

\begin{DoxyCompactList}\small\item\em the mode to calulate the time \end{DoxyCompactList}\item 
double {\bf \-\_\-time\-Calculation\-Parameter}\label{classmarlintpc_1_1PulseFinderProcessor_a80d748e6309e14117f7668fcff309631}

\begin{DoxyCompactList}\small\item\em parameter for time methods (different meaning for different methods) \end{DoxyCompactList}\item 
float {\bf \-\_\-pulse\-Start\-Pedestal\-Width\-Factor}\label{classmarlintpc_1_1PulseFinderProcessor_a1081b5c9bd281ae8b215f8c75d3698cd}

\begin{DoxyCompactList}\small\item\em factor to calculate the start threshold \end{DoxyCompactList}\item 
float {\bf \-\_\-pulse\-End\-Pedestal\-Width\-Factor}\label{classmarlintpc_1_1PulseFinderProcessor_af1ed3b9c8bf923ebc8ab9967f8a9fd92}

\begin{DoxyCompactList}\small\item\em factor to calculate the start threshold \end{DoxyCompactList}\item 
float {\bf \-\_\-minimum\-Pulse\-Height}\label{classmarlintpc_1_1PulseFinderProcessor_a453b822b88de784566584c78fb89f676}

\begin{DoxyCompactList}\small\item\em minimal value for the maximum adc value \end{DoxyCompactList}\item 
int {\bf \-\_\-minimum\-Pulse\-Length}\label{classmarlintpc_1_1PulseFinderProcessor_ae2b12f6f38b616dd5c369b149709c263}

\begin{DoxyCompactList}\small\item\em minimal length for a pulse in number of time bins \end{DoxyCompactList}\item 
int {\bf \-\_\-save\-N\-Bins\-Before\-Start}\label{classmarlintpc_1_1PulseFinderProcessor_aee9c9102fb6c878fd0598c377a2b5b20}

\begin{DoxyCompactList}\small\item\em \subsection*{of bins stored before the start threshold}\end{DoxyCompactList}\item 
int {\bf \-\_\-save\-N\-Bins\-After\-End}\label{classmarlintpc_1_1PulseFinderProcessor_adbc01e52d20012ef164f5b1552c9549f}

\begin{DoxyCompactList}\small\item\em \subsection*{of bins stored after the end threshold}\end{DoxyCompactList}\item 
float {\bf \-\_\-noise\-Value\-Pedestal\-Width\-Factor}\label{classmarlintpc_1_1PulseFinderProcessor_a7cde8b13b08da6514ae8da5de904d16e}

\begin{DoxyCompactList}\small\item\em factor to calculate the noise cut \end{DoxyCompactList}\item 
float {\bf \-\_\-maximum\-A\-D\-C\-Value\-Override}\label{classmarlintpc_1_1PulseFinderProcessor_a3c9b4acdd8b24eabd2a51a96b7612fcb}

\begin{DoxyCompactList}\small\item\em maximum adc value, needed to determine if a pulse is maxed out \end{DoxyCompactList}\item 
float {\bf \-\_\-readout\-Frequency\-Override}
\begin{DoxyCompactList}\small\item\em The readout frequency of every readout group (in M\-Hz). \end{DoxyCompactList}\item 
float {\bf \-\_\-pedestal\-Value\-Override}
\begin{DoxyCompactList}\small\item\em The pedestal value to be used for every hardware channel in every readout group. \end{DoxyCompactList}\item 
float {\bf \-\_\-pedestal\-Width\-Override}
\begin{DoxyCompactList}\small\item\em The pedestal width to be used for every hardware channel in every readout group. \end{DoxyCompactList}\item 
bool {\bf \-\_\-is\-Pedestal\-Subtracted\-Override}
\begin{DoxyCompactList}\small\item\em Sets, if the data is already pedestal subtracted in the read-\/out electronics. \end{DoxyCompactList}\item 
int {\bf \-\_\-polarity\-Override}\label{classmarlintpc_1_1PulseFinderProcessor_a4a2a70a359d8c86166dd4667133d5c9d}

\begin{DoxyCompactList}\small\item\em the polarity of all readout groups, overrides L\-C\-C\-D \end{DoxyCompactList}\item 
int {\bf \-\_\-max\-Plateau\-Length}
\begin{DoxyCompactList}\small\item\em The maximum length of a plateau within a pulse in time bins. \end{DoxyCompactList}\item 
{\bf Pulse\-Finder} $\ast$ {\bf \-\_\-pulse\-Finder}\label{classmarlintpc_1_1PulseFinderProcessor_aa9c5cf10da59c3a95c9ee898ae113fd9}

\begin{DoxyCompactList}\small\item\em The instance of the pulse finder object. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This processor creates lcio\-::\-Tracker\-Pulse objects from lcio\-::\-Tracker\-Data. 

It is the modular version of the \doxyref{Pulse\-Finder\-Processor}{p.}{classmarlintpc_1_1PulseFinderProcessor} in the sense that the functionality has been extracted into a separate class (\doxyref{Pulse\-Finder}{p.}{classmarlintpc_1_1PulseFinder}) to allow unit testing. See the documentation of \doxyref{Pulse\-Finder}{p.}{classmarlintpc_1_1PulseFinder} for the description of the algorithm.

\subparagraph*{Input -\/ Prerequisites}

Collection of Tracker\-Data (can be zero supressed and/ or pedestal subtracted)

\subparagraph*{Output}

\begin{DoxyItemize}
\item Collection of Tracker\-Pulses \item Collection of Tracker\-Data which belong to a pulse. As the pulses might have been split these Tracker\-Data are not identical to the input collection.\end{DoxyItemize}

\begin{DoxyParams}{Parameters}
{\em Input\-Collection\-Name\-:string} & Name of the input Tracker\-Data collection \\
\hline
{\em Output\-Tracker\-Pulse\-Collection\-Name\-:string} & Name of the output Tracker\-Pulse collection \\
\hline
{\em Output\-Tracker\-Data\-Collection\-Name\-:string} & Name of the output Tracker\-Data collection \\
\hline
{\em Write\-Output\-To\-Storage\-:bool} & Output collection will be written if set to true (which is the default) \\
\hline
{\em Force\-Spectrum\-Save\-:bool} & If true the A\-D\-C spectrum will be stored for all pulses, otherwise spectra are only stored if the quality word is not 0 (default\-: true) \\
\hline
{\em Switch\-Off\-Splitting\-:bool} & If true pulses will not be splitted, e.\-g. if double pulse is detected \\
\hline
{\em Pulse\-Start\-Pedestal\-Width\-Factor\-:float} & A pulse starts if the A\-D\-C value is this factor times width of the pedestal (default\-: \-: 7.\-0) \\
\hline
{\em Pulse\-End\-Pedestal\-Width\-Factor\-:float} & The pulse ends if the A\-D\-C value drops below this factor timed the width of the pedestal (default\-: 3.\-0) \\
\hline
{\em Minimum\-Pulse\-Height\-:float} & To accept a pulse its maximal A\-D\-C entry must exceed this cut (default\-: 12.\-0 A\-D\-C counts) \\
\hline
{\em Minumum\-Pulse\-Length\-:int} & To accept a pulse its length in time bins must be larger than this value without Start/\-End bins (default\-: 5) \\
\hline
{\em Save\-N\-Bins\-Before\-Start\-:int} & \# bins saved before the start bin (exept there is another pulse, default\-:2) \\
\hline
{\em Save\-N\-Bins\-After\-Start\-:int} & \# bins saved after the start bin (exept there is another pulse, default 8) \\
\hline
{\em Noise\-Value\-Pedestal\-Width\-Factor\-:float} & The noise (cut) value is calculated as this factor times pedestal width (default\-: 3.\-0) \\
\hline
{\em Electronics\-Parameter\-Object\-Name\-:string} & Name of the conditions object in which the parameters of the read out electronics is stored \\
\hline
{\em Electronics\-Parameters\-Collection\-Name\-:string} & Name of the conditions collection in which the parameters of the read out electronics is stored \\
\hline
{\em Pedestal\-Collection\-Name\-:string} & Name of the conditions collection in which the pedestals are stored \\
\hline
{\em Time\-Calculation\-Mode\-:int} & Specifies the mode for time calculation. Valid values\-:\par
 I\-N\-F\-L\-E\-X\-I\-O\-N\-\_\-\-P\-O\-I\-N\-T = 0 (default) \par
 F\-I\-T\-\_\-\-P\-A\-R\-A\-B\-O\-L\-A = 1 \par
 C\-E\-N\-T\-R\-E\-\_\-\-O\-F\-\_\-\-G\-R\-A\-V\-I\-T\-Y = 2 \par
 F\-I\-R\-S\-T\-\_\-\-A\-B\-O\-V\-E\-\_\-\-T\-H\-R\-E\-S\-H\-O\-L\-D = 3 \par
 A\-T\-\_\-\-M\-A\-X\-I\-M\-U\-M = 4 \par
 C\-O\-N\-S\-T\-A\-N\-T\-\_\-\-F\-R\-A\-C\-T\-I\-O\-N = 5 \par
 G\-A\-M\-M\-A\-\_\-\-F\-I\-T = 6\par
 C\-O\-G\-\_\-\-A\-T\-M\-A\-X = 7\par
\\
\hline
{\em Charge\-Calculation\-Mode\-:int} & Specifies the mode for charge calculation. Valid values\-:\par
 S\-U\-M\-Q = 0 (default) \par
 F\-I\-T\-\_\-\-P\-A\-R\-A\-B\-O\-L\-A = 1 \par
 M\-A\-X\-Q = 2 \\
\hline
{\em Pedestal\-Value\-Override} & {\ttfamily O\-P\-T\-I\-O\-N\-A\-L\-:} Manually set the pedestal value (in A\-D\-C counts) \\
\hline
{\em Pedestal\-Width\-Override} & {\ttfamily O\-P\-T\-I\-O\-N\-A\-L\-:} Manually set value of the pedestal width (in A\-D\-C coutns) \\
\hline
{\em Maximum\-A\-D\-C\-Value\-Override} & {\ttfamily O\-P\-T\-I\-O\-N\-A\-L\-:} Manually set value of the maximum adc value \\
\hline
{\em Is\-Pedestal\-Subtracted\-Override} & {\ttfamily O\-P\-T\-I\-O\-N\-A\-L\-:} Manually set whether the pedestal has been subtracted (true or false) \\
\hline
{\em Signal\-Polarity\-Override} & {\ttfamily O\-P\-T\-I\-O\-N\-A\-L\-:} Manually set value of the electronics polarity (+-\/1) \\
\hline
{\em Readout\-Frequency\-Override} & {\ttfamily O\-P\-T\-I\-O\-N\-A\-L\-:} Manually set value of the readout frequency (in M\-Hz) \\
\hline
{\em Plateau\-Length\-Cut\-Off} & {\ttfamily O\-P\-T\-I\-O\-N\-A\-L\-:} The maximum length of a plateau within a pulse in time bins. This used to cut off strange pulses that go into a plateau.\\
\hline
\end{DoxyParams}
As the interpretation of the data changes with the charge calculation mode (all charge or max charge) or the time calculation mode (different offsets), the parameters {\ttfamily Time\-Calculation\-Mode} and {\ttfamily Charge\-Calculation\-Mode} are stored as collection parameters of the pulse collection (in addition to being written to the run header together with all other processor parameters).

\begin{DoxyAttention}{Attention}
The following parameters have been renamed\-: \begin{DoxyItemize}
\item Is\-Pedestal\-Substracted\-Override (Was a typo, there should ne no 's' after the 'b') \item Pulse\-Start\-Threshold (Is not a threshold, new name is Pulse\-Start\-Pedestal\-Width\-Factor) \item Pulse\-End\-Threshold (Is not a threshold, new name is Pulse\-End\-Pedestal\-Width\-Factor) \item Pedestal\-Width\-Scale (New name is Noise\-Value\-Pedestal\-Width\-Factor)\end{DoxyItemize}


The following parameters have been replaced (versions with and without question mark)\-: \begin{DoxyItemize}
\item Use\-Parabolic\-Fit\-Amplitude\-As\-Charge? (Use Charge\-Calculation\-Mode instead) \item Use\-Parabolic\-Fit\-Amplitude\-As\-Charge (Use Charge\-Calculation\-Mode instead) \item Use\-Parabolic\-Fit\-Max\-As\-Time? (Use Time\-Calculation\-Mode instead) \item Use\-Parabolic\-Fit\-Max\-As\-Time (Use Time\-Calculation\-Mode instead)\end{DoxyItemize}
The processor will not run if any of the old parameters is set in the steering file. This avoids the old parameter being ignored and silently being replaced by the default of the new parameter. This would lead to unwanted behaviour and would be very difficult to identify. {\bfseries You can use the script tools/scripts/update\-Pulse\-Finder\-Parameters.\-sh to automatically update your steering files.}.

The Readout\-Frequency\-Override value has changed from Hz to M\-Hz to be consistent with the conditions data. The processor will refuse to work if values above 1e5 (50 G\-Hz) are detected in case old values in Hz have not been updated.
\end{DoxyAttention}
\begin{DoxyAuthor}{Author}
Ch. Rosemann, D\-E\-S\-Y (original author) 

Martin Killenberg 
\end{DoxyAuthor}


\subsection{Member Data Documentation}
\index{marlintpc\-::\-Pulse\-Finder\-Processor@{marlintpc\-::\-Pulse\-Finder\-Processor}!\-\_\-is\-Pedestal\-Subtracted\-Override@{\-\_\-is\-Pedestal\-Subtracted\-Override}}
\index{\-\_\-is\-Pedestal\-Subtracted\-Override@{\-\_\-is\-Pedestal\-Subtracted\-Override}!marlintpc::PulseFinderProcessor@{marlintpc\-::\-Pulse\-Finder\-Processor}}
\subsubsection[{\-\_\-is\-Pedestal\-Subtracted\-Override}]{\setlength{\rightskip}{0pt plus 5cm}bool marlintpc\-::\-Pulse\-Finder\-Processor\-::\-\_\-is\-Pedestal\-Subtracted\-Override\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1PulseFinderProcessor_a9ec302c57f35d49cd5d70d0259fe71dc}


Sets, if the data is already pedestal subtracted in the read-\/out electronics. 

This overrides any information provided by L\-C\-C\-D \index{marlintpc\-::\-Pulse\-Finder\-Processor@{marlintpc\-::\-Pulse\-Finder\-Processor}!\-\_\-max\-Plateau\-Length@{\-\_\-max\-Plateau\-Length}}
\index{\-\_\-max\-Plateau\-Length@{\-\_\-max\-Plateau\-Length}!marlintpc::PulseFinderProcessor@{marlintpc\-::\-Pulse\-Finder\-Processor}}
\subsubsection[{\-\_\-max\-Plateau\-Length}]{\setlength{\rightskip}{0pt plus 5cm}int marlintpc\-::\-Pulse\-Finder\-Processor\-::\-\_\-max\-Plateau\-Length\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1PulseFinderProcessor_a5e3f9c297f124a6aec3be4913d287aa1}


The maximum length of a plateau within a pulse in time bins. 

This used to cut off strange pulses that go into a plateau. \index{marlintpc\-::\-Pulse\-Finder\-Processor@{marlintpc\-::\-Pulse\-Finder\-Processor}!\-\_\-output\-Is\-Persistent@{\-\_\-output\-Is\-Persistent}}
\index{\-\_\-output\-Is\-Persistent@{\-\_\-output\-Is\-Persistent}!marlintpc::PulseFinderProcessor@{marlintpc\-::\-Pulse\-Finder\-Processor}}
\subsubsection[{\-\_\-output\-Is\-Persistent}]{\setlength{\rightskip}{0pt plus 5cm}bool marlintpc\-::\-Pulse\-Finder\-Processor\-::\-\_\-output\-Is\-Persistent\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1PulseFinderProcessor_a08586e3b565151891b9d97761ceae1e1}


Set this flag to use the amplitude (maximum bin value) of the pulse as the charge. 

set the persistency flag of the output collection \index{marlintpc\-::\-Pulse\-Finder\-Processor@{marlintpc\-::\-Pulse\-Finder\-Processor}!\-\_\-pedestal\-Value\-Override@{\-\_\-pedestal\-Value\-Override}}
\index{\-\_\-pedestal\-Value\-Override@{\-\_\-pedestal\-Value\-Override}!marlintpc::PulseFinderProcessor@{marlintpc\-::\-Pulse\-Finder\-Processor}}
\subsubsection[{\-\_\-pedestal\-Value\-Override}]{\setlength{\rightskip}{0pt plus 5cm}float marlintpc\-::\-Pulse\-Finder\-Processor\-::\-\_\-pedestal\-Value\-Override\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1PulseFinderProcessor_a4ef273bd19e0df146fdad1c0ab1a4dea}


The pedestal value to be used for every hardware channel in every readout group. 

This overrides any information provided by L\-C\-C\-D \index{marlintpc\-::\-Pulse\-Finder\-Processor@{marlintpc\-::\-Pulse\-Finder\-Processor}!\-\_\-pedestal\-Width\-Override@{\-\_\-pedestal\-Width\-Override}}
\index{\-\_\-pedestal\-Width\-Override@{\-\_\-pedestal\-Width\-Override}!marlintpc::PulseFinderProcessor@{marlintpc\-::\-Pulse\-Finder\-Processor}}
\subsubsection[{\-\_\-pedestal\-Width\-Override}]{\setlength{\rightskip}{0pt plus 5cm}float marlintpc\-::\-Pulse\-Finder\-Processor\-::\-\_\-pedestal\-Width\-Override\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1PulseFinderProcessor_aeec4e58521b8d5da7fb2689255af5fee}


The pedestal width to be used for every hardware channel in every readout group. 

This overrides any information provided by L\-C\-C\-D \index{marlintpc\-::\-Pulse\-Finder\-Processor@{marlintpc\-::\-Pulse\-Finder\-Processor}!\-\_\-readout\-Frequency\-Override@{\-\_\-readout\-Frequency\-Override}}
\index{\-\_\-readout\-Frequency\-Override@{\-\_\-readout\-Frequency\-Override}!marlintpc::PulseFinderProcessor@{marlintpc\-::\-Pulse\-Finder\-Processor}}
\subsubsection[{\-\_\-readout\-Frequency\-Override}]{\setlength{\rightskip}{0pt plus 5cm}float marlintpc\-::\-Pulse\-Finder\-Processor\-::\-\_\-readout\-Frequency\-Override\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1PulseFinderProcessor_a6a413ab8f3cf2d2fddfb54bd129fdf2e}


The readout frequency of every readout group (in M\-Hz). 

This overrides any information provided by L\-C\-C\-D 

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