Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:07

0001 #ifndef GsfVertexUpdator_H
0002 #define GsfVertexUpdator_H
0003 
0004 #include "RecoVertex/VertexPrimitives/interface/VertexUpdator.h"
0005 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexUpdator.h"
0006 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexWeightCalculator.h"
0007 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexMerger.h"
0008 
0009 /**
0010  *  Vertex updator for the Gaussian Sum vertex filter.
0011  *  (c.f. Th.Speer & R. Fruewirth, Comp.Phys.Comm 174, 935 (2006) )
0012  */
0013 
0014 class GsfVertexUpdator : public VertexUpdator<5> {
0015 public:
0016   typedef CachingVertex<5>::RefCountedVertexTrack RefCountedVertexTrack;
0017   typedef VertexTrack<5>::RefCountedLinearizedTrackState RefCountedLinearizedTrackState;
0018 
0019   GsfVertexUpdator(bool limit = false, const GsfVertexMerger* merger = nullptr);
0020   /**
0021  *  Method to add a track to an existing CachingVertex
0022  *  An invalid vertex is returned in case of problems during the update.
0023  */
0024 
0025   CachingVertex<5> add(const CachingVertex<5>& oldVertex, const RefCountedVertexTrack track) const override;
0026 
0027   /**
0028  *  Method removing already used VertexTrack from existing CachingVertex
0029  *  This method is not yet implemented.
0030  */
0031 
0032   CachingVertex<5> remove(const CachingVertex<5>& oldVertex, const RefCountedVertexTrack track) const override;
0033 
0034   /**
0035  * Clone method
0036  */
0037 
0038   VertexUpdator<5>* clone() const override { return new GsfVertexUpdator(*this); }
0039 
0040 private:
0041   typedef std::vector<VertexState> VSC;
0042   typedef std::vector<RefCountedLinearizedTrackState> LTC;
0043   typedef std::pair<double, double> WeightChi2Pair;
0044   typedef std::pair<VertexState, WeightChi2Pair> VertexComponent;
0045   typedef std::pair<VertexState, double> VertexChi2Pair;
0046 
0047   VertexComponent createNewComponent(const VertexState& oldVertex,
0048                                      const RefCountedLinearizedTrackState linTrack,
0049                                      float weight,
0050                                      int sign) const;
0051 
0052   VertexChi2Pair assembleVertexComponents(const std::vector<VertexComponent>& newVertexComponents) const;
0053 
0054   bool limitComponents;
0055   DeepCopyPointerByClone<GsfVertexMerger> theMerger;
0056   KalmanVertexUpdator<5> kalmanVertexUpdator;
0057   GsfVertexWeightCalculator theWeightCalculator;
0058 };
0059 
0060 #endif