4 template <
unsigned int N>
7 typedef ROOT::Math::SMatrix<double, N, 3, ROOT::Math::MatRepStd<double, N, 3> > AlgebraicMatrixN3;
8 typedef ROOT::Math::SMatrix<double,
N, N - 2, ROOT::Math::MatRepStd<double,
N, N - 2> > AlgebraicMatrixNM;
9 typedef ROOT::Math::SMatrix<double, N - 2, 3, ROOT::Math::MatRepStd<double, N - 2, 3> > AlgebraicMatrixM3;
10 typedef ROOT::Math::SMatrix<double, 3, N - 2, ROOT::Math::MatRepStd<double, 3, N - 2> > AlgebraicMatrix3M;
11 typedef ROOT::Math::SMatrix<double, N, N, ROOT::Math::MatRepSym<double, N> > AlgebraicSymMatrixNN;
12 typedef ROOT::Math::SMatrix<double, N - 2, N - 2, ROOT::Math::MatRepSym<double, N - 2> > AlgebraicSymMatrixMM;
13 typedef ROOT::Math::SMatrix<double, N - 2, N - 2, ROOT::Math::MatRepStd<double, N - 2, N - 2> > AlgebraicMatrixMM;
17 std::vector<RefCountedVertexTrack>
tracks = vertex.
tracks();
22 for (
typename std::vector<RefCountedVertexTrack>::iterator
i = tracks.begin();
i != tracks.end();
i++) {
23 const AlgebraicMatrixN3& leftA = (*i)->linearizedTrack()->positionJacobian();
24 const AlgebraicMatrixNM& leftB = (*i)->linearizedTrack()->momentumJacobian();
25 AlgebraicSymMatrixNN leftG = (*i)->linearizedTrack()->predictedStateWeight(ifail);
26 AlgebraicSymMatrixMM leftW = ROOT::Math::SimilarityT(leftB, leftG);
28 ifail = !leftW.Invert();
30 throw VertexException(
"KalmanTrackToTrackCovarianceCalculator::leftW matrix inversion failed");
31 AlgebraicMatrixM3 leftPart = leftW * (ROOT::Math::Transpose(leftB)) * leftG * leftA;
33 for (
typename std::vector<RefCountedVertexTrack>::iterator
j = tracks.begin();
j != tracks.end();
j++) {
35 const AlgebraicMatrixN3& rightA = (*j)->linearizedTrack()->positionJacobian();
36 const AlgebraicMatrixNM& rightB = (*j)->linearizedTrack()->momentumJacobian();
37 AlgebraicSymMatrixNN rightG = (*j)->linearizedTrack()->predictedStateWeight(ifail);
38 AlgebraicSymMatrixMM rightW = ROOT::Math::SimilarityT(rightB, rightG);
40 ifail = !rightW.Invert();
43 throw VertexException(
"KalmanTrackToTrackCovarianceCalculator::rightW matrix inversion failed");
44 AlgebraicMatrix3M rightPart = (ROOT::Math::Transpose(rightA)) * rightG * rightB * rightW;
45 internalMap[(*j)] = leftPart * vertexC * rightPart;
48 returnMap[*
i] = internalMap;
std::vector< RefCountedVertexTrack > tracks() const
const AlgebraicSymMatrix33 matrix() const
CachingVertex< N >::TrackToTrackMap operator()(const CachingVertex< N > &vertex) const override
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
std::map< RefCountedVertexTrack, AlgebraicMatrixMM > TrackMap
GlobalError error() const
std::map< RefCountedVertexTrack, TrackMap > TrackToTrackMap