\section{overlay\-:\-:Overlay\-B\-X Class Reference}
\label{classoverlay_1_1OverlayBX}\index{overlay\-::\-Overlay\-B\-X@{overlay\-::\-Overlay\-B\-X}}


Helper struct for T\-P\-C parameters.  




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

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

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

\item 
virtual void {\bfseries modify\-Event} (L\-C\-Event $\ast$evt)\label{classoverlay_1_1OverlayBX_a12ec3dfafc7e2bf8e0f6e4d2cf2b10bb}

\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_1OverlayBX_a697c1e849ce47d6c3ba907853e48f3c3}

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

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

\begin{DoxyCompactList}\small\item\em Called after data processing for clean up. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
typedef std\-::map$<$ std\-::string, \\*
std\-::string $>$ {\bfseries Str\-Map}\label{classoverlay_1_1OverlayBX_ab4f36c6c2f0e1d84c9a7b97f7cc6b679}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
L\-C\-Event $\ast$ {\bf read\-Next\-Event} (int bx\-Num)
\begin{DoxyCompactList}\small\item\em helper function for (randomly) reading the next event \end{DoxyCompactList}\item 
void {\bf init\-\_\-geometry} ()\label{classoverlay_1_1OverlayBX_ade69869c41e930ca5e0fe9b409398bd4}

\begin{DoxyCompactList}\small\item\em helper function \end{DoxyCompactList}\item 
int {\bf merge\-V\-X\-D\-Cols\-From\-B\-X} (L\-C\-Collection $\ast$vxd\-Col, L\-C\-Collection $\ast$vxd\-B\-G\-Col, int bx\-Num)\label{classoverlay_1_1OverlayBX_a998e9b9d647d9a122532b17ea4edc3a4}

\begin{DoxyCompactList}\small\item\em helper function \end{DoxyCompactList}\item 
int {\bf merge\-T\-P\-C\-Cols\-From\-B\-X} (L\-C\-Collection $\ast$tpc\-Col, L\-C\-Collection $\ast$tpc\-B\-G\-Col, float z\-Pos\-Shift)\label{classoverlay_1_1OverlayBX_a423c569a7a57f9702b8fc935138e8563}

\begin{DoxyCompactList}\small\item\em helper function \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
String\-Vec {\bfseries \-\_\-input\-File\-Names}\label{classoverlay_1_1OverlayBX_ae4a9008e3763cdece8aa637fb9513767}

\item 
int {\bfseries \-\_\-events\-Per\-B\-X}\label{classoverlay_1_1OverlayBX_a298d1305f7a709fa704cb277b46bd04f}

\item 
float {\bfseries \-\_\-bx\-Time\-\_\-s}\label{classoverlay_1_1OverlayBX_a10e6735287f5937bd2dba8f2dedca166}

\item 
float {\bfseries \-\_\-tpc\-Vdrift\-\_\-mm\-\_\-s}\label{classoverlay_1_1OverlayBX_a699871096f1878a2f5b162af446921ae}

\item 
int {\bfseries \-\_\-max\-B\-Xs\-T\-P\-C}\label{classoverlay_1_1OverlayBX_a24cee7858ce243a01b032468bf2d18e3}

\item 
bool {\bfseries \-\_\-keep\-Pairs\-Truth\-Info}\label{classoverlay_1_1OverlayBX_a350512f41b2b6c1b04bb9be58612c57b}

\item 
bool {\bfseries \-\_\-phi\-Rotate\-T\-P\-C\-Hits}\label{classoverlay_1_1OverlayBX_a4363e9aec5d3bf6267a3359e0998bf74}

\item 
Float\-Vec {\bfseries \-\_\-vxd\-Layer\-Read\-Out\-Times}\label{classoverlay_1_1OverlayBX_a859141391b33e4779def82b2b624bc7a}

\item 
String\-Vec {\bfseries \-\_\-tpc\-Collections}\label{classoverlay_1_1OverlayBX_ac0378b4c5795d79f10a46d20ebe7bf3b}

\item 
std\-::string {\bfseries \-\_\-mcp\-Collection}\label{classoverlay_1_1OverlayBX_a3c335de2595c414b1f52c4d370936937}

\item 
std\-::string {\bfseries \-\_\-vxd\-Collection}\label{classoverlay_1_1OverlayBX_af9727e49eebfc6a12d4c7d9e0b5df1f5}

\item 
String\-Vec {\bfseries \-\_\-merge\-Collections}\label{classoverlay_1_1OverlayBX_a41ee214d3afbffb2e73f06269fb95c9f}

\item 
int {\bfseries \-\_\-ran\-Seed}\label{classoverlay_1_1OverlayBX_a73ac93ea571aeca2d0860f4e2d89b8bb}

\item 
Str\-Map {\bfseries \-\_\-tpc\-Map}\label{classoverlay_1_1OverlayBX_a6ac0d6b763539abcb5dac70857d164ab}

\item 
Str\-Map {\bfseries \-\_\-col\-Map}\label{classoverlay_1_1OverlayBX_a8c33714e91132c2a410a0ce135f003f8}

\item 
std\-::vector$<$ L\-C\-Reader $\ast$ $>$ {\bfseries \-\_\-lc\-Readers}\label{classoverlay_1_1OverlayBX_a9b4d62eaa9bd865109abb331d08a35d7}

