File indexing completed on 2024-04-06 12:29:09
0001 #ifndef KalmanVertexUpdator_H
0002 #define KalmanVertexUpdator_H
0003
0004 #include "RecoVertex/VertexPrimitives/interface/VertexUpdator.h"
0005 #include "RecoVertex/KalmanVertexFit/interface/KVFHelper.h"
0006
0007
0008
0009
0010
0011
0012 template <unsigned int N>
0013 class KalmanVertexUpdator : public VertexUpdator<N> {
0014 public:
0015 typedef typename CachingVertex<N>::RefCountedVertexTrack RefCountedVertexTrack;
0016 typedef typename VertexTrack<N>::RefCountedLinearizedTrackState RefCountedLinearizedTrackState;
0017
0018
0019
0020
0021
0022
0023 CachingVertex<N> add(const CachingVertex<N>& oldVertex, const RefCountedVertexTrack track) const override;
0024
0025
0026
0027
0028
0029
0030 CachingVertex<N> remove(const CachingVertex<N>& oldVertex, const RefCountedVertexTrack track) const override;
0031
0032
0033
0034
0035
0036 VertexUpdator<N>* clone() const override { return new KalmanVertexUpdator(*this); }
0037
0038
0039
0040
0041
0042 CachingVertex<N> update(const CachingVertex<N>& oldVertex,
0043 const RefCountedVertexTrack track,
0044 float weight,
0045 int sign) const;
0046
0047 VertexState positionUpdate(const VertexState& oldVertex,
0048 const RefCountedLinearizedTrackState linearizedTrack,
0049 const float weight,
0050 int sign) const;
0051
0052 std::pair<bool, double> chi2Increment(const VertexState& oldVertex,
0053 const VertexState& newVertexState,
0054 const RefCountedLinearizedTrackState linearizedTrack,
0055 float weight) const;
0056
0057 private:
0058 typedef ROOT::Math::SVector<double, N> AlgebraicVectorN;
0059 typedef ROOT::Math::SVector<double, N - 2> AlgebraicVectorM;
0060 typedef ROOT::Math::SMatrix<double, N, 3, ROOT::Math::MatRepStd<double, N, 3> > AlgebraicMatrixN3;
0061 typedef ROOT::Math::SMatrix<double, N, N - 2, ROOT::Math::MatRepStd<double, N, N - 2> > AlgebraicMatrixNM;
0062 typedef ROOT::Math::SMatrix<double, N - 2, 3, ROOT::Math::MatRepStd<double, N - 2, 3> > AlgebraicMatrixM3;
0063 typedef ROOT::Math::SMatrix<double, N, N, ROOT::Math::MatRepSym<double, N> > AlgebraicSymMatrixNN;
0064 typedef ROOT::Math::SMatrix<double, N + 1, N + 1, ROOT::Math::MatRepSym<double, N + 1> > AlgebraicSymMatrixOO;
0065 typedef ROOT::Math::SMatrix<double, N + 1, N + 1, ROOT::Math::MatRepStd<double, N + 1, N + 1> > AlgebraicMatrixOO;
0066 typedef ROOT::Math::SMatrix<double, N - 2, N - 2, ROOT::Math::MatRepSym<double, N - 2> > AlgebraicSymMatrixMM;
0067
0068 KVFHelper<N> helper;
0069 };
0070
0071 #endif