\section{marlintpc\-:\-:M\-M\-Scatter\-Processor Class Reference}
\label{classmarlintpc_1_1MMScatterProcessor}\index{marlintpc\-::\-M\-M\-Scatter\-Processor@{marlintpc\-::\-M\-M\-Scatter\-Processor}}


Basic overview\-:  




{\ttfamily \#include $<$M\-M\-Scatter\-Processor.\-h$>$}

Inheritance diagram for marlintpc\-:\-:M\-M\-Scatter\-Processor\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classmarlintpc_1_1MMScatterProcessor}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class {\bf P\-R\-F\-Fcn}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual Processor $\ast$ {\bfseries new\-Processor} ()\label{classmarlintpc_1_1MMScatterProcessor_aa59584a4864d6129cc1815753bf548cf}

\item 
virtual void {\bf init} ()
\item 
virtual void {\bfseries process\-Run\-Header} (E\-V\-E\-N\-T\-::\-L\-C\-Run\-Header $\ast$run)\label{classmarlintpc_1_1MMScatterProcessor_aafe9837491922e064e869d7f2222f4d2}

\item 
virtual void {\bfseries process\-Event} (E\-V\-E\-N\-T\-::\-L\-C\-Event $\ast$evt)\label{classmarlintpc_1_1MMScatterProcessor_a6e55e7627617c400792347cd45f4b17d}

\item 
virtual void {\bfseries check} (E\-V\-E\-N\-T\-::\-L\-C\-Event $\ast$evt)\label{classmarlintpc_1_1MMScatterProcessor_a512713ae324f713a54c3afa509de5c34}

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

\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static std\-::pair$<$ double, double $>$ {\bfseries calculate\-Track\-Position} (const gear\-::\-T\-P\-C\-Parameters \&, const I\-M\-P\-L\-::\-Track\-Impl $\ast$, int mod, int row)\label{classmarlintpc_1_1MMScatterProcessor_a855687e5fa61a123ef735295c407141b}

\item 
static std\-::pair$<$ double, double $>$ {\bfseries calculate\-Track\-Position} (const gear\-::\-T\-P\-C\-Parameters \&, double d0, double phi0, double omega, const float $\ast$ref, int mod, int row)\label{classmarlintpc_1_1MMScatterProcessor_ae2eb4afcebf1ee797ca9d5bb8f2f6cc2}

\item 
static std\-::pair$<$ double, double $>$ {\bfseries calculate\-Straight\-Track\-Position} (const gear\-::\-T\-P\-C\-Parameters \&, double d0, double phi0, const float $\ast$ref, int mod, int row)\label{classmarlintpc_1_1MMScatterProcessor_aae99e76bfa829db3fa8e933a969ee47c}

\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static std\-::vector$<$ double $>$ {\bfseries C\-A\-L\-I\-B\-\_\-\-P\-A\-R\-A\-M\-S}\label{classmarlintpc_1_1MMScatterProcessor_abe769680cc39e855016258cb6e5cded8}

\end{DoxyCompactItemize}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
typedef std\-::map$<$ int, \\*
std\-::map$<$ int, std\-::vector\\*
$<$ Tracker\-Pulse $\ast$ $>$ $>$ $>$ {\bfseries Sorted\-Pulse\-Map}\label{classmarlintpc_1_1MMScatterProcessor_a56bc9c6a919a3ffd9b811ea68e99e212}

\item 
typedef std\-::map$<$ std\-::pair\\*
$<$ int, int $>$, std\-::vector\\*
$<$ std\-::pair$<$ double, float $>$ $>$ $>$ {\bfseries Points\-Map}\label{classmarlintpc_1_1MMScatterProcessor_a8648c4507c63a67ef310dac0add42b9d}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void {\bf \-\_\-sort\-Pulses} (const E\-V\-E\-N\-T\-::\-Tracker\-Hit\-Vec \&, const gear\-::\-T\-P\-C\-Parameters \&, Sorted\-Pulse\-Map \&)
\item 
void {\bfseries \-\_\-fill\-Data} (const Sorted\-Pulse\-Map \&, const gear\-::\-T\-P\-C\-Parameters \&, const I\-M\-P\-L\-::\-Track\-Impl $\ast$, Points\-Map \&)\label{classmarlintpc_1_1MMScatterProcessor_a95379b18cd7448698059bed0ccce2084}

\item 
void {\bfseries calibrate} ()\label{classmarlintpc_1_1MMScatterProcessor_a58d7c7fc86f2901f2f05da45b5158028}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
lcio\-::\-String\-Vec {\bfseries \-\_\-input\-Col\-Names}\label{classmarlintpc_1_1MMScatterProcessor_ac29585e7e0b84fff1a93e087249bed4b}

