CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFDisplacedVertexSeed.h
Go to the documentation of this file.
1 #ifndef DataFormat_ParticleFlowReco_PFDisplacedVertexSeed_h
2 #define DataFormat_ParticleFlowReco_PFDisplacedVertexSeed_h
3 
6 
7 #include <set>
8 #include <iostream>
9 
10 
11 
12 namespace reco {
13 
14 
16 
29 
30  public:
31 
33 
34  typedef std::set< reco::TrackBaseRef >::iterator IEset;
35 
41  struct Compare{
42  bool operator()(const TrackBaseRef& s1, const TrackBaseRef& s2) const
43  {return s1.key() < s2.key();}
44  };
45 
48 
51 
54  void updateSeedPoint(const GlobalPoint& dcaPoint, const TrackBaseRef,
55  const TrackBaseRef, double weight = 1);
56 
58  void mergeWith(const PFDisplacedVertexSeed& displacedVertex);
59 
61  bool isEmpty() const {return (elements_.size() == 0);}
62 
64  const std::set < TrackBaseRef, Compare >& elements() const
65  {return elements_;}
66 
67  const double nTracks() const {return elements_.size();}
68 
70  const GlobalPoint& seedPoint() const {return seedPoint_;}
71 
73  const double totalWeight() const {return totalWeight_;}
74 
76  void Dump(std::ostream& out = std::cout) const;
77 
78 
79  private:
80 
81 
82  friend std::ostream& operator<<( std::ostream& out, const PFDisplacedVertexSeed& co );
83 
85 
87  std::set < TrackBaseRef , Compare > elements_;
92  float totalWeight_;
93 
94  };
95 }
96 
97 #endif
98 
99 
100 
friend std::ostream & operator<<(std::ostream &out, const PFDisplacedVertexSeed &co)
bool operator()(const TrackBaseRef &s1, const TrackBaseRef &s2) const
std::set< TrackBaseRef, Compare > elements_
---—— MEMBERS ----—— ///
void addElement(TrackBaseRef)
Add a track Reference to the current Seed.
void mergeWith(const PFDisplacedVertexSeed &displacedVertex)
Merge two Seeds if their seed Points are close enough.
const std::set< TrackBaseRef, Compare > & elements() const
tuple s2
Definition: indexGen.py:106
void Dump(std::ostream &out=std::cout) const
cout function
GlobalPoint seedPoint_
Seed point which indicated the approximative position of the vertex.
size_t key() const
Definition: RefToBase.h:223
tuple out
Definition: dbtoconf.py:99
const GlobalPoint & seedPoint() const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
bool isEmpty() const
Check if it is a new Seed.
tuple cout
Definition: gather_cfg.py:41
std::set< reco::TrackBaseRef >::iterator IEset
-----— Useful Types -----— ///
const double totalWeight() const
PFDisplacedVertexSeed()
Default constructor.
void updateSeedPoint(const GlobalPoint &dcaPoint, const TrackBaseRef, const TrackBaseRef, double weight=1)