\hypertarget{classPamCutCollection}{
\section{PamCutCollection Class Reference}
\label{classPamCutCollection}\index{PamCutCollection@{PamCutCollection}}
}
A class which applies a set of cuts to Pamela data.  


{\tt \#include $<$PamCutBase.h$>$}

Inheritance diagram for PamCutCollection::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=5cm]{classPamCutCollection}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hyperlink{classPamCutCollection_756d6cc1c69e85a0f76e7674789c5588}{PamCutCollection} (const char $\ast$collectionName)
\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 
\hyperlink{classPamCutCollection_932711c5f613639091adbcd851107b0c}{$\sim$PamCutCollection} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
void \hyperlink{classPamCutCollection_6dc6a92a7ee9243f567a2a244e1e5685}{AddCut} (\hyperlink{classPamCut}{PamCut} \&cut)
\begin{CompactList}\small\item\em Adds a cut to the cut collection This routine adds a cut to the collection. These are stored in a vector in the same order they are inserted (the first cut would be element 0, the second cut element 1 and so on). All the references to a \char`\"{}cut number\char`\"{} or \char`\"{}cut index\char`\"{} will refer to this numbering scheme. \item\end{CompactList}\item 
int \hyperlink{classPamCutCollection_85f04cef7b560a37061391dd397813a7}{Check} (PamLevel2 $\ast$event)
\begin{CompactList}\small\item\em The basic selection. \item\end{CompactList}\item 
int \hyperlink{classPamCutCollection_e7af429a3afef3685cbd5aa076ef96e5}{ApplyCut} (PamLevel2 $\ast$event)
\begin{CompactList}\small\item\em Applies the cuts to the current event. \item\end{CompactList}\item 
\hyperlink{classPamCut}{PamCut} $\ast$ \hyperlink{classPamCutCollection_55e41082749260f5cee2fd53d9fd331b}{GetCut} (unsigned int iCut)
\begin{CompactList}\small\item\em Returns a pointer to the iCut-th cut. \item\end{CompactList}\item 
unsigned int \hyperlink{classPamCutCollection_231f91b82b18cf326a2912b0b515baca}{GetSize} ()
\begin{CompactList}\small\item\em The number of cuts contained in the collection. \item\end{CompactList}\item 
void \hyperlink{classPamCutCollection_982821389af5e585688611d733b3a7b0}{Setup} (PamLevel2 $\ast$events)
\begin{CompactList}\small\item\em The pre-analysis task definition. \item\end{CompactList}\item 
void \hyperlink{classPamCutCollection_15785c75fb13b998422739e741bb5c01}{Finalize} ()
\begin{CompactList}\small\item\em The post-analysis task definition. \item\end{CompactList}\item 
\hyperlink{classPamCutCollection}{PamCutCollection} \& \hyperlink{classPamCutCollection_3fb36e5fb38627f5cbffe6c23cf57d2a}{operator=} (const \hyperlink{classPamCutCollection}{PamCutCollection} \&rightValue)
\begin{CompactList}\small\item\em Assignment operator redefinition. The assignment operator replaces the content of the LHS with that of RHS. The net effect would be that the cuts contained in the LHS are exactly the same that are in the RHS. In particular, this means that any modification to one of the cuts will propagate both to the LHS and RHS collections. Also the cut name will be copied, since the implementation invokes \hyperlink{classPamCut_cff560f2c6a663345c81f95df905956e}{PamCut::operator=}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
std::vector$<$ \hyperlink{classPamCut}{PamCut} $\ast$ $>$ \hyperlink{classPamCutCollection_95f91f4b81f916cb6e120ee4b5bb5403}{\_\-cuts}
\begin{CompactList}\small\item\em A vector containing pointers to \hyperlink{classPamCut}{PamCut} objects. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
A class which applies a set of cuts to Pamela data. 

This is a multi-cut class, which inherits from \hyperlink{classPamCut}{PamCut}. Indeed, a multi-cut can be seen as a cut composed by various simpler cuts; hence the interface of \hyperlink{classPamCut}{PamCut} is also functional for \hyperlink{classPamCutCollection}{PamCutCollection}. The \hyperlink{classPamCutCollection_e7af429a3afef3685cbd5aa076ef96e5}{ApplyCut(PamLevel2 $\ast$event)} method is overridden so as all the cuts that compose the \hyperlink{classPamCutCollection}{PamCutCollection} are applied to the events in the same order they are added to the collection. Instead, \hyperlink{classPamCut_047b75499ea4457d60397ee5491adcd4}{Process(PamLevel2 $\ast$events, ULong\_\-t firstEvent, ULong\_\-t lastEvent)} is NOT overridden, since it performs the same task as the one in the base class: it is sufficient to override \hyperlink{classPamCutCollection_85f04cef7b560a37061391dd397813a7}{Check(PamLevel2 $\ast$event)} to replace the single-cut evaluation with a multi-cut evaluation. 

