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 }
Measurement1D
Definition: Measurement1D.h:11
reco::Vertex::position
const Point & position() const
position
Definition: Vertex.h:114
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
GlobalError
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
VertexDistance::distance
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
Definition: VertexDistance.cc:26
VertexDistance::compatibility
virtual float compatibility(const reco::Vertex &, const reco::Vertex &) const
Definition: VertexDistance.cc:51
VertexState::error
GlobalError error() const
Definition: VertexState.h:64
VertexState.h
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
VertexDistance.h
reco::Vertex::covariance
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:135
VertexState
Definition: VertexState.h:13
VertexState::position
GlobalPoint position() const
Definition: VertexState.h:62
Exception.h
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7733
Basic3DVector< float >
reco::Vertex
Definition: Vertex.h:35