![]() |
GeneralBrokenLines
V01-11-00
|
GBL trajectory. More...
#include <GblTrajectory.h>
Public Member Functions | |
| GblTrajectory (bool flagCurv=true, bool flagU1dir=true, bool flagU2dir=true) | |
| Create new trajectory. | |
| virtual | ~GblTrajectory () |
| unsigned int | addPoint (GblPoint aPoint) |
| Add point to trajectory. | |
| unsigned int | getNumPoints () const |
| Retrieve number of point from trajectory. | |
| void | addExternalSeed (unsigned int aLabel, const TMatrixDSym &aSeed) |
| Add external seed to trajectory. | |
| void | getResults (int aSignedLabel, TVectorD &localPar, TMatrixDSym &localCov) const |
| Get fit results at point. | |
| unsigned int | fit (double &Chi2, int &Ndf, double &lostWeight, std::string optionList="") |
| Perform fit of trajectory. | |
| void | milleOut (MilleBinary &aMille) |
| Write trajectory to Millepede-II binary file. | |
| void | kalmanGainFilter (double &Chi2, int &Ndf) |
Private Member Functions | |
| std::pair< std::vector < unsigned int >, TMatrixD > | getJacobian (int aSignedLabel) const |
| Get jacobian for transformation from fit to track parameters at point. | |
| void | getFitToLocalJacobian (std::vector< unsigned int > &anIndex, SMatrix55 &aJacobian, GblPoint &aPoint, unsigned int measDim, unsigned int nJacobian=1) const |
| Get (part of) jacobian for transformation from (trajectory) fit to track parameters at point. | |
| void | getFitToKinkJacobian (std::vector< unsigned int > &anIndex, SMatrix27 &aJacobian, GblPoint &aPoint) const |
| Get jacobian for transformation from (trajectory) fit to kink parameters at point. | |
| void | defineOffsets () |
| Define offsets from list of points. | |
| void | calcJacobians () |
| Calculate Jacobians to previous/next scatterer from point to point ones. | |
| void | buildLinearEquationSystem () |
| Build linear equation system from data (blocks). | |
| void | prepare () |
| Prepare fit. | |
| void | predict () |
| Calculate predictions for all points. | |
| double | downWeight (unsigned int aMethod) |
| Down-weight all points. | |
Private Attributes | |
| unsigned int | numPoints |
| Number of point on trajectory. | |
| unsigned int | numOffsets |
| Number of (points with) offsets on trajectory. | |
| unsigned int | numCurvature |
| Number of curvature parameters (0 or 1) | |
| unsigned int | numParameters |
| Number of fit parameters. | |
| unsigned int | numLocals |
| Total number of (additional) local parameters. | |
| unsigned int | externalPoint |
| Label of external point (or 0) | |
| std::vector< unsigned int > | theDimension |
| List of active dimensions (0=u1, 1=u2) in fit. | |
| std::vector< GblPoint > | thePoints |
| List of points on trajectory. | |
| std::vector< GblData > | theData |
| List of data blocks. | |
| std::vector< unsigned int > | externalIndex |
| List of fit parameters used by external seed. | |
| TMatrixDSym | externalSeed |
| Precision (inverse covariance matrix) of external seed. | |
| VVector::VVector | theVector |
| Vector of linear equation system. | |
| BorderedBandMatrix | theMatrix |
| (Bordered band) matrix of linear equation system | |
GBL trajectory.
List of GblPoints ordered by arc length. Can be fitted and optionally written to MP-II binary file.
Definition at line 23 of file GblTrajectory.h.
| GblTrajectory::GblTrajectory | ( | bool | flagCurv = true, |
| bool | flagU1dir = true, |
||
| bool | flagU2dir = true |
||
| ) |
Create new trajectory.
Curved trajectory in space (default) or without curvature (q/p) or in one plane (u-direction) only.
| [in] | flagCurv | Use q/p |
| [in] | flagU1dir | Use in u1 direction |
| [in] | flagU2dir | Use in u2 direction |
Definition at line 91 of file GblTrajectory.cpp.
References theDimension, and thePoints.
| GblTrajectory::~GblTrajectory | ( | ) | [virtual] |
Definition at line 102 of file GblTrajectory.cpp.
| void GblTrajectory::addExternalSeed | ( | unsigned int | aLabel, |
| const TMatrixDSym & | aSeed | ||
| ) |
Add external seed to trajectory.
| [in] | aLabel | (Signed) label of point for external seed (<0: in front, >0: after point, slope changes at scatterer!) |
| [in] | aSeed | Precision matrix of external seed |
Definition at line 130 of file GblTrajectory.cpp.
References externalPoint, and externalSeed.
Referenced by example1().
| unsigned int GblTrajectory::addPoint | ( | GblPoint | aPoint | ) |
Add point to trajectory.
Points have to be ordered in arc length.
| [in] | aPoint | Point to add |
Definition at line 111 of file GblTrajectory.cpp.
References GblPoint::getNumLocals(), numLocals, numPoints, GblPoint::setLabel(), and thePoints.
Referenced by example1().
| void GblTrajectory::buildLinearEquationSystem | ( | ) | [private] |
Build linear equation system from data (blocks).
Definition at line 423 of file GblTrajectory.cpp.
References BorderedBandMatrix::addBlockMatrix(), numCurvature, numLocals, numParameters, BorderedBandMatrix::resize(), theData, theMatrix, and theVector.
Referenced by fit().
| void GblTrajectory::calcJacobians | ( | ) | [private] |
Calculate Jacobians to previous/next scatterer from point to point ones.
Definition at line 162 of file GblTrajectory.cpp.
References numPoints, and thePoints.
Referenced by fit().
| void GblTrajectory::defineOffsets | ( | ) | [private] |
Define offsets from list of points.
Define offsets at points with scatterers and first and last point. All other points need interpolation from adjacent points with offsets.
Definition at line 142 of file GblTrajectory.cpp.
References numCurvature, numLocals, numOffsets, numParameters, numPoints, theDimension, and thePoints.
Referenced by fit().
| double GblTrajectory::downWeight | ( | unsigned int | aMethod | ) | [private] |
Down-weight all points.
| [in] | aMethod | M-estimator (1: Tukey, 2:Huber, 3:Cauchy) |
Definition at line 538 of file GblTrajectory.cpp.
References theData.
Referenced by fit().
| unsigned int GblTrajectory::fit | ( | double & | Chi2, |
| int & | Ndf, | ||
| double & | lostWeight, | ||
| std::string | optionList = "" |
||
| ) |
Perform fit of trajectory.
Optionally iterate for outlier down-weighting.
| [out] | Chi2 | Chi2 sum (corrected for down-weighting) |
| [out] | Ndf | Number of degrees of freedom |
| [out] | lostWeight | Sum of weights lost due to down-weighting |
| [in] | optionList | Iterations for down-weighting (One character per iteration: t,h,c (or T,H,C) for Tukey, Huber or Cauchy function) |
Definition at line 557 of file GblTrajectory.cpp.
References buildLinearEquationSystem(), calcJacobians(), defineOffsets(), downWeight(), numParameters, predict(), prepare(), BorderedBandMatrix::solveAndInvertBorderedBand(), theData, theMatrix, and theVector.
Referenced by example1().
| void GblTrajectory::getFitToKinkJacobian | ( | std::vector< unsigned int > & | anIndex, |
| SMatrix27 & | aJacobian, | ||
| GblPoint & | aPoint | ||
| ) | const [private] |
Get jacobian for transformation from (trajectory) fit to kink parameters at point.
Jacobian broken lines (q/p,..,u_i-1,u_i,u_i+1..) to kink (du') parameters.
| [out] | anIndex | List of fit parameters with non zero derivatives |
| [out] | aJacobian | Corresponding transformation matrix |
| [in] | aPoint | Point to use |
Definition at line 366 of file GblTrajectory.cpp.
References GblPoint::getDerivatives(), GblPoint::getOffset(), numCurvature, numLocals, and theDimension.
Referenced by prepare().
| void GblTrajectory::getFitToLocalJacobian | ( | std::vector< unsigned int > & | anIndex, |
| SMatrix55 & | aJacobian, | ||
| GblPoint & | aPoint, | ||
| unsigned int | measDim, | ||
| unsigned int | nJacobian = 1 |
||
| ) | const [private] |
Get (part of) jacobian for transformation from (trajectory) fit to track parameters at point.
Jacobian broken lines (q/p,..,u_i,u_i+1..) to local (q/p,u',u) parameters.
| [out] | anIndex | List of fit parameters with non zero derivatives |
| [out] | aJacobian | Corresponding transformation matrix |
| [in] | aPoint | Point to use |
| [in] | measDim | Dimension of 'measurement' (<=2: calculate only offset part, >2: complete matrix) |
| [in] | nJacobian | Direction (0: to previous offset, 1: to next offset) |
Definition at line 274 of file GblTrajectory.cpp.
References GblPoint::getDerivatives(), GblPoint::getOffset(), numCurvature, numLocals, and theDimension.
Referenced by getJacobian(), and prepare().
| std::pair< std::vector< unsigned int >, TMatrixD > GblTrajectory::getJacobian | ( | int | aSignedLabel | ) | const [private] |
Get jacobian for transformation from fit to track parameters at point.
Jacobian broken lines (q/p,..,u_i,u_i+1..) to track (q/p,u',u) parameters including additional local parameters.
| [in] | aSignedLabel | (Signed) label of point for external seed (<0: in front, >0: after point, slope changes at scatterer!) |
Definition at line 210 of file GblTrajectory.cpp.
References getFitToLocalJacobian(), numCurvature, numLocals, numPoints, theDimension, and thePoints.
Referenced by getResults(), and prepare().
| unsigned int GblTrajectory::getNumPoints | ( | ) | const |
Retrieve number of point from trajectory.
Definition at line 120 of file GblTrajectory.cpp.
References numPoints.
| void GblTrajectory::getResults | ( | int | aSignedLabel, |
| TVectorD & | localPar, | ||
| TMatrixDSym & | localCov | ||
| ) | const |
Get fit results at point.
Get corrections and covariance matrix for local track and additional parameters in forward or backward direction.
| [in] | aSignedLabel | (Signed) label of point for external seed (<0: in front, >0: after point, slope changes at scatterer!) |
| [out] | localPar | Corrections for local parameters |
| [out] | localCov | Covariance for local parameters |
Definition at line 408 of file GblTrajectory.cpp.
References BorderedBandMatrix::getBlockMatrix(), getJacobian(), theMatrix, and theVector.
| void GblTrajectory::kalmanGainFilter | ( | double & | Chi2, |
| int & | Ndf | ||
| ) |
Definition at line 632 of file GblTrajectory.cpp.
| void GblTrajectory::milleOut | ( | MilleBinary & | aMille | ) |
Write trajectory to Millepede-II binary file.
Definition at line 604 of file GblTrajectory.cpp.
References MilleBinary::addData(), theData, and MilleBinary::writeRecord().
| void GblTrajectory::predict | ( | ) | [private] |
Calculate predictions for all points.
Definition at line 527 of file GblTrajectory.cpp.
References theData, and theVector.
Referenced by fit().
| void GblTrajectory::prepare | ( | ) | [private] |
Prepare fit.
Generate data (blocks) from measurements, kinks and external seed.
Definition at line 444 of file GblTrajectory.cpp.
References GblData::addDerivatives(), externalIndex, externalPoint, externalSeed, getFitToKinkJacobian(), getFitToLocalJacobian(), getJacobian(), numOffsets, numPoints, theData, theDimension, and thePoints.
Referenced by fit().
std::vector<unsigned int> GblTrajectory::externalIndex [private] |
List of fit parameters used by external seed.
Definition at line 48 of file GblTrajectory.h.
Referenced by prepare().
unsigned int GblTrajectory::externalPoint [private] |
Label of external point (or 0)
Definition at line 44 of file GblTrajectory.h.
Referenced by addExternalSeed(), and prepare().
TMatrixDSym GblTrajectory::externalSeed [private] |
Precision (inverse covariance matrix) of external seed.
Definition at line 49 of file GblTrajectory.h.
Referenced by addExternalSeed(), and prepare().
unsigned int GblTrajectory::numCurvature [private] |
Number of curvature parameters (0 or 1)
Definition at line 41 of file GblTrajectory.h.
Referenced by buildLinearEquationSystem(), defineOffsets(), getFitToKinkJacobian(), getFitToLocalJacobian(), and getJacobian().
unsigned int GblTrajectory::numLocals [private] |
Total number of (additional) local parameters.
Definition at line 43 of file GblTrajectory.h.
Referenced by addPoint(), buildLinearEquationSystem(), defineOffsets(), getFitToKinkJacobian(), getFitToLocalJacobian(), and getJacobian().
unsigned int GblTrajectory::numOffsets [private] |
Number of (points with) offsets on trajectory.
Definition at line 40 of file GblTrajectory.h.
Referenced by defineOffsets(), and prepare().
unsigned int GblTrajectory::numParameters [private] |
Number of fit parameters.
Definition at line 42 of file GblTrajectory.h.
Referenced by buildLinearEquationSystem(), defineOffsets(), and fit().
unsigned int GblTrajectory::numPoints [private] |
Number of point on trajectory.
Definition at line 39 of file GblTrajectory.h.
Referenced by addPoint(), calcJacobians(), defineOffsets(), getJacobian(), getNumPoints(), kalmanGainFilter(), and prepare().
std::vector<GblData> GblTrajectory::theData [private] |
List of data blocks.
Definition at line 47 of file GblTrajectory.h.
Referenced by buildLinearEquationSystem(), downWeight(), fit(), milleOut(), predict(), and prepare().
std::vector<unsigned int> GblTrajectory::theDimension [private] |
List of active dimensions (0=u1, 1=u2) in fit.
Definition at line 45 of file GblTrajectory.h.
Referenced by defineOffsets(), GblTrajectory(), getFitToKinkJacobian(), getFitToLocalJacobian(), getJacobian(), and prepare().
BorderedBandMatrix GblTrajectory::theMatrix [private] |
(Bordered band) matrix of linear equation system
Definition at line 51 of file GblTrajectory.h.
Referenced by buildLinearEquationSystem(), fit(), and getResults().
std::vector<GblPoint> GblTrajectory::thePoints [private] |
List of points on trajectory.
Definition at line 46 of file GblTrajectory.h.
Referenced by addPoint(), calcJacobians(), defineOffsets(), GblTrajectory(), getJacobian(), kalmanGainFilter(), and prepare().
VVector::VVector GblTrajectory::theVector [private] |
Vector of linear equation system.
Definition at line 50 of file GblTrajectory.h.
Referenced by buildLinearEquationSystem(), fit(), getResults(), and predict().
1.7.6.1