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


\doxyref{Overlay\-Timing}{p.}{classoverlay_1_1OverlayTiming} processor for overlaying background to each bunch crossing of a bunch train.  




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

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

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

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

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

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

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

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

\end{DoxyCompactItemize}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
typedef std\-::map$<$ long long, \\*
E\-V\-E\-N\-T\-::\-Sim\-Calorimeter\-Hit $\ast$ $>$ {\bfseries Dest\-Map}\label{classoverlay_1_1OverlayTiming_a47e43627d070516b17b2fa727df64fb1}

\item 
typedef std\-::map$<$ std\-::string, \\*
Dest\-Map $>$ {\bfseries Coll\-Dest\-Map}\label{classoverlay_1_1OverlayTiming_a92aa86cf6b8a4c60e4a0c7df87698b26}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
float {\bfseries time\-\_\-of\-\_\-flight} (float x, float y, float z) const \label{classoverlay_1_1OverlayTiming_aa9eb14b28c7a65b22dc718b8c700323a}

\item 
void {\bfseries define\-\_\-time\-\_\-windows} (const std\-::string \&Collection\-\_\-name)\label{classoverlay_1_1OverlayTiming_a0dfc6c7a766bf9c10db3bbd3cb6e9c10}

\item 
void {\bfseries crop\-\_\-collection} (E\-V\-E\-N\-T\-::\-L\-C\-Collection $\ast$collection)\label{classoverlay_1_1OverlayTiming_aaf7821dec212cbc6cf4ea663d418785f}

\item 
void {\bfseries merge\-\_\-collections} (E\-V\-E\-N\-T\-::\-L\-C\-Collection $\ast$source\-\_\-collection, E\-V\-E\-N\-T\-::\-L\-C\-Collection $\ast$dest\-\_\-collection, float time\-\_\-offset)\label{classoverlay_1_1OverlayTiming_a75f78b3dc5e93b9eb688c6487bf98fc0}

\item 
long long {\bfseries cell\-I\-D2long} (int id0, int id1) const \label{classoverlay_1_1OverlayTiming_aa4da7a440f58e87e4fbd86abce45888f}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
float {\bfseries \-\_\-\-T\-\_\-diff}\label{classoverlay_1_1OverlayTiming_ab01553b3c471cf43fd63050a8b833e5e}

\item 
int {\bfseries \-\_\-n\-Bunch\-Train}\label{classoverlay_1_1OverlayTiming_a7b8bc1b09d13c333db863e58d7ae8f3f}

\item 
unsigned int {\bfseries \-\_\-n\-Run}\label{classoverlay_1_1OverlayTiming_ad382ab52b69e75a3baf7bd46e727a71f}

\item 
unsigned int {\bfseries \-\_\-n\-Evt}\label{classoverlay_1_1OverlayTiming_a4d64c31017e81edfe86585381fe0864c}

\item 
String\-Vec {\bfseries \-\_\-input\-File\-Names}\label{classoverlay_1_1OverlayTiming_a5def154c2bb828e457bcfaf4df8ee740}

\item 
int {\bfseries \-\_\-\-B\-X\-\_\-phys}\label{classoverlay_1_1OverlayTiming_a442bec592789656099d8970ae8fff354}

\item 
float {\bfseries \-\_\-\-N\-Overlay}\label{classoverlay_1_1OverlayTiming_a1aa3a00f869f7e849ae5a72af54e1bd9}

\item 
unsigned int {\bfseries overlay\-\_\-file\-\_\-list}\label{classoverlay_1_1OverlayTiming_acd6a3285acb33316f23b71a0de1123ac}

\item 
float {\bfseries \-\_\-\-Beam\-Cal\-\_\-int}\label{classoverlay_1_1OverlayTiming_a5f296707812f746646282d5d8b81e193}

\item 
float {\bfseries \-\_\-\-E\-T\-D\-\_\-int}\label{classoverlay_1_1OverlayTiming_a44971509e048684dc420b2425ba8be3f}

\item 
float {\bfseries \-\_\-\-Ecal\-Barrel\-\_\-int}\label{classoverlay_1_1OverlayTiming_a9324e654fa38f019f8ee2a21aa67b506}

\item 
float {\bfseries \-\_\-\-Ecal\-Barrel\-Pre\-Shower\-\_\-int}\label{classoverlay_1_1OverlayTiming_a80e4d009b32451337d83dda78edb42c6}

\item 
float {\bfseries \-\_\-\-Ecal\-Endcap\-\_\-int}\label{classoverlay_1_1OverlayTiming_a9f6117167ac4202307cd20d3365b998c}

