CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
hitfit::Constraint_Calculator Class Referenceabstract

Abstract base class for evaluating constraints. Users derive from this class and implement the eval() method. More...

#include <Base_Constrainer.h>

Inheritance diagram for hitfit::Constraint_Calculator:
hitfit::Fourvec_Constraint_Calculator

Public Member Functions

 Constraint_Calculator (int nconstraints)
 
virtual bool eval (const Column_Vector &x, const Column_Vector &y, Row_Vector &F, Matrix &Bx, Matrix &By)=0
 Evaluate constraints at the point described by x and y (well-measured and poorly-measured variables, respectively). The results should be stored in F. Bx and By should be set to the gradients of F with respect to x and y, respectively. More...
 
int nconstraints () const
 
virtual ~Constraint_Calculator ()
 

Private Attributes

int _nconstraints
 

Detailed Description

Abstract base class for evaluating constraints. Users derive from this class and implement the eval() method.

Definition at line 139 of file Base_Constrainer.h.

Constructor & Destructor Documentation

hitfit::Constraint_Calculator::Constraint_Calculator ( int  nconstraints)

Constructor.

Parameters
nconstraintsNumber of constraint equations.

Definition at line 147 of file Base_Constrainer.cc.

virtual hitfit::Constraint_Calculator::~Constraint_Calculator ( )
inlinevirtual

Destructor.

Definition at line 157 of file Base_Constrainer.h.

157 {}

Member Function Documentation

virtual bool hitfit::Constraint_Calculator::eval ( const Column_Vector x,
const Column_Vector y,
Row_Vector F,
Matrix Bx,
Matrix By 
)
pure virtual

Evaluate constraints at the point described by x and y (well-measured and poorly-measured variables, respectively). The results should be stored in F. Bx and By should be set to the gradients of F with respect to x and y, respectively.

Parameters
xColumn_Vector of well-measured variables.
yColumn_Vector of poorly-measured variables.
FRow_Vector contains the results of the constraint evaluation.
BxGradients of F with respect to x
ByGradients of F with respect to y
Output:
  • F.
  • Bx.
  • By.
Return:
true if the point (x,y) is accepted.
false if the point (x,y) is rejected (i.e., in an unphysical region). The constraints need not be evaluated in that case.

Implemented in hitfit::Fourvec_Constraint_Calculator.

int hitfit::Constraint_Calculator::nconstraints ( ) const

Return the number of constraints.

Definition at line 159 of file Base_Constrainer.cc.

References _nconstraints.

Referenced by hitfit::Chisq_Constrainer::fit().

166 {
167  return _nconstraints;
168 }

Member Data Documentation

int hitfit::Constraint_Calculator::_nconstraints
private

Number of constraints functions.

Definition at line 216 of file Base_Constrainer.h.

Referenced by nconstraints().