\item 
int {\bfseries \-\_\-max\-B\-Xs}\label{classoverlay_1_1OverlayBX_aaa62b881d2c9f27aeca90629bf60503b}

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

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

\item 
V\-X\-D\-Layers {\bfseries \-\_\-vxd\-Layers}\label{classoverlay_1_1OverlayBX_a1a7a948dbfd34f1a73450e1444e90192}

\item 
int {\bfseries \-\_\-last\-B\-X\-Num}\label{classoverlay_1_1OverlayBX_a04101ce760a3b28d3cb1422c490bb493}

\item 
int {\bfseries \-\_\-last\-Event}\label{classoverlay_1_1OverlayBX_adc16a8b1ed3e7ef484896d88c5abbb12}

\item 
int {\bfseries \-\_\-current\-Rdr}\label{classoverlay_1_1OverlayBX_a9e4d1b29f1fc500f07d3c4f6116383f4}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Helper struct for T\-P\-C parameters. 

\doxyref{Overlay\-B\-X}{p.}{classoverlay_1_1OverlayBX} processor for overlaying (pair) background from many bunch crossings. Sim\-Tracker\-Hits from the T\-P\-C and the V\-X\-D detectors are overlayed for the number of bunchcrossings that will be visible for a given physics event, according to the bunch crossing frequency and the corresponding readout characteristics (drift time) of the devices. Hits from different bunch crossings are shifted in z for the T\-P\-C accordingly. No shift in r-\/phi (along the ladders) is applied for the V\-X\-D so far. For all other detectors high time resolution is assumed and only one bunch crosing will be overalayd.\par
 {\bfseries Note\-: code assumes that background files contain exactly one bunch crossing -\/ this is necesassary as guineapig files are ordered.}

\begin{DoxyAuthor}{Author}
F. Gaede D\-E\-S\-Y (based on \doxyref{Overlay}{p.}{classoverlay_1_1Overlay} processor by N. Chiapolini) 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}

\end{DoxyVersion}
\begin{DoxyParagraph}{Id\-:}
\doxyref{Overlay\-B\-X.\-h}{p.}{OverlayBX_8h_source} 951 2016-\/07-\/27 14\-:28\-:38\-Z voutsina 
\end{DoxyParagraph}



\begin{DoxyParams}{Parameters}
{\em Background\-File\-Names} & (String\-Vec) The names (with absolute or relative pathes) of the files from which the background should be read. Events are read in random order from the files in the list with possible dublication. It is the users responsibility to provide sufficient statistics for the signal sample under study.\\
\hline
{\em Bunch\-Crossing\-Time} & [s] (float) -\/ default 3.\-0e-\/7 (300 ns)\\
\hline
{\em T\-P\-C\-Driftvelocity} & [mm/s] (float) -\/ default 5.\-0e+7 (5cm/us)\\
\hline
{\em Max\-B\-Xs\-T\-P\-C} & (int) -\/ maximum of B\-Xs to be overlayed for the T\-P\-C; -\/1\-: compute from length and B\-Xtime; default 10\\
\hline
{\em T\-P\-C\-Collections} & pairs of collection names with T\-P\-C Sim\-Tracker\-Hits to be overlaid. The input collection (given first) will be merged into the output collection. If the output collectiondoes not exist, it will be created.\\
\hline
{\em Phi\-Rotate\-T\-P\-C\-Hits} & -\/ if set to true the bg events are rotated in azimuth by a random angle allows to re-\/use the same bg events more often\\
\hline
{\em V\-X\-D\-Layer\-Read\-Out\-Times} & [us] (Float\-Vec) -\/ default \char`\"{}50. 50. 200. 200. 200. 200.\char`\"{}\\
\hline
{\em V\-X\-D\-Collection} & collection of V\-X\-D Sim\-Tracker\-Hits\\
\hline
{\em Random\-Seed} & (int) random seed -\/ default 42\\
\hline
{\em Merge\-Collections} & (String\-Vec) Pairs of collection names from detectors that will have one bunch crossing of beam background overlayd. The input collection (given first) will be merged into the output collection. If the output collectiondoes not exist, it will be created.\\
\hline
{\em Max\-Number\-Of\-Events\-Per\-File} & (int) Maximum number of background events to be read from one file. Default\-: -\/1, i.\-e. read one file per B\-X. This option is essentially for testing. \\
\hline
\end{DoxyParams}


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


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

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

References init\-\_\-geometry().

\index{overlay\-::\-Overlay\-B\-X@{overlay\-::\-Overlay\-B\-X}!read\-Next\-Event@{read\-Next\-Event}}
\index{read\-Next\-Event@{read\-Next\-Event}!overlay::OverlayBX@{overlay\-::\-Overlay\-B\-X}}
\subsubsection[{read\-Next\-Event}]{\setlength{\rightskip}{0pt plus 5cm}L\-C\-Event $\ast$ overlay\-::\-Overlay\-B\-X\-::read\-Next\-Event (
\begin{DoxyParamCaption}
\item[{int}]{bx\-Num}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classoverlay_1_1OverlayBX_a71604651bf521c3fade954f61f506eb1}


helper function for (randomly) reading the next event 

helper function for reading the next event of B\-X bx\-Num 

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