\section{overlay\-:\-:Overlay Class Reference}
\label{classoverlay_1_1Overlay}\index{overlay\-::\-Overlay@{overlay\-::\-Overlay}}


\doxyref{Overlay}{p.}{classoverlay_1_1Overlay} processor allows to overlay an event with background events from additional L\-C\-I\-O files based on different criteria.  




{\ttfamily \#include $<$Overlay.\-h$>$}

Inheritance diagram for overlay\-:\-:Overlay\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classoverlay_1_1Overlay}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual marlin\-::\-Processor $\ast$ {\bfseries new\-Processor} ()\label{classoverlay_1_1Overlay_a0737231400ddfa7338b8712fe4f8e76e}

\item 
virtual const std\-::string \& {\bfseries name} () const \label{classoverlay_1_1Overlay_a29085d73b620ebb0bbf046cedcae37ca}

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

\item 
virtual void {\bf init} ()
\begin{DoxyCompactList}\small\item\em Called at the begin of the job before anything is read. \end{DoxyCompactList}\item 
virtual void {\bf process\-Run\-Header} (L\-C\-Run\-Header $\ast$run)\label{classoverlay_1_1Overlay_ae7ccbe910d10e2591774cba459cf1795}

\begin{DoxyCompactList}\small\item\em Called for every run. \end{DoxyCompactList}\item 
virtual void {\bf check} (E\-V\-E\-N\-T\-::\-L\-C\-Event $\ast$evt)\label{classoverlay_1_1Overlay_ac0742f1c42aee7da52683de6dc070c4c}

\begin{DoxyCompactList}\small\item\em Called for every event -\/ the working horse. \end{DoxyCompactList}\item 
virtual void {\bf end} ()\label{classoverlay_1_1Overlay_a90cbef58d0dcf579cf3b590113f3599d}

\begin{DoxyCompactList}\small\item\em Called after data processing for clean up. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
L\-C\-Event $\ast$ {\bf read\-Next\-Event} ()\label{classoverlay_1_1Overlay_a8133ecccbfc6aa5b1e75979fdcb240cf}

\begin{DoxyCompactList}\small\item\em Helper method. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
String\-Vec {\bf \-\_\-file\-Names}\label{classoverlay_1_1Overlay_a9d5e8ef72f8011d80ba52dc55d2a8661}

\begin{DoxyCompactList}\small\item\em Input file names. \end{DoxyCompactList}\item 
int {\bfseries \-\_\-num\-Overlay}\label{classoverlay_1_1Overlay_a814337bb8fa6ccfc8836bb99992f132f}

\item 
double {\bfseries \-\_\-exp\-B\-G}\label{classoverlay_1_1Overlay_abe311c7ed340db30e48e6b4c75ea2ce3}

\item 
bool {\bfseries \-\_\-run\-Overlay}\label{classoverlay_1_1Overlay_a3994ae5d45ae4be9431649b35a182a57}

\item 
int {\bfseries \-\_\-n\-Skip\-Events\-Random}\label{classoverlay_1_1Overlay_afb16705ef7c93e4ebd7cca3c82c8d40d}

\item 
String\-Vec {\bfseries \-\_\-col\-Vec}\label{classoverlay_1_1Overlay_aab9c75661f90271e8fe5a7e749b2414f}

\item 
std\-::map$<$ std\-::string, \\*
std\-::string $>$ {\bfseries \-\_\-col\-Map}\label{classoverlay_1_1Overlay_a353c3bfb0eb7f44720c99ca25beb010f}

\item 
I\-O\-::\-L\-C\-Reader $\ast$ {\bfseries \-\_\-lc\-Reader}\label{classoverlay_1_1Overlay_acb86344cb05ae7757f31bee02eeb0997}

\item 
E\-V\-E\-N\-T\-::\-L\-C\-Event $\ast$ {\bfseries \-\_\-overlay\-Event}\label{classoverlay_1_1Overlay_ae116f0f9faae701663527d801c9b6b23}

\item 
int {\bfseries \-\_\-active\-Run\-Number}\label{classoverlay_1_1Overlay_a13678da547b64e625959a954a398c9cd}

\item 
int {\bfseries \-\_\-n\-Run}\label{classoverlay_1_1Overlay_aabe5775a7eb93c27ab775f3460c301fd}

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

\item 
int {\bfseries \-\_\-n\-Overlay\-Evt}\label{classoverlay_1_1Overlay_a1de890a0f162ba523647652b8d9450df}

\item 
Int\-Vec {\bfseries \-\_\-events}\label{classoverlay_1_1Overlay_ab2f71e712ba2601d3cd47c7c8defd04b}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\doxyref{Overlay}{p.}{classoverlay_1_1Overlay} processor allows to overlay an event with background events from additional L\-C\-I\-O files based on different criteria. 

A typical use case would be the overlay of gamma gamma -\/$>$ hadrons background events with a number drawn from a poissonian distribution with a given mean 'exp\-B\-G' (Number\-Overlay\-Events=0). Best to specfiy only one input file as then direct access in L\-C\-I\-O is used.

See Merger.\-cc for the collection types that can be merged.

\begin{DoxyAuthor}{Author}
N. Chiapolini, D\-E\-S\-Y 

F. Gaede, D\-E\-S\-Y 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}

\end{DoxyVersion}
\begin{DoxyParagraph}{Id\-:}
\doxyref{Overlay.\-h}{p.}{Overlay_8h_source} 851 2012-\/09-\/11 09\-:52\-:37\-Z gaede 
\end{DoxyParagraph}



\begin{DoxyParams}{Parameters}
{\em Input\-File\-Names} & (String\-Vec) The names (with absolute or relative pathes) of the files from which the background should be read. Multiple files can be given by a white spaces separated list or by setting this parameter multiple times. If the end of the last file is reached, before all events have been processed, a warning will be printed and reading restarted with the first file. N\-B\-: if only one file is given direct access is used -\/ this is much faster (and thus preferred)\\
\hline
{\em Collection\-Map} & (String\-Vec) Pairs of collection names. The input collection (given first) will be merged into the output collection. If the output collection does not exist, it will be created. It is recommended to set this parameter once for each collection pair. If this parameter is not set, all collections with the same name and type will be merged.\\
\hline
{\em Number\-Overlay\-Events} & (int) Fixed number of background events that should be added to each physics event. (default 0)\\
\hline
{\em exp\-B\-G} & (double) If this value is set, a random number of background will be added to each physics event. The Random numbers will be thrown according to a Poisson distribution with this expectation value. If set, Number\-Overlay\-Events will be added to the random number. \\
\hline
{\em run\-Overlay} & (bool) If true, Number\-Overlay\-Events and exp\-B\-G will be ignored. Instead one run of background events will be added to each physics event.\\
\hline
{\em N\-Skip\-Events\-Random} & Maximum number of events to skip between overlayd events (choosen from flat intervall [0,N\-Skip\-Events\-Random] ) used if more than one inout file given and skip\-N\-Event is used \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\index{overlay\-::\-Overlay@{overlay\-::\-Overlay}!init@{init}}
\index{init@{init}!overlay::Overlay@{overlay\-::\-Overlay}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}void overlay\-::\-Overlay\-::init (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classoverlay_1_1Overlay_a6648885fe8765e485adaa7deaa010e86}


Called at the begin of the job before anything is read. 

Use to initialize the processor, e.\-g. book histograms. 

References \-\_\-file\-Names.



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