00001 #ifndef _GsfVertexSmoother_H_ 00002 #define _GsfVertexSmoother_H_ 00003 00004 00005 #include "RecoVertex/VertexPrimitives/interface/VertexSmoother.h" 00006 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexUpdator.h" 00007 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexMerger.h" 00008 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexUpdator.h" 00009 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexTrackUpdator.h" 00010 #include "RecoVertex/KalmanVertexFit/interface/KalmanSmoothedVertexChi2Estimator.h" 00011 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexWeightCalculator.h" 00012 #include "RecoVertex/VertexTools/interface/VertexTrackFactory.h" 00013 #include "DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h" 00014 #include "RecoVertex/KalmanVertexFit/interface/KVFHelper.h" 00015 00016 00023 class GsfVertexSmoother : public VertexSmoother<5> { 00024 00025 public: 00026 00033 GsfVertexSmoother(bool limit, const GsfVertexMerger * merger); 00034 00035 virtual ~GsfVertexSmoother() {} 00036 00044 virtual CachingVertex<5> smooth(const CachingVertex<5> & vertex) const; 00045 00050 const VertexUpdator<5> * vertexUpdator() const 00051 {return &theUpdator;} 00052 00056 virtual VertexSmoother<5> * clone() const 00057 { 00058 return new GsfVertexSmoother(* this); 00059 } 00060 00061 private: 00062 00063 typedef CachingVertex<5>::RefCountedVertexTrack RefCountedVertexTrack; 00064 typedef VertexTrack<5>::RefCountedLinearizedTrackState RefCountedLinearizedTrackState; 00065 typedef VertexTrack<5>::RefCountedRefittedTrackState RefCountedRefittedTrackState; 00066 typedef VertexTrack<5>::AlgebraicMatrix3M AlgebraicMatrix3M; 00067 00068 typedef std::vector<VertexState> VSC; 00069 typedef std::vector<RefCountedLinearizedTrackState> LTC; 00070 typedef std::pair<double, double> VtxTrkChi2Pair; 00071 typedef std::pair<RefCountedRefittedTrackState, double> TrackWeightPair; 00072 typedef std::pair<RefCountedRefittedTrackState, VtxTrkChi2Pair> TrackChi2Pair; 00073 typedef std::pair<TrackWeightPair, VtxTrkChi2Pair> RefittedTrackComponent; 00074 00075 VertexState meanVertex(const VertexState & vertexA, 00076 const VertexState & vertexB) const; 00077 00078 TrackChi2Pair vertexAndTrackUpdate(const VertexState & oldVertex, 00079 const RefCountedVertexTrack track, const GlobalPoint & referencePosition) const; 00080 00081 RefittedTrackComponent createNewComponent(const VertexState & oldVertex, 00082 const RefCountedLinearizedTrackState linTrack, float weight) const; 00083 00084 TrackChi2Pair assembleTrackComponents( 00085 const vector<RefittedTrackComponent> & trackComponents, 00086 const GlobalPoint & referencePosition) const; 00087 00095 double priorVertexChi2(const VertexState priorVertex, 00096 const VertexState fittedVertex) const; 00097 00098 bool limitComponents; 00099 DeepCopyPointerByClone<GsfVertexMerger> theMerger; 00100 GsfVertexUpdator theUpdator; 00101 KalmanVertexUpdator<5> kalmanVertexUpdator; 00102 KalmanSmoothedVertexChi2Estimator<5> smoothedChi2Estimator; 00103 KalmanVertexTrackUpdator<5> theVertexTrackUpdator; 00104 GsfVertexWeightCalculator theWeightCalculator; 00105 VertexTrackFactory<5> theVTFactory; 00106 KVFHelper<5> helper; 00107 }; 00108 00109 #endif