Base class for constrained fitter. More...
#include <Base_Constrainer.h>
Public Member Functions | |
Base_Constrainer (const Base_Constrainer_Args &args) | |
virtual double | fit (Constraint_Calculator &constraint_calculator, const Column_Vector &xm, Column_Vector &x, const Column_Vector &ym, Column_Vector &y, const Matrix &G_i, const Diagonal_Matrix &Y, Column_Vector &pullx, Column_Vector &pully, Matrix &Q, Matrix &R, Matrix &S)=0 |
Perform the constrained fit. More... | |
virtual std::ostream & | print (std::ostream &s) const |
Print out internal state to output stream. More... | |
virtual | ~Base_Constrainer () |
Protected Member Functions | |
bool | call_constraint_fcn (Constraint_Calculator &constraint_calculator, const Column_Vector &x, const Column_Vector &y, Row_Vector &F, Matrix &Bx, Matrix &By) const |
Helper function to evaluate constraints. This takes care of checking what the user function returns againts numerical derivatives, it that was requested. More... | |
Private Attributes | |
const Base_Constrainer_Args | _args |
Friends | |
std::ostream & | operator<< (std::ostream &s, const Base_Constrainer &f) |
Output stream operator, print the content of this Base_Constrainer to an output stream. More... | |
Base class for constrained fitter.
Definition at line 228 of file Base_Constrainer.h.
hitfit::Base_Constrainer::Base_Constrainer | ( | const Base_Constrainer_Args & | args | ) |
Constructor.
args | Contains the parameter settings for this instance. |
Definition at line 174 of file Base_Constrainer.cc.
|
inlinevirtual |
|
protected |
Helper function to evaluate constraints. This takes care of checking what the user function returns againts numerical derivatives, it that was requested.
constraint_calculator | the User-supplied object to evaluate the constraints. |
x | Vector of well-measured quantities where we evaluate the constraints. Has dimension of Nw. |
y | Vector of poorly-measured quantities where we evaluate the the constraints. Has dimension of Np. |
F | Results of the constraint functions. |
Bx | Gradients of F with respect to x, has dimension (Nw,Nc). |
By | Gradients of F with respect to y, has dimension (Np,Nc). |
Definition at line 230 of file Base_Constrainer.cc.
References gather_cfg::cout, F(), i, j, and x().
Referenced by hitfit::Chisq_Constrainer::fit().
|
pure virtual |
Perform the constrained fit.
constraint_calculator | The object that will be used to evaluate the constraints. |
xm | Measured values of the well-measured variables, has dimension Nw. |
x | Before the fit: starting value of the well-measured variables for the fit, has dimension Nw. After the fit: final values of the well-measured variables. |
ym | Measured values of the poorly-measured variables, has dimension Np. |
y | Before the fit: starting value of the poorly-measured variables for the fit, has dimension Np. After the fit: final values of the poorly-measured variables. |
G_i | Error matrix for the well-measured variables, has dimension Nw,Nw. |
Y | Inverse error matrix for the poorly-measured variables, has dimension Np,Np. |
pullx | Pull quantities for the well-measured variables, has dimension Nw. |
pully | Pull quantities for the poorly-measured variables, has dimension Np. |
Q | Error matrix for the well-measured variables, has dimension Nw,Nw. |
R | Error matrix for the poorly-measured variables, has dimension Np,Np. |
S | Error matrix for the correlation between well-measured variables and poorly-measured variables, has dimension Nw,Np. |
Implemented in hitfit::Chisq_Constrainer.
Referenced by trackingPlots.Iteration::modules().
|
virtual |
Print out internal state to output stream.
s | Output stream to which to write. |
Reimplemented in hitfit::Chisq_Constrainer.
Definition at line 186 of file Base_Constrainer.cc.
References alignCSCRings::s.
Referenced by hitfit::operator<<(), and hitfit::Chisq_Constrainer::print().
|
friend |
Output stream operator, print the content of this Base_Constrainer to an output stream.
s | The output stream to which to write. |
f | The instance of Base_Constrainer to be printed. |
Definition at line 214 of file Base_Constrainer.cc.
|
private |
Parameter settings for this instance of Base_Constrainer.
Definition at line 355 of file Base_Constrainer.h.
Referenced by Vispa.Main.Application.Application::_readCommandLineAttributes().