<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\section{U\-T\-I\-L\-:\-:P\-I\-D\-Handler Class Reference}
\label{classUTIL_1_1PIDHandler}\index{U\-T\-I\-L\-::\-P\-I\-D\-Handler@{U\-T\-I\-L\-::\-P\-I\-D\-Handler}}


Convenient class for setting and retrieving particle id information attached to Reconstructed\-Particles.  




{\ttfamily \#include $&lt;$U\-T\-I\-L/\-P\-I\-D\-Handler.\-h$&gt;$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf P\-I\-D\-Handler} (const {\bf L\-C\-Collection} $\ast$col)\label{classUTIL_1_1PIDHandler_acad9c8142be6949930f9d317f36b9986}

\begin{DoxyCompactList}\small\item\em Create \doxyref{P\-I\-D\-Handler}{p.}{classUTIL_1_1PIDHandler} for reading from the given collection -\/ read the collection parameters P\-I\-D\-Algorithm\-Type\-Name, P\-I\-D\-Algorithm\-Type\-I\-D and the corresponding Parameter\-Names\-\_\-\-P\-I\-D\-Algorithm\-Type\-Name if they exist. \end{DoxyCompactList}\item 
{\bf P\-I\-D\-Handler} ({\bf L\-C\-Collection} $\ast$col)
\begin{DoxyCompactList}\small\item\em Create \doxyref{P\-I\-D\-Handler}{p.}{classUTIL_1_1PIDHandler} for setting P\-I\-D information in the given collection. \end{DoxyCompactList}\item 
{\bf $\sim$\-P\-I\-D\-Handler} ()\label{classUTIL_1_1PIDHandler_a7621c781819ea8f0ef9330f9b63f0ad4}

\begin{DoxyCompactList}\small\item\em Update the collection parameter when going out of scope. \end{DoxyCompactList}\item 
int {\bf add\-Algorithm} (const std\-::string \&amp;algo\-Name, const {\bf String\-Vec} \&amp;parameter\-Names)\label{classUTIL_1_1PIDHandler_a9cf638b3a7c120a9df17ee45a13a1d81}

\begin{DoxyCompactList}\small\item\em Add a new algorithm and return the corresponding algorithm id. \end{DoxyCompactList}\item 
int {\bf get\-Algorithm\-I\-D} (const std\-::string \&amp;algo\-Name)\label{classUTIL_1_1PIDHandler_a664c89cf31f123a7862a8ebdc96f4ada}

\begin{DoxyCompactList}\small\item\em Return the type\-I\-D of algorithm algo\-Name -\/ throws \doxyref{Unknown\-Algorithm}{p.}{classUTIL_1_1UnknownAlgorithm}. \end{DoxyCompactList}\item 
const std\-::string \&amp; {\bf get\-Algorithm\-Name} (int algo\-I\-D)\label{classUTIL_1_1PIDHandler_ab91dee023bad4f9c013d60a077282f6b}

\begin{DoxyCompactList}\small\item\em Return the name of the algorithm with id -\/ throws \doxyref{Unknown\-Algorithm}{p.}{classUTIL_1_1UnknownAlgorithm}. \end{DoxyCompactList}\item 
int {\bf get\-Parameter\-Index} (int algorithm\-I\-D, const std\-::string \&amp;p\-Name)\label{classUTIL_1_1PIDHandler_a9d69c97f137957a0fc8d0cb7d8f47394}

\begin{DoxyCompactList}\small\item\em The index of parameter p\-Name for the algorithm with algorithm\-I\-D -\/ throws Unknown\-Algoritm. \end{DoxyCompactList}\item 
const {\bf Particle\-I\-D} \&amp; {\bf get\-Particle\-I\-D} ({\bf L\-C\-Object} $\ast$particle, int algorithm\-I\-D)
\begin{DoxyCompactList}\small\item\em Return the (first) Particle\-I\-D object for the given algorithm and particle (or cluster) -\/ throws \doxyref{Unknown\-Algorithm}{p.}{classUTIL_1_1UnknownAlgorithm}. \end{DoxyCompactList}\item 
{\bf Particle\-I\-D\-Vec} {\bf get\-Particle\-I\-Ds} ({\bf L\-C\-Object} $\ast$p, int id)\label{classUTIL_1_1PIDHandler_a2c8b8783f78bfe225f4d33acbd01f662}

\begin{DoxyCompactList}\small\item\em Return all P\-I\-D objects for a given algorithm -\/ ordered with decreasing likelihood -\/ throws \doxyref{Unknown\-Algorithm}{p.}{classUTIL_1_1UnknownAlgorithm}. \end{DoxyCompactList}\item 
void {\bf set\-Particle\-I\-D\-Used} ({\bf I\-M\-P\-L\-::\-Reconstructed\-Particle\-Impl} $\ast$particle, int algorithm\-I\-D)
\begin{DoxyCompactList}\small\item\em Set the particle\-I\-D algorithm that is used for this particle's kinematic variables. \end{DoxyCompactList}\item 
const {\bf String\-Vec} \&amp; {\bf get\-Parameter\-Names} (int algorithm\-I\-D)\label{classUTIL_1_1PIDHandler_a2335c3a39ddedf418e4dbdd2b05438b8}

\begin{DoxyCompactList}\small\item\em The names of parameters for the algorithm with algorithm\-I\-D -\/ throws Unknown\-Algoritm. \end{DoxyCompactList}\item 
const {\bf Int\-Vec} \&amp; {\bf get\-Algorithm\-I\-Ds} ()\label{classUTIL_1_1PIDHandler_ad9c65749713fb864c8eab55738b8c354}

\begin{DoxyCompactList}\small\item\em Return the I\-Ds of all known Algorithms. \end{DoxyCompactList}\item 
void {\bf set\-Particle\-I\-D} ({\bf L\-C\-Object} $\ast$p, int user\-Type, int P\-D\-G, float likelihood, int algorithm\-I\-D, const {\bf Float\-Vec} \&amp;params)\label{classUTIL_1_1PIDHandler_a01641e74337700210fcf7a8cc0cef00c}

\begin{DoxyCompactList}\small\item\em Set the particle\-I\-D information for this particle (or cluster) -\/ throws \doxyref{Unknown\-Algorithm}{p.}{classUTIL_1_1UnknownAlgorithm}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
int {\bfseries next\-I\-D} ()\label{classUTIL_1_1PIDHandler_a91dd2e7780a754f8dd88bf35205fbf40}

\item 
void {\bfseries init} (const {\bf L\-C\-Collection} $\ast$col)\label{classUTIL_1_1PIDHandler_a97522f36d8a9da38818112cd70fcac38}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
{\bf L\-C\-Collection} $\ast$ {\bfseries \-\_\-col}\label{classUTIL_1_1PIDHandler_a8031b88abe24580acd5486efabbc6feb}

\item 
{\bf C\-P\-M} {\bfseries \-\_\-cpm}\label{classUTIL_1_1PIDHandler_a81c95284bc030312fb34332271b2a4fa}

\item 
int {\bfseries \-\_\-type}\label{classUTIL_1_1PIDHandler_ade72c6735cf45a2f49482783afbec3dd}

\item 
int {\bfseries \-\_\-max\-I\-D}\label{classUTIL_1_1PIDHandler_a3f053ea5e004ba91a65aa44c37fb36e0}

\item 
P\-N\-M {\bfseries \-\_\-p\-Names}\label{classUTIL_1_1PIDHandler_a94d921f955be05fc8fffb1e5446d349a}

\item 
C\-P\-M\-I\-N\-V {\bfseries \-\_\-cpm\-Inv}\label{classUTIL_1_1PIDHandler_a2b28bab4c5122bf8b13866547e13c888}

\item 
{\bf Int\-Vec} {\bfseries \-\_\-ids}\label{classUTIL_1_1PIDHandler_a9b5e2734269ed716251734d171e3cac7}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Convenient class for setting and retrieving particle id information attached to Reconstructed\-Particles. 

Use one instance of \doxyref{P\-I\-D\-Handler}{p.}{classUTIL_1_1PIDHandler} for one L\-C\-Collection only. When used for setting particle id information the scope of the \doxyref{P\-I\-D\-Handler}{p.}{classUTIL_1_1PIDHandler} must match that of the collection, as the collection parameters are updated automatically when the \doxyref{P\-I\-D\-Handler}{p.}{classUTIL_1_1PIDHandler} object goes out of scope. Reads (and updates) the collection parameters P\-I\-D\-Algorithm\-Type\-Name, P\-I\-D\-Algorithm\-Type\-I\-D and the corresponding Parameter\-Names\-\_\-\-P\-I\-D\-Algorithm\-Type\-Name for every algorithm used.

\begin{DoxySeeAlso}{See Also}
Reconstructed\-Particle 

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

\end{DoxyVersion}
\begin{DoxyParagraph}{Id\-:}
\doxyref{P\-I\-D\-Handler.\-h}{p.}{PIDHandler_8h_source},v 1.\-2 2010-\/01-\/21 16\-:28\-:25 gaede Exp 
\end{DoxyParagraph}


\subsection{Constructor \&amp; Destructor Documentation}
\index{U\-T\-I\-L\-::\-P\-I\-D\-Handler@{U\-T\-I\-L\-::\-P\-I\-D\-Handler}!P\-I\-D\-Handler@{P\-I\-D\-Handler}}
\index{P\-I\-D\-Handler@{P\-I\-D\-Handler}!UTIL::PIDHandler@{U\-T\-I\-L\-::\-P\-I\-D\-Handler}}
\subsubsection[{P\-I\-D\-Handler}]{\setlength{\rightskip}{0pt plus 5cm}U\-T\-I\-L\-::\-P\-I\-D\-Handler\-::\-P\-I\-D\-Handler (
\begin{DoxyParamCaption}
\item[{{\bf L\-C\-Collection} $\ast$}]{col}
\end{DoxyParamCaption}
)}\label{classUTIL_1_1PIDHandler_acc88465d7f1d816cc4fc5bbf72d7e04e}


Create \doxyref{P\-I\-D\-Handler}{p.}{classUTIL_1_1PIDHandler} for setting P\-I\-D information in the given collection. 


\begin{DoxyItemize}
\item read and update the collection parameters P\-I\-D\-Algorithm\-Type\-Name, P\-I\-D\-Algorithm\-Type\-I\-D and the corresponding Parameter\-Names\-\_\-\-P\-I\-D\-Algorithm\-Type\-Name if they exist. 
\end{DoxyItemize}

\subsection{Member Function Documentation}
\index{U\-T\-I\-L\-::\-P\-I\-D\-Handler@{U\-T\-I\-L\-::\-P\-I\-D\-Handler}!get\-Particle\-I\-D@{get\-Particle\-I\-D}}
\index{get\-Particle\-I\-D@{get\-Particle\-I\-D}!UTIL::PIDHandler@{U\-T\-I\-L\-::\-P\-I\-D\-Handler}}
\subsubsection[{get\-Particle\-I\-D}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf Particle\-I\-D} \&amp; U\-T\-I\-L\-::\-P\-I\-D\-Handler\-::get\-Particle\-I\-D (
\begin{DoxyParamCaption}
\item[{{\bf L\-C\-Object} $\ast$}]{particle, }
\item[{int}]{algorithm\-I\-D}
\end{DoxyParamCaption}
)}\label{classUTIL_1_1PIDHandler_a00fc29f1a684f5f449327d8951138b72}


