CMS 3D CMS Logo

VertexDistance.cc
Go to the documentation of this file.
4 #include <cfloat>
5 
6 using namespace reco;
7 
9  return distance(vtx1.position(), vtx1.error(), vtx2.position(), vtx2.error());
10 }
11 
12 Measurement1D VertexDistance::distance(const Vertex& vtx1, const VertexState& vtx2) const {
14  GlobalError(vtx1.covariance()),
15  vtx2.position(),
16  vtx2.error());
17 }
18 
19 Measurement1D VertexDistance::distance(const VertexState& vtx1, const Vertex& vtx2) const {
20  return distance(vtx1.position(),
21  vtx1.error(),
23  GlobalError(vtx2.covariance()));
24 }
25 
26 Measurement1D VertexDistance::distance(const Vertex& vtx1, const Vertex& vtx2) const {
28  GlobalError(vtx1.covariance()),
30  GlobalError(vtx2.covariance()));
31 }
32 
33 float VertexDistance::compatibility(const VertexState& vtx1, const VertexState& vtx2) const {
34  return compatibility(vtx1.position(), vtx1.error(), vtx2.position(), vtx2.error());
35 }
36 
37 float VertexDistance::compatibility(const Vertex& vtx1, const VertexState& vtx2) const {
38  return compatibility(GlobalPoint(Basic3DVector<float>(vtx1.position())),
39  GlobalError(vtx1.covariance()),
40  vtx2.position(),
41  vtx2.error());
42 }
43 
44 float VertexDistance::compatibility(const VertexState& vtx1, const Vertex& vtx2) const {
45  return compatibility(vtx1.position(),
46  vtx1.error(),
48  GlobalError(vtx2.covariance()));
49 }
50 
51 float VertexDistance::compatibility(const Vertex& vtx1, const Vertex& vtx2) const {
52  return compatibility(GlobalPoint(Basic3DVector<float>(vtx1.position())),
53  GlobalError(vtx1.covariance()),
55  GlobalError(vtx2.covariance()));
56 }
const Point & position() const
position
Definition: Vertex.h:127
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:148
GlobalError error() const
Definition: VertexState.h:64
virtual float compatibility(const reco::Vertex &, const reco::Vertex &) const
fixed size matrix
GlobalPoint position() const
Definition: VertexState.h:62