Belle II Software light-2406-ragdoll
|
Public Member Functions | |
BaseFitObject () | |
Default constructor. | |
BaseFitObject (const BaseFitObject &rhs) | |
Copy constructor. | |
BaseFitObject & | operator= (const BaseFitObject &rhs) |
Assignment. | |
virtual | ~BaseFitObject () |
Virtual destructor. | |
virtual BaseFitObject * | copy () const =0 |
Return a new copy of itself. | |
virtual BaseFitObject & | assign (const BaseFitObject &source) |
Assign from anther object, if of same type. | |
virtual bool | setParam (int ilocal, double par_, bool measured_, bool fixed_=false) |
Set value and measured flag of parameter i; return: significant change. | |
virtual bool | setParam (int ilocal, double par_) |
Set value of parameter ilocal; return: significant change. | |
virtual bool | updateParams (double p[], int idim) |
Read values from global vector, readjust vector; return: significant change. | |
virtual bool | setMParam (int ilocal, double mpar_) |
Set measured value of parameter ilocal; return: success. | |
virtual bool | setError (int ilocal, double err_) |
Set error of parameter ilocal; return: success. | |
virtual bool | setCov (int ilocal, int jlocal, double cov_) |
Set covariance of parameters ilocal and jlocal; return: success. | |
virtual bool | setGlobalParNum (int ilocal, int iglobal) |
Set number of parameter ilocal in global list return true signals OK. | |
virtual bool | fixParam (int ilocal, bool fix=true) |
Fix a parameter (fix=true), or release it (fix=false) | |
virtual bool | releaseParam (int ilocal) |
Release a parameter. | |
virtual bool | isParamFixed (int ilocal) const |
Returns whether parameter is fixed. | |
virtual double | getParam (int ilocal) const |
Get current value of parameter ilocal. | |
virtual const char * | getParamName (int ilocal) const =0 |
Get name of parameter ilocal. | |
virtual const char * | getName () const |
Get object's name. | |
void | setName (const char *name_) |
Set object's name. | |
virtual double | getMParam (int ilocal) const |
Get measured value of parameter ilocal. | |
virtual double | getError (int ilocal) const |
Get error of parameter ilocal. | |
virtual double | getCov (int ilocal, int jlocal) const |
Get covariance between parameters ilocal and jlocal. | |
virtual double | getRho (int ilocal, int jlocal) const |
Get correlation coefficient between parameters ilocal and jlocal. | |
virtual bool | isParamMeasured (int ilocal) const |
Get measured flag for parameter ilocal. | |
virtual int | getGlobalParNum (int ilocal) const |
Get global parameter number of parameter ilocal. | |
virtual int | getNPar () const =0 |
Get total number of parameters of this FitObject. | |
virtual int | getNMeasured () const |
Get number of measured parameters of this FitObject. | |
virtual int | getNUnmeasured () const |
Get number of unmeasured parameters of this FitObject. | |
virtual int | getNFree () const |
Get number of free parameters of this FitObject. | |
virtual int | getNFixed () const |
Get number of fixed parameters of this FitObject. | |
virtual double | getChi2 () const |
Get chi squared from measured and fitted parameters. | |
virtual double | getDChi2DParam (int ilocal) const |
Get derivative of chi squared w.r.t. parameter ilocal. | |
virtual double | getD2Chi2DParam2 (int ilocal, int jlocal) const |
Get second derivative of chi squared w.r.t. parameters ilocal1 and ilocal2. | |
virtual std::ostream & | printParams (std::ostream &os) const |
print the parameters and errors | |
virtual std::ostream & | printRhoValues (std::ostream &os) const |
print the correlation coefficients | |
virtual std::ostream & | print1stDerivatives (std::ostream &os) const |
print the 1st derivatives wrt metaSet 0 (E, px, py, pz) | |
virtual std::ostream & | print2ndDerivatives (std::ostream &os) const |
print the 2nd derivatives wrt metaSet 0 (E, px, py, pz) | |
virtual std::ostream & | print (std::ostream &os) const =0 |
print object to ostream | |
void | invalidateCache () const |
invalidate any cached quantities | |
virtual void | updateCache () const =0 |
virtual void | addToGlobCov (double *glcov, int idim) const |
Add covariance matrix elements to global covariance matrix of size idim x idim. | |
virtual int | addToGlobalChi2DerVector (double *y, int idim) const |
Add derivatives of chi squared to global derivative vector. | |
virtual void | addToGlobalChi2DerMatrix (double *M, int idim) const |
Add 2nd derivatives of chi squared to global derivative matrix. | |
virtual void | addToGlobalChi2DerVector (double *y, int idim, double lambda, double der[], int metaSet) const |
Add derivatives of momentum vector to global derivative vector. | |
virtual void | addTo1stDerivatives (double M[], int idim, double der[], int kglobal, int metaSet) const |
virtual void | addTo2ndDerivatives (double der2[], int idim, double factor[], int metaSet) const |
virtual void | addTo2ndDerivatives (double M[], int idim, double lambda, double der[], int metaSet) const |
virtual double | getFirstDerivative_Meta_Local (int iMeta, int ilocal, int metaSet) const =0 |
virtual double | getSecondDerivative_Meta_Local (int iMeta, int ilocal, int jlocal, int metaSet) const =0 |
virtual void | initCov () |
virtual double | getError2 (double der[], int metaset) const |
virtual void | getDerivatives (double der[], int idim) const =0 |
Protected Member Functions | |
virtual bool | calculateCovInv () const |
Calculate the inverse of the covariance matrix. | |
Protected Attributes | |
char * | name |
double | par [BaseDefs::MAXPAR] |
fit parameters | |
double | mpar [BaseDefs::MAXPAR] |
measured parameters | |
bool | measured [BaseDefs::MAXPAR] |
measured flag | |
bool | fixed [BaseDefs::MAXPAR] |
fixed flag | |
int | globalParNum [BaseDefs::MAXPAR] |
global parameter number for each parameter | |
double | cov [BaseDefs::MAXPAR][BaseDefs::MAXPAR] |
local covariance matrix | |
double | covinv [BaseDefs::MAXPAR][BaseDefs::MAXPAR] |
inverse pf local covariance matrix | |
bool | covinvvalid |
flag for valid inverse covariance matrix | |
bool | cachevalid |
flag for valid cache | |
Static Protected Attributes | |
static const double | eps2 = 0.0001 |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &os, const BaseFitObject &bfo) |
Prints out a BaseFitObject, using its print method. | |
Definition at line 91 of file BaseFitObject.h.
BaseFitObject | ( | ) |
Default constructor.
Definition at line 38 of file BaseFitObject.cc.
BaseFitObject | ( | const BaseFitObject & | rhs | ) |
Copy constructor.
rhs | right hand side |
Definition at line 54 of file BaseFitObject.cc.
|
virtual |
|
virtual |
Definition at line 515 of file BaseFitObject.cc.
|
virtual |
Definition at line 534 of file BaseFitObject.cc.
|
virtual |
Definition at line 559 of file BaseFitObject.cc.
|
virtual |
Add 2nd derivatives of chi squared to global derivative matrix.
M | Global derivative matrix |
idim | First dimension of global derivative matrix |
Definition at line 462 of file BaseFitObject.cc.
|
virtual |
Add derivatives of chi squared to global derivative vector.
y | Vector of chi2 derivatives |
idim | Vector size |
Definition at line 482 of file BaseFitObject.cc.
|
virtual |
Add derivatives of momentum vector to global derivative vector.
y | Vector of chi2 derivatives |
idim | Vector size |
lambda | The lambda value |
der | derivatives of constraint wrt intermediate variables (e.g. 4-vector with dg/dE, dg/dpx, dg/dpy, dg/dpz) |
metaSet | which set of intermediate variables |
Definition at line 498 of file BaseFitObject.cc.
|
virtual |
Add covariance matrix elements to global covariance matrix of size idim x idim.
glcov | Global covariance matrix |
idim | First dimension of global derivative matrix |
Definition at line 217 of file BaseFitObject.cc.
|
virtual |
Assign from anther object, if of same type.
source | The source object |
Reimplemented in ISRPhotonFitObject, JetFitObject, NeutrinoFitObject, ParticleFitObject, and PxPyPzMFitObject.
Definition at line 68 of file BaseFitObject.cc.
|
protectedvirtual |
Calculate the inverse of the covariance matrix.
Definition at line 235 of file BaseFitObject.cc.
|
pure virtual |
Return a new copy of itself.
Implemented in ISRPhotonFitObject, JetFitObject, NeutrinoFitObject, and PxPyPzMFitObject.
|
virtual |
Fix a parameter (fix=true), or release it (fix=false)
ilocal | Local parameter number |
fix | fix if true, release if false |
Definition at line 352 of file BaseFitObject.cc.
|
virtual |
Get chi squared from measured and fitted parameters.
Reimplemented in ParticleFitObject.
Definition at line 414 of file BaseFitObject.cc.
|
virtual |
Get covariance between parameters ilocal and jlocal.
ilocal | Local parameter number i |
jlocal | Local parameter number j |
Reimplemented in JetFitObject.
Definition at line 389 of file BaseFitObject.cc.
|
virtual |
Get second derivative of chi squared w.r.t. parameters ilocal1 and ilocal2.
ilocal | Local parameter number i |
jlocal | Local parameter number j |
Definition at line 449 of file BaseFitObject.cc.
|
virtual |
Get derivative of chi squared w.r.t. parameter ilocal.
ilocal | Local parameter number |
Definition at line 435 of file BaseFitObject.cc.
|
virtual |
Get error of parameter ilocal.
ilocal | Local parameter number |
Reimplemented in JetFitObject.
Definition at line 383 of file BaseFitObject.cc.
|
virtual |
Definition at line 597 of file BaseFitObject.cc.
|
pure virtual |
Implemented in JetFitObject.
|
virtual |
Get global parameter number of parameter ilocal.
ilocal | Local parameter number |
Definition at line 365 of file BaseFitObject.cc.
|
virtual |
Get measured value of parameter ilocal.
ilocal | Local parameter number |
Definition at line 377 of file BaseFitObject.cc.
|
virtual |
Get object's name.
Definition at line 107 of file BaseFitObject.cc.
|
virtual |
Get number of fixed parameters of this FitObject.
Definition at line 130 of file BaseFitObject.cc.
|
virtual |
Get number of free parameters of this FitObject.
Definition at line 124 of file BaseFitObject.cc.
|
virtual |
Get number of measured parameters of this FitObject.
Definition at line 112 of file BaseFitObject.cc.
|
pure virtual |
Get total number of parameters of this FitObject.
Implemented in ISRPhotonFitObject, JetFitObject, NeutrinoFitObject, and PxPyPzMFitObject.
|
virtual |
Get number of unmeasured parameters of this FitObject.
Definition at line 118 of file BaseFitObject.cc.
|
virtual |
Get current value of parameter ilocal.
ilocal | Local parameter number |
Definition at line 371 of file BaseFitObject.cc.
|
pure virtual |
Get name of parameter ilocal.
ilocal | Local parameter number |
Implemented in ISRPhotonFitObject, JetFitObject, NeutrinoFitObject, and PxPyPzMFitObject.
|
virtual |
Get correlation coefficient between parameters ilocal and jlocal.
ilocal | Local parameter number i |
jlocal | Local parameter number j |
Definition at line 396 of file BaseFitObject.cc.
|
virtual |
Definition at line 587 of file BaseFitObject.cc.
|
inline |
|
virtual |
Returns whether parameter is fixed.
ilocal | Local parameter number |
Definition at line 408 of file BaseFitObject.cc.
|
virtual |
Get measured flag for parameter ilocal.
ilocal | Local parameter number |
Definition at line 402 of file BaseFitObject.cc.
BaseFitObject & operator= | ( | const BaseFitObject & | rhs | ) |
Assignment.
rhs | right hand side |
Definition at line 60 of file BaseFitObject.cc.
|
pure virtual |
|
virtual |
print the 1st derivatives wrt metaSet 0 (E, px, py, pz)
os | The output stream |
Definition at line 164 of file BaseFitObject.cc.
|
virtual |
print the 2nd derivatives wrt metaSet 0 (E, px, py, pz)
os | The output stream |
Definition at line 178 of file BaseFitObject.cc.
|
virtual |
print the parameters and errors
os | The output stream |
Definition at line 137 of file BaseFitObject.cc.
|
virtual |
print the correlation coefficients
os | The output stream |
Definition at line 151 of file BaseFitObject.cc.
|
inlinevirtual |
Release a parameter.
ilocal | Local parameter number |
Definition at line 157 of file BaseFitObject.h.
|
virtual |
Set covariance of parameters ilocal and jlocal; return: success.
ilocal | Local parameter number |
jlocal | Local parameter number |
cov_ | New error value |
Definition at line 340 of file BaseFitObject.cc.
|
virtual |
Set error of parameter ilocal; return: success.
ilocal | Local parameter number |
err_ | New error value |
Definition at line 330 of file BaseFitObject.cc.
|
virtual |
Set number of parameter ilocal in global list return true signals OK.
ilocal | Local parameter number |
iglobal | New global parameter number |
Definition at line 358 of file BaseFitObject.cc.
|
virtual |
Set measured value of parameter ilocal; return: success.
ilocal | Local parameter number |
mpar_ | New measured parameter value |
Definition at line 320 of file BaseFitObject.cc.
void setName | ( | const char * | name_ | ) |
Set object's name.
Definition at line 98 of file BaseFitObject.cc.
|
virtual |
Set value of parameter ilocal; return: significant change.
ilocal | Local parameter number |
par_ | New parameter value |
Definition at line 309 of file BaseFitObject.cc.
|
virtual |
Set value and measured flag of parameter i; return: significant change.
ilocal | Local parameter number |
par_ | New parameter value |
measured_ | New "measured" flag |
fixed_ | New "fixed" flag |
Definition at line 299 of file BaseFitObject.cc.
|
virtual |
Read values from global vector, readjust vector; return: significant change.
p | The parameter vector |
idim | Length of the vector |
Reimplemented in ISRPhotonFitObject, JetFitObject, NeutrinoFitObject, and PxPyPzMFitObject.
Definition at line 196 of file BaseFitObject.cc.
|
related |
Prints out a BaseFitObject, using its print method.
os | The output stream |
bfo | The object to print |
Definition at line 341 of file BaseFitObject.h.
|
mutableprotected |
flag for valid cache
Definition at line 333 of file BaseFitObject.h.
|
protected |
local covariance matrix
Definition at line 327 of file BaseFitObject.h.
|
mutableprotected |
inverse pf local covariance matrix
Definition at line 329 of file BaseFitObject.h.
|
mutableprotected |
flag for valid inverse covariance matrix
Definition at line 331 of file BaseFitObject.h.
|
staticprotected |
Definition at line 307 of file BaseFitObject.h.
|
protected |
fixed flag
Definition at line 323 of file BaseFitObject.h.
|
protected |
global parameter number for each parameter
Definition at line 325 of file BaseFitObject.h.
|
protected |
measured flag
Definition at line 321 of file BaseFitObject.h.
|
protected |
measured parameters
Definition at line 319 of file BaseFitObject.h.
|
protected |
Definition at line 306 of file BaseFitObject.h.
|
protected |
fit parameters
Definition at line 317 of file BaseFitObject.h.