<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\section{marlintpc\-:\-:Voxel\-T\-P\-C Class Reference}
\label{classmarlintpc_1_1VoxelTPC}\index{marlintpc\-::\-Voxel\-T\-P\-C@{marlintpc\-::\-Voxel\-T\-P\-C}}


The \doxyref{Voxel\-T\-P\-C}{p.}{classmarlintpc_1_1VoxelTPC} is a helper class containing a std\-::map of all T\-P\-C\-Voxels which contain charge.  




{\ttfamily \#include $&lt;$Voxel\-T\-P\-C.\-h$&gt;$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct {\bf Voxel\-Index}
\begin{DoxyCompactList}\small\item\em This structure is for the sorting of the voxels. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Voxel\-T\-P\-C} (gear\-::\-T\-P\-C\-Parameters const $\ast$tpc\-Parameters, double length\-Of\-Time\-Bin, double induction\-Factor=0)\label{classmarlintpc_1_1VoxelTPC_a27f42938b65128b504d86edc6a58075b}

\begin{DoxyCompactList}\small\item\em Constructor of \doxyref{Voxel\-T\-P\-C}{p.}{classmarlintpc_1_1VoxelTPC}. \end{DoxyCompactList}\item 
{\bf $\sim$\-Voxel\-T\-P\-C} ()\label{classmarlintpc_1_1VoxelTPC_ab9d2e63130f5ef9022a6294ae3582c78}

\begin{DoxyCompactList}\small\item\em Destructor of \doxyref{Voxel\-T\-P\-C}{p.}{classmarlintpc_1_1VoxelTPC}. \end{DoxyCompactList}\item 
L\-C\-Collection\-Vec $\ast$ {\bf get\-Voxel\-Collection} (double output\-Length=-\/1)
\begin{DoxyCompactList}\small\item\em Returns an L\-C\-Collection\-Vec of the stored T\-P\-C\-Voxels. \end{DoxyCompactList}\item 
L\-C\-Collection\-Vec $\ast$ {\bf fetch\-Voxel\-Collection} (double output\-Length=-\/1)\label{classmarlintpc_1_1VoxelTPC_a4772792efc7d05d4c4832ea2317594fa}

\begin{DoxyCompactList}\small\item\em Does the same as \doxyref{get\-Voxel\-Collection()}{p.}{classmarlintpc_1_1VoxelTPC_a223a370b3e3bfd3475f1c74c43f728a4} but erases the voxels from the map. \end{DoxyCompactList}\item 
std\-::list$&lt;$ std\-::pair\\*
$&lt;$ {\bf Voxel\-Index}, int $&gt;$ $&gt;$ $\ast$ {\bf get\-Voxel\-List} (double output\-Length=-\/1, bool erase=false)
\begin{DoxyCompactList}\small\item\em This function works like get\-Voxel\-Collection, but the output format is different. \end{DoxyCompactList}\item 
std\-::list$&lt;$ std\-::pair\\*
$&lt;$ {\bf Voxel\-Index}, int $&gt;$ $&gt;$ $\ast$ {\bf fetch\-Voxel\-List} (double output\-Length=-\/1)\label{classmarlintpc_1_1VoxelTPC_ab18294c44b1928332c0eff26d25ecce0}

\begin{DoxyCompactList}\small\item\em Convenience function\-: calls get\-Voxel\-Map with erase = true. \end{DoxyCompactList}\item 
void {\bf put\-Charge\-In\-Voxels} (Sim\-Tracker\-Hit $\ast$hit, double sigma\-Trans, double sigma\-Long=0)
\begin{DoxyCompactList}\small\item\em Distributes the charge onto the pads assuming a 2\-D Gaussian distribution with the width sigma\-Trans. \end{DoxyCompactList}\item 
void {\bf put\-Charge\-In\-Voxel} ({\bf T\-P\-C\-Voxel} const \&amp;voxel)
\begin{DoxyCompactList}\small\item\em Puts the charge into the voxel. \end{DoxyCompactList}\item 
void {\bf put\-Charge\-In\-Voxel} (int pad\-Index, double z\-Length, int charge, int module\-I\-D=0)
\begin{DoxyCompactList}\small\item\em Convenience function for \doxyref{put\-Charge\-In\-Voxel( T\-P\-C\-Voxel const \&amp;voxel)}{p.}{classmarlintpc_1_1VoxelTPC_ad03bf4dfb030de8bc597647c36ba5879}. \end{DoxyCompactList}\item 
{\bf T\-P\-C\-Voxel} {\bf get\-Voxel} (int pad\-Index, int time\-Index, int module\-I\-D=0)
\begin{DoxyCompactList}\small\item\em Get the voxel with a given index. \end{DoxyCompactList}\item 
std\-::vector$&lt;$ {\bf T\-P\-C\-Voxel} $&gt;$ {\bf get\-Voxels\-On\-Pad} (int pad\-Index, int module\-I\-D=0)\label{classmarlintpc_1_1VoxelTPC_a8118a0c9134b7b6e005e1f2f899c2b41}

