RecoVertex
KalmanVertexFit
src
KalmanSmoothedVertexChi2Estimator.cc
Go to the documentation of this file.
1
#include "
RecoVertex/KalmanVertexFit/interface/KalmanSmoothedVertexChi2Estimator.h
"
2
// #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexTrackCompatibilityEstimator.h"
3
4
template
<
unsigned
int
N>
5
typename
KalmanSmoothedVertexChi2Estimator<N>::BDpair
KalmanSmoothedVertexChi2Estimator<N>::estimate
(
6
const
CachingVertex<N>
&
vertex
)
const
{
7
//initial vertex part
8
float
v_part = 0.;
9
float
returnChi = 0.;
10
11
if
(
vertex
.hasPrior()) {
12
v_part =
helper
.vertexChi2(
vertex
.priorVertexState(),
vertex
.vertexState());
13
}
14
15
//vector of tracks part
16
typedef
typename
CachingVertex<N>::RefCountedVertexTrack
RefCountedVertexTrack
;
17
std::vector<RefCountedVertexTrack>
tracks
=
vertex
.tracks();
18
float
sum = 0.;
19
bool
success
=
true
;
20
for
(
typename
std::vector<RefCountedVertexTrack>::iterator
i
=
tracks
.begin();
i
!=
tracks
.end();
i
++) {
21
BDpair
result
=
helper
.trackParameterChi2((*i)->linearizedTrack(), (*i)->refittedState());
22
success
=
success
&&
result
.first;
23
sum += (*i)->weight() *
result
.second;
24
}
25
returnChi = v_part + sum;
26
return
BDpair
(
success
, returnChi);
27
}
28
29
template
class
KalmanSmoothedVertexChi2Estimator<5>
;
30
template
class
KalmanSmoothedVertexChi2Estimator<6>
;
PDWG_EXOHSCP_cff.tracks
tracks
Definition:
PDWG_EXOHSCP_cff.py:28
mps_fire.i
i
Definition:
mps_fire.py:428
CachingVertex
Definition:
CachingVertex.h:22
ReferenceCountingPointer
Definition:
ReferenceCounted.h:60
VertexSmoothedChiSquaredEstimator::BDpair
std::pair< bool, double > BDpair
Definition:
VertexSmoothedChiSquaredEstimator.h:17
KalmanSmoothedVertexChi2Estimator< 5 >
summarizeEdmComparisonLogfiles.success
success
Definition:
summarizeEdmComparisonLogfiles.py:115
bphysicsOniaDQM_cfi.vertex
vertex
Definition:
bphysicsOniaDQM_cfi.py:7
helper
Definition:
helper.py:1
KalmanSmoothedVertexChi2Estimator::BDpair
std::pair< bool, double > BDpair
Definition:
KalmanSmoothedVertexChi2Estimator.h:16
KalmanSmoothedVertexChi2Estimator::estimate
BDpair estimate(const CachingVertex< N > &vertex) const override
Definition:
KalmanSmoothedVertexChi2Estimator.cc:5
mps_fire.result
result
Definition:
mps_fire.py:311
KalmanSmoothedVertexChi2Estimator.h
Generated for CMSSW Reference Manual by
1.8.16