\item 
bool {\bfseries \-\_\-fit\-P\-R\-F}\label{classmarlintpc_1_1MMScatterProcessor_ad2f017fae5afff3348de52a05f4f5a23}

\item 
bool {\bfseries \-\_\-row\-Dep}\label{classmarlintpc_1_1MMScatterProcessor_a75525e7ce3b53b3d95533acb0847c679}

\item 
bool {\bfseries \-\_\-module\-Dep}\label{classmarlintpc_1_1MMScatterProcessor_a240567cb863681e713a800a39f0ad776}

\item 
bool {\bfseries \-\_\-single\-Track}\label{classmarlintpc_1_1MMScatterProcessor_ac41b1441985170c05e19633072935d27}

\item 
bool {\bfseries \-\_\-small\-Angle}\label{classmarlintpc_1_1MMScatterProcessor_a886b5cb3629be0c6c211320cc62141b9}

\item 
bool {\bfseries \-\_\-profile}\label{classmarlintpc_1_1MMScatterProcessor_aced6bb70d119fb82c769925c9ecac31e}

\item 
int {\bfseries \-\_\-cur\-Evt}\label{classmarlintpc_1_1MMScatterProcessor_a35bbdf5d6b8d36a2e1f4f878c7f8c056}

\item 
int {\bfseries \-\_\-norm\-Type}\label{classmarlintpc_1_1MMScatterProcessor_a75cbab7de02f3c1ec20777f63494ae81}

\item 
int {\bfseries \-\_\-n\-Par}\label{classmarlintpc_1_1MMScatterProcessor_a4fc729eae1f41a6c0c6308092051d3da}

\item 
double $\ast$ {\bfseries \-\_\-par\-Array}\label{classmarlintpc_1_1MMScatterProcessor_a07ed40ef799c02509a5e8c4b0af4ceb0}

\item 
std\-::string {\bfseries \-\_\-output\-\_\-path}\label{classmarlintpc_1_1MMScatterProcessor_a2c393cab03768c73dc234706f54ac29b}

\item 
std\-::string {\bfseries \-\_\-prf\-Type}\label{classmarlintpc_1_1MMScatterProcessor_aef4c428f09794b6c3bea070d80316259}

\item 
std\-::vector$<$ float $>$ {\bfseries \-\_\-par\-Vec}\label{classmarlintpc_1_1MMScatterProcessor_a8afa2deb86294e2de64e51907a30f182}

\item 
std\-::vector$<$ int $>$ {\bfseries \-\_\-module\-List}\label{classmarlintpc_1_1MMScatterProcessor_a395306775064ee725c5101487d32689a}

\item 
std\-::map$<$ int, int $>$ {\bfseries \-\_\-module\-Map}\label{classmarlintpc_1_1MMScatterProcessor_acae1d7e7341731b43d5600a1d218c1a8}

\item 
Points\-Map {\bfseries \-\_\-scatter\-Map}\label{classmarlintpc_1_1MMScatterProcessor_a9becc7c009f039d65f5e1c3a98a60c6b}

\item 
std\-::vector$<$ std\-::vector\\*
$<$ double $>$ $>$ {\bfseries \-\_\-iteration\-Par}\label{classmarlintpc_1_1MMScatterProcessor_a7b70a013b37833666b7d046b0d26cc9f}

\item 
std\-::vector$<$ double $>$ {\bfseries \-\_\-iteration\-Numbers}\label{classmarlintpc_1_1MMScatterProcessor_a6b8867cd5fd08a53d3e03616f4280c71}

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

\item 
int {\bfseries \-\_\-n\-Iterations}\label{classmarlintpc_1_1MMScatterProcessor_ae721a3d0d3a8746988b51d1e1914f07b}

\item 
int {\bfseries \-\_\-calib\-Iter}\label{classmarlintpc_1_1MMScatterProcessor_a1eae8d10779cb8ee47b2346cbeee0a50}

\item 
bool {\bfseries \-\_\-calib\-Run}\label{classmarlintpc_1_1MMScatterProcessor_a009c7bcd1b57ba536188fa136099ea88}

\item 
bool {\bfseries \-\_\-calib\-Pad}\label{classmarlintpc_1_1MMScatterProcessor_a6919c327114e03ce2d18b37dd83d875a}

\item 
std\-::map$<$ std\-::pair$<$ int, int $>$\\*
, T\-H1 $\ast$ $>$ {\bfseries \-\_\-scatter\-Plots}\label{classmarlintpc_1_1MMScatterProcessor_adb5cc820f0c317c04710574e5cfd88f4}