\begin{DoxyCompactList}\small\item\em Returns a vector with all voxels with a specific pad (and module) index. \end{DoxyCompactList}\item 
std\-::vector$&lt;$ {\bf T\-P\-C\-Voxel} $&gt;$ {\bf get\-Voxels\-With\-Z\-Bin} (int z\-Bin)\label{classmarlintpc_1_1VoxelTPC_aad1734cee27e27a0527f2c333251bc74}

\begin{DoxyCompactList}\small\item\em Returns a vector of all non-\/empty voxels with a specific time index. \end{DoxyCompactList}\item 
void {\bf add\-Collection} (L\-C\-Collection $\ast$voxel\-Col)\label{classmarlintpc_1_1VoxelTPC_a47309430c84811dfa0aa7b864e1d364e}

\begin{DoxyCompactList}\small\item\em Adds the given collection of T\-P\-C\-Voxels to the map. \end{DoxyCompactList}\item 
void {\bf remove\-Voxel} ({\bf T\-P\-C\-Voxel} const \&amp;voxel)
\begin{DoxyCompactList}\small\item\em Removes a voxel from the set. \end{DoxyCompactList}\item 
void {\bf remove\-Voxel} (int pad\-Index, int z\-Bin, int module\-I\-D=0)\label{classmarlintpc_1_1VoxelTPC_a81f925e18c9fd1a1c09a5aa18fa04bb8}

\begin{DoxyCompactList}\small\item\em Removes a voxel with given pad index and z\-Bin from the map. \end{DoxyCompactList}\item 
void {\bf remove\-Voxels} (std\-::vector$&lt;$ {\bf T\-P\-C\-Voxel} $&gt;$ const \&amp;voxel\-Vec)
\begin{DoxyCompactList}\small\item\em Removes voxels in vector from the set. \end{DoxyCompactList}\item 
void {\bf remove\-Voxels\-On\-Pad} (int pad\-Index, int module\-I\-D=0)\label{classmarlintpc_1_1VoxelTPC_a26bfc05c58800bd5a3c8718fe42de6d7}

\begin{DoxyCompactList}\small\item\em Removes all voxels with given pad index. \end{DoxyCompactList}\item 
void {\bf remove\-Voxels\-With\-Z\-Bin} (int z\-Bin)\label{classmarlintpc_1_1VoxelTPC_a22e5041699be07b1ddc11b95c4790e7c}

\begin{DoxyCompactList}\small\item\em Removes all voxels with given time index. \end{DoxyCompactList}\item 
int {\bf get\-Z\-Bin} (double z\-Length)\label{classmarlintpc_1_1VoxelTPC_a1f15de9016978272875132be1f646346}

\begin{DoxyCompactList}\small\item\em Takes a length in z and returns the number of the corresponding z\-Bin. \end{DoxyCompactList}\item 
size\-\_\-t {\bf get\-Size} ()\label{classmarlintpc_1_1VoxelTPC_a300c404fa65fc7311ff18cd8df94934a}

\begin{DoxyCompactList}\small\item\em For debugging\-: get the size of the map. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::map$&lt;$ {\bf Voxel\-Index}, int $&gt;$ {\bf \-\_\-voxel\-Map}
\begin{DoxyCompactList}\small\item\em Map to store the information contained in the voxels. \end{DoxyCompactList}\item 
gear\-::\-T\-P\-C\-Parameters const $\ast$ {\bf \-\_\-tpc\-Parameters}\label{classmarlintpc_1_1VoxelTPC_a868461113faa552efbe2dd8940fb5024}

