\section{marlintpc\-:\-:Z\-Bin\-Template\-Processor$<$ N1\-D\-H\-I\-S\-T\-O\-S, N2\-D\-H\-I\-S\-T\-O\-S $>$ Class Template Reference}
\label{classmarlintpc_1_1ZBinTemplateProcessor}\index{marlintpc\-::\-Z\-Bin\-Template\-Processor$<$ N1\-D\-H\-I\-S\-T\-O\-S, N2\-D\-H\-I\-S\-T\-O\-S $>$@{marlintpc\-::\-Z\-Bin\-Template\-Processor$<$ N1\-D\-H\-I\-S\-T\-O\-S, N2\-D\-H\-I\-S\-T\-O\-S $>$}}


A template to create processors wich create 1\-D or 2\-D distribution histograms, one histogram per z bin.  




{\ttfamily \#include $<$Z\-Bin\-Template\-Processor.\-h$>$}

Inheritance diagram for marlintpc\-:\-:Z\-Bin\-Template\-Processor$<$ N1\-D\-H\-I\-S\-T\-O\-S, N2\-D\-H\-I\-S\-T\-O\-S $>$\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classmarlintpc_1_1ZBinTemplateProcessor}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct {\bf Histo\-N\-Bins2\-D}
\begin{DoxyCompactList}\small\item\em A nested convenience struct which contains the number of bins for both directions of a 2\-D histogram. \end{DoxyCompactList}\item 
struct {\bf Histo\-Range}
\begin{DoxyCompactList}\small\item\em A nested convenience struct which contains the minimal and maximal value of a (1\-D) histogram rage. \end{DoxyCompactList}\item 
struct {\bf Histo\-Range2\-D}
\begin{DoxyCompactList}\small\item\em A nested convenience struct which contains two 1\-D \doxyref{Histo\-Range}{p.}{structmarlintpc_1_1ZBinTemplateProcessor_1_1HistoRange} objects. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual Processor $\ast$ {\bf new\-Processor} ()\label{classmarlintpc_1_1ZBinTemplateProcessor_a0b92e7273eb3aa0b843edd2a1c33fa7e}

\begin{DoxyCompactList}\small\item\em The \doxyref{new\-Processor()}{p.}{classmarlintpc_1_1ZBinTemplateProcessor_a0b92e7273eb3aa0b843edd2a1c33fa7e} function does not make sense for this template class, so it throws an {\ttfamily lcio\-::\-Exception}. \end{DoxyCompactList}\item 
virtual void {\bf init} ()\label{classmarlintpc_1_1ZBinTemplateProcessor_a0c89b71db60b3c22a7c39e5e0642a4e4}

\begin{DoxyCompactList}\small\item\em Register the A\-I\-D\-A histograms at the A\-I\-D\-A\-Processor. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bfseries Z\-Bin\-Template\-Processor} (const std\-::string \&type\-Name)\label{classmarlintpc_1_1ZBinTemplateProcessor_a2a5fb5e913153021b20c3ff82c32cb46}

\item 
void {\bf fill\-Histogram} (unsigned int histo\-Index, float x, float z)
\begin{DoxyCompactList}\small\item\em Fill value {\ttfamily x} into the histogram set {\ttfamily histo\-Index}. \end{DoxyCompactList}\item 
void {\bf fill\-Histogram} (unsigned int histo\-Index, float x, float y, float z)
\begin{DoxyCompactList}\small\item\em Fill the {\ttfamily x} and {\ttfamily y} value pair into the 2\-D histogram set {\ttfamily histo\-Index}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::vector$<$ std\-::vector\\*
$<$ A\-I\-D\-A\-::\-I\-Histogram1\-D $\ast$ $>$ $>$ {\bf \-\_\-1\-D\-Histos}\label{classmarlintpc_1_1ZBinTemplateProcessor_ae2371aa77d4868c624cd656d3f6b93ce}

\begin{DoxyCompactList}\small\item\em Vector of 1\-D histogram vectors. \end{DoxyCompactList}\item 
std\-::vector$<$ std\-::vector\\*
$<$ A\-I\-D\-A\-::\-I\-Histogram2\-D $\ast$ $>$ $>$ {\bf \-\_\-2\-D\-Histos}\label{classmarlintpc_1_1ZBinTemplateProcessor_acb8e5d82e40fa46e18350151b3119fcb}

