Point on trajectory. More...
#include <GblPoint.h>
Public Member Functions | |
template<typename Derivative > | |
void | addGlobals (const std::vector< int > &aLabels, const Eigen::MatrixBase< Derivative > &aDerivatives) |
Add global derivatives to a point. More... | |
template<typename Derivative > | |
void | addLocals (const Eigen::MatrixBase< Derivative > &aDerivatives) |
Add local derivatives to a point. More... | |
template<typename Projection , typename Residuals , typename Precision , typename std::enable_if<(Residuals::ColsAtCompileTime==1)>::type * = nullptr, typename std::enable_if<(Precision::ColsAtCompileTime!=1)>::type * = nullptr> | |
void | addMeasurement (const Eigen::MatrixBase< Projection > &aProjection, const Eigen::MatrixBase< Residuals > &aResiduals, const Eigen::MatrixBase< Precision > &aPrecision, double minPrecision=0.) |
Add a measurement to a point. More... | |
template<typename Projection , typename Residuals , typename Precision , typename std::enable_if<(Residuals::ColsAtCompileTime==1)>::type * = nullptr, typename std::enable_if<(Precision::ColsAtCompileTime==1)>::type * = nullptr> | |
void | addMeasurement (const Eigen::MatrixBase< Projection > &aProjection, const Eigen::MatrixBase< Residuals > &aResiduals, const Eigen::MatrixBase< Precision > &aPrecision, double minPrecision=0.) |
template<typename Residuals , typename Precision , typename std::enable_if<(Residuals::ColsAtCompileTime==1)>::type * = nullptr, typename std::enable_if<(Precision::ColsAtCompileTime!=1)>::type * = nullptr> | |
void | addMeasurement (const Eigen::MatrixBase< Residuals > &aResiduals, const Eigen::MatrixBase< Precision > &aPrecision, double minPrecision=0.) |
Add a measurement to a point. More... | |
template<typename Residuals , typename Precision , typename std::enable_if<(Residuals::ColsAtCompileTime==1)>::type * = nullptr, typename std::enable_if<(Precision::ColsAtCompileTime==1)>::type * = nullptr> | |
void | addMeasurement (const Eigen::MatrixBase< Residuals > &aResiduals, const Eigen::MatrixBase< Precision > &aPrecision, double minPrecision=0.) |
void | addNextJacobian (const Matrix5d &aJac) |
Define jacobian to next scatterer (by GBLTrajectory constructor) More... | |
void | addPrevJacobian (const Matrix5d &aJac) |
Define jacobian to previous scatterer (by GBLTrajectory constructor) More... | |
template<typename Precision > | |
void | addScatterer (const Eigen::Vector2d &aResiduals, const Eigen::MatrixBase< Precision > &aPrecision) |
Add a (thin) scatterer to a point. More... | |
void | addScatterer (const Eigen::Vector2d &aResiduals, const Eigen::Vector2d &aPrecision) |
GblPoint (const Matrix5d &aJacobian) | |
Create a point. More... | |
GblPoint (const GblPoint &)=default | |
GblPoint (GblPoint &&)=default | |
void | getDerivatives (int aDirection, Eigen::Matrix2d &matW, Eigen::Matrix2d &matWJ, Eigen::Vector2d &vecWd) const |
Retrieve derivatives of local track model. More... | |
void | getGlobalDerivatives (Eigen::MatrixXd &aDerivatives) const |
Retrieve global derivatives from a point. More... | |
void | getGlobalLabels (std::vector< int > &aLabels) const |
Retrieve global derivatives labels from a point. More... | |
void | getGlobalLabelsAndDerivatives (unsigned int aRow, std::vector< int > &aLabels, std::vector< double > &aDerivatives) const |
Retrieve global derivatives from a point for a single row. More... | |
unsigned int | getLabel () const |
Retrieve label of point. More... | |
const Eigen::MatrixXd & | getLocalDerivatives () const |
Retrieve local derivatives from a point. More... | |
double | getMeasPrecMin () const |
get precision cutoff. More... | |
void | getMeasTransformation (Eigen::MatrixXd &aTransformation) const |
Get measurement transformation (from diagonalization). More... | |
void | getMeasurement (Matrix5d &aProjection, Vector5d &aResiduals, Vector5d &aPrecision) const |
Retrieve measurement of a point. More... | |
unsigned int | getNumGlobals () const |
Retrieve number of global derivatives from a point. More... | |
unsigned int | getNumLocals () const |
Retrieve number of local derivatives from a point. More... | |
int | getOffset () const |
Retrieve offset for point. More... | |
const Matrix5d & | getP2pJacobian () const |
Retrieve point-to-(previous)point jacobian. More... | |
void | getScatterer (Eigen::Matrix2d &aTransformation, Eigen::Vector2d &aResiduals, Eigen::Vector2d &aPrecision) const |
Retrieve scatterer of a point. More... | |
void | getScatTransformation (Eigen::Matrix2d &aTransformation) const |
Get scatterer transformation (from diagonalization). More... | |
unsigned int | hasMeasurement () const |
Check for measurement at a point. More... | |
bool | hasScatterer () const |
Check for scatterer at a point. More... | |
GblPoint & | operator= (const GblPoint &)=default |
GblPoint & | operator= (GblPoint &&)=default |
void | printPoint (unsigned int level=0) const |
Print GblPoint. More... | |
void | setLabel (unsigned int aLabel) |
Define label of point (by GBLTrajectory constructor) More... | |
void | setOffset (int anOffset) |
Define offset for point (by GBLTrajectory constructor) More... | |
virtual | ~GblPoint () |
Private Attributes | |
Eigen::MatrixXd | globalDerivatives |
Derivatives of measurement vs additional global (MP-II) parameters. More... | |
std::vector< int > | globalLabels |
Labels of global (MP-II) derivatives. More... | |
Eigen::MatrixXd | localDerivatives |
Derivatives of measurement vs additional local (fit) parameters. More... | |
unsigned int | measDim |
Dimension of measurement (1-5), 0 indicates absence of measurement. More... | |
Vector5d | measPrecision |
Measurement precision (diagonal of inverse covariance matrix) More... | |
double | measPrecMin |
Minimal measurement precision (for usage) More... | |
Matrix5d | measProjection |
Projection from measurement to local system. More... | |
Vector5d | measResiduals |
Measurement residuals. More... | |
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor, 5, 5 > | measTransformation |
Transformation of diagonalization (of meas. precision matrix) More... | |
Matrix5d | nextJacobian |
Jacobian to next scatterer (or last measurement) More... | |
Matrix5d | p2pJacobian |
Point-to-point jacobian from previous point. More... | |
Matrix5d | prevJacobian |
Jacobian to previous scatterer (or first measurement) More... | |
bool | scatFlag |
Scatterer present? More... | |
Eigen::Vector2d | scatPrecision |
Scattering precision (diagonal of inverse covariance matrix) More... | |
Eigen::Vector2d | scatResiduals |
Scattering residuals (initial kinks if iterating) More... | |
Eigen::Matrix2d | scatTransformation |
Transformation of diagonalization (of scat. precision matrix) More... | |
unsigned int | theLabel |
Label identifying point. More... | |
int | theOffset |
Offset number at point if not negative (else interpolation needed) More... | |
bool | transFlag |
Transformation exists? More... | |
Point on trajectory.
User supplied point on (initial) trajectory.
Must have jacobian for propagation from previous point. May have:
Definition at line 66 of file GblPoint.h.
gbl::GblPoint::GblPoint | ( | const Matrix5d & | aJacobian | ) |
Create a point.
Create point on (initial) trajectory. Needs transformation jacobian from previous point.
[in] | aJacobian | Transformation jacobian from previous point |
Definition at line 41 of file GblPoint.cc.
References globalDerivatives, globalLabels, mps_fire::i, localDerivatives, measDim, measPrecMin, measTransformation, p2pJacobian, scatFlag, theLabel, theOffset, and transFlag.
|
default |
|
default |
|
virtual |
Definition at line 68 of file GblPoint.cc.
References addMeasurement(), mps_fire::i, measDim, measPrecision, measPrecMin, measProjection, measResiduals, measTransformation, and transFlag.
void gbl::GblPoint::addGlobals | ( | const std::vector< int > & | aLabels, |
const Eigen::MatrixBase< Derivative > & | aDerivatives | ||
) |
Add global derivatives to a point.
Point needs to have a measurement.
[in] | aLabels | Global derivatives labels |
[in] | aDerivatives | Global derivatives (matrix) |
Definition at line 342 of file GblPoint.h.
References globalDerivatives, globalLabels, measDim, measTransformation, and transFlag.
Referenced by MillePedeAlignmentAlgorithm::addGlobalData(), and getLocalDerivatives().
void gbl::GblPoint::addLocals | ( | const Eigen::MatrixBase< Derivative > & | aDerivatives | ) |
Add local derivatives to a point.
Point needs to have a measurement.
[in] | aDerivatives | Local derivatives (matrix) |
Definition at line 323 of file GblPoint.h.
References localDerivatives, measDim, measTransformation, and transFlag.
Referenced by getScatTransformation().
void gbl::GblPoint::addMeasurement | ( | const Eigen::MatrixBase< Projection > & | aProjection, |
const Eigen::MatrixBase< Residuals > & | aResiduals, | ||
const Eigen::MatrixBase< Precision > & | aPrecision, | ||
double | minPrecision = 0. |
||
) |
Add a measurement to a point.
Add measurement (in meas. system) with diagonal or arbitrary precision (inverse covariance) matrix. Will be diagonalized. ((up to) 2D: position, 4D: slope+position, 5D: curvature+slope+position)
[in] | aProjection | Projection from local to measurement system |
[in] | aResiduals | Measurement residuals |
[in] | aPrecision | Measurement precision (matrix) |
[in] | minPrecision | Minimal precision to accept measurement |
Add measurement (in meas. system) with diagonal or arbitrary precision (inverse covariance) matrix. Will be diagonalized. ((up to) 2D: position, 4D: slope+position, 5D: curvature+slope+position)
[in] | aProjection | Projection from local to measurement system |
[in] | aResiduals | Measurement residuals |
[in] | aPrecision | Measurement precision (diagonal) |
[in] | minPrecision | Minimal precision to accept measurement |
Definition at line 194 of file GblPoint.h.
References measDim, measPrecision, measPrecMin, measProjection, measResiduals, measTransformation, and transFlag.
Referenced by ReferenceTrajectory::addMaterialEffectsCurvlinGbl(), ReferenceTrajectory::addMaterialEffectsLocalGbl(), addMeasurement(), and ~GblPoint().
void gbl::GblPoint::addMeasurement | ( | const Eigen::MatrixBase< Projection > & | aProjection, |
const Eigen::MatrixBase< Residuals > & | aResiduals, | ||
const Eigen::MatrixBase< Precision > & | aPrecision, | ||
double | minPrecision = 0. |
||
) |
void gbl::GblPoint::addMeasurement | ( | const Eigen::MatrixBase< Residuals > & | aResiduals, |
const Eigen::MatrixBase< Precision > & | aPrecision, | ||
double | minPrecision = 0. |
||
) |
Add a measurement to a point.
Add measurement in local system with diagonal or arbitrary precision (inverse covariance) matrix. Will be diagonalized. ((up to) 2D: position, 4D: slope+position, 5D: curvature+slope+position)
[in] | aResiduals | Measurement residuals |
[in] | aPrecision | Measurement precision (matrix) |
[in] | minPrecision | Minimal precision to accept measurement |
Add measurement in local system with diagonal or arbitrary precision (inverse covariance) matrix. Will be diagonalized. ((up to) 2D: position, 4D: slope+position, 5D: curvature+slope+position)
[in] | aResiduals | Measurement residuals |
[in] | aPrecision | Measurement precision (diagonal) |
[in] | minPrecision | Minimal precision to accept measurement |
Definition at line 249 of file GblPoint.h.
References addMeasurement(), measDim, measPrecision, measPrecMin, measProjection, measResiduals, measTransformation, and transFlag.
void gbl::GblPoint::addMeasurement | ( | const Eigen::MatrixBase< Residuals > & | aResiduals, |
const Eigen::MatrixBase< Precision > & | aPrecision, | ||
double | minPrecision = 0. |
||
) |
void gbl::GblPoint::addNextJacobian | ( | const Matrix5d & | aJac | ) |
Define jacobian to next scatterer (by GBLTrajectory constructor)
[in] | aJac | Jacobian |
Definition at line 487 of file GblPoint.cc.
References nextJacobian.
Referenced by gbl::GblTrajectory::calcJacobians().
void gbl::GblPoint::addPrevJacobian | ( | const Matrix5d & | aJac | ) |
Define jacobian to previous scatterer (by GBLTrajectory constructor)
[in] | aJac | Jacobian |
Definition at line 472 of file GblPoint.cc.
References prevJacobian.
void gbl::GblPoint::addScatterer | ( | const Eigen::Vector2d & | aResiduals, |
const Eigen::MatrixBase< Precision > & | aPrecision | ||
) |
Add a (thin) scatterer to a point.
Add scatterer with diagonal or arbitrary precision (inverse covariance) matrix. Will be diagonalized. Changes local track direction.
The precision matrix for the local slopes is defined by the angular scattering error theta_0 and the scalar products c_1, c_2 of the offset directions in the local frame with the track direction:
(1 - c_1*c_1 - c_2*c_2) | 1 - c_1*c_1 - c_1*c_2 | P = ----------------------- * | | theta_0*theta_0 | - c_1*c_2 1 - c_2*c_2 |
[in] | aResiduals | Scatterer residuals |
[in] | aPrecision | Scatterer precision (vector (with diagonal) or (full) matrix) |
Definition at line 305 of file GblPoint.h.
References scatFlag, scatPrecision, scatResiduals, and scatTransformation.
Referenced by ReferenceTrajectory::addMaterialEffectsCurvlinGbl(), ReferenceTrajectory::addMaterialEffectsLocalGbl(), and getMeasTransformation().
void gbl::GblPoint::addScatterer | ( | const Eigen::Vector2d & | aResiduals, |
const Eigen::Vector2d & | aPrecision | ||
) |
void gbl::GblPoint::getDerivatives | ( | int | aDirection, |
Eigen::Matrix2d & | matW, | ||
Eigen::Matrix2d & | matWJ, | ||
Eigen::Vector2d & | vecWd | ||
) | const |
Retrieve derivatives of local track model.
Linearized track model: F_u(q/p,u',u) = J*u + S*u' + d*q/p, W is inverse of S, negated for backward propagation.
[in] | aDirection | Propagation direction (>0 forward, else backward) |
[out] | matW | W |
[out] | matWJ | W*J |
[out] | vecWd | W*d |
std::overflow_error | : matrix S is singular. |
Definition at line 501 of file GblPoint.cc.
References gather_cfg::cout, nextJacobian, and prevJacobian.
Referenced by gbl::GblTrajectory::getFitToKinkJacobian(), and gbl::GblTrajectory::getFitToLocalJacobian().
void gbl::GblPoint::getGlobalDerivatives | ( | Eigen::MatrixXd & | aDerivatives | ) | const |
Retrieve global derivatives from a point.
[out] | aDerivatives | Global derivatives |
Definition at line 417 of file GblPoint.cc.
References globalDerivatives.
void gbl::GblPoint::getGlobalLabels | ( | std::vector< int > & | aLabels | ) | const |
Retrieve global derivatives labels from a point.
[out] | aLabels | Global labels |
Definition at line 409 of file GblPoint.cc.
References globalLabels.
void gbl::GblPoint::getGlobalLabelsAndDerivatives | ( | unsigned int | aRow, |
std::vector< int > & | aLabels, | ||
std::vector< double > & | aDerivatives | ||
) | const |
Retrieve global derivatives from a point for a single row.
[in] | aRow | Row number |
[out] | aLabels | Global labels |
[out] | aDerivatives | Global derivatives |
Definition at line 427 of file GblPoint.cc.
References globalDerivatives, globalLabels, and mps_fire::i.
unsigned int gbl::GblPoint::getLabel | ( | ) | const |
const MatrixXd & gbl::GblPoint::getLocalDerivatives | ( | ) | const |
Retrieve local derivatives from a point.
Definition at line 367 of file GblPoint.cc.
References addGlobals(), globalDerivatives, globalLabels, mps_fire::i, localDerivatives, measDim, measTransformation, and transFlag.
double gbl::GblPoint::getMeasPrecMin | ( | ) | const |
get precision cutoff.
Definition at line 197 of file GblPoint.cc.
References measPrecMin.
void gbl::GblPoint::getMeasTransformation | ( | Eigen::MatrixXd & | aTransformation | ) | const |
Get measurement transformation (from diagonalization).
[out] | aTransformation | Transformation matrix |
Definition at line 219 of file GblPoint.cc.
References addScatterer(), mps_fire::i, measDim, measTransformation, scatFlag, scatPrecision, scatResiduals, scatTransformation, and transFlag.
void gbl::GblPoint::getMeasurement | ( | Matrix5d & | aProjection, |
Vector5d & | aResiduals, | ||
Vector5d & | aPrecision | ||
) | const |
Retrieve measurement of a point.
[out] | aProjection | Projection from (diagonalized) measurement to local system |
[out] | aResiduals | Measurement residuals |
[out] | aPrecision | Measurement precision (diagonal) |
Definition at line 207 of file GblPoint.cc.
References measDim, measPrecision, measProjection, and measResiduals.
unsigned int gbl::GblPoint::getNumGlobals | ( | ) | const |
Retrieve number of global derivatives from a point.
Definition at line 401 of file GblPoint.cc.
References globalDerivatives.
unsigned int gbl::GblPoint::getNumLocals | ( | ) | const |
Retrieve number of local derivatives from a point.
Definition at line 362 of file GblPoint.cc.
References localDerivatives.
int gbl::GblPoint::getOffset | ( | ) | const |
Retrieve offset for point.
Definition at line 459 of file GblPoint.cc.
References theOffset.
Referenced by gbl::GblTrajectory::getFitToKinkJacobian(), and gbl::GblTrajectory::getFitToLocalJacobian().
const Matrix5d & gbl::GblPoint::getP2pJacobian | ( | ) | const |
Retrieve point-to-(previous)point jacobian.
Definition at line 464 of file GblPoint.cc.
References p2pJacobian.
Referenced by gbl::GblTrajectory::calcJacobians().
void gbl::GblPoint::getScatterer | ( | Eigen::Matrix2d & | aTransformation, |
Eigen::Vector2d & | aResiduals, | ||
Eigen::Vector2d & | aPrecision | ||
) | const |
Retrieve scatterer of a point.
[out] | aTransformation | Scatterer transformation from diagonalization |
[out] | aResiduals | Scatterer residuals |
[out] | aPrecision | Scatterer precision (diagonal) |
Definition at line 317 of file GblPoint.cc.
References scatPrecision, scatResiduals, and scatTransformation.
void gbl::GblPoint::getScatTransformation | ( | Eigen::Matrix2d & | aTransformation | ) | const |
Get scatterer transformation (from diagonalization).
[out] | aTransformation | Transformation matrix |
Definition at line 328 of file GblPoint.cc.
References addLocals(), mps_fire::i, localDerivatives, measDim, measTransformation, scatFlag, scatTransformation, and transFlag.
unsigned int gbl::GblPoint::hasMeasurement | ( | ) | const |
Check for measurement at a point.
Get dimension of measurement (0 = none).
Definition at line 189 of file GblPoint.cc.
References measDim.
bool gbl::GblPoint::hasScatterer | ( | ) | const |
void gbl::GblPoint::printPoint | ( | unsigned int | level = 0 | ) | const |
Print GblPoint.
[in] | level | print level (0: minimum, >0: more) |
Definition at line 533 of file GblPoint.cc.
References gather_cfg::cout, globalDerivatives, globalLabels, mps_fire::i, localDerivatives, measDim, measPrecision, measPrecMin, measProjection, measResiduals, nextJacobian, p2pJacobian, prevJacobian, scatFlag, scatPrecision, scatResiduals, theLabel, theOffset, and transFlag.
void gbl::GblPoint::setLabel | ( | unsigned int | aLabel | ) |
Define label of point (by GBLTrajectory constructor)
[in] | aLabel | Label identifying point |
Definition at line 441 of file GblPoint.cc.
References theLabel.
Referenced by SequenceTypes.DummyModule::__init__(), SequenceTypes.DummyBooleanModule::__init__(), and Vispa.Gui.FindDialog.FindDialog::reset().
void gbl::GblPoint::setOffset | ( | int | anOffset | ) |
Define offset for point (by GBLTrajectory constructor)
[in] | anOffset | Offset number |
Definition at line 454 of file GblPoint.cc.
References theOffset.
|
private |
Derivatives of measurement vs additional global (MP-II) parameters.
Definition at line 177 of file GblPoint.h.
Referenced by addGlobals(), GblPoint(), getGlobalDerivatives(), getGlobalLabelsAndDerivatives(), getLocalDerivatives(), getNumGlobals(), and printPoint().
|
private |
Labels of global (MP-II) derivatives.
Definition at line 176 of file GblPoint.h.
Referenced by addGlobals(), GblPoint(), getGlobalLabels(), getGlobalLabelsAndDerivatives(), getLocalDerivatives(), and printPoint().
|
private |
Derivatives of measurement vs additional local (fit) parameters.
Definition at line 175 of file GblPoint.h.
Referenced by addLocals(), GblPoint(), getLocalDerivatives(), getNumLocals(), getScatTransformation(), and printPoint().
|
private |
Dimension of measurement (1-5), 0 indicates absence of measurement.
Definition at line 163 of file GblPoint.h.
Referenced by addGlobals(), addLocals(), addMeasurement(), GblPoint(), getLocalDerivatives(), getMeasTransformation(), getMeasurement(), getScatTransformation(), hasMeasurement(), printPoint(), and ~GblPoint().
|
private |
Measurement precision (diagonal of inverse covariance matrix)
Definition at line 167 of file GblPoint.h.
Referenced by addMeasurement(), getMeasurement(), printPoint(), and ~GblPoint().
|
private |
Minimal measurement precision (for usage)
Definition at line 164 of file GblPoint.h.
Referenced by addMeasurement(), GblPoint(), getMeasPrecMin(), printPoint(), and ~GblPoint().
|
private |
Projection from measurement to local system.
Definition at line 165 of file GblPoint.h.
Referenced by addMeasurement(), getMeasurement(), printPoint(), and ~GblPoint().
|
private |
Measurement residuals.
Definition at line 166 of file GblPoint.h.
Referenced by addMeasurement(), getMeasurement(), printPoint(), and ~GblPoint().
|
private |
Transformation of diagonalization (of meas. precision matrix)
Definition at line 170 of file GblPoint.h.
Referenced by addGlobals(), addLocals(), addMeasurement(), GblPoint(), getLocalDerivatives(), getMeasTransformation(), getScatTransformation(), and ~GblPoint().
|
private |
Jacobian to next scatterer (or last measurement)
Definition at line 162 of file GblPoint.h.
Referenced by addNextJacobian(), getDerivatives(), and printPoint().
|
private |
Point-to-point jacobian from previous point.
Definition at line 160 of file GblPoint.h.
Referenced by GblPoint(), getP2pJacobian(), and printPoint().
|
private |
Jacobian to previous scatterer (or first measurement)
Definition at line 161 of file GblPoint.h.
Referenced by addPrevJacobian(), getDerivatives(), and printPoint().
|
private |
Scatterer present?
Definition at line 171 of file GblPoint.h.
Referenced by addScatterer(), GblPoint(), getMeasTransformation(), getScatTransformation(), hasScatterer(), and printPoint().
|
private |
Scattering precision (diagonal of inverse covariance matrix)
Definition at line 174 of file GblPoint.h.
Referenced by addScatterer(), getMeasTransformation(), getScatterer(), and printPoint().
|
private |
Scattering residuals (initial kinks if iterating)
Definition at line 173 of file GblPoint.h.
Referenced by addScatterer(), getMeasTransformation(), getScatterer(), and printPoint().
|
private |
Transformation of diagonalization (of scat. precision matrix)
Definition at line 172 of file GblPoint.h.
Referenced by addScatterer(), getMeasTransformation(), getScatterer(), and getScatTransformation().
|
private |
Label identifying point.
Definition at line 158 of file GblPoint.h.
Referenced by GblPoint(), getLabel(), printPoint(), and setLabel().
|
private |
Offset number at point if not negative (else interpolation needed)
Definition at line 159 of file GblPoint.h.
Referenced by GblPoint(), getOffset(), printPoint(), and setOffset().
|
private |
Transformation exists?
Definition at line 168 of file GblPoint.h.
Referenced by addGlobals(), addLocals(), addMeasurement(), GblPoint(), getLocalDerivatives(), getMeasTransformation(), getScatTransformation(), printPoint(), and ~GblPoint().