\begin{DoxyCompactList}\small\item\em Pointer on the gear pad layout. \end{DoxyCompactList}\item 
{\bf Hit\-Distributor} $\ast$ {\bf \-\_\-distribute\-Hit\-Ptr}\label{classmarlintpc_1_1VoxelTPC_aa59b713e053e48177b6999c7d22f0ac2}

\begin{DoxyCompactList}\small\item\em Pointer on Hit\-Smearer for the distribution of the hits. \end{DoxyCompactList}\item 
double {\bf \-\_\-length\-Of\-Z\-Bin}\label{classmarlintpc_1_1VoxelTPC_a4a907c034d84c37bb0e05644c2188791}

\begin{DoxyCompactList}\small\item\em Instantiation parameters. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The \doxyref{Voxel\-T\-P\-C}{p.}{classmarlintpc_1_1VoxelTPC} is a helper class containing a std\-::map of all T\-P\-C\-Voxels which contain charge. 

It uses the G\-E\-A\-R pad geometry and the length of a time bin to calculate the pad index and time index of the voxels. One time bin does not necessarily have to be one sample of the A\-D\-C. It can also be a nanosecond (useful to have good time resolution for a realistic electronics shaping) or one bunch crossing (to store one bunch train on a per event basis). 

\subsection{Member Function Documentation}
\index{marlintpc\-::\-Voxel\-T\-P\-C@{marlintpc\-::\-Voxel\-T\-P\-C}!get\-Voxel@{get\-Voxel}}
\index{get\-Voxel@{get\-Voxel}!marlintpc::VoxelTPC@{marlintpc\-::\-Voxel\-T\-P\-C}}
\subsubsection[{get\-Voxel}]{\setlength{\rightskip}{0pt plus 5cm}{\bf T\-P\-C\-Voxel} marlintpc\-::\-Voxel\-T\-P\-C\-::get\-Voxel (
\begin{DoxyParamCaption}
\item[{int}]{pad\-Index, }
\item[{int}]{time\-Index, }
\item[{int}]{module\-I\-D = {\ttfamily 0}}
\end{DoxyParamCaption}
)}\label{classmarlintpc_1_1VoxelTPC_aeeb9fdb6a73eb295e455e7267140d638}


Get the voxel with a given index. 

In case the voxel is not in the map it returns an empty voxel. \index{marlintpc\-::\-Voxel\-T\-P\-C@{marlintpc\-::\-Voxel\-T\-P\-C}!get\-Voxel\-Collection@{get\-Voxel\-Collection}}
\index{get\-Voxel\-Collection@{get\-Voxel\-Collection}!marlintpc::VoxelTPC@{marlintpc\-::\-Voxel\-T\-P\-C}}
\subsubsection[{get\-Voxel\-Collection}]{\setlength{\rightskip}{0pt plus 5cm}L\-C\-Collection\-Vec $\ast$ marlintpc\-::\-Voxel\-T\-P\-C\-::get\-Voxel\-Collection (
\begin{DoxyParamCaption}
\item[{double}]{output\-Length = {\ttfamily -\/1}}
\end{DoxyParamCaption}
)}\label{classmarlintpc_1_1VoxelTPC_a223a370b3e3bfd3475f1c74c43f728a4}


Returns an L\-C\-Collection\-Vec of the stored T\-P\-C\-Voxels. 

This vector is newly taken from the heap so it can be given to an event, which takes over the ownership. Be careful to delete it and all the voxels it contains if you don't add it to the event! Returns a pointer on the collection which contains all voxels with a z\-Bin below or equal to the given output\-Length. Default output\-Length is -\/1. If output\-Length is negative all voxels in the map are returned. 

Referenced by marlintpc\-::\-Ion\-Back\-Drift\-Processor\-::process\-Event(), and marlintpc\-::\-Ions\-In\-Voxels\-Processor\-::process\-Event().

\index{marlintpc\-::\-Voxel\-T\-P\-C@{marlintpc\-::\-Voxel\-T\-P\-C}!get\-Voxel\-List@{get\-Voxel\-List}}
\index{get\-Voxel\-List@{get\-Voxel\-List}!marlintpc::VoxelTPC@{marlintpc\-::\-Voxel\-T\-P\-C}}
\subsubsection[{get\-Voxel\-List}]{\setlength{\rightskip}{0pt plus 5cm}std\-::list$&lt;$ std\-::pair$&lt;$ {\bf Voxel\-T\-P\-C\-::\-Voxel\-Index}, int $&gt;$ $&gt;$ $\ast$ marlintpc\-::\-Voxel\-T\-P\-C\-::get\-Voxel\-List (
\begin{DoxyParamCaption}
\item[{double}]{output\-Length = {\ttfamily -\/1}, }
\item[{bool}]{erase = {\ttfamily false}}
\end{DoxyParamCaption}
)}\label{classmarlintpc_1_1VoxelTPC_a4c0320211dce4fd22546805dc0e6d6a7}


