Go to the documentation of this file.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 typedef VertexTrack<5>::AlgebraicSymMatrixOO AlgebraicSymMatrixOO;
00068
00069 typedef std::vector<VertexState> VSC;
00070 typedef std::vector<RefCountedLinearizedTrackState> LTC;
00071 typedef std::pair<double, double> VtxTrkChi2Pair;
00072 typedef std::pair<RefCountedRefittedTrackState, double> TrackWeightPair;
00073 typedef std::pair<RefCountedRefittedTrackState, VtxTrkChi2Pair> TrackChi2Pair;
00074 typedef std::pair<TrackWeightPair, VtxTrkChi2Pair> RefittedTrackComponent;
00075
00076 VertexState meanVertex(const VertexState & vertexA,
00077 const VertexState & vertexB) const;
00078
00079 TrackChi2Pair vertexAndTrackUpdate(const VertexState & oldVertex,
00080 const RefCountedVertexTrack track, const GlobalPoint & referencePosition) const;
00081
00082 RefittedTrackComponent createNewComponent(const VertexState & oldVertex,
00083 const RefCountedLinearizedTrackState linTrack, float weight) const;
00084
00085 TrackChi2Pair assembleTrackComponents(
00086 const std::vector<RefittedTrackComponent> & trackComponents,
00087 const GlobalPoint & referencePosition) const;
00088
00096 double priorVertexChi2(const VertexState priorVertex,
00097 const VertexState fittedVertex) const;
00098
00099 bool limitComponents;
00100 DeepCopyPointerByClone<GsfVertexMerger> theMerger;
00101 GsfVertexUpdator theUpdator;
00102 KalmanVertexUpdator<5> kalmanVertexUpdator;
00103 KalmanSmoothedVertexChi2Estimator<5> smoothedChi2Estimator;
00104 KalmanVertexTrackUpdator<5> theVertexTrackUpdator;
00105 GsfVertexWeightCalculator theWeightCalculator;
00106 VertexTrackFactory<5> theVTFactory;
00107 KVFHelper<5> helper;
00108 };
00109
00110 #endif