\section{Soft\-Gauss\-Momentum\-Constraint Class Reference}
\label{classSoftGaussMomentumConstraint}\index{Soft\-Gauss\-Momentum\-Constraint@{Soft\-Gauss\-Momentum\-Constraint}}


Implements a soft constraint with chi$^\wedge$2=((efact$\ast$sum(E\-\_\-i) + pxfact$\ast$sum(p\-\_\-x,i)+pyfact$\ast$sum(p\-\_\-y,i)+pzfact$\ast$sum(p\-\_\-z,i)-\/value)/sigma)$^\wedge$2.  




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

Inheritance diagram for Soft\-Gauss\-Momentum\-Constraint\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=4.000000cm]{classSoftGaussMomentumConstraint}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Soft\-Gauss\-Momentum\-Constraint} (double sigma\-\_\-, double efact\-\_\-, double pxfact\-\_\-, double pyfact\-\_\-, double pzfact\-\_\-, double value\-\_\-=0)
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
virtual {\bf $\sim$\-Soft\-Gauss\-Momentum\-Constraint} ()\label{classSoftGaussMomentumConstraint_acba53325b47b578ee28b0e14008507cd}

\begin{DoxyCompactList}\small\item\em Virtual destructor. \end{DoxyCompactList}\item 
virtual double {\bf get\-Value} () const \label{classSoftGaussMomentumConstraint_a2f97a918c643a014044f15c86851d90b}

\begin{DoxyCompactList}\small\item\em Returns the value of the constraint function. \end{DoxyCompactList}\item 
virtual void {\bf get\-Derivatives} (int idim, double der[$\,$]) const 
\begin{DoxyCompactList}\small\item\em Get first order derivatives. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\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{classSoftGaussMomentumConstraint_a4bbbdce997eb6c4a1797e7e828a670df}

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

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

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

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

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


\subsection{Detailed Description}
Implements a soft constraint with chi$^\wedge$2=((efact$\ast$sum(E\-\_\-i) + pxfact$\ast$sum(p\-\_\-x,i)+pyfact$\ast$sum(p\-\_\-y,i)+pzfact$\ast$sum(p\-\_\-z,i)-\/value)/sigma)$^\wedge$2. 

This class implements soft constraints on the sum of energies, px, py, and pz. It can be used to for constraints of the form
\begin{DoxyItemize}
\item chi$^\wedge$2 = (sum(\-E)-\/sqrt(s))$^\wedge$2/sigma$^\wedge$2
\item chi$^\wedge$2 = (sum(px))$^\wedge$2/sigma$^\wedge$2
\item chi$^\wedge$2 = (sum(py))$^\wedge$2/sigma$^\wedge$2
\item chi$^\wedge$2 = (sum(pz))$^\wedge$2/sigma$^\wedge$2
\item chi$^\wedge$2 = (sum(\-E)-\/sum(pz)-\/2 Ee)$^\wedge$2/sigma$^\wedge$2
\end{DoxyItemize}

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{Soft\-Gauss\-Momentum\-Constraint@{Soft\-Gauss\-Momentum\-Constraint}!Soft\-Gauss\-Momentum\-Constraint@{Soft\-Gauss\-Momentum\-Constraint}}
\index{Soft\-Gauss\-Momentum\-Constraint@{Soft\-Gauss\-Momentum\-Constraint}!SoftGaussMomentumConstraint@{Soft\-Gauss\-Momentum\-Constraint}}
\subsubsection[{Soft\-Gauss\-Momentum\-Constraint}]{\setlength{\rightskip}{0pt plus 5cm}Soft\-Gauss\-Momentum\-Constraint\-::\-Soft\-Gauss\-Momentum\-Constraint (
\begin{DoxyParamCaption}
\item[{double}]{sigma\-\_\-, }
\item[{double}]{efact\-\_\-, }
\item[{double}]{pxfact\-\_\-, }
\item[{double}]{pyfact\-\_\-, }
\item[{double}]{pzfact\-\_\-, }
\item[{double}]{value\-\_\- = {\ttfamily 0}}
\end{DoxyParamCaption}
)}\label{classSoftGaussMomentumConstraint_a1477732bc8dff75277604ddc64bf3a43}


Constructor. 


\begin{DoxyParams}{Parameters}
{\em sigma\-\_\-} & The sigma value \\
\hline
{\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{Soft\-Gauss\-Momentum\-Constraint@{Soft\-Gauss\-Momentum\-Constraint}!first\-Derivatives@{first\-Derivatives}}
\index{first\-Derivatives@{first\-Derivatives}!SoftGaussMomentumConstraint@{Soft\-Gauss\-Momentum\-Constraint}}
\subsubsection[{first\-Derivatives}]{\setlength{\rightskip}{0pt plus 5cm}bool Soft\-Gauss\-Momentum\-Constraint\-::first\-Derivatives (
\begin{DoxyParamCaption}
\item[{int}]{i, }
\item[{double $\ast$}]{derivatives}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}\label{classSoftGaussMomentumConstraint_a10a1f073d36bbdb11ff8e68e14dfa40e}


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 Soft\-Gauss\-Particle\-Constraint} \doxyref{}{p.}{classSoftGaussParticleConstraint_a08e956b0334a8a221deb6e771ffcb0aa}.

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


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 Soft\-Gauss\-Particle\-Constraint} \doxyref{}{p.}{classSoftGaussParticleConstraint_a466338d7f4d153acc03a4d35b93a596b}.



References Soft\-Gauss\-Particle\-Constraint\-::fitobjects.

\index{Soft\-Gauss\-Momentum\-Constraint@{Soft\-Gauss\-Momentum\-Constraint}!second\-Derivatives@{second\-Derivatives}}
\index{second\-Derivatives@{second\-Derivatives}!SoftGaussMomentumConstraint@{Soft\-Gauss\-Momentum\-Constraint}}
\subsubsection[{second\-Derivatives}]{\setlength{\rightskip}{0pt plus 5cm}bool Soft\-Gauss\-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{classSoftGaussMomentumConstraint_abbfb7024a4959d4dc044dcf7f1cf5c2c}


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 Soft\-Gauss\-Particle\-Constraint} \doxyref{}{p.}{classSoftGaussParticleConstraint_ac8fb61123f71e58634acd87a22c805bd}.



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