11 template <
unsigned int N>
20 std::pair<bool, double>
result = helper.trackParameterChi2(track->linearizedTrack(), thePair.first);
21 float smoothedChi2 = helper.vertexChi2(rVert, vertex.
vertexState()) + result.second;
23 return theVTFactory.vertexTrack(
24 track->linearizedTrack(), vertex.
vertexState(), thePair.first, smoothedChi2, thePair.second, track->weight());
27 template <
unsigned int N>
32 typedef ROOT::Math::SVector<double, N> AlgebraicVectorN;
33 typedef ROOT::Math::SVector<double,
N - 2> AlgebraicVectorM;
34 typedef ROOT::Math::SMatrix<double, N, 3, ROOT::Math::MatRepStd<double, N, 3> > AlgebraicMatrixN3;
35 typedef ROOT::Math::SMatrix<double, 3, N, ROOT::Math::MatRepStd<double, 3, N> > AlgebraicMatrix3N;
36 typedef ROOT::Math::SMatrix<double, 3,
N - 2, ROOT::Math::MatRepStd<double, 3, N - 2> >
AlgebraicMatrix3M;
37 typedef ROOT::Math::SMatrix<double,
N, N - 2, ROOT::Math::MatRepStd<double,
N, N - 2> > AlgebraicMatrixNM;
38 typedef ROOT::Math::SMatrix<double, N - 2, 3, ROOT::Math::MatRepStd<double, N - 2, 3> > AlgebraicMatrixM3;
39 typedef ROOT::Math::SMatrix<double, N, N, ROOT::Math::MatRepSym<double, N> > AlgebraicSymMatrixNN;
41 typedef ROOT::Math::SMatrix<double, N + 1, N + 1, ROOT::Math::MatRepStd<double, N + 1, N + 1> > AlgebraicMatrixOO;
42 typedef ROOT::Math::SMatrix<double, N - 2, N - 2, ROOT::Math::MatRepSym<double, N - 2> > AlgebraicSymMatrixMM;
48 vertexCoord(0) = vertexPosition.
x();
49 vertexCoord(1) = vertexPosition.
y();
50 vertexCoord(2) = vertexPosition.
z();
54 const AlgebraicMatrixN3
a = linTrackState->positionJacobian();
55 const AlgebraicMatrixNM
b = linTrackState->momentumJacobian();
61 AlgebraicSymMatrixNN trackParametersWeight = linTrackState->predictedStateWeight(ifail);
63 AlgebraicSymMatrixMM
s = ROOT::Math::SimilarityT(b, trackParametersWeight);
66 throw VertexException(
"KalmanVertexTrackUpdator::S matrix inversion failed");
69 AlgebraicMatrixNM twbs = trackParametersWeight * b *
s;
71 AlgebraicVectorN vv = linTrackState->predictedStateParameters() - linTrackState->constantTerm() - a * vertexCoord;
74 AlgebraicVectorM newTrackMomentumP = ROOT::Math::Transpose(twbs) * vv;
80 AlgebraicMatrix3N tmpM1 = -vertexErrorMatrix * (ROOT::Math::Transpose(a));
81 AlgebraicMatrix3M refittedPositionMomentumConvariance = tmpM1 * twbs;
83 AlgebraicSymMatrixMM refittedMomentumConvariance =
84 s / weight + ROOT::Math::SimilarityT(refittedPositionMomentumConvariance, vertex.
weight().
matrix());
87 AlgebraicMatrixOO covMatrix;
88 covMatrix.Place_at(refittedPositionMomentumConvariance, 0, 3);
89 covMatrix.Place_at(ROOT::Math::Transpose(refittedPositionMomentumConvariance), 3, 0);
90 covMatrix.Place_at(vertexErrorMatrix, 0, 0);
91 covMatrix.Place_at(refittedMomentumConvariance, 3, 3);
96 linTrackState->createRefittedTrackState(vertexPosition, newTrackMomentumP, covSymMatrix);
VertexState const & vertexState() const
const AlgebraicSymMatrix33 matrix() const
GlobalPoint position() const
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
GlobalWeight weight() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
GlobalError error() const