\begin{DoxyCompactList}\small\item\em Vector of 2\-D histogram vectors. \end{DoxyCompactList}\item 
std\-::vector$<$ std\-::string $>$ {\bf \-\_\-histo1\-D\-Base\-Names}
\begin{DoxyCompactList}\small\item\em Vector of base names for the 1\-D histograms. \end{DoxyCompactList}\item 
std\-::vector$<$ std\-::string $>$ {\bf \-\_\-histo2\-D\-Base\-Names}
\begin{DoxyCompactList}\small\item\em Vector of base names for the 2\-D histograms. \end{DoxyCompactList}\item 
std\-::vector$<$ std\-::string $>$ {\bf \-\_\-histo1\-D\-Titles}
\begin{DoxyCompactList}\small\item\em Vector of titles for the 1\-D histograms. \end{DoxyCompactList}\item 
std\-::vector$<$ std\-::string $>$ {\bf \-\_\-histo2\-D\-Titles}
\begin{DoxyCompactList}\small\item\em Vector of titles for the 2\-D histograms. \end{DoxyCompactList}\item 
std\-::vector$<$ {\bf Histo\-Range} $>$ {\bf \-\_\-histo\-Ranges1\-D}\label{classmarlintpc_1_1ZBinTemplateProcessor_a6872a5c89d4e37d415ca889c943f6f91}

\begin{DoxyCompactList}\small\item\em Vector of ranges for the 1\-D histograms. \end{DoxyCompactList}\item 
std\-::vector$<$ {\bf Histo\-Range2\-D} $>$ {\bf \-\_\-histo\-Ranges2\-D}\label{classmarlintpc_1_1ZBinTemplateProcessor_a3c8a08720ba6496f61e158901c363ee1}

\begin{DoxyCompactList}\small\item\em Vector of ranges for the 2\-D histograms. \end{DoxyCompactList}\item 
std\-::vector$<$ int $>$ {\bf \-\_\-n\-Bins1\-D}\label{classmarlintpc_1_1ZBinTemplateProcessor_af7e6189e622c767cc853a5126217e51f}

\begin{DoxyCompactList}\small\item\em Vector with number of bins for the 1\-D histograms. \end{DoxyCompactList}\item 
std\-::vector$<$ {\bf Histo\-N\-Bins2\-D} $>$ {\bf \-\_\-n\-Bins2\-D}\label{classmarlintpc_1_1ZBinTemplateProcessor_a3132791f556e973fd82497495b3b46b3}

\begin{DoxyCompactList}\small\item\em Vector with number of bins for the 1\-D histograms. \end{DoxyCompactList}\item 
float {\bf \-\_\-min\-Z}\label{classmarlintpc_1_1ZBinTemplateProcessor_ab714d78dfb8bbf6ac5a2bb8cc2ec9cf1}

\begin{DoxyCompactList}\small\item\em Minimum z value of lowest bin. \end{DoxyCompactList}\item 
float {\bf \-\_\-max\-Z}\label{classmarlintpc_1_1ZBinTemplateProcessor_a82b2aca6488956293cea89079eb8aad9}

\begin{DoxyCompactList}\small\item\em Maximum z value of highest bin. \end{DoxyCompactList}\item 
int {\bf \-\_\-n\-Z\-Bins}\label{classmarlintpc_1_1ZBinTemplateProcessor_acc58b46181a5609ff7dbe5b24048c935}

\begin{DoxyCompactList}\small\item\em Number of z bins. \end{DoxyCompactList}\item 
float {\bf \-\_\-z\-Bin\-Width}\label{classmarlintpc_1_1ZBinTemplateProcessor_a41ae7ceb74af30f292d67266eda5ea29}

\begin{DoxyCompactList}\small\item\em Width of a bin, calculated as (\-\_\-max\-Z-\/\-\_\-min\-Z)/\-\_\-n\-Z\-Bins;. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$unsigned int N1\-D\-H\-I\-S\-T\-O\-S, unsigned int N2\-D\-H\-I\-S\-T\-O\-S$>$class marlintpc\-::\-Z\-Bin\-Template\-Processor$<$ N1\-D\-H\-I\-S\-T\-O\-S, N2\-D\-H\-I\-S\-T\-O\-S $>$}

A template to create processors wich create 1\-D or 2\-D distribution histograms, one histogram per z bin. 

In addition one histogram is filled without any z cut.