Return the (first) Particle\-I\-D object for the given algorithm and particle (or cluster) -\/ throws \doxyref{Unknown\-Algorithm}{p.}{classUTIL_1_1UnknownAlgorithm}. 

Only use if you know there is only one P\-I\-D object for the algorithms or if you simply want the most likely P\-I\-D for this algorithm. 

References get\-Particle\-I\-Ds().

\index{U\-T\-I\-L\-::\-P\-I\-D\-Handler@{U\-T\-I\-L\-::\-P\-I\-D\-Handler}!set\-Particle\-I\-D\-Used@{set\-Particle\-I\-D\-Used}}
\index{set\-Particle\-I\-D\-Used@{set\-Particle\-I\-D\-Used}!UTIL::PIDHandler@{U\-T\-I\-L\-::\-P\-I\-D\-Handler}}
\subsubsection[{set\-Particle\-I\-D\-Used}]{\setlength{\rightskip}{0pt plus 5cm}void U\-T\-I\-L\-::\-P\-I\-D\-Handler\-::set\-Particle\-I\-D\-Used (
\begin{DoxyParamCaption}
\item[{{\bf I\-M\-P\-L\-::\-Reconstructed\-Particle\-Impl} $\ast$}]{particle, }
\item[{int}]{algorithm\-I\-D}
\end{DoxyParamCaption}
)}\label{classUTIL_1_1PIDHandler_a3910b5fb704a6df33f9d53da9ebf83bf}


Set the particle\-I\-D algorithm that is used for this particle's kinematic variables. 


\begin{DoxyItemize}
\item throws \doxyref{Unknown\-Algorithm}{p.}{classUTIL_1_1UnknownAlgorithm}. 
\end{DoxyItemize}

References I\-M\-P\-L\-::\-Reconstructed\-Particle\-Impl\-::get\-Particle\-I\-Ds().



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