File indexing completed on 2024-04-06 12:29:09
0001 #ifndef KalmanVertexTrackCompatibilityEstimator_H
0002 #define KalmanVertexTrackCompatibilityEstimator_H
0003
0004 #include "RecoVertex/VertexPrimitives/interface/VertexTrackCompatibilityEstimator.h"
0005
0006 #include "RecoVertex/VertexPrimitives/interface/VertexTrack.h"
0007 #include "RecoVertex/VertexPrimitives/interface/CachingVertex.h"
0008 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexUpdator.h"
0009 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexTrackUpdator.h"
0010 #include "RecoVertex/VertexTools/interface/VertexTrackFactory.h"
0011 #include "RecoVertex/KalmanVertexFit/interface/KVFHelper.h"
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 template <unsigned int N>
0024 class KalmanVertexTrackCompatibilityEstimator : public VertexTrackCompatibilityEstimator<N> {
0025 public:
0026 typedef typename CachingVertex<N>::RefCountedVertexTrack RefCountedVertexTrack;
0027 typedef typename VertexTrack<N>::RefCountedLinearizedTrackState RefCountedLinearizedTrackState;
0028 typedef typename VertexTrack<N>::RefCountedRefittedTrackState RefCountedRefittedTrackState;
0029 typedef typename std::pair<bool, double> BDpair;
0030
0031 KalmanVertexTrackCompatibilityEstimator() {}
0032
0033 ~KalmanVertexTrackCompatibilityEstimator() override {}
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043 BDpair estimate(const CachingVertex<N>& vrt,
0044 const RefCountedVertexTrack track,
0045 unsigned int hint = UINT_MAX) const override;
0046
0047 BDpair estimate(const CachingVertex<N>& v,
0048 const RefCountedLinearizedTrackState track,
0049 unsigned int hint = UINT_MAX) const override;
0050
0051 BDpair estimate(const reco::Vertex& vertex, const reco::TransientTrack& track) const override;
0052
0053 KalmanVertexTrackCompatibilityEstimator<N>* clone() const override {
0054 return new KalmanVertexTrackCompatibilityEstimator(*this);
0055 }
0056
0057 private:
0058 BDpair estimateFittedTrack(const CachingVertex<N>& v, const RefCountedVertexTrack track) const;
0059 BDpair estimateNFittedTrack(const CachingVertex<N>& v, const RefCountedVertexTrack track) const;
0060 BDpair estimateDifference(const CachingVertex<N>& more,
0061 const CachingVertex<N>& less,
0062 const RefCountedVertexTrack track) const;
0063 KalmanVertexUpdator<N> updator;
0064 KalmanVertexTrackUpdator<N> trackUpdator;
0065 VertexTrackFactory<N> vTrackFactory;
0066 KVFHelper<N> helper;
0067 };
0068
0069 #endif