Usage\-: \begin{DoxyItemize}
\item Derrive your processor from this class. The number of 1\-D and 2\-D histogram sets are the template parameters. (Example\-: Two 1\-D histograms, x-\/\-Distribution and y-\/\-Distribution, and one 2\-D-\/\-Histogram xy-\/\-Distribtuion. For each of these a set of z-\/binned histograms is created, plus one histogram without z-\/cut each.)\par
For convenience it is recommended to define index constants for the histogram sets\-: 
\begin{DoxyCode}
\textcolor{keyword}{static} \textcolor{keyword}{const}  xDistributionHistoIndex 0; \textcolor{comment}{// The templated set of x  histograms is the 1D index 0}
\textcolor{keyword}{static} \textcolor{keyword}{const}  yDistributionHistoIndex 1; \textcolor{comment}{// The templated set of y  histograms is the 1D index 1}
\textcolor{keyword}{static} \textcolor{keyword}{const} xyDistributionHistoIndex 0; \textcolor{comment}{// The templated set of xy histograms is the 2D index 0}
\end{DoxyCode}
 \item As this is a template class you have to include the {\ttfamily Z\-Bin\-Template\-Processor.\-cc} in your .cc file\-: 
\begin{DoxyCode}
\textcolor{preprocessor}{#include "ZBinTemplateProcessor.cc"}
\end{DoxyCode}
 \item Set the histgram names, titles, ranges and binning in your \doxyref{init()}{p.}{classmarlintpc_1_1ZBinTemplateProcessor_a0c89b71db60b3c22a7c39e5e0642a4e4} \item {\bfseries  Call {\ttfamily \doxyref{Z\-Bin\-Template\-Processor\-::init()}{p.}{classmarlintpc_1_1ZBinTemplateProcessor_a0c89b71db60b3c22a7c39e5e0642a4e4}} in your init function! } This is needed because the A\-I\-D\-A histograms are registered here. The fill\-Histogram will throw and {\ttfamily lcio\-::\-Exception} if \doxyref{Z\-Bin\-Template\-Processor\-::init()}{p.}{classmarlintpc_1_1ZBinTemplateProcessor_a0c89b71db60b3c22a7c39e5e0642a4e4} has not been called. \item Fill the histograms using the fill\-Histogram method.\end{DoxyItemize}

\begin{DoxyParams}{Parameters}
{\em Min\-Z} & Minimum z value of lowest bin in case of z binning (default\-: 0) \\
\hline
{\em Max\-Z} & Maximum z value of highest bin in case of z binning (default\-: 260) \\
\hline
{\em n\-Z\-Bins} & Number ob bins in z (default\-: 10)\par
 z binning switched of if 0, only the histogram without z cut is created\\
\hline
\end{DoxyParams}
As an example you can use \doxyref{Hit\-And\-Track\-Counter\-Processor}{p.}{classmarlintpc_1_1HitAndTrackCounterProcessor}.

\begin{DoxyAuthor}{Author}
Martin Killenberg, University of Bonn 
\end{DoxyAuthor}


\subsection{Member Function Documentation}
\index{marlintpc\-::\-Z\-Bin\-Template\-Processor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}!fill\-Histogram@{fill\-Histogram}}
\index{fill\-Histogram@{fill\-Histogram}!marlintpc::ZBinTemplateProcessor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}}
\subsubsection[{fill\-Histogram}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned int N1\-D\-H\-I\-S\-T\-O\-S, unsigned int N2\-D\-H\-I\-S\-T\-O\-S$>$ void {\bf marlintpc\-::\-Z\-Bin\-Template\-Processor}$<$ N1\-D\-H\-I\-S\-T\-O\-S, N2\-D\-H\-I\-S\-T\-O\-S $>$\-::fill\-Histogram (
\begin{DoxyParamCaption}
\item[{unsigned int}]{histo\-Index, }
\item[{float}]{x, }
\item[{float}]{z}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}}\label{classmarlintpc_1_1ZBinTemplateProcessor_a467bd6d5a0d3adc07c23e30a79f68b80}


Fill value {\ttfamily x} into the histogram set {\ttfamily histo\-Index}. 

The correct z histogram is chosen according to the {\ttfamily z} value. In addition the histogram without z cut is filled. Throws an {\ttfamily lcio\-::\-Exception} in case the histograms have not been initialised. \index{marlintpc\-::\-Z\-Bin\-Template\-Processor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}!fill\-Histogram@{fill\-Histogram}}
\index{fill\-Histogram@{fill\-Histogram}!marlintpc::ZBinTemplateProcessor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}}
\subsubsection[{fill\-Histogram}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned int N1\-D\-H\-I\-S\-T\-O\-S, unsigned int N2\-D\-H\-I\-S\-T\-O\-S$>$ void {\bf marlintpc\-::\-Z\-Bin\-Template\-Processor}$<$ N1\-D\-H\-I\-S\-T\-O\-S, N2\-D\-H\-I\-S\-T\-O\-S $>$\-::fill\-Histogram (
\begin{DoxyParamCaption}
\item[{unsigned int}]{histo\-Index, }
\item[{float}]{x, }
\item[{float}]{y, }
\item[{float}]{z}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}}\label{classmarlintpc_1_1ZBinTemplateProcessor_a500f73d891aee562463a0a0aa884b427}


