#include <BaseFitObject.h>
Inheritance diagram for BaseFitObject:
Public Member Functions | |
virtual | ~BaseFitObject () |
virtual bool | setParam (int ilocal, double par_, bool measured_, bool fixed_=false)=0 |
Set value and measured flag of parameter i; return: success. | |
virtual bool | setParam (int ilocal, double par_)=0 |
Set value of parameter ilocal; return: success. | |
virtual bool | setMParam (int ilocal, double mpar_)=0 |
Set measured value of parameter ilocal; return: success. | |
virtual bool | setError (int ilocal, double err_)=0 |
Set error of parameter ilocal; return: success. | |
virtual bool | setCov (int ilocal, int jlocal, double cov_)=0 |
Set covariance of parameters ilocal and jlocal; return: success. | |
virtual bool | setGlobalParNum (int ilocal, int iglobal)=0 |
virtual bool | fixParam (int ilocal, bool fix=true)=0 |
Fix a parameter (fix=true), or release it (fix=false). | |
virtual bool | releaseParam (int ilocal) |
Release a parameter. | |
virtual bool | isParamFixed (int ilocal) const=0 |
Returns whether parameter is fixed. | |
virtual double | getParam (int ilocal) const=0 |
Get current value of parameter ilocal. | |
virtual const char * | getParamName (int ilocal) const |
Get name of parameter ilocal. | |
virtual const char * | getName () const |
Get object's name. | |
virtual void | setName (const char *name_) |
Set object's name. | |
virtual double | getMParam (int ilocal) const=0 |
Get measured value of parameter ilocal. | |
virtual double | getError (int ilocal) const=0 |
Get error of parameter ilocal. | |
virtual double | getCov (int ilocal, int jlocal) const=0 |
Get covariance between parameters ilocal and jlocal. | |
virtual bool | isParamMeasured (int ilocal) const=0 |
Get measured flag for parameter ilocal. | |
virtual int | getGlobalParNum (int ilocal) const=0 |
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 | getNUnmeasrd () 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 void | addToGlobCov (double *glcov, int idim) const=0 |
virtual double | getChi2 () const=0 |
Get chi squared from measured and fitted parameters. | |
virtual double | getDChi2DParam (int ilocal) const=0 |
Get derivative of chi squared w.r.t. parameter ilocal. | |
virtual double | getD2Chi2DParam2 (int ilocal, int jlocal) const=0 |
Get second derivative of chi squared w.r.t. parameters ilocal1 and ilocal2. | |
virtual void | addToGlobalChi2DerMatrix (int idim, double *M) const=0 |
Add derivatives of chi squared to global covariance matrix. | |
virtual void | addToGlobalDerMatrix (int idim, double c, double *M) const=0 |
Add derivatives to global covariance matrix. | |
virtual std::ostream & | printParams (std::ostream &os) const |
print the parameters | |
virtual std::ostream & | print (std::ostream &os) const=0 |
print object to ostream | |
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. |
This class defines the minimal functionality any fit object must provide. The main task of a fit object is to keep parameters (and errors) that define the four-momentum of a particle and encapsulate the actually chosen parametrisation from the rest of the fitting machinery.
Since for the fit a parametrisation distributed like a gaussian is most favorable, different kinds of particles (implying different kinds of measurements!) might require different parametrisations. For each desired parametrisation a concrete class should be derived from this abstract base class. It needs to be able to convert its parameters to E, px, py, pz and to provide the derivatives of E, px, py, pz with respect to the internal parameters.
Depending on the type of particle, some or all parameters might be unmeasured (neutrinos!), meaning that they come with a very large and/or unknown error. They are treated differently by the fit algorithm and are thus flagged accordingly.
In order to insert its derivatives into the global covariance matrix of all FitObjects in the event, each FitObjects needs to know the position of its parameters in the overall parameter list.
THIS iS JUNK!!!! It is done like this in JetFitObject.C, but using measured[i] which is the bool giving the measured/unmeasured status and NOT a bool containing the START VALUES!!!!! From its stored initial parameters and the current fit parameters the FitObject calculates its contribution to the $^2$ of the fit.
In its current state, a BaseFitObject has a set of parameters, some of them measured (i.e., they contribute to the ). These parameters have a local numbering, running from 0 to n-1. Global numbers can be assigned by the BaseFitter using setGlobalParNum.
The class WWFitter needs the following routines from BaseFitObject:
Author: Benno List, Jenny Böhme
Changelog:
Definition at line 85 of file BaseFitObject.h.
|
Definition at line 87 of file BaseFitObject.h. |
|
Add derivatives of chi squared to global covariance matrix.
Implemented in ChargedParticleTrack, NeutralParticleTrack, ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Add derivatives to global covariance matrix.
Implemented in ChargedParticleTrack, JetFitObject, NeutralParticleTrack, NeutrinoFitObject, ParticleFitObject, TrackFitObject, and VertexFitObject. Referenced by NewtonFitter::fit(). |
|
Add covariance matrix elements to global covariance matrix of size idim x idim Implemented in NeutralParticleTrack, ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Fix a parameter (fix=true), or release it (fix=false).
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. Referenced by releaseParam(). |
|
Get chi squared from measured and fitted parameters.
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Get covariance between parameters ilocal and jlocal.
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Get second derivative of chi squared w.r.t. parameters ilocal1 and ilocal2.
Implemented in ChargedParticleTrack, NeutralParticleTrack, ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Get derivative of chi squared w.r.t. parameter ilocal.
Implemented in ChargedParticleTrack, NeutralParticleTrack, ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Get error of parameter ilocal.
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. Referenced by printParams(). |
|
Get global parameter number of parameter ilocal.
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. Referenced by NewtonFitter::fit(). |
|
Get measured value of parameter ilocal.
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Get object's name.
Reimplemented in TrackFitObject, and VertexFitObject. Definition at line 138 of file BaseFitObject.h. Referenced by ParticleFitObject::calculateCovInv(). |
|
Get number of fixed parameters of this FitObject.
Definition at line 33 of file BaseFitObject.C. References getNPar(), and isParamFixed(). |
|
Get number of free parameters of this FitObject.
Definition at line 28 of file BaseFitObject.C. References getNPar(), and isParamFixed(). |
|
Get number of measured parameters of this FitObject.
Definition at line 18 of file BaseFitObject.C. References getNPar(), isParamFixed(), and isParamMeasured(). |
|
Get total number of parameters of this FitObject.
Implemented in ChargedParticleTrack, NeutralParticleTrack, ParticleFitObject, TrackFitObject, and VertexFitObject. Referenced by NewtonFitter::fit(), getNFixed(), getNFree(), getNMeasured(), getNUnmeasrd(), and printParams(). |
|
Get number of unmeasured parameters of this FitObject.
Definition at line 23 of file BaseFitObject.C. References getNPar(), isParamFixed(), and isParamMeasured(). |
|
Get current value of parameter ilocal.
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. Referenced by NewtonFitter::fit(), and printParams(). |
|
Get name of parameter ilocal.
Reimplemented in ChargedParticleTrack, JetFitObject, NeutralParticleTrack, NeutrinoFitObject, and VertexFitObject. Definition at line 135 of file BaseFitObject.h. Referenced by TrackFitObject::printCov(). |
|
Returns whether parameter is fixed.
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. Referenced by getNFixed(), getNFree(), getNMeasured(), getNUnmeasrd(), and printParams(). |
|
Get measured flag for parameter ilocal.
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. Referenced by getNMeasured(), and getNUnmeasrd(). |
|
print object to ostream
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. Referenced by operator<<(). |
|
print the parameters
Definition at line 39 of file BaseFitObject.C. References getError(), getNPar(), getParam(), and isParamFixed(). Referenced by VertexFitObject::print(), TrackFitObject::print(), and ParticleFitObject::print(). |
|
Release a parameter.
Definition at line 123 of file BaseFitObject.h. References fixParam(). |
|
Set covariance of parameters ilocal and jlocal; return: success.
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Set error of parameter ilocal; return: success.
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Set number of parameter ilocal in global list return true signals OK
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Set measured value of parameter ilocal; return: success.
Implemented in ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Set object's name.
Reimplemented in TrackFitObject, and VertexFitObject. Definition at line 140 of file BaseFitObject.h. |
|
Set value of parameter ilocal; return: success.
Implemented in ChargedParticleTrack, NeutralParticleTrack, NeutrinoFitObject, ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Set value and measured flag of parameter i; return: success.
Implemented in ChargedParticleTrack, NeutralParticleTrack, ParticleFitObject, TrackFitObject, and VertexFitObject. |
|
Prints out a BaseFitObject, using its print method.
Definition at line 203 of file BaseFitObject.h. References print(). |