9 template <
unsigned int N>
16 trackRefit(vertex.
vertexState(), track->linearizedTrack(), track->weight() );
21 std::pair<bool, double>
result = helper.trackParameterChi2(track->linearizedTrack(), thePair.first);
22 float smoothedChi2 = helper.vertexChi2(rVert, vertex.
vertexState()) + result.second;
24 return theVTFactory.vertexTrack(track->linearizedTrack(),
25 vertex.
vertexState(), thePair.first, smoothedChi2, thePair.second,
29 template <
unsigned int N>
36 typedef ROOT::Math::SVector<double,N> AlgebraicVectorN;
37 typedef ROOT::Math::SVector<double,
N-2> AlgebraicVectorM;
38 typedef ROOT::Math::SMatrix<double,N,3,ROOT::Math::MatRepStd<double,N,3> > AlgebraicMatrixN3;
39 typedef ROOT::Math::SMatrix<double,
N,N-2,ROOT::Math::MatRepStd<double,
N,N-2> > AlgebraicMatrixNM;
40 typedef ROOT::Math::SMatrix<double,N-2,3,ROOT::Math::MatRepStd<double,N-2,3> > AlgebraicMatrixM3;
41 typedef ROOT::Math::SMatrix<double,N,N,ROOT::Math::MatRepSym<double,N> > AlgebraicSymMatrixNN;
43 typedef ROOT::Math::SMatrix<double,N+1,N+1,ROOT::Math::MatRepStd<double,N+1,N+1> > AlgebraicMatrixOO;
44 typedef ROOT::Math::SMatrix<double,N-2,N-2,ROOT::Math::MatRepSym<double,N-2> > AlgebraicSymMatrixMM;
50 vertexCoord(0) = vertexPosition.
x();
51 vertexCoord(1) = vertexPosition.
y();
52 vertexCoord(2) = vertexPosition.
z();
56 const AlgebraicMatrixN3 &
a = linTrackState->positionJacobian();
57 const AlgebraicMatrixNM &
b = linTrackState->momentumJacobian();
63 AlgebraicSymMatrixNN trackParametersWeight =
64 linTrackState->predictedStateWeight(ifail);
66 AlgebraicSymMatrixMM
s = ROOT::Math::SimilarityT(b,trackParametersWeight);
70 (
"KalmanVertexTrackUpdator::S matrix inversion failed");
72 AlgebraicVectorM newTrackMomentumP = s * (ROOT::Math::Transpose(b)) * trackParametersWeight *
73 (linTrackState->predictedStateParameters() - linTrackState->constantTerm() - a*vertexCoord);
76 -vertexErrorMatrix * (ROOT::Math::Transpose(a)) * trackParametersWeight * b * s;
78 AlgebraicSymMatrixMM refittedMomentumConvariance = s/weight +
79 ROOT::Math::SimilarityT(refittedPositionMomentumConvariance, vertex.
weight().
matrix_new());
83 AlgebraicMatrixOO covMatrix;
84 covMatrix.Place_at(refittedPositionMomentumConvariance, 0, 3);
85 covMatrix.Place_at(ROOT::Math::Transpose(refittedPositionMomentumConvariance), 3, 0);
86 covMatrix.Place_at(vertexErrorMatrix, 0, 0);
87 covMatrix.Place_at(refittedMomentumConvariance, 3 ,3);
92 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
ROOT::Math::SVector< double, 3 > AlgebraicVector3
GlobalWeight weight() const
GlobalError error() const