#include <LeastSquares.h>
Public Member Functions | |
void | add (const std::vector< double > &values, double dest, double weight=1.0) |
void | add (const LeastSquares &other, double weight=1.0) |
void | calculate () |
const TMatrixDSym & | getCoefficients () const |
double | getConstant () const |
const TMatrixDSym & | getCorrelations () const |
const TMatrixDSym & | getCovariance () const |
std::vector< double > | getMeans () const |
const TMatrixD & | getRotation () |
unsigned int | getSize () const |
std::vector< double > | getWeights () const |
LeastSquares (unsigned int n) | |
void | load (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *elem) |
XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | save (XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc) const |
virtual | ~LeastSquares () |
Static Public Member Functions | |
static TVectorD | solveFisher (const TMatrixDSym &coeffs) |
static TMatrixD | solveRotation (const TMatrixDSym &covar, TVectorD &trace) |
Private Attributes | |
TMatrixDSym | coeffs |
TMatrixDSym | corr |
TMatrixDSym | covar |
const unsigned int | n |
TMatrixD | rotation |
TVectorD | trace |
TVectorD | variance |
TVectorD | weights |
Definition at line 14 of file LeastSquares.h.
PhysicsTools::LeastSquares::LeastSquares | ( | unsigned int | n | ) |
Definition at line 22 of file LeastSquares.cc.
|
virtual |
Definition at line 28 of file LeastSquares.cc.
void PhysicsTools::LeastSquares::add | ( | const std::vector< double > & | values, |
double | dest, | ||
double | weight = 1.0 |
||
) |
Definition at line 32 of file LeastSquares.cc.
References coeffs, mps_fire::i, n, and mps_merge::weight.
Referenced by counter.Counter::register().
void PhysicsTools::LeastSquares::add | ( | const LeastSquares & | other, |
double | weight = 1.0 |
||
) |
Definition at line 55 of file LeastSquares.cc.
References coeffs, getSize(), and n.
Referenced by counter.Counter::register().
void PhysicsTools::LeastSquares::calculate | ( | ) |
Definition at line 87 of file LeastSquares.cc.
References EnergyCorrector::c, coeffs, corr, covar, mps_fire::i, N, n, rotation, solveFisher(), solveRotation(), mathSSE::sqrt(), trace, findQualityFiles::v, variance, w, and weights.
|
inline |
double PhysicsTools::LeastSquares::getConstant | ( | ) | const |
Definition at line 139 of file LeastSquares.cc.
|
inline |
|
inline |
std::vector< double > PhysicsTools::LeastSquares::getMeans | ( | ) | const |
Definition at line 127 of file LeastSquares.cc.
References coeffs, mps_fire::i, N, n, and mps_update::results.
|
inline |
Definition at line 33 of file LeastSquares.h.
References coeffs, covar, common_cff::doc, HTMLExport::elem(), load(), rotation, save(), solveFisher(), solveRotation(), trace, and XERCES_CPP_NAMESPACE_QUALIFIER.
|
inline |
std::vector< double > PhysicsTools::LeastSquares::getWeights | ( | ) | const |
Definition at line 116 of file LeastSquares.cc.
References mps_fire::i, n, mps_update::results, and weights.
void PhysicsTools::LeastSquares::load | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * | elem | ) |
Definition at line 280 of file LeastSquares.cc.
References EnergyCorrector::c, coeffs, corr, covar, HTMLExport::elem(), Exception, mps_fire::i, PhysicsTools::loadMatrix(), PhysicsTools::loadVector(), N, n, rotation, mathSSE::sqrt(), tmp, trace, findQualityFiles::v, variance, jets_cff::version, w, and weights.
Referenced by getRotation().
DOMElement * PhysicsTools::LeastSquares::save | ( | XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * | doc | ) | const |
Definition at line 392 of file LeastSquares.cc.
References coeffs, corr, covar, n, pyrootRender::root, rotation, PhysicsTools::saveMatrix(), PhysicsTools::saveVector(), trace, variance, and weights.
Referenced by getRotation().
|
static |
Definition at line 64 of file LeastSquares.cc.
References coeffs, n, convertSQLiteXML::ok, and tmp.
Referenced by calculate(), and getRotation().
|
static |
Definition at line 78 of file LeastSquares.cc.
References tmp.
Referenced by calculate(), and getRotation().
|
private |
Definition at line 44 of file LeastSquares.h.
Referenced by add(), calculate(), getCoefficients(), getMeans(), getRotation(), load(), save(), and solveFisher().
|
private |
Definition at line 46 of file LeastSquares.h.
Referenced by calculate(), getCorrelations(), load(), and save().
|
private |
Definition at line 45 of file LeastSquares.h.
Referenced by calculate(), getCovariance(), getRotation(), load(), and save().
|
private |
Definition at line 51 of file LeastSquares.h.
Referenced by add(), calculate(), getConstant(), getMeans(), getSize(), getWeights(), load(), save(), PhysicsTools::saveMatrix(), PhysicsTools::saveVector(), and solveFisher().
|
private |
Definition at line 47 of file LeastSquares.h.
Referenced by calculate(), getRotation(), load(), and save().
|
private |
Definition at line 50 of file LeastSquares.h.
Referenced by calculate(), getRotation(), load(), and save().
|
private |
Definition at line 49 of file LeastSquares.h.
Referenced by calculate(), load(), save(), and average.Average::uncertainty().
|
private |
Definition at line 48 of file LeastSquares.h.
Referenced by calculate(), getConstant(), getWeights(), load(), and save().