\section{Momentum\-Constraint Class Reference}
\label{classMomentumConstraint}\index{Momentum\-Constraint@{Momentum\-Constraint}}


Implements a constraint of the form efact$\ast$sum(E)+pxfact$\ast$sum(px)+pyfact$\ast$sum(py)+pzfact$\ast$sum(pz)=value.  




{\ttfamily \#include $<$Momentum\-Constraint.\-h$>$}

Inheritance diagram for Momentum\-Constraint\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=4.000000cm]{classMomentumConstraint}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Momentum\-Constraint} (double efact\-\_\-=0, double pxfact\-\_\-=0, double pyfact\-\_\-=0, double pzfact\-\_\-=0, double value\-\_\-=0)
\item 
virtual double {\bf get\-Value} () const \label{classMomentumConstraint_ad0d3b50e2811161433b4fd116cd93c62}

\begin{DoxyCompactList}\small\item\em Returns the value of the constraint. \end{DoxyCompactList}\item 
virtual void {\bf get\-Derivatives} (int idim, double der[$\,$]) const 
\begin{DoxyCompactList}\small\item\em Get first order derivatives. \end{DoxyCompactList}\item 
virtual void {\bf invalidate\-Cache} () const \label{classMomentumConstraint_ad58b69a05e685d5742ca34a20394295f}

\begin{DoxyCompactList}\small\item\em Invalidates any cached values for the next event. \end{DoxyCompactList}\item 
virtual int {\bfseries get\-Var\-Basis} () const \label{classMomentumConstraint_a840c7d60ddd5ee99d24d444baa2f990e}

\end{DoxyCompactItemize}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
enum \{ {\bfseries V\-A\-R\-\_\-\-B\-A\-S\-I\-S} =0
 \}
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void {\bfseries update\-Cache} () const \label{classMomentumConstraint_a76410e18a91e73e17edddc889d88b6f6}

\item 
virtual bool {\bf second\-Derivatives} (int i, int j, double $\ast${\bf derivatives}) const 
\begin{DoxyCompactList}\small\item\em Second derivatives with respect to the 4-\/vectors of Fit objects i and j; result false if all derivatives are zero. \end{DoxyCompactList}\item 
virtual bool {\bf first\-Derivatives} (int i, double $\ast${\bf derivatives}) const 
\begin{DoxyCompactList}\small\item\em First derivatives with respect to the 4-\/vector of Fit objects i; result false if all derivatives are zero. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
double {\bfseries efact}\label{classMomentumConstraint_ad0d4e309b83a4f86561cfe423d27c24e}

\item 
double {\bfseries pxfact}\label{classMomentumConstraint_a99c0e2170d51727e3dcb0d1ea1abb9bb}

\item 
double {\bfseries pyfact}\label{classMomentumConstraint_a5209d8c3673c29501783995359069af8}

\item 
double {\bfseries pzfact}\label{classMomentumConstraint_a3ba1b5cf19689b701de5113200b78698}

\item 
double {\bfseries value}\label{classMomentumConstraint_a6b561290fa7f0a52bcecf9d8bf00a546}

\item 
bool {\bfseries cachevalid}\label{classMomentumConstraint_a3d0bc548bc3d89af2c6e6a5fd4965cdd}

\item 
int {\bfseries nparams}\label{classMomentumConstraint_aa3148fdd5bf076a345acc51043801a29}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
Implements a constraint of the form efact$\ast$sum(E)+pxfact$\ast$sum(px)+pyfact$\ast$sum(py)+pzfact$\ast$sum(pz)=value. 

Author\-: Jenny List, Benno List Last update\-: \begin{DoxyParagraph}{Date\-:}
2008/02/18 09\-:59\-:34 
\end{DoxyParagraph}
by\-: \begin{DoxyParagraph}{Author\-:}
blist 
\end{DoxyParagraph}


\subsection{Constructor \& Destructor Documentation}
\index{Momentum\-Constraint@{Momentum\-Constraint}!Momentum\-Constraint@{Momentum\-Constraint}}
\index{Momentum\-Constraint@{Momentum\-Constraint}!MomentumConstraint@{Momentum\-Constraint}}
\subsubsection[{Momentum\-Constraint}]{\setlength{\rightskip}{0pt plus 5cm}Momentum\-Constraint\-::\-Momentum\-Constraint (
\begin{DoxyParamCaption}
\item[{double}]{efact\-\_\- = {\ttfamily 0}, }
\item[{double}]{pxfact\-\_\- = {\ttfamily 0}, }
\item[{double}]{pyfact\-\_\- = {\ttfamily 0}, }
\item[{double}]{pzfact\-\_\- = {\ttfamily 0}, }
\item[{double}]{value\-\_\- = {\ttfamily 0}}
\end{DoxyParamCaption}
)}\label{classMomentumConstraint_a93bca0d0e64d29de656a53c5205e2728}