\item 
A\-I\-D\-A\-::\-I\-Tuple $\ast$ {\bfseries fit\-Data}\label{classmarlintpc_1_1MMScatterProcessor_af62d641ae83fc350baf9009d105a18a0}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Basic overview\-: 

This processor takes in a collection of tracks. Filters are applied to screen unwanted tracks (trackangle, number of tracks, etc.) The hits from the track are extracted, and from them, the consituent pulses. A vector of points is created -- the independent variable is the pulse's distance from the track, and the dependent variable is the pulse's amplitude. The vector is then amended so that the pulse amplitude's are normalized.

If performing a calibration, the scatter plot is fit with the P\-R\-F after a given interval of events, and the results are used in the calculation of the hits for the next interval of events, so as to iteratively converge on the correct parameters.

Parameters\-:

Input\-Track\-Collections = Input collections of tracks [String\-Vec] Single\-Track = Restrict to single-\/track events [boolean] Small\-Angle = Restrict to hits with a local track angle between -\/5 and 5 degrees [boolean] P\-R\-F\-Type = Type of P\-R\-F to use [string] Norm\-Type = Type of P\-R\-F normalization to use. See \doxyref{M\-M\-Advanced\-Calibration\-Processor}{p.}{classmarlintpc_1_1MMAdvancedCalibrationProcessor} for options [integer] P\-R\-F\-\_\-\-Parameters = List of P\-R\-F Parameters [Float\-Vec] Fit\-P\-R\-F = Whether or not the P\-R\-F should be fit to the scatter plot(s) [boolean] Calib\-Run = Whether or not this is a calibration run (hence whether or not the static P\-R\-F variable should be modified) [boolean] Calib\-Iterations = If calibrating, this sets the number of events per iteration [integer] Calib\-Pad = If calibrating, this sets whether or not to pad the hits with empty pulses [boolean] Row\-Dep = Set whether or not the P\-R\-F parameters have a row dependency (as defined in the \doxyref{M\-M\-Hit\-Finder\-Processor}{p.}{classmarlintpc_1_1MMHitFinderProcessor}) [boolean] Profiles = Whether or not to turn the scatter plots into T\-Profiles [boolean] Module\-List = List of modules to be used [Int\-Vec] Par\-Output\-Path = If calibrating, this is the path to save the calibrated parameters [string]

Author\-: P. Hayman, Carleton University 

\subsection{Member Function Documentation}
\index{marlintpc\-::\-M\-M\-Scatter\-Processor@{marlintpc\-::\-M\-M\-Scatter\-Processor}!\-\_\-sort\-Pulses@{\-\_\-sort\-Pulses}}
\index{\-\_\-sort\-Pulses@{\-\_\-sort\-Pulses}!marlintpc::MMScatterProcessor@{marlintpc\-::\-M\-M\-Scatter\-Processor}}
\subsubsection[{\-\_\-sort\-Pulses}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-M\-M\-Scatter\-Processor\-::\-\_\-sort\-Pulses (
\begin{DoxyParamCaption}
\item[{const E\-V\-E\-N\-T\-::\-Tracker\-Hit\-Vec \&}]{, }
\item[{const gear\-::\-T\-P\-C\-Parameters \&}]{, }
\item[{Sorted\-Pulse\-Map \&}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1MMScatterProcessor_a695ac8fc1bc5eaf660e2885c9401266b}
Taken almost directly from \doxyref{M\-M\-Hit\-Finder\-Processor}{p.}{classmarlintpc_1_1MMHitFinderProcessor}.

Simple method. Procedure is as follows\-:

-\/\-Check hits one-\/by-\/one\-: -\/\-For each pulse in the hit\-: -\/\-Check if its module is already in the map\-: -\/if it is not there, add it; -\/\-Check if its row is in the map\-: -\/if it is not there, add it; -\/\-Add the pulse to the vector of the appropriate row in the appropriate module;\index{marlintpc\-::\-M\-M\-Scatter\-Processor@{marlintpc\-::\-M\-M\-Scatter\-Processor}!init@{init}}
\index{init@{init}!marlintpc::MMScatterProcessor@{marlintpc\-::\-M\-M\-Scatter\-Processor}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-M\-M\-Scatter\-Processor\-::init (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classmarlintpc_1_1MMScatterProcessor_a6380807530f5f37734d6b7055bb65004}
T\-O\-D\-O\-: Set additional braces, according to indentation, to prevent warnings\-: suggest explicit braces to avoid ambiguous 'else' Please check carefully, if braces are still set correctly!

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