12 template <
unsigned int N>
19 trackRefit(vertex.
vertexState(), track->linearizedTrack(), track->weight() );
24 std::pair<bool, double>
result = helper.trackParameterChi2(track->linearizedTrack(), thePair.first);
25 float smoothedChi2 = helper.vertexChi2(rVert, vertex.
vertexState()) + result.second;
27 return theVTFactory.vertexTrack(track->linearizedTrack(),
28 vertex.
vertexState(), thePair.first, smoothedChi2, thePair.second,
32 template <
unsigned int N>
38 typedef ROOT::Math::SVector<double,N> AlgebraicVectorN;
39 typedef ROOT::Math::SVector<double,
N-2> AlgebraicVectorM;
40 typedef ROOT::Math::SMatrix<double,N,3,ROOT::Math::MatRepStd<double,N,3> > AlgebraicMatrixN3;
41 typedef ROOT::Math::SMatrix<double,3,N,ROOT::Math::MatRepStd<double,3,N> > AlgebraicMatrix3N;
42 typedef ROOT::Math::SMatrix<double,3,
N-2,ROOT::Math::MatRepStd<double,3,N-2> >
AlgebraicMatrix3M;
43 typedef ROOT::Math::SMatrix<double,
N,N-2,ROOT::Math::MatRepStd<double,
N,N-2> > AlgebraicMatrixNM;
44 typedef ROOT::Math::SMatrix<double,N-2,3,ROOT::Math::MatRepStd<double,N-2,3> > AlgebraicMatrixM3;
45 typedef ROOT::Math::SMatrix<double,N,N,ROOT::Math::MatRepSym<double,N> > AlgebraicSymMatrixNN;
47 typedef ROOT::Math::SMatrix<double,N+1,N+1,ROOT::Math::MatRepStd<double,N+1,N+1> > AlgebraicMatrixOO;
48 typedef ROOT::Math::SMatrix<double,N-2,N-2,ROOT::Math::MatRepSym<double,N-2> > AlgebraicSymMatrixMM;
54 vertexCoord(0) = vertexPosition.
x();
55 vertexCoord(1) = vertexPosition.
y();
56 vertexCoord(2) = vertexPosition.
z();
60 const AlgebraicMatrixN3
a = linTrackState->positionJacobian();
61 const AlgebraicMatrixNM
b = linTrackState->momentumJacobian();
67 AlgebraicSymMatrixNN trackParametersWeight =
68 linTrackState->predictedStateWeight(ifail);
70 AlgebraicSymMatrixMM
s = ROOT::Math::SimilarityT(b,trackParametersWeight);
74 (
"KalmanVertexTrackUpdator::S matrix inversion failed");
77 AlgebraicMatrixNM twbs = trackParametersWeight * b *
s;
81 linTrackState->predictedStateParameters() - linTrackState->constantTerm() - a*vertexCoord;
84 AlgebraicVectorM newTrackMomentumP = ROOT::Math::Transpose(twbs) * vv;
90 AlgebraicMatrix3N tmpM1 = -vertexErrorMatrix * (ROOT::Math::Transpose(a));
91 AlgebraicMatrix3M refittedPositionMomentumConvariance = tmpM1 * twbs;
93 AlgebraicSymMatrixMM refittedMomentumConvariance = s/weight +
94 ROOT::Math::SimilarityT(refittedPositionMomentumConvariance, vertex.
weight().
matrix_new());
98 AlgebraicMatrixOO covMatrix;
99 covMatrix.Place_at(refittedPositionMomentumConvariance, 0, 3);
100 covMatrix.Place_at(ROOT::Math::Transpose(refittedPositionMomentumConvariance), 3, 0);
101 covMatrix.Place_at(vertexErrorMatrix, 0, 0);
102 covMatrix.Place_at(refittedMomentumConvariance, 3 ,3);
107 createRefittedTrackState(vertexPosition, newTrackMomentumP, covSymMatrix);
VertexState vertexState() const
GlobalPoint position() const
const AlgebraicSymMatrix33 & matrix_new() const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
ROOT::Math::SVector< double, 3 > AlgebraicVector3
GlobalWeight weight() const
GlobalError error() const