CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
KalmanSmoothedVertexChi2Estimator< N > Class Template Reference

#include <KalmanSmoothedVertexChi2Estimator.h>

Inheritance diagram for KalmanSmoothedVertexChi2Estimator< N >:
VertexSmoothedChiSquaredEstimator< N >

Public Types

typedef std::pair< bool, double > BDpair
 
- Public Types inherited from VertexSmoothedChiSquaredEstimator< N >
typedef std::pair< bool, double > BDpair
 
typedef CachingVertex< N >::RefCountedVertexTrack RefCountedVertexTrack
 

Public Member Functions

KalmanSmoothedVertexChi2Estimatorclone () const override
 
BDpair estimate (const CachingVertex< N > &vertex) const override
 
 ~KalmanSmoothedVertexChi2Estimator () override
 
- Public Member Functions inherited from VertexSmoothedChiSquaredEstimator< N >
 VertexSmoothedChiSquaredEstimator ()
 
virtual ~VertexSmoothedChiSquaredEstimator ()
 

Private Attributes

KVFHelper< Nhelper
 

Detailed Description

template<unsigned int N>
class KalmanSmoothedVertexChi2Estimator< N >

Class to calculate the smoothed chi**2 of the vertex using the Kalman filter algorithms after the vertex has been fit and the tracks refit.

Definition at line 14 of file KalmanSmoothedVertexChi2Estimator.h.

Member Typedef Documentation

template<unsigned int N>
typedef std::pair<bool, double> KalmanSmoothedVertexChi2Estimator< N >::BDpair

Definition at line 18 of file KalmanSmoothedVertexChi2Estimator.h.

Constructor & Destructor Documentation

template<unsigned int N>
KalmanSmoothedVertexChi2Estimator< N >::~KalmanSmoothedVertexChi2Estimator ( )
inlineoverride

Definition at line 20 of file KalmanSmoothedVertexChi2Estimator.h.

20 {}

Member Function Documentation

template<unsigned int N>
KalmanSmoothedVertexChi2Estimator* KalmanSmoothedVertexChi2Estimator< N >::clone ( void  ) const
inlineoverridevirtual
template<unsigned int N>
KalmanSmoothedVertexChi2Estimator< N >::BDpair KalmanSmoothedVertexChi2Estimator< N >::estimate ( const CachingVertex< N > &  vertex) const
overridevirtual

Methode which calculates the smoothed vertex chi**2.

Parameters
vertexis the final estimate of the vertex, with the refited tracks
Returns
the smoothed vertex chi**2

Implements VertexSmoothedChiSquaredEstimator< N >.

Definition at line 7 of file KalmanSmoothedVertexChi2Estimator.cc.

References CachingVertex< N >::hasPrior(), mps_fire::i, CachingVertex< N >::priorVertexState(), mps_fire::result, summarizeEdmComparisonLogfiles::success, l1t::tracks, CachingVertex< N >::tracks(), and CachingVertex< N >::vertexState().

Referenced by KalmanSmoothedVertexChi2Estimator< 5 >::~KalmanSmoothedVertexChi2Estimator().

8 {
9 //initial vertex part
10  float v_part = 0.;
11  float returnChi = 0.;
12 
13  if (vertex.hasPrior()) {
14  v_part = helper.vertexChi2(vertex.priorVertexState(), vertex.vertexState());
15  }
16 
17 //vector of tracks part
19  std::vector< RefCountedVertexTrack > tracks = vertex.tracks();
20  float sum = 0.;
21  bool success = true;
22  for(typename std::vector<RefCountedVertexTrack>::iterator i = tracks.begin(); i != tracks.end(); i++)
23  {
24  BDpair result = helper.trackParameterChi2((*i)->linearizedTrack(), (*i)->refittedState());
25  success = success && result.first;
26  sum += (*i)->weight() * result.second;
27  }
28  returnChi = v_part + sum;
29  return BDpair(success, returnChi);
30 }
std::vector< RefCountedVertexTrack > tracks() const
Definition: helper.py:1
VertexState const & vertexState() const
bool hasPrior() const
VertexState const & priorVertexState() const
CachingVertex< N >::RefCountedVertexTrack RefCountedVertexTrack

Member Data Documentation

template<unsigned int N>
KVFHelper<N> KalmanSmoothedVertexChi2Estimator< N >::helper
private

Definition at line 36 of file KalmanSmoothedVertexChi2Estimator.h.