Fill the {\ttfamily x} and {\ttfamily y} value pair into the 2\-D histogram set {\ttfamily histo\-Index}. 

The correct z histogram is chosen according to the {\ttfamily z} value. In addition the histogram without z cut is filled. Throws an {\ttfamily lcio\-::\-Exception} in case the histograms have not been initialised. 

\subsection{Member Data Documentation}
\index{marlintpc\-::\-Z\-Bin\-Template\-Processor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}!\-\_\-histo1\-D\-Base\-Names@{\-\_\-histo1\-D\-Base\-Names}}
\index{\-\_\-histo1\-D\-Base\-Names@{\-\_\-histo1\-D\-Base\-Names}!marlintpc::ZBinTemplateProcessor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}}
\subsubsection[{\-\_\-histo1\-D\-Base\-Names}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned int N1\-D\-H\-I\-S\-T\-O\-S, unsigned int N2\-D\-H\-I\-S\-T\-O\-S$>$ std\-::vector$<$ std\-::string $>$ {\bf marlintpc\-::\-Z\-Bin\-Template\-Processor}$<$ N1\-D\-H\-I\-S\-T\-O\-S, N2\-D\-H\-I\-S\-T\-O\-S $>$\-::\-\_\-histo1\-D\-Base\-Names\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1ZBinTemplateProcessor_abd8a53470cf3448f54a2e877f35b77ad}


Vector of base names for the 1\-D histograms. 

For the z-\/binned histograms an index is appended, the histogram without z-\/cut is left wothout index 

Referenced by marlintpc\-::\-Z\-Bin\-Template\-Processor$<$ N\-\_\-1\-D\-\_\-\-H\-I\-S\-T\-O\-S\-\_\-\-H\-I\-T\-\_\-\-T\-R\-A\-C\-K\-\_\-\-C\-O\-U\-N\-T\-E\-R\-\_\-\-P\-R\-O\-C\-E\-S\-S\-O\-R, N\-\_\-2\-D\-\_\-\-H\-I\-S\-T\-O\-S\-\_\-\-H\-I\-T\-\_\-\-T\-R\-A\-C\-K\-\_\-\-C\-O\-U\-N\-T\-E\-R\-\_\-\-P\-R\-O\-C\-E\-S\-S\-O\-R $>$\-::init().

\index{marlintpc\-::\-Z\-Bin\-Template\-Processor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}!\-\_\-histo1\-D\-Titles@{\-\_\-histo1\-D\-Titles}}
\index{\-\_\-histo1\-D\-Titles@{\-\_\-histo1\-D\-Titles}!marlintpc::ZBinTemplateProcessor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}}
\subsubsection[{\-\_\-histo1\-D\-Titles}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned int N1\-D\-H\-I\-S\-T\-O\-S, unsigned int N2\-D\-H\-I\-S\-T\-O\-S$>$ std\-::vector$<$ std\-::string $>$ {\bf marlintpc\-::\-Z\-Bin\-Template\-Processor}$<$ N1\-D\-H\-I\-S\-T\-O\-S, N2\-D\-H\-I\-S\-T\-O\-S $>$\-::\-\_\-histo1\-D\-Titles\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1ZBinTemplateProcessor_a9ececf8adea20e0ede3a2b6e51951ee3}


Vector of titles for the 1\-D histograms. 

For the z-\/binned histograms the z-\/range is appeded to the title. 

