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

◆ ~VertexDistance()

virtual VertexDistance::~VertexDistance ( )
inlinevirtual

Definition at line 18 of file VertexDistance.h.

18 {}

Member Function Documentation

◆ clone()

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

Implemented in VertexDistance3D, and VertexDistanceXY.

◆ compatibility() [1/5]

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

Definition at line 51 of file VertexDistance.cc.

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

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

◆ compatibility() [2/5]

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

Definition at line 33 of file VertexDistance.cc.

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

33  {
34  return compatibility(vtx1.position(), vtx1.error(), vtx2.position(), vtx2.error());
35 }
GlobalError error() const
Definition: VertexState.h:64
virtual float compatibility(const reco::Vertex &, const reco::Vertex &) const
GlobalPoint position() const
Definition: VertexState.h:62

◆ compatibility() [3/5]

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

Definition at line 37 of file VertexDistance.cc.

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

37  {
39  GlobalError(vtx1.covariance()),
40  vtx2.position(),
41  vtx2.error());
42 }
const Point & position() const
position
Definition: Vertex.h:128
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:149
GlobalError error() const
Definition: VertexState.h:64
virtual float compatibility(const reco::Vertex &, const reco::Vertex &) const
GlobalPoint position() const
Definition: VertexState.h:62

◆ compatibility() [4/5]

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

Definition at line 44 of file VertexDistance.cc.

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

44  {
45  return compatibility(vtx1.position(),
46  vtx1.error(),
48  GlobalError(vtx2.covariance()));
49 }
const Point & position() const
position
Definition: Vertex.h:128
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:149
GlobalError error() const
Definition: VertexState.h:64
virtual float compatibility(const reco::Vertex &, const reco::Vertex &) const
GlobalPoint position() const
Definition: VertexState.h:62

◆ compatibility() [5/5]

virtual float VertexDistance::compatibility ( const GlobalPoint vtx1Position,
const GlobalError vtx1PositionError,
const GlobalPoint vtx2Position,
const GlobalError vtx2PositionError 
) const
protectedpure virtual

Implemented in VertexDistance3D, and VertexDistanceXY.

◆ distance() [1/5]

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

Definition at line 26 of file VertexDistance.cc.

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

Referenced by IPTools::absoluteImpactParameter(), VertexCompatibleWithBeam::distanceToBeam(), and VertexCompatibleWithBeam::operator()().

26  {
28  GlobalError(vtx1.covariance()),
30  GlobalError(vtx2.covariance()));
31 }
const Point & position() const
position
Definition: Vertex.h:128
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:149

◆ distance() [2/5]

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

Definition at line 8 of file VertexDistance.cc.

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

8  {
9  return distance(vtx1.position(), vtx1.error(), vtx2.position(), vtx2.error());
10 }
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
GlobalError error() const
Definition: VertexState.h:64
GlobalPoint position() const
Definition: VertexState.h:62

◆ distance() [3/5]

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

Definition at line 12 of file VertexDistance.cc.

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

12  {
14  GlobalError(vtx1.covariance()),
15  vtx2.position(),
16  vtx2.error());
17 }
const Point & position() const
position
Definition: Vertex.h:128
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:149
GlobalError error() const
Definition: VertexState.h:64
GlobalPoint position() const
Definition: VertexState.h:62

◆ distance() [4/5]

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

Definition at line 19 of file VertexDistance.cc.

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

19  {
20  return distance(vtx1.position(),
21  vtx1.error(),
23  GlobalError(vtx2.covariance()));
24 }
const Point & position() const
position
Definition: Vertex.h:128
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:149
GlobalError error() const
Definition: VertexState.h:64
GlobalPoint position() const
Definition: VertexState.h:62

◆ distance() [5/5]

virtual Measurement1D VertexDistance::distance ( const GlobalPoint vtx1Position,
const GlobalError vtx1PositionError,
const GlobalPoint vtx2Position,
const GlobalError vtx2PositionError 
) const
protectedpure virtual

Implemented in VertexDistance3D, and VertexDistanceXY.

◆ signedDistance()

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.