#include <KalmanTrackToTrackCovCalculator.h>
Public Types | |
typedef CachingVertex< N > ::RefCountedVertexTrack | RefCountedVertexTrack |
Public Member Functions | |
KalmanTrackToTrackCovCalculator * | clone () const |
KalmanTrackToTrackCovCalculator () | |
CachingVertex< N >::TrackToTrackMap | operator() (const CachingVertex< N > &vertex) const |
Calculates all the track-to-track covariance matrices using the Kalman filter algorithms after the vertex has been fit and the tracks refit.
Definition at line 13 of file KalmanTrackToTrackCovCalculator.h.
typedef CachingVertex<N>::RefCountedVertexTrack KalmanTrackToTrackCovCalculator< N >::RefCountedVertexTrack |
Definition at line 18 of file KalmanTrackToTrackCovCalculator.h.
KalmanTrackToTrackCovCalculator< N >::KalmanTrackToTrackCovCalculator | ( | ) | [inline] |
Definition at line 20 of file KalmanTrackToTrackCovCalculator.h.
Referenced by KalmanTrackToTrackCovCalculator< N >::clone().
{}
KalmanTrackToTrackCovCalculator* KalmanTrackToTrackCovCalculator< N >::clone | ( | void | ) | const [inline, virtual] |
Implements TrackToTrackCovCalculator< N >.
Definition at line 31 of file KalmanTrackToTrackCovCalculator.h.
References KalmanTrackToTrackCovCalculator< N >::KalmanTrackToTrackCovCalculator().
{ return new KalmanTrackToTrackCovCalculator(* this); }
CachingVertex< N >::TrackToTrackMap KalmanTrackToTrackCovCalculator< N >::operator() | ( | const CachingVertex< N > & | vertex | ) | const [virtual] |
Calculates all the track-to-track covariance matrices
vertex | The vertex whose track-to-track covariance matrices have to be calculated. |
Implements TrackToTrackCovCalculator< N >.
Definition at line 7 of file KalmanTrackToTrackCovCalculator.cc.
References i, j, MultiGaussianStateTransform::N, and testEve_cfg::tracks.
{ typedef ROOT::Math::SMatrix<double,N,3,ROOT::Math::MatRepStd<double,N,3> > AlgebraicMatrixN3; typedef ROOT::Math::SMatrix<double,N,N-2,ROOT::Math::MatRepStd<double,N,N-2> > AlgebraicMatrixNM; typedef ROOT::Math::SMatrix<double,N-2,3,ROOT::Math::MatRepStd<double,N-2,3> > AlgebraicMatrixM3; typedef ROOT::Math::SMatrix<double,3,N-2,ROOT::Math::MatRepStd<double,3,N-2> > AlgebraicMatrix3M; typedef ROOT::Math::SMatrix<double,N,N,ROOT::Math::MatRepSym<double,N> > AlgebraicSymMatrixNN; typedef ROOT::Math::SMatrix<double,N-2,N-2,ROOT::Math::MatRepSym<double,N-2> > AlgebraicSymMatrixMM; typedef ROOT::Math::SMatrix<double,N-2,N-2,ROOT::Math::MatRepStd<double,N-2,N-2> > AlgebraicMatrixMM; typename CachingVertex<N>::TrackToTrackMap returnMap; int ifail = 0; std::vector<RefCountedVertexTrack> tracks = vertex.tracks(); //vertex initial data needed AlgebraicSymMatrix33 vertexC = vertex.error().matrix_new(); for(typename std::vector<RefCountedVertexTrack>::iterator i = tracks.begin(); i != tracks.end(); i++) { const AlgebraicMatrixN3 & leftA = (*i)->linearizedTrack()->positionJacobian(); const AlgebraicMatrixNM & leftB = (*i)->linearizedTrack()->momentumJacobian(); AlgebraicSymMatrixNN leftG = (*i)->linearizedTrack()->predictedStateWeight(ifail); AlgebraicSymMatrixMM leftW = ROOT::Math::SimilarityT(leftB,leftG); ifail = ! leftW.Invert(); if(ifail != 0) throw VertexException ("KalmanTrackToTrackCovarianceCalculator::leftW matrix inversion failed"); AlgebraicMatrixM3 leftPart = leftW * (ROOT::Math::Transpose(leftB)) * leftG * leftA; typename CachingVertex<N>::TrackMap internalMap; for(typename std::vector<RefCountedVertexTrack>::iterator j = tracks.begin(); j != tracks.end(); j++) { if(*i < *j) { const AlgebraicMatrixN3 & rightA = (*j)->linearizedTrack()->positionJacobian(); const AlgebraicMatrixNM & rightB = (*j)->linearizedTrack()->momentumJacobian(); AlgebraicSymMatrixNN rightG = (*j)->linearizedTrack()->predictedStateWeight(ifail); AlgebraicSymMatrixMM rightW = ROOT::Math::SimilarityT(rightB,rightG); ifail = ! rightW.Invert(); if(ifail != 0) throw VertexException ("KalmanTrackToTrackCovarianceCalculator::rightW matrix inversion failed"); AlgebraicMatrix3M rightPart = (ROOT::Math::Transpose(rightA)) * rightG * rightB * rightW; internalMap[(*j)] = leftPart * vertexC * rightPart; } } returnMap[*i] = internalMap; } return returnMap; }