CMS 3D CMS Logo

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 130 of file Base_Constrainer.h.

Constructor & Destructor Documentation

◆ Constraint_Calculator()

hitfit::Constraint_Calculator::Constraint_Calculator ( int  nconstraints)

Constructor.

Parameters
nconstraintsNumber of constraint equations.

Definition at line 134 of file Base_Constrainer.cc.

◆ ~Constraint_Calculator()

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

Destructor.

Definition at line 148 of file Base_Constrainer.h.

148 {}

Member Function Documentation

◆ eval()

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.

◆ nconstraints()

int hitfit::Constraint_Calculator::nconstraints ( ) const

Return the number of constraints.

Definition at line 143 of file Base_Constrainer.cc.

150  {
151  return _nconstraints;
152  }

References _nconstraints.

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

Member Data Documentation

◆ _nconstraints

int hitfit::Constraint_Calculator::_nconstraints
private

Number of constraints functions.

Definition at line 202 of file Base_Constrainer.h.

Referenced by nconstraints().

hitfit::Constraint_Calculator::nconstraints
int nconstraints() const
Definition: Base_Constrainer.cc:143
hitfit::Constraint_Calculator::_nconstraints
int _nconstraints
Definition: Base_Constrainer.h:202