CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DataFormats/ParticleFlowReco/interface/PFDisplacedVertexSeed.h

Go to the documentation of this file.
00001 #ifndef DataFormat_ParticleFlowReco_PFDisplacedVertexSeed_h
00002 #define DataFormat_ParticleFlowReco_PFDisplacedVertexSeed_h 
00003 
00004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00005 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00006 
00007 #include <set>
00008 #include <iostream>
00009 
00010 
00011 
00012 namespace reco {
00013 
00014   
00016 
00028   class PFDisplacedVertexSeed {
00029 
00030   public:
00031 
00033 
00034     typedef std::set< reco::TrackBaseRef >::iterator IEset;
00035 
00041     struct Compare{
00042       bool operator()(const TrackBaseRef& s1, const TrackBaseRef& s2) const
00043       {return s1.key() < s2.key();}
00044     };
00045 
00047     PFDisplacedVertexSeed();
00048 
00050     void addElement(TrackBaseRef);
00051 
00054     void updateSeedPoint(const GlobalPoint& dcaPoint, const TrackBaseRef, 
00055                          const TrackBaseRef, double weight = 1);
00056 
00058     void mergeWith(const PFDisplacedVertexSeed& displacedVertex);
00059 
00061     bool isEmpty() const {return (elements_.size() == 0);}
00062 
00064     const std::set < TrackBaseRef, Compare >& elements() const 
00065       {return elements_;}
00066 
00067     const double nTracks() const {return elements_.size();}
00068 
00070     const GlobalPoint& seedPoint() const {return seedPoint_;}
00071 
00073     const double totalWeight() const {return totalWeight_;}
00074 
00076     void Dump(std::ostream& out = std::cout) const;
00077 
00078 
00079   private:
00080 
00081 
00082     friend std::ostream& operator<<( std::ostream& out, const PFDisplacedVertexSeed& co );    
00083 
00085 
00087     std::set < TrackBaseRef , Compare >     elements_;
00089     GlobalPoint                   seedPoint_;
00092     float                         totalWeight_;
00093 
00094   };
00095 }
00096 
00097 #endif
00098 
00099 
00100