RecoVertex
VertexTools
src
VertexCompatibleWithBeam.cc
Go to the documentation of this file.
1
#include "
RecoVertex/VertexTools/interface/VertexCompatibleWithBeam.h
"
2
#include "
DataFormats/GeometryVector/interface/GlobalPoint.h
"
3
#include "
DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h
"
4
#include "
RecoVertex/VertexTools/interface/VertexDistance.h
"
5
6
using namespace
reco
;
7
8
VertexCompatibleWithBeam::VertexCompatibleWithBeam
(
const
VertexDistance
&
d
,
float
cut
)
9
: theDistance(
d
.
clone
()), theCut(
cut
) {
10
BeamSpot
beamSpot
;
11
theBeam
=
VertexState
(
beamSpot
);
12
}
13
14
VertexCompatibleWithBeam::VertexCompatibleWithBeam
(
const
VertexDistance
&
d
,
float
cut
,
const
BeamSpot
&
beamSpot
)
15
: theDistance(
d
.
clone
()), theCut(
cut
), theBeam(
beamSpot
) {}
16
17
VertexCompatibleWithBeam::VertexCompatibleWithBeam
(
const
VertexCompatibleWithBeam
&
other
)
18
: theDistance((*
other
.theDistance).
clone
()), theCut(
other
.theCut), theBeam(
other
.theBeam) {}
19
20
VertexCompatibleWithBeam::~VertexCompatibleWithBeam
() {
delete
theDistance
; }
21
22
VertexCompatibleWithBeam
&
VertexCompatibleWithBeam::operator=
(
const
VertexCompatibleWithBeam
&
other
) {
23
if
(
this
== &
other
)
24
return
*
this
;
25
26
theDistance
= (*
other
.theDistance).
clone
();
27
theCut
=
other
.theCut;
28
theBeam
=
other
.theBeam;
29
return
*
this
;
30
}
31
32
void
VertexCompatibleWithBeam::setBeamSpot
(
const
BeamSpot
&
beamSpot
) {
theBeam
=
VertexState
(
beamSpot
); }
33
34
bool
VertexCompatibleWithBeam::operator()
(
const
reco::Vertex
&
v
)
const
{
35
GlobalPoint
p
(
Basic3DVector<float>
(
v
.position()));
36
VertexState
vs(
p
,
GlobalError
(
v
.covariance()));
37
return
(
theDistance
->
distance
(vs,
theBeam
).
value
() <
theCut
);
38
}
39
40
float
VertexCompatibleWithBeam::distanceToBeam
(
const
reco::Vertex
&
v
)
const
{
41
GlobalPoint
p
(
Basic3DVector<float>
(
v
.position()));
42
VertexState
vs(
p
,
GlobalError
(
v
.covariance()));
43
return
theDistance
->
distance
(vs,
theBeam
).
value
();
44
}
45
46
float
VertexCompatibleWithBeam::distanceToBeam
(
const
reco::Vertex
&
v
,
const
VertexState
&
bs
)
const
{
47
GlobalPoint
p
(
Basic3DVector<float>
(
v
.position()));
48
VertexState
vs(
p
,
GlobalError
(
v
.covariance()));
49
return
theDistance
->
distance
(vs,
bs
).
value
();
50
}
51
52
bool
VertexCompatibleWithBeam::operator()
(
const
reco::Vertex
&
v
,
const
VertexState
&
bs
)
const
{
53
GlobalPoint
p
(
Basic3DVector<float>
(
v
.position()));
54
VertexState
vs(
p
,
GlobalError
(
v
.covariance()));
55
return
(
theDistance
->
distance
(vs,
bs
).
value
() <
theCut
);
56
}
VertexCompatibleWithBeam::theDistance
VertexDistance * theDistance
Definition:
VertexCompatibleWithBeam.h:33
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition:
pwdgSkimBPark_cfi.py:5
TkAlMuonSelectors_cfi.cut
cut
Definition:
TkAlMuonSelectors_cfi.py:5
Measurement1D::value
double value() const
Definition:
Measurement1D.h:25
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
VertexCompatibleWithBeam.h
VertexCompatibleWithBeam::operator()
virtual bool operator()(const reco::Vertex &) const
Definition:
VertexCompatibleWithBeam.cc:34
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
findQualityFiles.v
v
Definition:
findQualityFiles.py:179
GlobalError
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition:
GlobalError.h:13
cms::cuda::bs
bs
Definition:
HistoContainer.h:127
VertexDistance::distance
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
Definition:
VertexDistance.cc:26
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition:
eve_macros.cc:135
reco::BeamSpot
Definition:
BeamSpot.h:21
trackingPlots.other
other
Definition:
trackingPlots.py:1460
Point3DBase< float, GlobalTag >
VertexCompatibleWithBeam::operator=
VertexCompatibleWithBeam & operator=(const VertexCompatibleWithBeam &other)
Definition:
VertexCompatibleWithBeam.cc:22
VertexDistance
Definition:
VertexDistance.h:16
VertexCompatibleWithBeam::distanceToBeam
float distanceToBeam(const reco::Vertex &) const
Definition:
VertexCompatibleWithBeam.cc:40
VertexCompatibleWithBeam
Definition:
VertexCompatibleWithBeam.h:15
VertexDistance.h
GlobalError.h
VertexCompatibleWithBeam::theBeam
VertexState theBeam
Definition:
VertexCompatibleWithBeam.h:35
VertexCompatibleWithBeam::VertexCompatibleWithBeam
VertexCompatibleWithBeam(const VertexDistance &dist, float cut)
Definition:
VertexCompatibleWithBeam.cc:8
VertexCompatibleWithBeam::theCut
float theCut
Definition:
VertexCompatibleWithBeam.h:34
VertexState
Definition:
VertexState.h:13
VertexCompatibleWithBeam::setBeamSpot
void setBeamSpot(const reco::BeamSpot &beamSpot)
Definition:
VertexCompatibleWithBeam.cc:32
ztail.d
d
Definition:
ztail.py:151
VertexCompatibleWithBeam::~VertexCompatibleWithBeam
virtual ~VertexCompatibleWithBeam()
Definition:
VertexCompatibleWithBeam.cc:20
GlobalPoint.h
Basic3DVector< float >
reco::Vertex
Definition:
Vertex.h:35
Generated for CMSSW Reference Manual by
1.8.16