\item 
float {\bfseries \-\_\-\-Ecal\-Endcap\-Pre\-Shower\-\_\-int}\label{classoverlay_1_1OverlayTiming_a9c74bd0756bd3693b42c47044d7c43eb}

\item 
float {\bfseries \-\_\-\-Ecal\-Endcap\-Ring\-\_\-int}\label{classoverlay_1_1OverlayTiming_a8c1c2eea843a398efd517c2bf6a71ad5}

\item 
float {\bfseries \-\_\-\-Ecal\-Endcap\-Ring\-Pre\-Shower\-\_\-int}\label{classoverlay_1_1OverlayTiming_a587897bc0c1da52fe78a92eb384e4516}

\item 
float {\bfseries \-\_\-\-F\-T\-D\-\_\-int}\label{classoverlay_1_1OverlayTiming_af8a6df6ef1dedb1bc068ecf4e9b77ba4}

\item 
float {\bfseries \-\_\-\-Hcal\-Barrel\-Reg\-\_\-int}\label{classoverlay_1_1OverlayTiming_ae1edeed5f5e4fad8eac61545112128db}

\item 
float {\bfseries \-\_\-\-Hcal\-End\-Cap\-Rings\-\_\-int}\label{classoverlay_1_1OverlayTiming_a6b29cbb6894a30db65c01db49b551408}

\item 
float {\bfseries \-\_\-\-Hcal\-End\-Caps\-\_\-int}\label{classoverlay_1_1OverlayTiming_ade43b531400a3e4e92e274772f52dea4}

\item 
float {\bfseries \-\_\-\-L\-Hcal\-\_\-int}\label{classoverlay_1_1OverlayTiming_a4dd987a4148720793b4794dfa5d73067}

\item 
float {\bfseries \-\_\-\-Lumi\-Cal\-\_\-int}\label{classoverlay_1_1OverlayTiming_a754fabf7eafafebe533e3ba48dcfd4ca}

\item 
float {\bfseries \-\_\-\-Muon\-Barrel\-\_\-int}\label{classoverlay_1_1OverlayTiming_ad15cb5abd96752c54299073a54f0a380}

\item 
float {\bfseries \-\_\-\-Muon\-End\-Cap\-\_\-int}\label{classoverlay_1_1OverlayTiming_a4592167c73d618fb5da3fb03469ca0a9}

\item 
float {\bfseries \-\_\-\-S\-E\-T\-\_\-int}\label{classoverlay_1_1OverlayTiming_af5e0cb57e6356a7bd8b99b2e385c41b8}

\item 
float {\bfseries \-\_\-\-S\-I\-T\-\_\-int}\label{classoverlay_1_1OverlayTiming_a44db9e338bfb30a6d6e3bb4e9b9e9726}

\item 
float {\bfseries \-\_\-\-V\-X\-D\-\_\-int}\label{classoverlay_1_1OverlayTiming_a274b11cf36905beb8725cc31eab1e79d}

\item 
float {\bfseries \-\_\-\-Ecal\-Plug\-\_\-int}\label{classoverlay_1_1OverlayTiming_af1ce4df90e2f905869c1afb834a3b142}

\item 
float {\bfseries \-\_\-\-V\-X\-D\-B\-\_\-int}\label{classoverlay_1_1OverlayTiming_a0b864134f35ac0689a78099ec48c277c}

\item 
float {\bfseries \-\_\-\-V\-X\-D\-E\-\_\-int}\label{classoverlay_1_1OverlayTiming_ab456f65bd62b7b5b0a831e2e993eaaef}

\item 
float {\bfseries \-\_\-\-I\-T\-B\-\_\-int}\label{classoverlay_1_1OverlayTiming_ad44171b31c8ab08fe1a444b6ff2733cf}

\item 
float {\bfseries \-\_\-\-I\-T\-E\-\_\-int}\label{classoverlay_1_1OverlayTiming_a9b1eedbbbd1bf98ff5ce3a9eca14905f}

\item 
float {\bfseries \-\_\-\-O\-T\-B\-\_\-int}\label{classoverlay_1_1OverlayTiming_a22260d86f819c248039c6b13554f4089}

\item 
float {\bfseries \-\_\-\-O\-T\-E\-\_\-int}\label{classoverlay_1_1OverlayTiming_a46a11371b54517bcfe2c578002a22479}

\item 
float {\bfseries \-\_\-\-T\-P\-C\-\_\-int}\label{classoverlay_1_1OverlayTiming_a812a42c519419e39e74d8e73513e1a91}

