CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/RecoVertex/GaussianSumVertexFit/interface/GsfVertexUpdator.h

Go to the documentation of this file.
00001 #ifndef GsfVertexUpdator_H
00002 #define GsfVertexUpdator_H
00003 
00004 #include "RecoVertex/VertexPrimitives/interface/VertexUpdator.h"
00005 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexUpdator.h"
00006 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexWeightCalculator.h"
00007 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexMerger.h"
00008 
00014 class GsfVertexUpdator: public VertexUpdator<5> {
00015 
00016 public:
00017 
00018   typedef CachingVertex<5>::RefCountedVertexTrack RefCountedVertexTrack;
00019   typedef VertexTrack<5>::RefCountedLinearizedTrackState RefCountedLinearizedTrackState;
00020 
00021   GsfVertexUpdator(bool limit = false, const GsfVertexMerger * merger = 0);
00027    CachingVertex<5> add(const CachingVertex<5> & oldVertex,
00028         const RefCountedVertexTrack track) const;
00029 
00035    CachingVertex<5> remove(const CachingVertex<5> & oldVertex,
00036         const RefCountedVertexTrack track) const;
00037 
00042    VertexUpdator<5> * clone() const
00043    {
00044     return new GsfVertexUpdator(* this);
00045    }
00046 
00047 
00048 private:
00049 
00050   typedef std::vector<VertexState> VSC;
00051   typedef std::vector<RefCountedLinearizedTrackState> LTC;
00052   typedef std::pair<double, double> WeightChi2Pair;
00053   typedef std::pair<VertexState, WeightChi2Pair> VertexComponent;
00054   typedef std::pair<VertexState, double> VertexChi2Pair;
00055 
00056   VertexComponent createNewComponent(const VertexState & oldVertex,
00057          const RefCountedLinearizedTrackState linTrack, float weight, int sign) const;
00058 
00059   VertexChi2Pair assembleVertexComponents(
00060          const std::vector<VertexComponent> & newVertexComponents) const;
00061 
00062   bool limitComponents;
00063   DeepCopyPointerByClone<GsfVertexMerger> theMerger;
00064   KalmanVertexUpdator<5> kalmanVertexUpdator;
00065   GsfVertexWeightCalculator theWeightCalculator;
00066 };
00067 
00068 #endif