Minimize a subject to a set of constraints. Based on the SQUAW algorithm. More...
#include <Chisq_Constrainer.h>
Public Member Functions | |
Chisq_Constrainer (const Chisq_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) |
virtual std::ostream & | print (std::ostream &s) const |
Print the state of this instance of Chisq_Constrainer. More... | |
virtual | ~Chisq_Constrainer () |
Public Member Functions inherited from hitfit::Base_Constrainer | |
Base_Constrainer (const Base_Constrainer_Args &args) | |
virtual | ~Base_Constrainer () |
Private Attributes | |
const Chisq_Constrainer_Args | _args |
Additional Inherited Members | |
Protected Member Functions inherited from hitfit::Base_Constrainer | |
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... | |
Minimize a subject to a set of constraints. Based on the SQUAW algorithm.
Definition at line 253 of file Chisq_Constrainer.h.
hitfit::Chisq_Constrainer::Chisq_Constrainer | ( | const Chisq_Constrainer_Args & | args | ) |
Constructor. Create an instance of Chisq_Constrainer from a Chisq_Constrainer_Args object.
args | The parameter settings for this instance. |
Definition at line 308 of file Chisq_Constrainer.cc.
|
inlinevirtual |
|
virtual |
@ brief Do a constrained fit. Call the number of well-measured variables Nw, the number of poorly-measured variables Np, and the number of constraints Nc.
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. |
cout << "singular matrix!";
Implements hitfit::Base_Constrainer.
Definition at line 321 of file Chisq_Constrainer.cc.
References _args, a, abs, alpha, beta, trackerHits::c, alignmentValidation::c1, hitfit::Base_Constrainer::call_constraint_fcn(), hitfit::Chisq_Constrainer_Args::chisq_diff_eps(), hitfit::Chisq_Constrainer_Args::chisq_test_eps(), hitfit::Chisq_Constrainer_Args::constraint_sum_eps(), gather_cfg::cout, hitfit::Chisq_Constrainer_Args::cutsize(), delta, F(), i, hitfit::Chisq_Constrainer_Args::max_cut(), hitfit::Chisq_Constrainer_Args::maxit(), hitfit::Chisq_Constrainer_Args::min_tot_cutsize(), hitfit::Constraint_Calculator::nconstraints(), hitfit::Chisq_Constrainer_Args::printfit(), dttmaxenums::R, hitfit::scalar(), mathSSE::sqrt(), and hitfit::Chisq_Constrainer_Args::use_G().
|
virtual |
Print the state of this instance of Chisq_Constrainer.
s | The output stream to which the output is sent. |
Reimplemented from hitfit::Base_Constrainer.
Definition at line 674 of file Chisq_Constrainer.cc.
References hitfit::Base_Constrainer::print(), and alignCSCRings::s.
|
private |
Parameter settings for this instance of Chisq_Constrainer.
Definition at line 377 of file Chisq_Constrainer.h.
Referenced by Vispa.Main.Application.Application::_readCommandLineAttributes(), and fit().