This function works like get\-Voxel\-Collection, but the output format is different. 

This is to keep the memory footprint low by bypassing the L\-C\-I\-O interface of a processor. \index{marlintpc\-::\-Voxel\-T\-P\-C@{marlintpc\-::\-Voxel\-T\-P\-C}!put\-Charge\-In\-Voxel@{put\-Charge\-In\-Voxel}}
\index{put\-Charge\-In\-Voxel@{put\-Charge\-In\-Voxel}!marlintpc::VoxelTPC@{marlintpc\-::\-Voxel\-T\-P\-C}}
\subsubsection[{put\-Charge\-In\-Voxel}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-Voxel\-T\-P\-C\-::put\-Charge\-In\-Voxel (
\begin{DoxyParamCaption}
\item[{{\bf T\-P\-C\-Voxel} const \&amp;}]{voxel}
\end{DoxyParamCaption}
)}\label{classmarlintpc_1_1VoxelTPC_ad03bf4dfb030de8bc597647c36ba5879}


Puts the charge into the voxel. 

If the voxel does not have charge yet it is added to the map, otherwise the charge is added to the existing entry for the voxel. Smearing is done in the x,y-\/plane according to transversal diffusion and if wanted also in z according to longitudinal diffusion 

References marlintpc\-::\-T\-P\-C\-Voxel\-::get\-Charge(), marlintpc\-::\-T\-P\-C\-Voxel\-::get\-Module\-I\-D(), marlintpc\-::\-T\-P\-C\-Voxel\-::get\-Pad\-Index(), and marlintpc\-::\-T\-P\-C\-Voxel\-::get\-Time\-Index().



Referenced by marlintpc\-::\-Ion\-Back\-Drift\-Processor\-::process\-Event(), and marlintpc\-::\-Ions\-In\-Voxels\-Processor\-::process\-Event().

\index{marlintpc\-::\-Voxel\-T\-P\-C@{marlintpc\-::\-Voxel\-T\-P\-C}!put\-Charge\-In\-Voxel@{put\-Charge\-In\-Voxel}}
\index{put\-Charge\-In\-Voxel@{put\-Charge\-In\-Voxel}!marlintpc::VoxelTPC@{marlintpc\-::\-Voxel\-T\-P\-C}}
\subsubsection[{put\-Charge\-In\-Voxel}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-Voxel\-T\-P\-C\-::put\-Charge\-In\-Voxel (
\begin{DoxyParamCaption}
\item[{int}]{pad\-Index, }
\item[{double}]{z\-Length, }
\item[{int}]{charge, }
\item[{int}]{module\-I\-D = {\ttfamily 0}}
\end{DoxyParamCaption}
)}\label{classmarlintpc_1_1VoxelTPC_ad531610e96908e222232eaee56793035}


Convenience function for \doxyref{put\-Charge\-In\-Voxel( T\-P\-C\-Voxel const \&amp;voxel)}{p.}{classmarlintpc_1_1VoxelTPC_ad03bf4dfb030de8bc597647c36ba5879}. 

It determines the z\-Bin corresponding to the given z length and then puts charge in voxel with given pad\-Index and z\-Bin \index{marlintpc\-::\-Voxel\-T\-P\-C@{marlintpc\-::\-Voxel\-T\-P\-C}!put\-Charge\-In\-Voxels@{put\-Charge\-In\-Voxels}}
\index{put\-Charge\-In\-Voxels@{put\-Charge\-In\-Voxels}!marlintpc::VoxelTPC@{marlintpc\-::\-Voxel\-T\-P\-C}}
\subsubsection[{put\-Charge\-In\-Voxels}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-Voxel\-T\-P\-C\-::put\-Charge\-In\-Voxels (
\begin{DoxyParamCaption}
\item[{Sim\-Tracker\-Hit $\ast$}]{hit, }
\item[{double}]{sigma\-Trans, }
\item[{double}]{sigma\-Long = {\ttfamily 0}}
\end{DoxyParamCaption}
)}\label{classmarlintpc_1_1VoxelTPC_ac78144e540e7d25085dbe9acd111fddb}