Definition at line 171 of file PamCutBase.h.

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classPamCutCollection_756d6cc1c69e85a0f76e7674789c5588}{
\index{PamCutCollection@{PamCutCollection}!PamCutCollection@{PamCutCollection}}
\index{PamCutCollection@{PamCutCollection}!PamCutCollection@{PamCutCollection}}
\subsubsection[{PamCutCollection}]{\setlength{\rightskip}{0pt plus 5cm}PamCutCollection::PamCutCollection (const char $\ast$ {\em collectionName})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classPamCutCollection_756d6cc1c69e85a0f76e7674789c5588}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em collectionName}]The collection's name. \end{description}
\end{Desc}


Definition at line 178 of file PamCutBase.h.\hypertarget{classPamCutCollection_932711c5f613639091adbcd851107b0c}{
\index{PamCutCollection@{PamCutCollection}!$\sim$PamCutCollection@{$\sim$PamCutCollection}}
\index{$\sim$PamCutCollection@{$\sim$PamCutCollection}!PamCutCollection@{PamCutCollection}}
\subsubsection[{$\sim$PamCutCollection}]{\setlength{\rightskip}{0pt plus 5cm}PamCutCollection::$\sim$PamCutCollection ()\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classPamCutCollection_932711c5f613639091adbcd851107b0c}


Destructor. 



Definition at line 183 of file PamCutBase.h.

\subsection{Member Function Documentation}
\hypertarget{classPamCutCollection_6dc6a92a7ee9243f567a2a244e1e5685}{
\index{PamCutCollection@{PamCutCollection}!AddCut@{AddCut}}
\index{AddCut@{AddCut}!PamCutCollection@{PamCutCollection}}
\subsubsection[{AddCut}]{\setlength{\rightskip}{0pt plus 5cm}void PamCutCollection::AddCut ({\bf PamCut} \& {\em cut})}}
\label{classPamCutCollection_6dc6a92a7ee9243f567a2a244e1e5685}


Adds a cut to the cut collection This routine adds a cut to the collection. These are stored in a vector in the same order they are inserted (the first cut would be element 0, the second cut element 1 and so on). All the references to a \char`\"{}cut number\char`\"{} or \char`\"{}cut index\char`\"{} will refer to this numbering scheme. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cut}]The PamCut-derived object to add to the collection. \end{description}
\end{Desc}


Definition at line 74 of file PamCutBase.cpp.

References \_\-cuts.\hypertarget{classPamCutCollection_e7af429a3afef3685cbd5aa076ef96e5}{
\index{PamCutCollection@{PamCutCollection}!ApplyCut@{ApplyCut}}
\index{ApplyCut@{ApplyCut}!PamCutCollection@{PamCutCollection}}
\subsubsection[{ApplyCut}]{\setlength{\rightskip}{0pt plus 5cm}int PamCutCollection::ApplyCut (PamLevel2 $\ast$ {\em event})\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
\label{classPamCutCollection_e7af429a3afef3685cbd5aa076ef96e5}


Applies the cuts to the current event. 

This routine works pretty much like the redefinition of \hyperlink{classPamCutCollection_85f04cef7b560a37061391dd397813a7}{Check()}, calling \hyperlink{classPamCutCollection_e7af429a3afef3685cbd5aa076ef96e5}{ApplyCut()} (instead of \hyperlink{classPamCutCollection_85f04cef7b560a37061391dd397813a7}{Check()} )for each cut. If a cut fails, it calls \hyperlink{classPamCut_cbb3b507d79f20878fac4392ffa57acb}{OnBad()}, passing the index of the failed cut as the selectionResult argument. If all the cuts are successful, it calls \hyperlink{classPamCut_56021e959232270c12528ddec3062985}{OnGood()}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em event}]The event to analyze. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]same return values as \hyperlink{classPamCutCollection_85f04cef7b560a37061391dd397813a7}{Check()}. \end{Desc}


Reimplemented from \hyperlink{classPamCut_132a1a7cf365ff28eca38b7dda1acb7f}{PamCut}.

Reimplemented in \hyperlink{classBlindCutCollection_8d387de8cbc54ff0eab8cff220b49c20}{BlindCutCollection}.

Definition at line 94 of file PamCutBase.cpp.

