RecoVertex
VertexTools
src
VertexDistance.cc
Go to the documentation of this file.
1
#include "
RecoVertex/VertexTools/interface/VertexDistance.h
"
2
#include "
RecoVertex/VertexPrimitives/interface/VertexState.h
"
3
#include "
FWCore/Utilities/interface/Exception.h
"
4
#include <cfloat>
5
6
using namespace
reco
;
7
8
Measurement1D
VertexDistance::distance
(
const
VertexState
& vtx1,
const
VertexState
& vtx2)
const
{
9
return
distance
(vtx1.
position
(), vtx1.
error
(), vtx2.
position
(), vtx2.
error
());
10
}
11
12
Measurement1D
VertexDistance::distance
(
const
Vertex
& vtx1,
const
VertexState
& vtx2)
const
{
13
return
distance
(
GlobalPoint
(
Basic3DVector<float>
(vtx1.
position
())),
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
(),
22
GlobalPoint
(
Basic3DVector<float>
(vtx2.
position
())),
23
GlobalError
(vtx2.
covariance
()));
24
}
25
26
Measurement1D
VertexDistance::distance
(
const
Vertex
& vtx1,
const
Vertex
& vtx2)
const
{
27
return
distance
(
GlobalPoint
(
Basic3DVector<float>
(vtx1.
position
())),
28
GlobalError
(vtx1.
covariance
()),
29
GlobalPoint
(
Basic3DVector<float>
(vtx2.
position
())),
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
(),
47
GlobalPoint
(
Basic3DVector<float>
(vtx2.
position
())),
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
()),
54
GlobalPoint
(
Basic3DVector<float>
(vtx2.
position
())),
55
GlobalError
(vtx2.
covariance
()));
56
}
Measurement1D
Definition:
Measurement1D.h:11
HLT_2018_cff.distance
distance
Definition:
HLT_2018_cff.py:6417
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
Basic3DVector< float >
reco::Vertex
Definition:
Vertex.h:35
Generated for CMSSW Reference Manual by
1.8.16