Distributes the charge onto the pads assuming a 2\-D Gaussian distribution with the width sigma\-Trans. 

The charge is deposited in the according voxels with the z\-Bin in arbitrry units, which can be chosen by the user e.\-g. drift time or a length scale. The z\-Bin can be smeared with a Gaussian with width sigma\-Long. By default sigma\-Long is 0 and the charge is not distributed in z. This is useful in case of single electrons which have been amplified in a G\-E\-M. Here charge is distributed in xy, but the distribution in z is negligible. 

Referenced by marlintpc\-::\-Mokka\-To\-Voxel\-Processor\-::process\-Event(), and marlintpc\-::\-Charge\-Distribution\-Processor\-::process\-Event().

\index{marlintpc\-::\-Voxel\-T\-P\-C@{marlintpc\-::\-Voxel\-T\-P\-C}!remove\-Voxel@{remove\-Voxel}}
\index{remove\-Voxel@{remove\-Voxel}!marlintpc::VoxelTPC@{marlintpc\-::\-Voxel\-T\-P\-C}}
\subsubsection[{remove\-Voxel}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-Voxel\-T\-P\-C\-::remove\-Voxel (
\begin{DoxyParamCaption}
\item[{{\bf T\-P\-C\-Voxel} const \&amp;}]{voxel}
\end{DoxyParamCaption}
)}\label{classmarlintpc_1_1VoxelTPC_a2aa1feb1bd53dc5c9e125ba358f7656e}


Removes a voxel from the set. 

It removes the corresponding voxel in the map, not the object which is passed to this function. 

References marlintpc\-::\-T\-P\-C\-Voxel\-::get\-Module\-I\-D(), marlintpc\-::\-T\-P\-C\-Voxel\-::get\-Pad\-Index(), and marlintpc\-::\-T\-P\-C\-Voxel\-::get\-Time\-Index().

\index{marlintpc\-::\-Voxel\-T\-P\-C@{marlintpc\-::\-Voxel\-T\-P\-C}!remove\-Voxels@{remove\-Voxels}}
\index{remove\-Voxels@{remove\-Voxels}!marlintpc::VoxelTPC@{marlintpc\-::\-Voxel\-T\-P\-C}}
\subsubsection[{remove\-Voxels}]{\setlength{\rightskip}{0pt plus 5cm}void marlintpc\-::\-Voxel\-T\-P\-C\-::remove\-Voxels (
\begin{DoxyParamCaption}
\item[{std\-::vector$&lt;$ {\bf T\-P\-C\-Voxel} $&gt;$ const \&amp;}]{voxel\-Vec}
\end{DoxyParamCaption}
)}\label{classmarlintpc_1_1VoxelTPC_a6c687822e1302a81e2504cdb28a34453}


Removes voxels in vector from the set. 

It removes the corresponding voxels in the map, not the objects in the vector. 

\subsection{Member Data Documentation}
\index{marlintpc\-::\-Voxel\-T\-P\-C@{marlintpc\-::\-Voxel\-T\-P\-C}!\-\_\-voxel\-Map@{\-\_\-voxel\-Map}}
\index{\-\_\-voxel\-Map@{\-\_\-voxel\-Map}!marlintpc::VoxelTPC@{marlintpc\-::\-Voxel\-T\-P\-C}}
\subsubsection[{\-\_\-voxel\-Map}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$&lt;${\bf Voxel\-Index}, int$&gt;$ marlintpc\-::\-Voxel\-T\-P\-C\-::\-\_\-voxel\-Map\hspace{0.3cm}{\ttfamily [protected]}}\label{classmarlintpc_1_1VoxelTPC_a057faab437f16faa289f4e1fb3e4b1c8}


Map to store the information contained in the voxels. 

pad\-Index and z\-Bin are used in a struct as key. The map sorted first by the z\-Bin then by the pad\-Index. the charge contained in the voxel is the map data. 

The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Voxel\-T\-P\-C.\-h\item 
Voxel\-T\-P\-C.\-cc\end{DoxyCompactItemize}
</pre></body></html>