References \_\-cuts, PamCut::\_\-nEv, PamCut::\_\-nGood, CUTOK, PamCut::OnBad(), and PamCut::OnGood().\hypertarget{classPamCutCollection_85f04cef7b560a37061391dd397813a7}{
\index{PamCutCollection@{PamCutCollection}!Check@{Check}}
\index{Check@{Check}!PamCutCollection@{PamCutCollection}}
\subsubsection[{Check}]{\setlength{\rightskip}{0pt plus 5cm}int PamCutCollection::Check (PamLevel2 $\ast$ {\em event})\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
\label{classPamCutCollection_85f04cef7b560a37061391dd397813a7}


The basic selection. 

Like in the mother class, this method performs a basic check on the current event: it calls \hyperlink{classPamCutCollection_85f04cef7b560a37061391dd397813a7}{Check()} for each cut previously added with \hyperlink{classPamCutCollection_6dc6a92a7ee9243f567a2a244e1e5685}{AddCut()}, exiting if one of them is not satisfied.

\begin{Desc}
\item[Returns:]the index of the failed cut (range: \mbox{[}0, \#cuts-1\mbox{]}, see \hyperlink{classPamCutCollection_6dc6a92a7ee9243f567a2a244e1e5685}{AddCut()}); \hyperlink{CommonDefs_8h_c857f4b76ae431837cbf61fd74863b6c}{CUTOK} if the event satisfies all the cuts. \end{Desc}


Implements \hyperlink{classPamCut_a874600461950d1f2b75ce3938f91cbe}{PamCut}.

Reimplemented in \hyperlink{classBlindCutCollection_016ee86612e57a50f03c8469d3ed9d1f}{BlindCutCollection}.

Definition at line 78 of file PamCutBase.cpp.

References \_\-cuts, and CUTOK.\hypertarget{classPamCutCollection_15785c75fb13b998422739e741bb5c01}{
\index{PamCutCollection@{PamCutCollection}!Finalize@{Finalize}}
\index{Finalize@{Finalize}!PamCutCollection@{PamCutCollection}}
\subsubsection[{Finalize}]{\setlength{\rightskip}{0pt plus 5cm}void PamCutCollection::Finalize ()\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
\label{classPamCutCollection_15785c75fb13b998422739e741bb5c01}


The post-analysis task definition. 

This override of the \hyperlink{classPamCutCollection_15785c75fb13b998422739e741bb5c01}{Finalize()} method calls \hyperlink{classPamCut_fd74c1565552cabe4aced316df803737}{PamCut::Finalize()} and then the \hyperlink{classPamCutCollection_15785c75fb13b998422739e741bb5c01}{Finalize()} method of each cut contained in the collection, in the same order. 

Reimplemented from \hyperlink{classPamCut_fd74c1565552cabe4aced316df803737}{PamCut}.

Reimplemented in \hyperlink{classSmartBlindCollection_a78ee7b18b0913554e64b4e560453167}{SmartBlindCollection}, \hyperlink{classSmartCollection_8105730615ad127a482a7fb399695977}{SmartCollection}, \hyperlink{classVerboseBlindCollection_43d6ea7b5ea35c5dbb342e23584b79ee}{VerboseBlindCollection}, and \hyperlink{classVerboseCollection_3fcdf28d50507d772647d4306a78f3cc}{VerboseCollection}.

Definition at line 146 of file PamCutBase.cpp.

References \_\-cuts, and GetSize().\hypertarget{classPamCutCollection_55e41082749260f5cee2fd53d9fd331b}{
\index{PamCutCollection@{PamCutCollection}!GetCut@{GetCut}}
\index{GetCut@{GetCut}!PamCutCollection@{PamCutCollection}}
\subsubsection[{GetCut}]{\setlength{\rightskip}{0pt plus 5cm}{\bf PamCut} $\ast$ PamCutCollection::GetCut (unsigned int {\em iCut})}}
\label{classPamCutCollection_55e41082749260f5cee2fd53d9fd331b}


Returns a pointer to the iCut-th cut. 

The return value of this method is a pointer to a \hyperlink{classPamCut}{PamCut} object; hence, to use the specific method of derived cuts it must be cast to the proper cut class.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em iCut}]The cut number, defined as the insertion order (from 0 to \#cuts-1, see \hyperlink{classPamCutCollection_6dc6a92a7ee9243f567a2a244e1e5685}{AddCut()}). \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]pointer to the iCut-th cut; NULL if the specified cut cannot be found or if no cuts are present. \end{Desc}


Definition at line 116 of file PamCutBase.cpp.

References \_\-cuts.

Referenced by VerboseCollection::Finalize(), and VerboseBlindCollection::Finalize().\hypertarget{classPamCutCollection_231f91b82b18cf326a2912b0b515baca}{
\index{PamCutCollection@{PamCutCollection}!GetSize@{GetSize}}
\index{GetSize@{GetSize}!PamCutCollection@{PamCutCollection}}
\subsubsection[{GetSize}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int PamCutCollection::GetSize ()}}
\label{classPamCutCollection_231f91b82b18cf326a2912b0b515baca}


The number of cuts contained in the collection. 

\begin{Desc}
\item[Returns:]The number of cuts \end{Desc}


Definition at line 125 of file PamCutBase.cpp.

References \_\-cuts.

Referenced by Finalize(), VerboseCollection::Finalize(), VerboseBlindCollection::Finalize(), and Setup().\hypertarget{classPamCutCollection_3fb36e5fb38627f5cbffe6c23cf57d2a}{
\index{PamCutCollection@{PamCutCollection}!operator=@{operator=}}
\index{operator=@{operator=}!PamCutCollection@{PamCutCollection}}
\subsubsection[{operator=}]{\setlength{\rightskip}{0pt plus 5cm}{\bf PamCutCollection} \& PamCutCollection::operator= (const {\bf PamCutCollection} \& {\em rightValue})}}
\label{classPamCutCollection_3fb36e5fb38627f5cbffe6c23cf57d2a}


Assignment operator redefinition. The assignment operator replaces the content of the LHS with that of RHS. The net effect would be that the cuts contained in the LHS are exactly the same that are in the RHS. In particular, this means that any modification to one of the cuts will propagate both to the LHS and RHS collections. Also the cut name will be copied, since the implementation invokes \hyperlink{classPamCut_cff560f2c6a663345c81f95df905956e}{PamCut::operator=}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rightValue}]The RHS. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The new value for LHS. \end{Desc}


Definition at line 130 of file PamCutBase.cpp.

References \_\-cuts.\hypertarget{classPamCutCollection_982821389af5e585688611d733b3a7b0}{
\index{PamCutCollection@{PamCutCollection}!Setup@{Setup}}
\index{Setup@{Setup}!PamCutCollection@{PamCutCollection}}
\subsubsection[{Setup}]{\setlength{\rightskip}{0pt plus 5cm}void PamCutCollection::Setup (PamLevel2 $\ast$ {\em events})\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
\label{classPamCutCollection_982821389af5e585688611d733b3a7b0}


The pre-analysis task definition. 

This override of the \hyperlink{classPamCutCollection_982821389af5e585688611d733b3a7b0}{Setup()} method calls \hyperlink{classPamCutCollection_982821389af5e585688611d733b3a7b0}{Setup()} for the base class \hyperlink{classPamCut}{PamCut}, and subsequently for each cut contained in the collection, in the same order the cuts were added to the collection.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em events}]The PamLevel2 pointer to the events that will be analyzed. Unused, but required by the interface. \end{description}
\end{Desc}


Reimplemented from \hyperlink{classPamCut_e587828903b809c99f9ab5ba97ae6616}{PamCut}.

Reimplemented in \hyperlink{classSmartBlindCollection_e59d373921df00a54a8a8401a1ae2baf}{SmartBlindCollection}, and \hyperlink{classSmartCollection_9b5b11a854b9e174218ea516ceffb34c}{SmartCollection}.

Definition at line 137 of file PamCutBase.cpp.

References \_\-cuts, and GetSize().

\subsection{Member Data Documentation}
\hypertarget{classPamCutCollection_95f91f4b81f916cb6e120ee4b5bb5403}{
\index{PamCutCollection@{PamCutCollection}!\_\-cuts@{\_\-cuts}}
\index{\_\-cuts@{\_\-cuts}!PamCutCollection@{PamCutCollection}}
\subsubsection[{\_\-cuts}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf PamCut}$\ast$$>$ {\bf PamCutCollection::\_\-cuts}\hspace{0.3cm}{\tt  \mbox{[}protected\mbox{]}}}}
\label{classPamCutCollection_95f91f4b81f916cb6e120ee4b5bb5403}


A vector containing pointers to \hyperlink{classPamCut}{PamCut} objects. 



Definition at line 261 of file PamCutBase.h.

Referenced by AddCut(), ApplyCut(), BlindCutCollection::ApplyCut(), Check(), BlindCutCollection::Check(), Finalize(), VerboseCollection::Finalize(), VerboseBlindCollection::Finalize(), GetCut(), GetSize(), operator=(), and Setup().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
PamCutBase/\hyperlink{PamCutBase_8h}{PamCutBase.h}\item 
PamCutBase/\hyperlink{PamCutBase_8cpp}{PamCutBase.cpp}\end{CompactItemize}
