CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions
VertexDistance Class Referenceabstract

#include <VertexDistance.h>

Inheritance diagram for VertexDistance:
VertexDistance3D VertexDistanceXY

Public Member Functions

virtual VertexDistanceclone () const =0
 
virtual float compatibility (const reco::Vertex &, const reco::Vertex &) const
 
virtual float compatibility (const VertexState &, const VertexState &) const
 
virtual float compatibility (const reco::Vertex &, const VertexState &) const
 
virtual float compatibility (const VertexState &, const reco::Vertex &) const
 
Measurement1D distance (const reco::Vertex &, const reco::Vertex &) const
 
Measurement1D distance (const VertexState &, const VertexState &) const
 
Measurement1D distance (const reco::Vertex &, const VertexState &) const
 
Measurement1D distance (const VertexState &, const reco::Vertex &) const
 
virtual Measurement1D signedDistance (const reco::Vertex &primVtx, const reco::Vertex &secVtx, const GlobalVector &momentum) const =0
 
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 16 of file VertexDistance.h.

Constructor & Destructor Documentation

virtual VertexDistance::~VertexDistance ( )
inlinevirtual

Definition at line 19 of file VertexDistance.h.

References clone(), compatibility(), distance(), and signedDistance().

19 {}

Member Function Documentation

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

Implemented in VertexDistance3D, and VertexDistanceXY.

Referenced by ~VertexDistance().

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

Definition at line 68 of file VertexDistance.cc.

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

Referenced by VertexDistanceXY::clone(), and ~VertexDistance().

70 {
72  GlobalError(vtx1.covariance()),
74  GlobalError(vtx2.covariance()));
75 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:130
virtual float compatibility(const reco::Vertex &, const reco::Vertex &) const
const Point & position() const
position
Definition: Vertex.h:109
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
float VertexDistance::compatibility ( const VertexState vtx1,
const VertexState vtx2 
) const
virtual

Definition at line 44 of file VertexDistance.cc.

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

46 {
47  return compatibility(vtx1.position(), vtx1.error(),
48  vtx2.position(), vtx2.error());
49 }
GlobalPoint position() const
Definition: VertexState.h:69
virtual float compatibility(const reco::Vertex &, const reco::Vertex &) const
GlobalError error() const
Definition: VertexState.h:74
float VertexDistance::compatibility ( const reco::Vertex vtx1,
const VertexState vtx2 
) const
virtual

Definition at line 51 of file VertexDistance.cc.

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

53 {
55  GlobalError(vtx1.covariance()),
56  vtx2.position(), vtx2.error());
57 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:130
GlobalPoint position() const
Definition: VertexState.h:69
virtual float compatibility(const reco::Vertex &, const reco::Vertex &) const
const Point & position() const
position
Definition: Vertex.h:109
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
GlobalError error() const
Definition: VertexState.h:74
float VertexDistance::compatibility ( const VertexState vtx1,
const reco::Vertex vtx2 
) const
virtual

Definition at line 59 of file VertexDistance.cc.

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

61 {
62  return compatibility(vtx1.position(), vtx1.error(),
64  GlobalError(vtx2.covariance()));
65 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:130
GlobalPoint position() const
Definition: VertexState.h:69
virtual float compatibility(const reco::Vertex &, const reco::Vertex &) const
const Point & position() const
position
Definition: Vertex.h:109
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
GlobalError error() const
Definition: VertexState.h:74
virtual float VertexDistance::compatibility ( const GlobalPoint vtx1Position,
const GlobalError vtx1PositionError,
const GlobalPoint vtx2Position,
const GlobalError vtx2PositionError 
) const
protectedpure virtual

Implemented in VertexDistance3D, and VertexDistanceXY.

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

Definition at line 35 of file VertexDistance.cc.

References reco::Vertex::covariance(), SoftLeptonByDistance_cfi::distance, and reco::Vertex::position().

Referenced by IPTools::absoluteImpactParameter(), VertexDistanceXY::clone(), VertexDistance3D::clone(), VertexCompatibleWithBeam::distanceToBeam(), VertexCompatibleWithBeam::operator()(), and ~VertexDistance().

36 {
38  GlobalError(vtx1.covariance()),
40  GlobalError(vtx2.covariance()));
41 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:130
const Point & position() const
position
Definition: Vertex.h:109
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
Measurement1D VertexDistance::distance ( const VertexState vtx1,
const VertexState vtx2 
) const

Definition at line 9 of file VertexDistance.cc.

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

11 {
12  return distance(vtx1.position(), vtx1.error(),
13  vtx2.position(), vtx2.error());
14 }
GlobalPoint position() const
Definition: VertexState.h:69
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
GlobalError error() const
Definition: VertexState.h:74
Measurement1D VertexDistance::distance ( const reco::Vertex vtx1,
const VertexState vtx2 
) const

Definition at line 16 of file VertexDistance.cc.

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

18 {
20  GlobalError(vtx1.covariance()),
21  vtx2.position(), vtx2.error());
22 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:130
GlobalPoint position() const
Definition: VertexState.h:69
const Point & position() const
position
Definition: Vertex.h:109
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
GlobalError error() const
Definition: VertexState.h:74
Measurement1D VertexDistance::distance ( const VertexState vtx1,
const reco::Vertex vtx2 
) const

Definition at line 25 of file VertexDistance.cc.

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

27 {
28  return distance(vtx1.position(), vtx1.error(),
30  GlobalError(vtx2.covariance()));
31 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:130
GlobalPoint position() const
Definition: VertexState.h:69
const Point & position() const
position
Definition: Vertex.h:109
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
GlobalError error() const
Definition: VertexState.h:74
virtual Measurement1D VertexDistance::distance ( const GlobalPoint vtx1Position,
const GlobalError vtx1PositionError,
const GlobalPoint vtx2Position,
const GlobalError vtx2PositionError 
) const
protectedpure virtual

Implemented in VertexDistance3D, and VertexDistanceXY.

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.

Referenced by ~VertexDistance().