#include <VertexFitObject.h>
Inheritance diagram for VertexFitObject:
Public Types | |
enum | { VX = 1, VY = 2, VZ = 4, VXY = 3, VXYZ = 7, PX = 8, PY = 16, PZ = 32, PXY = 24, PXYZ = 56, E = 64, EPXYZ = 120, THE_FULL_MONTY = 127 } |
Public Member Functions | |
VertexFitObject (const char *name_, double x, double y, double z) | |
Constructor. | |
VertexFitObject (const VertexFitObject &rhs) | |
Copy Constructor. | |
VertexFitObject & | operator= (const VertexFitObject &rhs) |
assignment | |
virtual | ~VertexFitObject () |
Destructor. | |
virtual bool | setParam (int ilocal, double par_, bool measured_, bool fixed_=false) |
Set value and measured flag of parameter ilocal; return=success. | |
virtual bool | setParam (int ilocal, double par_) |
Set value of parameter ilocal; return=success. | |
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. | |
virtual bool | setCov (int ilocal, int jlocal, double cov_) |
Set covariance of parameters ilocal and jlocal. | |
virtual bool | setGlobalParNum (int ilocal, int iglobal) |
virtual bool | fixParam (int ilocal, bool fix=true) |
Fix a parameter (fix=true), or release it (fix=false). | |
virtual double | getParam (int ilocal) const |
Get parameter ilocal. | |
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 bool | isParamMeasured (int ilocal) const |
Get measured flag for parameter i. | |
virtual bool | isParamFixed (int ilocal) const |
Get fixed flag for parameter i. | |
virtual int | getGlobalParNum (int ilocal) const |
Get global parameter number of parameter ilocal. | |
virtual int | getNPar () const |
Get number of parameters of this FitObject. | |
virtual const char * | getName () const |
Get object's name. | |
virtual void | setName (const char *name_) |
Set object's name. | |
virtual const char * | getParamName (int ilocal) const |
Get name of parameter ilocal. | |
virtual void | getVertexEx (ThreeVector &p) const |
Get vertex into existing 3-vector. | |
virtual ThreeVector | getVertex () const |
Get vertex. | |
virtual void | getVertexDerivativeEx (int ilocal, ThreeVector &p) const |
Get derivative of vertex w.r.t. parameter ilocal into existing 3-vector. | |
virtual ThreeVector | getVertexDerivative (int ilocal) const |
Get derivative of vertex w.r.t. parameter ilocal. | |
virtual void | addToGlobCov (double *cov, int idim) const |
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 ilocal1, int ilocal2) const |
Get second derivative of chi squared w.r.t. parameters ilocal1 and ilocal2. | |
virtual void | addToGlobalChi2DerMatrix (int idim, double *M) const |
Add derivatives of chi squared to global covariance matrix. | |
virtual void | addToGlobalDerMatrix (int idim, double c, double *M) const |
Add derivatives to global covariance matrix. | |
virtual std::ostream & | print (std::ostream &os) const |
print object to ostream | |
virtual TrackFitObject * | getTrack (int i) const |
get track i | |
virtual void | addTrack (TrackFitObject *track, bool inbound, bool measured) |
add track | |
virtual void | addConstraints (BaseFitter &fitter, int mask=THE_FULL_MONTY) |
Create constraints and add them to a BaseFit object. | |
virtual ThreeVector | estimatePosition () |
Estimate vertex position. | |
virtual void | initForFit () |
Initialize this object and attatched tracks for fit with initial estimates. | |
Protected Types | |
typedef std::vector< TrackDescriptor > | TContainer |
typedef TContainer::iterator | TIterator |
typedef std::vector< BaseConstraint * > | CContainer |
typedef CContainer::iterator | CIterator |
enum | { NPAR = 3 } |
Number of parameters. More... | |
Protected Member Functions | |
virtual void | addVertexConstraints (BaseFitter &fitter, int axis) |
generate vertex constraints | |
virtual void | addMomentumConstraint (BaseFitter &fitter, int axis) |
generate momentum constraints | |
virtual void | initCov () |
init covariance matrix to dummy values | |
virtual bool | calculateCovInv () const |
Calculate the inverse of the covariance matrix. | |
virtual void | calculateChi2 () const |
Calculate chi2. | |
virtual void | copy (const VertexFitObject &source) |
Copy another VertexFitObject. | |
Protected Attributes | |
double | par [NPAR] |
fit parameters | |
double | mpar [NPAR] |
measured parameters | |
double | err [NPAR] |
errors | |
bool | measured [NPAR] |
measured flag | |
bool | fixed [NPAR] |
fixed flag | |
int | globalParNum [NPAR] |
global paramter number for each parameter | |
double | cov [NPAR][NPAR] |
local covariance matrix | |
double | covinv [NPAR][NPAR] |
inverse of local covariance matrix | |
bool | covinvvalid |
flag for valid inverse covariance matrix | |
double | chi2 |
chi^2 | |
double | resid [NPAR] |
residuals | |
bool | chi2contr [NPAR] |
contributes to chi2? | |
char * | name |
object name | |
TContainer | tracks |
CContainer | constraints |
A VertexFitObject represents a vertex, parametrized by its coordinates (x, y, z).
A VertexFitObject is a BaseFitObject, and therefore the vertex coordinates can enter a fit, either as measured values for a measured (primary) vertex, or as unmeasured values for a decay vertex.
Additionally, a VertexFitObject keeps a list of outgoing tracks and knows its incoming track (if any), which enables the VertexFitObject to set a list of constraints (VertexConstraint and TrackMomentumConstraint objects) for a fitter object.
Author:Benno List, Jenny List
Definition at line 56 of file VertexFitObject.h.
|
Definition at line 261 of file VertexFitObject.h. |
|
Definition at line 262 of file VertexFitObject.h. Referenced by ~VertexFitObject(). |
|
Definition at line 258 of file VertexFitObject.h. |
|
Definition at line 259 of file VertexFitObject.h. Referenced by addMomentumConstraint(), addVertexConstraints(), estimatePosition(), and initForFit(). |
|
Definition at line 181 of file VertexFitObject.h. |
|
Number of parameters.
Definition at line 218 of file VertexFitObject.h. |
|
Constructor.
Definition at line 37 of file VertexFitObject.C. References initCov(), setMParam(), setName(), and setParam(). |
|
Copy Constructor.
Definition at line 55 of file VertexFitObject.C. References copy(). |
|
Destructor.
Definition at line 89 of file VertexFitObject.C. References CIterator, constraints, and name. |
|
Create constraints and add them to a BaseFit object.
Definition at line 355 of file VertexFitObject.C. References addMomentumConstraint(), addVertexConstraints(), E, fixParam(), PX, PY, PZ, VX, VY, and VZ. Referenced by K0Event::fitEvent(), H1K0Event2::fitEvent(), and H1K0Event::fitEvent(). |
|
generate momentum constraints
Definition at line 335 of file VertexFitObject.C. References BaseFitter::addConstraint(), TrackConstraint::addToFOList(), constraints, TIterator, and tracks. Referenced by addConstraints(). |
|
Add derivatives of chi squared to global covariance matrix.
Implements BaseFitObject. Definition at line 163 of file VertexFitObject.h. |
|
Add derivatives to global covariance matrix.
Implements BaseFitObject. Definition at line 165 of file VertexFitObject.h. |
|
Add covariance matrix elements to global covariance matrix of size idim x idim Implements BaseFitObject. Definition at line 246 of file VertexFitObject.C. References cov, getGlobalParNum(), getNPar(), isParamFixed(), isParamMeasured(), and NPAR. |
|
add track
Definition at line 365 of file VertexFitObject.C. References tracks. Referenced by K0Event::fitEvent(), H1K0Event2::fitEvent(), and H1K0Event::fitEvent(). |
|
generate vertex constraints
Definition at line 325 of file VertexFitObject.C. References BaseFitter::addConstraint(), constraints, TIterator, and tracks. Referenced by addConstraints(). |
|
Calculate chi2.
Definition at line 307 of file VertexFitObject.C. References calculateCovInv(), chi2, chi2contr, covinv, covinvvalid, getNPar(), isParamFixed(), isParamMeasured(), mpar, par, and resid. Referenced by getChi2(). |
|
Calculate the inverse of the covariance matrix.
Definition at line 282 of file VertexFitObject.C. References cov, covinv, covinvvalid, dsinv(), getNPar(), isParamMeasured(), and NPAR. Referenced by calculateChi2(). |
|
Copy another VertexFitObject.
Definition at line 70 of file VertexFitObject.C. References cov, covinvvalid, err, fixed, globalParNum, measured, mpar, name, NPAR, par, setName(), and tracks. Referenced by operator=(), and VertexFitObject(). |
|
Estimate vertex position.
Definition at line 370 of file VertexFitObject.C. References JBLHelix::getClosestApproach(), JBLHelix::getTrajectoryPoint(), TIterator, and tracks. Referenced by initForFit(). |
|
Fix a parameter (fix=true), or release it (fix=false).
Implements BaseFitObject. Definition at line 167 of file VertexFitObject.C. Referenced by addConstraints(). |
|
Get chi squared from measured and fitted parameters.
Implements BaseFitObject. Definition at line 277 of file VertexFitObject.C. References calculateChi2(), and chi2. |
|
Get covariance between parameters ilocal and jlocal.
Implements BaseFitObject. Definition at line 191 of file VertexFitObject.C. |
|
Get second derivative of chi squared w.r.t. parameters ilocal1 and ilocal2.
Implements BaseFitObject. Definition at line 160 of file VertexFitObject.h. |
|
Get derivative of chi squared w.r.t. parameter ilocal.
Implements BaseFitObject. Definition at line 158 of file VertexFitObject.h. |
|
Get error of parameter ilocal.
Implements BaseFitObject. Definition at line 186 of file VertexFitObject.C. |
|
Get global parameter number of parameter ilocal.
Implements BaseFitObject. Definition at line 171 of file VertexFitObject.C. References getNPar(), and globalParNum. Referenced by addToGlobCov(), and VertexConstraint::getDerivatives(). |
|
Get measured value of parameter ilocal.
Implements BaseFitObject. Definition at line 180 of file VertexFitObject.C. References isParamMeasured(), mpar, and NPAR. |
|
Get object's name.
Reimplemented from BaseFitObject. Definition at line 137 of file VertexFitObject.C. References name. Referenced by initForFit(), and print(). |
|
Get number of parameters of this FitObject.
Implements BaseFitObject. Definition at line 66 of file VertexFitObject.C. References NPAR. Referenced by addToGlobCov(), calculateChi2(), calculateCovInv(), VertexConstraint::getDerivatives(), getGlobalParNum(), and initCov(). |
|
Get parameter ilocal.
Implements BaseFitObject. Definition at line 176 of file VertexFitObject.C. |
|
Get name of parameter ilocal.
Reimplemented from BaseFitObject. Definition at line 141 of file VertexFitObject.C. |
|
get track i
Definition at line 172 of file VertexFitObject.h. References tracks. |
|
Get vertex.
Definition at line 214 of file VertexFitObject.C. References getVertexEx(). Referenced by VertexConstraint::getValue(), and main(). |
|
Get derivative of vertex w.r.t. parameter ilocal.
Definition at line 224 of file VertexFitObject.C. References getVertexDerivativeEx(). Referenced by VertexConstraint::getDerivatives(). |
|
Get derivative of vertex w.r.t. parameter ilocal into existing 3-vector.
Definition at line 230 of file VertexFitObject.C. References ThreeVector::setValues(). Referenced by getVertexDerivative(). |
|
Get vertex into existing 3-vector.
Definition at line 220 of file VertexFitObject.C. References par, and ThreeVector::setValues(). Referenced by getVertex(). |
|
init covariance matrix to dummy values
Definition at line 267 of file VertexFitObject.C. References cov, covinvvalid, and getNPar(). Referenced by VertexFitObject(). |
|
Initialize this object and attatched tracks for fit with initial estimates.
Definition at line 401 of file VertexFitObject.C. References estimatePosition(), ThreeVector::getComponent(), FourVector::getE(), getName(), par, TIterator, and tracks. Referenced by K0Event::fitEvent(), H1K0Event2::fitEvent(), and H1K0Event::fitEvent(). |
|
Get fixed flag for parameter i.
Implements BaseFitObject. Definition at line 202 of file VertexFitObject.C. Referenced by addToGlobCov(), calculateChi2(), VertexConstraint::getDerivatives(), and setGlobalParNum(). |
|
Get measured flag for parameter i.
Implements BaseFitObject. Definition at line 197 of file VertexFitObject.C. References measured, and NPAR. Referenced by addToGlobCov(), calculateChi2(), calculateCovInv(), and getMParam(). |
|
assignment
Definition at line 61 of file VertexFitObject.C. References copy(). |
|
print object to ostream
Implements BaseFitObject. Definition at line 207 of file VertexFitObject.C. References getName(), and BaseFitObject::printParams(). |
|
Set covariance of parameters ilocal and jlocal.
Implements BaseFitObject. Definition at line 128 of file VertexFitObject.C. References cov, covinvvalid, and NPAR. |
|
Set error of parameter ilocal.
Implements BaseFitObject. Definition at line 120 of file VertexFitObject.C. References cov, covinvvalid, and NPAR. |
|
Set number of parameter ilocal in global list return true signals OK Implements BaseFitObject. Definition at line 161 of file VertexFitObject.C. References globalParNum, isParamFixed(), and NPAR. |
|
Set measured value of parameter ilocal; return=success.
Implements BaseFitObject. Definition at line 113 of file VertexFitObject.C. Referenced by VertexFitObject(). |
|
Set object's name.
Reimplemented from BaseFitObject. Definition at line 150 of file VertexFitObject.C. References name. Referenced by copy(), and VertexFitObject(). |
|
Set value of parameter ilocal; return=success.
Implements BaseFitObject. Definition at line 107 of file VertexFitObject.C. |
|
Set value and measured flag of parameter ilocal; return=success.
Implements BaseFitObject. Definition at line 99 of file VertexFitObject.C. References fixed, measured, and NPAR. Referenced by VertexFitObject(). |
|
chi^2
Definition at line 240 of file VertexFitObject.h. Referenced by calculateChi2(), and getChi2(). |
|
contributes to chi2?
Definition at line 242 of file VertexFitObject.h. Referenced by calculateChi2(). |
|
Definition at line 263 of file VertexFitObject.h. Referenced by addMomentumConstraint(), addVertexConstraints(), and ~VertexFitObject(). |
|
local covariance matrix
Definition at line 233 of file VertexFitObject.h. Referenced by addToGlobCov(), calculateCovInv(), copy(), getCov(), getError(), initCov(), setCov(), and setError(). |
|
inverse of local covariance matrix
Definition at line 235 of file VertexFitObject.h. Referenced by calculateChi2(), and calculateCovInv(). |
|
flag for valid inverse covariance matrix
Definition at line 237 of file VertexFitObject.h. Referenced by calculateChi2(), calculateCovInv(), copy(), initCov(), setCov(), and setError(). |
|
errors
Definition at line 225 of file VertexFitObject.h. Referenced by copy(). |
|
fixed flag
Definition at line 229 of file VertexFitObject.h. Referenced by copy(), fixParam(), isParamFixed(), and setParam(). |
|
global paramter number for each parameter
Definition at line 231 of file VertexFitObject.h. Referenced by copy(), getGlobalParNum(), and setGlobalParNum(). |
|
measured flag
Definition at line 227 of file VertexFitObject.h. Referenced by copy(), isParamMeasured(), and setParam(). |
|
measured parameters
Definition at line 223 of file VertexFitObject.h. Referenced by calculateChi2(), copy(), getMParam(), and setMParam(). |
|
object name
Definition at line 244 of file VertexFitObject.h. Referenced by copy(), getName(), setName(), and ~VertexFitObject(). |
|
fit parameters
Definition at line 221 of file VertexFitObject.h. Referenced by calculateChi2(), copy(), getParam(), getVertexEx(), initForFit(), and setParam(). |
|
residuals
Definition at line 241 of file VertexFitObject.h. Referenced by calculateChi2(). |
|
Definition at line 260 of file VertexFitObject.h. Referenced by addMomentumConstraint(), addTrack(), addVertexConstraints(), copy(), estimatePosition(), getTrack(), and initForFit(). |