12 template <
typename input_track_t>
15 detail::update<input_track_t>(vtx, trk, 1);
18 template <
typename input_track_t>
29 double chi2 = fitQuality.first;
30 double ndf = fitQuality.second;
33 double trkChi2 = detail::trackParametersChi2<input_track_t>(
37 chi2 += sign * (detail::vertexPositionChi2<input_track_t>(vtx, matrixCache) +
38 trackWeight * trkChi2);
41 ndf += sign * trackWeight * 2.;
46 vtx.setFitQuality(chi2, ndf);
54 trk.
ndf = 2 * trackWeight;
62 template <
typename input_track_t>
74 const auto trkParamWeight = linTrack.
weightAtPCA.block<5, 5>(0, 0);
77 const auto& oldVtxPos = vtx.
position();
82 (momJac.transpose() * (trkParamWeight * momJac)).inverse();
85 auto gBmat = trkParamWeight -
87 (momJac * (matrixCache.
momWeightInv * momJac.transpose())) *
88 trkParamWeight.transpose();
93 trackWeight * sign * posJac.transpose() * (gBmat * posJac);
99 trackWeight * sign * posJac.transpose() *
100 gBmat * (trkParams - constTerm));
103 template <
typename input_track_t>
112 template <
typename input_track_t>
120 const auto trkParamWeight = linTrack.
weightAtPCA.block<5, 5>(0, 0);
126 trkParamWeight * (trkParams - constTerm - jacVtx);
129 auto newTrkParams = constTerm + jacVtx + momJac * newTrackMomentum;
132 auto paramDiff = trkParams - newTrkParams;
135 return paramDiff.transpose() * (trkParamWeight * paramDiff);