Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
genfit::tools Namespace Reference

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.
 

Function Documentation

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 E, Acts::UnitConstants::e, genfit::Exception::setFatal(), and utils::status.

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(), and PHGenFit::Track::updateOneMeasurementKalman().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 arr, E, Acts::UnitConstants::e, genfit::Exception::setFatal(), and utils::status.

+ Here is the call graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 KFPMath::a, genfit::AbsHMatrix::MHt(), QR(), physmon_track_finding_ttbar::r, S(), and transposedForwardSubstitution().

Referenced by genfit::KalmanFitter::processTrackPoint(), and genfit::KalmanFitterRefTrack::processTrackPointSqrt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References j.

Referenced by genfit::KalmanFitterRefTrack::processTrackPointSqrt().

+ Here is the caller graph for this function:

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 assert, autodiff::detail::copysign(), i, j, k, sigma, sum(), physmon_ckf_tracking::u, and y.

Referenced by genfit::calcAverageState(), kalmanPredictionCovSqrt(), and kalmanUpdateSqrt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 assert, bk(), autodiff::detail::copysign(), i, j, k, sigma, sum(), physmon_ckf_tracking::u, and y.

+ Here is the call graph for this function:

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

References bk(), i, j, n, and sum().

Referenced by kalmanUpdateSqrt(), and transposedInvert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool genfit::tools::transposedForwardSubstitution ( const TMatrixD &  R,
TMatrixD &  b,
int  nCol 
)

Same, for a column of the matrix b.

Definition at line 170 of file Tools.cc.

View newest version in sPHENIX GitHub at line 170 of file Tools.cc

References bk(), i, j, n, and sum().

+ Here is the call graph for this function:

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 i, j, and transposedForwardSubstitution().

Referenced by genfit::calcAverageState().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: