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) | |
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) override |
std::ostream & | print (std::ostream &s) const override |
Print the state of this instance of Chisq_Constrainer. More... | |
~Chisq_Constrainer () override | |
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 244 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 282 of file Chisq_Constrainer.cc.
|
inlineoverride |
|
overridevirtual |
@ 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 291 of file Chisq_Constrainer.cc.
References _args, a, funct::abs(), alpha, cms::cuda::assert(), HLT_2022v15_cff::beta, HltBtagPostValidation_cff::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(), ztail::d, d1, dumpMFGeometry_cfg::delta, F(), cmssw_cycle_finder::G, CustomPhysics_cfi::gamma, data-class-funcs::H, mps_fire::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(), mitigatedMETSequence_cff::U, hitfit::Chisq_Constrainer_Args::use_G(), cms::cuda::V, x, BeamSpotPI::Y, and testProducerWithPsetDescEmpty_cfi::z2.
Referenced by trackingPlots.Iteration::modules().
|
overridevirtual |
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 623 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 366 of file Chisq_Constrainer.h.
Referenced by fit().