\begin{DoxyParams}{Parameters}
{\em efact\-\_\-} & Factor for energy sum \\
\hline
{\em pxfact\-\_\-} & Factor for px sum \\
\hline
{\em pyfact\-\_\-} & Factor for py sum \\
\hline
{\em pzfact\-\_\-} & Factor for pz sum \\
\hline
{\em value\-\_\-} & Target value of sum \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\index{Momentum\-Constraint@{Momentum\-Constraint}!first\-Derivatives@{first\-Derivatives}}
\index{first\-Derivatives@{first\-Derivatives}!MomentumConstraint@{Momentum\-Constraint}}
\subsubsection[{first\-Derivatives}]{\setlength{\rightskip}{0pt plus 5cm}bool Momentum\-Constraint\-::first\-Derivatives (
\begin{DoxyParamCaption}
\item[{int}]{i, }
\item[{double $\ast$}]{derivatives}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}\label{classMomentumConstraint_a299c5fed7afced190353b0d5d6b5f956}


First derivatives with respect to the 4-\/vector of Fit objects i; result false if all derivatives are zero. 


\begin{DoxyParams}{Parameters}
{\em i} & number of 1st Fit\-Object \\
\hline
{\em derivatives} & The result 4-\/vector \\
\hline
\end{DoxyParams}


Implements {\bf Base\-Hard\-Constraint} \doxyref{}{p.}{classBaseHardConstraint_a26b5d72caf3176a1568c9327e309700f}.

\index{Momentum\-Constraint@{Momentum\-Constraint}!get\-Derivatives@{get\-Derivatives}}
\index{get\-Derivatives@{get\-Derivatives}!MomentumConstraint@{Momentum\-Constraint}}
\subsubsection[{get\-Derivatives}]{\setlength{\rightskip}{0pt plus 5cm}void Momentum\-Constraint\-::get\-Derivatives (
\begin{DoxyParamCaption}
\item[{int}]{idim, }
\item[{double}]{der[$\,$]}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classMomentumConstraint_a60fa38a84077150d36297709ae812dc6}


Get first order derivatives. 

Call this with a predefined array \char`\"{}der\char`\"{} with the necessary number of entries! 
\begin{DoxyParams}{Parameters}
{\em idim} & First dimension of the array \\
\hline
{\em der} & Array of derivatives, at least idim x idim \\
\hline
\end{DoxyParams}


Implements {\bf Base\-Hard\-Constraint} \doxyref{}{p.}{classBaseHardConstraint_aece9761955facf0914a59888c0253762}.



References Base\-Hard\-Constraint\-::fitobjects, Particle\-Fit\-Object\-::get\-D\-E(), Particle\-Fit\-Object\-::get\-D\-Px(), Particle\-Fit\-Object\-::get\-D\-Py(), and Particle\-Fit\-Object\-::get\-D\-Pz().

\index{Momentum\-Constraint@{Momentum\-Constraint}!second\-Derivatives@{second\-Derivatives}}
\index{second\-Derivatives@{second\-Derivatives}!MomentumConstraint@{Momentum\-Constraint}}
\subsubsection[{second\-Derivatives}]{\setlength{\rightskip}{0pt plus 5cm}bool Momentum\-Constraint\-::second\-Derivatives (
\begin{DoxyParamCaption}
\item[{int}]{i, }
\item[{int}]{j, }
\item[{double $\ast$}]{derivatives}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}\label{classMomentumConstraint_a53ef154476fc6f44ce44dc268e0b34a5}


Second derivatives with respect to the 4-\/vectors of Fit objects i and j; result false if all derivatives are zero. 


\begin{DoxyParams}{Parameters}
{\em i} & number of 1st Fit\-Object \\
\hline
{\em j} & number of 2nd Fit\-Object \\
\hline
{\em derivatives} & The result 4x4 matrix \\
\hline
\end{DoxyParams}


Implements {\bf Base\-Hard\-Constraint} \doxyref{}{p.}{classBaseHardConstraint_afc5d5695e93d9f68647dbdd33dc3637d}.



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