CMS 3D CMS Logo

VertexDistance Class Reference

Abstact class which defines a distance and compatibility between vertices. More...

#include <RecoVertex/VertexTools/interface/VertexDistance.h>

Inheritance diagram for VertexDistance:

VertexDistance3D VertexDistanceXY

List of all members.

Public Member Functions

virtual VertexDistanceclone () const =0
virtual float compatibility (const VertexState &, const reco::Vertex &) const
virtual float compatibility (const reco::Vertex &, const VertexState &) const
virtual float compatibility (const VertexState &, const VertexState &) const
virtual float compatibility (const reco::Vertex &, const reco::Vertex &) const
Measurement1D distance (const VertexState &, const reco::Vertex &) const
Measurement1D distance (const reco::Vertex &, const VertexState &) const
Measurement1D distance (const VertexState &, const VertexState &) const
Measurement1D distance (const reco::Vertex &, const reco::Vertex &) const
virtual Measurement1D signedDistance (const reco::Vertex &primVtx, const reco::Vertex &secVtx, const GlobalVector &momentum) const =0
 The signed distance is computed using a vector from the primary to the secondary vertex and a given reference vector.
virtual ~VertexDistance ()

Protected Member Functions

virtual float compatibility (const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const =0
virtual Measurement1D distance (const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const =0


Detailed Description

Abstact class which defines a distance and compatibility between vertices.

Definition at line 17 of file VertexDistance.h.


Constructor & Destructor Documentation

virtual VertexDistance::~VertexDistance (  )  [inline, virtual]

Definition at line 20 of file VertexDistance.h.

00020 {}


Member Function Documentation

virtual VertexDistance* VertexDistance::clone (  )  const [pure virtual]

Implemented in VertexDistance3D, and VertexDistanceXY.

virtual float VertexDistance::compatibility ( const GlobalPoint vtx1Position,
const GlobalError vtx1PositionError,
const GlobalPoint vtx2Position,
const GlobalError vtx2PositionError 
) const [protected, pure virtual]

Implemented in VertexDistance3D, and VertexDistanceXY.

float VertexDistance::compatibility ( const VertexState vtx1,
const reco::Vertex vtx2 
) const [virtual]

Definition at line 60 of file VertexDistance.cc.

References compatibility(), RecoVertex::convertError(), reco::Vertex::covariance(), VertexState::error(), reco::Vertex::position(), and VertexState::position().

00062 {
00063   return compatibility(vtx1.position(), vtx1.error(),
00064                   GlobalPoint(Basic3DVector<float> (vtx2.position())), 
00065                   RecoVertex::convertError(vtx2.covariance()));
00066 }

float VertexDistance::compatibility ( const reco::Vertex vtx1,
const VertexState vtx2 
) const [virtual]

Definition at line 52 of file VertexDistance.cc.

References compatibility(), RecoVertex::convertError(), reco::Vertex::covariance(), VertexState::error(), reco::Vertex::position(), and VertexState::position().

00054 {
00055   return compatibility(GlobalPoint(Basic3DVector<float> (vtx1.position())), 
00056                        RecoVertex::convertError(vtx1.covariance()),
00057                        vtx2.position(), vtx2.error());
00058 }

float VertexDistance::compatibility ( const VertexState vtx1,
const VertexState vtx2 
) const [virtual]

Definition at line 45 of file VertexDistance.cc.

References compatibility(), VertexState::error(), and VertexState::position().

00047 {
00048   return compatibility(vtx1.position(), vtx1.error(),
00049                        vtx2.position(), vtx2.error());
00050 }

float VertexDistance::compatibility ( const reco::Vertex vtx1,
const reco::Vertex vtx2 
) const [virtual]

Definition at line 69 of file VertexDistance.cc.

References RecoVertex::convertError(), reco::Vertex::covariance(), and reco::Vertex::position().

Referenced by compatibility().

virtual Measurement1D VertexDistance::distance ( const GlobalPoint vtx1Position,
const GlobalError vtx1PositionError,
const GlobalPoint vtx2Position,
const GlobalError vtx2PositionError 
) const [protected, pure virtual]

Implemented in VertexDistance3D, and VertexDistanceXY.

Measurement1D VertexDistance::distance ( const VertexState vtx1,
const reco::Vertex vtx2 
) const

Definition at line 26 of file VertexDistance.cc.

References RecoVertex::convertError(), reco::Vertex::covariance(), distance(), VertexState::error(), reco::Vertex::position(), and VertexState::position().

00028 {
00029   return distance(vtx1.position(), vtx1.error(),
00030                   GlobalPoint(Basic3DVector<float> (vtx2.position())), 
00031                   RecoVertex::convertError(vtx2.covariance()));
00032 }

Measurement1D VertexDistance::distance ( const reco::Vertex vtx1,
const VertexState vtx2 
) const

Definition at line 17 of file VertexDistance.cc.

References RecoVertex::convertError(), reco::Vertex::covariance(), distance(), VertexState::error(), reco::Vertex::position(), and VertexState::position().

00019 {
00020   return distance(GlobalPoint(Basic3DVector<float> (vtx1.position())), 
00021                   RecoVertex::convertError(vtx1.covariance()),
00022                   vtx2.position(), vtx2.error());
00023 }

Measurement1D VertexDistance::distance ( const VertexState vtx1,
const VertexState vtx2 
) const

Definition at line 10 of file VertexDistance.cc.

References distance(), VertexState::error(), and VertexState::position().

00012 {
00013   return distance(vtx1.position(), vtx1.error(),
00014                   vtx2.position(), vtx2.error());
00015 }

Measurement1D VertexDistance::distance ( const reco::Vertex vtx1,
const reco::Vertex vtx2 
) const

Definition at line 36 of file VertexDistance.cc.

References RecoVertex::convertError(), reco::Vertex::covariance(), and reco::Vertex::position().

Referenced by distance(), VertexCompatibleWithBeam::distanceToBeam(), and VertexCompatibleWithBeam::operator()().

virtual Measurement1D VertexDistance::signedDistance ( const reco::Vertex primVtx,
const reco::Vertex secVtx,
const GlobalVector momentum 
) const [pure virtual]

The signed distance is computed using a vector from the primary to the secondary vertex and a given reference vector.

for the 2D case: The sign is determined by the scalar product of the x,y component of the vector connecting the vertices and the reference vector: if the scalar product is greater than zero, the sign is +1, else -1

for the 3D case: Follows same approach, using all three components of the two vectors

Implemented in VertexDistance3D, and VertexDistanceXY.


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:34:59 2009 for CMSSW by  doxygen 1.5.4