CMS 3D CMS Logo

KalmanSmoothedVertexChi2Estimator.cc
Go to the documentation of this file.
2 // #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexTrackCompatibilityEstimator.h"
3 
4 template <unsigned int N>
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
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 
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:114
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:176
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