EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
Functions | |
void | invertMatrix (const TMatrixDSym &mat, TMatrixDSym &inv, double *determinant=nullptr) |
Invert a matrix, throwing an Exception when inversion fails. Optional calculation of determinant. | |
void | invertMatrix (TMatrixDSym &mat, double *determinant=nullptr) |
Same, replacing its argument. | |
bool | transposedForwardSubstitution (const TMatrixD &R, TVectorD &b) |
Solves R^t x = b, replacing b with the solution for x. R is assumed to be upper diagonal. | |
bool | transposedForwardSubstitution (const TMatrixD &R, TMatrixD &b, int nCol) |
Same, for a column of the matrix b. | |
bool | transposedInvert (const TMatrixD &R, TMatrixD &inv) |
Inverts the transpose of the upper right matrix R into inv. | |
void | QR (TMatrixD &A) |
Replaces A with an upper right matrix connected to A by an orthongonal transformation. I.e., it computes R from a QR decomposition of A = QR, replacing A. | |
void | QR (TMatrixD &A, TVectorD &b) |
Replaces A with an upper right matrix connected to A by an orthongonal transformation. I.e., it computes R from a QR decomposition of A = QR, replacing A. Also replaces b by Q'b where Q' is the transposed of Q. | |
void | noiseMatrixSqrt (const TMatrixDSym &noise, TMatrixD &noiseSqrt) |
Calculate a sqrt for the positive semidefinite noise matrix. Rows corresponding to zero eigenvalues are omitted. This gives the transposed of the square root, i.e. noise = noiseSqrt * noiseSqrt'. | |
void | kalmanPredictionCovSqrt (const TMatrixD &S, const TMatrixD &F, const TMatrixD &Q, TMatrixD &Snew) |
Calculates the square root of the covariance matrix after the Kalman prediction (i.e. extrapolation) with transport matrix F and the noise square root Q. Gives the new covariance square root. | |
void | kalmanUpdateSqrt (const TMatrixD &S, const TVectorD &res, const TMatrixD &R, const AbsHMatrix *H, TVectorD &update, TMatrixD &SNew) |
Calculate the Kalman measurement update with no transport. x, S : state prediction, covariance square root res, R, H : residual, measurement covariance square root, H matrix of the measurement. | |
void genfit::tools::invertMatrix | ( | const TMatrixDSym & | mat, |
TMatrixDSym & | inv, | ||
double * | determinant = nullptr |
||
) |
Invert a matrix, throwing an Exception when inversion fails. Optional calculation of determinant.
Definition at line 38 of file Tools.cc.
View newest version in sPHENIX GitHub at line 38 of file Tools.cc
References Acts::UnitConstants::e, and genfit::Exception::setFatal().
Referenced by genfit::calcAverageState(), genfit::DAF::calcWeights(), genfit::SpacepointMeasurement::constructMeasurementsOnPlane(), genfit::KalmanFitterInfo::getAvgWeightedMeasurementOnPlane(), genfit::KalmanFitterInfo::getSmoothedChi2(), genfit::SpacepointMeasurement::initG(), genfit::KalmanFitter::processTrackPoint(), genfit::KalmanFitterRefTrack::processTrackPoint(), genfit::KalmanFitterRefTrack::processTrackPointSqrt(), PHGenFit::Track::updateOneMeasurementKalman(), and PHGenFit2::Track::updateOneMeasurementKalman().
void genfit::tools::invertMatrix | ( | TMatrixDSym & | mat, |
double * | determinant = nullptr |
||
) |
Same, replacing its argument.
Definition at line 90 of file Tools.cc.
View newest version in sPHENIX GitHub at line 90 of file Tools.cc
References Acts::UnitConstants::e, and genfit::Exception::setFatal().
void genfit::tools::kalmanPredictionCovSqrt | ( | const TMatrixD & | S, |
const TMatrixD & | F, | ||
const TMatrixD & | Q, | ||
TMatrixD & | Snew | ||
) |
Calculates the square root of the covariance matrix after the Kalman prediction (i.e. extrapolation) with transport matrix F and the noise square root Q. Gives the new covariance square root.
Definition at line 377 of file Tools.cc.
View newest version in sPHENIX GitHub at line 377 of file Tools.cc
References QR().
Referenced by genfit::KalmanFitterRefTrack::processTrackPointSqrt().
void genfit::tools::kalmanUpdateSqrt | ( | const TMatrixD & | S, |
const TVectorD & | res, | ||
const TMatrixD & | R, | ||
const AbsHMatrix * | H, | ||
TVectorD & | update, | ||
TMatrixD & | SNew | ||
) |
Calculate the Kalman measurement update with no transport. x, S : state prediction, covariance square root res, R, H : residual, measurement covariance square root, H matrix of the measurement.
Definition at line 402 of file Tools.cc.
View newest version in sPHENIX GitHub at line 402 of file Tools.cc
References genfit::AbsHMatrix::MHt(), QR(), and transposedForwardSubstitution().
Referenced by genfit::KalmanFitter::processTrackPoint(), and genfit::KalmanFitterRefTrack::processTrackPointSqrt().
void genfit::tools::noiseMatrixSqrt | ( | const TMatrixDSym & | noise, |
TMatrixD & | noiseSqrt | ||
) |
Calculate a sqrt for the positive semidefinite noise matrix. Rows corresponding to zero eigenvalues are omitted. This gives the transposed of the square root, i.e. noise = noiseSqrt * noiseSqrt'.
Definition at line 338 of file Tools.cc.
View newest version in sPHENIX GitHub at line 338 of file Tools.cc
Referenced by genfit::KalmanFitterRefTrack::processTrackPointSqrt().
void genfit::tools::QR | ( | TMatrixD & | A | ) |
Replaces A with an upper right matrix connected to A by an orthongonal transformation. I.e., it computes R from a QR decomposition of A = QR, replacing A.
Definition at line 209 of file Tools.cc.
View newest version in sPHENIX GitHub at line 209 of file Tools.cc
References k, Acts::UnitConstants::u, and y.
Referenced by genfit::calcAverageState(), kalmanPredictionCovSqrt(), and kalmanUpdateSqrt().
void genfit::tools::QR | ( | TMatrixD & | A, |
TVectorD & | b | ||
) |
Replaces A with an upper right matrix connected to A by an orthongonal transformation. I.e., it computes R from a QR decomposition of A = QR, replacing A. Also replaces b by Q'b where Q' is the transposed of Q.
Definition at line 270 of file Tools.cc.
View newest version in sPHENIX GitHub at line 270 of file Tools.cc
References bk(), k, Acts::UnitConstants::u, and y.
bool genfit::tools::transposedForwardSubstitution | ( | const TMatrixD & | R, |
TVectorD & | b | ||
) |
Solves R^t x = b, replacing b with the solution for x. R is assumed to be upper diagonal.
Definition at line 150 of file Tools.cc.
View newest version in sPHENIX GitHub at line 150 of file Tools.cc
Referenced by kalmanUpdateSqrt(), and transposedInvert().
bool genfit::tools::transposedForwardSubstitution | ( | const TMatrixD & | R, |
TMatrixD & | b, | ||
int | nCol | ||
) |
bool genfit::tools::transposedInvert | ( | const TMatrixD & | R, |
TMatrixD & | inv | ||
) |
Inverts the transpose of the upper right matrix R into inv.
Definition at line 189 of file Tools.cc.
View newest version in sPHENIX GitHub at line 189 of file Tools.cc
References transposedForwardSubstitution().
Referenced by genfit::calcAverageState().