00001 #ifndef KinematicVertex_H 00002 #define KinematicVertex_H 00003 00004 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h" 00005 #include "RecoVertex/VertexPrimitives/interface/CachingVertex.h" 00006 #include "RecoVertex/VertexPrimitives/interface/VertexState.h" 00007 #include "DataFormats/VertexReco/interface/Vertex.h" 00008 class KinematicTree; 00009 00021 class KinematicVertex : public ReferenceCounted 00022 { 00023 public: 00024 00025 friend class KinematicTree; 00026 00031 KinematicVertex(); 00032 00033 00038 KinematicVertex(const VertexState state, float totalChiSq, float degreesOfFr); 00039 00044 KinematicVertex(const VertexState state, 00045 const ReferenceCountingPointer<KinematicVertex> prVertex, 00046 float totalChiSq, float degreesOfFr); 00047 00051 KinematicVertex(const CachingVertex<6>& vertex); 00052 00053 00054 virtual ~KinematicVertex(); 00055 00061 bool operator==(const KinematicVertex& other) const; 00062 00063 bool operator==(const ReferenceCountingPointer<KinematicVertex> other) const; 00064 00071 bool operator<(const KinematicVertex& other)const; 00083 bool vertexIsValid() const; 00084 00090 KinematicTree * correspondingTree() const; 00091 00095 ReferenceCountingPointer<KinematicVertex> vertexBeforeConstraint() const; 00096 00097 00098 VertexState vertexState() const; 00099 00100 GlobalPoint position() const; 00101 00102 GlobalError error() const; 00103 00104 float chiSquared() const; 00105 00106 float degreesOfFreedom() const; 00107 00108 operator reco::Vertex(); 00109 00110 private: 00111 00112 void setTreePointer(KinematicTree * tr) const; 00113 00114 //kinematic tree this 00115 //vertex belongs to (can be 0) 00116 mutable KinematicTree * tree; 00117 mutable bool vl; 00118 00119 VertexState theState; 00120 // GlobalPoint theVertexPosition; 00121 // GlobalError theVPositionError; 00122 float theChiSquared; 00123 float theNDF; 00124 mutable ReferenceCountingPointer<KinematicVertex> pVertex; 00125 }; 00126 00127 #endif