CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
BDpair estimate (const CachingVertex< N > &vertex) const
 
virtual ~KalmanSmoothedVertexChi2Estimator ()
 
- 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>
virtual KalmanSmoothedVertexChi2Estimator< N >::~KalmanSmoothedVertexChi2Estimator ( )
inlinevirtual

Definition at line 20 of file KalmanSmoothedVertexChi2Estimator.h.

20 {}

Member Function Documentation

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

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(), i, CachingVertex< N >::priorVertexState(), query::result, summarizeEdmComparisonLogfiles::success, testEve_cfg::tracks, CachingVertex< N >::tracks(), and CachingVertex< N >::vertexState().

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 }
int i
Definition: DBlmapReader.cc:9
std::vector< RefCountedVertexTrack > tracks() const
Definition: CachingVertex.h:91
VertexState vertexState() const
Definition: CachingVertex.h:85
tuple result
Definition: query.py:137
VertexState priorVertexState() const
Definition: CachingVertex.h:86
bool hasPrior() const
Definition: CachingVertex.h:94
tuple tracks
Definition: testEve_cfg.py:39
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.