\item 
float {\bfseries \-\_\-\-T\-P\-C\-Space\-Point\-\_\-int}\label{classoverlay_1_1OverlayTiming_a8ad6715629ff8eb1368e8c5f220e2375}

\item 
I\-O\-::\-L\-C\-Reader $\ast$ {\bfseries overlay\-\_\-\-Eventfile\-\_\-reader}\label{classoverlay_1_1OverlayTiming_a5afdbaff553ba12a66677c01176a3183}

\item 
float {\bfseries this\-\_\-start}\label{classoverlay_1_1OverlayTiming_a15e7b3efce1f97dd614472d393e117b5}

\item 
float {\bfseries this\-\_\-stop}\label{classoverlay_1_1OverlayTiming_a2408b053b2d074617df656f8f8b11205}

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

\item 
std\-::string {\bfseries \-\_\-mc\-Particle\-Collection\-Name}\label{classoverlay_1_1OverlayTiming_a787ed612d640c4ee4eaff5470e26d877}

\item 
std\-::string {\bfseries \-\_\-mc\-Physics\-Particle\-Collection\-Name}\label{classoverlay_1_1OverlayTiming_a4a9ab600350bd7c6e435eaf14cc6818d}

\item 
std\-::string {\bfseries current\-Dest}\label{classoverlay_1_1OverlayTiming_aacc97d153978de46edeeff3f3877235b}

\item 
bool {\bfseries T\-P\-C\-\_\-hits}\label{classoverlay_1_1OverlayTiming_aacc60902153113c6779621580c2bea35}

\item 
float {\bfseries \-\_\-tpc\-Vdrift\-\_\-mm\-\_\-ns}\label{classoverlay_1_1OverlayTiming_a3c8db98358256a819528e3f14b11f9a8}

\item 
bool {\bfseries \-\_\-random\-B\-X}\label{classoverlay_1_1OverlayTiming_a67b81a38e0d322b3e9ae9c70a8d4c9e0}

\item 
bool {\bfseries \-\_\-\-Poisson}\label{classoverlay_1_1OverlayTiming_ac27e50d952a3858e9c1e758669523f58}

\item 
Coll\-Dest\-Map {\bfseries coll\-Dest\-Map}\label{classoverlay_1_1OverlayTiming_a77331a367e7fb8737d14a240606e3859}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\doxyref{Overlay\-Timing}{p.}{classoverlay_1_1OverlayTiming} processor for overlaying background to each bunch crossing of a bunch train. 

A physics event is placed at a random or fixed position of the bunch train. Then background events are overlayed to each bunch crossing of the train and merged into the physics event.

For the merging, integration times can be given for each collection or subdetector, respectively. Then only hits are added to the physics event's collections, which fall into the integration time window of the specific subdetector

\begin{DoxyAuthor}{Author}
P. Schade D\-E\-S\-Y/\-C\-E\-R\-N (based on \doxyref{Overlay}{p.}{classoverlay_1_1Overlay} processor by F. Gaede)
\end{DoxyAuthor}

\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. It is the users responsibility to provide sufficient statistics for the signal sample under study.\\
\hline
{\em Delta\-\_\-t} & [ns] (float) -\/ default 0.\-5 (0.\-5 ns) (Cli\-C default) -- Time difference between B\-Xs in the B\-Xtrain\\
\hline
{\em N\-Bunchtrain} & (int) -\/ default 1 -- Number of bunches in the bunch train\\
\hline
{\em T\-P\-C\-Driftvelocity} & [mm/s] (float) -\/ default 5.\-0e+7 (5cm/us)\\
\hline
{\em Physics\-B\-X} & -\/ default 1 -- B\-X of the physics event. Is overwritten if Random number is chosen\\
\hline
{\em Number\-Background} & -\/ default 1 -- Number of background events to overlay to one B\-X. This is either fixed (if Poisson\-\_\-random\-\_\-\-N\-Overlay = false) of the mean value if (if Poisson\-\_\-random\-\_\-\-N\-Overlay = true)\\
\hline
{\em Poisson\-\_\-random\-\_\-\-N\-Overlay} & -\/ default false -- \doxyref{Overlay}{p.}{classoverlay_1_1Overlay} a random number of background events to each B\-X. If t, the number is pulled from a Poisson distribution.\\
\hline
{\em Random\-Bx} & -\/ default false -- Put the physics event at a random number of the bunch train\\
\hline
{\em Random\-Seed} & (int) random seed -\/ default 42 \\
\hline
\end{DoxyParams}


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