Referenced by marlintpc\-::\-Z\-Bin\-Template\-Processor$<$ N\-\_\-1\-D\-\_\-\-H\-I\-S\-T\-O\-S\-\_\-\-H\-I\-T\-\_\-\-T\-R\-A\-C\-K\-\_\-\-C\-O\-U\-N\-T\-E\-R\-\_\-\-P\-R\-O\-C\-E\-S\-S\-O\-R, N\-\_\-2\-D\-\_\-\-H\-I\-S\-T\-O\-S\-\_\-\-H\-I\-T\-\_\-\-T\-R\-A\-C\-K\-\_\-\-C\-O\-U\-N\-T\-E\-R\-\_\-\-P\-R\-O\-C\-E\-S\-S\-O\-R $>$\-::init().

\index{marlintpc\-::\-Z\-Bin\-Template\-Processor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}!\-\_\-histo2\-D\-Base\-Names@{\-\_\-histo2\-D\-Base\-Names}}
\index{\-\_\-histo2\-D\-Base\-Names@{\-\_\-histo2\-D\-Base\-Names}!marlintpc::ZBinTemplateProcessor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}}
\subsubsection[{\-\_\-histo2\-D\-Base\-Names}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned int N1\-D\-H\-I\-S\-T\-O\-S, unsigned int N2\-D\-H\-I\-S\-T\-O\-S$>$ std\-::vector$<$ std\-::string $>$ {\bf marlintpc\-::\-Z\-Bin\-Template\-Processor}$<$ N1\-D\-H\-I\-S\-T\-O\-S, N2\-D\-H\-I\-S\-T\-O\-S $>$\-::\-\_\-histo2\-D\-Base\-Names\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1ZBinTemplateProcessor_a9aac107d1f1ef0e9d5e5195f0d29fc7e}


Vector of base names for the 2\-D histograms. 

For the z-\/binned histograms an index is appended, the histogram without z-\/cut is left wothout index 

Referenced by marlintpc\-::\-Z\-Bin\-Template\-Processor$<$ N\-\_\-1\-D\-\_\-\-H\-I\-S\-T\-O\-S\-\_\-\-H\-I\-T\-\_\-\-T\-R\-A\-C\-K\-\_\-\-C\-O\-U\-N\-T\-E\-R\-\_\-\-P\-R\-O\-C\-E\-S\-S\-O\-R, N\-\_\-2\-D\-\_\-\-H\-I\-S\-T\-O\-S\-\_\-\-H\-I\-T\-\_\-\-T\-R\-A\-C\-K\-\_\-\-C\-O\-U\-N\-T\-E\-R\-\_\-\-P\-R\-O\-C\-E\-S\-S\-O\-R $>$\-::init().

\index{marlintpc\-::\-Z\-Bin\-Template\-Processor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}!\-\_\-histo2\-D\-Titles@{\-\_\-histo2\-D\-Titles}}
\index{\-\_\-histo2\-D\-Titles@{\-\_\-histo2\-D\-Titles}!marlintpc::ZBinTemplateProcessor@{marlintpc\-::\-Z\-Bin\-Template\-Processor}}
\subsubsection[{\-\_\-histo2\-D\-Titles}]{\setlength{\rightskip}{0pt plus 5cm}template$<$unsigned int N1\-D\-H\-I\-S\-T\-O\-S, unsigned int N2\-D\-H\-I\-S\-T\-O\-S$>$ std\-::vector$<$ std\-::string $>$ {\bf marlintpc\-::\-Z\-Bin\-Template\-Processor}$<$ N1\-D\-H\-I\-S\-T\-O\-S, N2\-D\-H\-I\-S\-T\-O\-S $>$\-::\-\_\-histo2\-D\-Titles\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1ZBinTemplateProcessor_ab463d9f72b48cf7c6e780db1a7a5c9bb}


Vector of titles for the 2\-D histograms. 

For the z-\/binned histograms the z-\/range is appeded to the title. 

Referenced by marlintpc\-::\-Z\-Bin\-Template\-Processor$<$ N\-\_\-1\-D\-\_\-\-H\-I\-S\-T\-O\-S\-\_\-\-H\-I\-T\-\_\-\-T\-R\-A\-C\-K\-\_\-\-C\-O\-U\-N\-T\-E\-R\-\_\-\-P\-R\-O\-C\-E\-S\-S\-O\-R, N\-\_\-2\-D\-\_\-\-H\-I\-S\-T\-O\-S\-\_\-\-H\-I\-T\-\_\-\-T\-R\-A\-C\-K\-\_\-\-C\-O\-U\-N\-T\-E\-R\-\_\-\-P\-R\-O\-C\-E\-S\-S\-O\-R $>$\-::init().



The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Z\-Bin\-Template\-Processor.\-h\end{DoxyCompactItemize}
