CMS 3D CMS Logo

SequentialVertexSmoother< N > Class Template Reference

The class which handles the track-refit, smoothed chi**2 and track-to-track covariance matrix calculations. More...

#include <RecoVertex/VertexTools/interface/SequentialVertexSmoother.h>

Inheritance diagram for SequentialVertexSmoother< N >:

VertexSmoother< N >

List of all members.

Public Types

typedef
ReferenceCountingPointer
< LinearizedTrackState< N > > 
RefCountedLinearizedTrackState
typedef
ReferenceCountingPointer
< RefittedTrackState< N > > 
RefCountedRefittedTrackState
typedef
ReferenceCountingPointer
< VertexTrack< N > > 
RefCountedVertexTrack

Public Member Functions

virtual
SequentialVertexSmoother< N > * 
clone () const
 Clone method.
 SequentialVertexSmoother (const SequentialVertexSmoother< N > &smoother)
 Special copy constructor cloning the private data.
 SequentialVertexSmoother (const VertexTrackUpdator< N > &vtu, const VertexSmoothedChiSquaredEstimator< N > &vse, const TrackToTrackCovCalculator< N > &covCalc)
 The constructor, where the different components to be used are specified.
virtual CachingVertex< N > smooth (const CachingVertex< N > &vertex) const
 Methode which will refit the tracks with the vertex constraint, calculate the smoothed vertex chi**2, and, if required, the track-to-track covariance matrix.
const
TrackToTrackCovCalculator< N > * 
trackToTrackCovCalculator () const
const
VertexSmoothedChiSquaredEstimator
< N > * 
vertexSmoothedChiSquaredEstimator () const
const VertexTrackUpdator< N > * vertexTrackUpdator () const
 Access methods.
virtual ~SequentialVertexSmoother ()

Private Attributes

TrackToTrackCovCalculator< N > * theTrackToTrackCovCalculator
VertexSmoothedChiSquaredEstimator
< N > * 
theVertexSmoothedChiSquaredEstimator
VertexTrackUpdator< N > * theVertexTrackUpdator


Detailed Description

template<unsigned int N>
class SequentialVertexSmoother< N >

The class which handles the track-refit, smoothed chi**2 and track-to-track covariance matrix calculations.

Definition at line 16 of file SequentialVertexSmoother.h.


Member Typedef Documentation

template<unsigned int N>
typedef ReferenceCountingPointer<LinearizedTrackState<N> > SequentialVertexSmoother< N >::RefCountedLinearizedTrackState

Definition at line 22 of file SequentialVertexSmoother.h.

template<unsigned int N>
typedef ReferenceCountingPointer<RefittedTrackState<N> > SequentialVertexSmoother< N >::RefCountedRefittedTrackState

Definition at line 20 of file SequentialVertexSmoother.h.

template<unsigned int N>
typedef ReferenceCountingPointer<VertexTrack<N> > SequentialVertexSmoother< N >::RefCountedVertexTrack

Definition at line 21 of file SequentialVertexSmoother.h.


Constructor & Destructor Documentation

template<unsigned int N>
SequentialVertexSmoother< N >::SequentialVertexSmoother ( const VertexTrackUpdator< N > &  vtu,
const VertexSmoothedChiSquaredEstimator< N > &  vse,
const TrackToTrackCovCalculator< N > &  covCalc 
) [inline]

The constructor, where the different components to be used are specified.

Parameters:
vtu The algorithm to refit the tracks with the vertex constraint (or smoothing)
vse The algorithm to calculate the smoothed chi**2
Returns:
covCalc The algorithm the track-to-track covariance matrix. If this option is not required, this pointer should be 0.

Definition at line 5 of file SequentialVertexSmoother.cc.

Referenced by SequentialVertexSmoother< 5 >::clone().

00008                                                 :
00009   theVertexTrackUpdator(vtu.clone()), 
00010   theVertexSmoothedChiSquaredEstimator(vse.clone()), 
00011   theTrackToTrackCovCalculator(covCalc.clone()) 
00012 {}

template<unsigned int N>
SequentialVertexSmoother< N >::~SequentialVertexSmoother (  )  [inline, virtual]

Definition at line 16 of file SequentialVertexSmoother.cc.

References SequentialVertexSmoother< N >::theTrackToTrackCovCalculator, SequentialVertexSmoother< N >::theVertexSmoothedChiSquaredEstimator, and SequentialVertexSmoother< N >::theVertexTrackUpdator.

00017 {
00018   delete theVertexTrackUpdator;
00019   delete theVertexSmoothedChiSquaredEstimator;
00020   delete theTrackToTrackCovCalculator;
00021 }

template<unsigned int N>
SequentialVertexSmoother< N >::SequentialVertexSmoother ( const SequentialVertexSmoother< N > &  smoother  )  [inline]

Special copy constructor cloning the private data.

Definition at line 25 of file SequentialVertexSmoother.cc.

References SequentialVertexSmoother< N >::theTrackToTrackCovCalculator, SequentialVertexSmoother< N >::theVertexSmoothedChiSquaredEstimator, SequentialVertexSmoother< N >::theVertexTrackUpdator, SequentialVertexSmoother< N >::trackToTrackCovCalculator(), SequentialVertexSmoother< N >::vertexSmoothedChiSquaredEstimator(), and SequentialVertexSmoother< N >::vertexTrackUpdator().

00027 {
00028   theVertexTrackUpdator = smoother.vertexTrackUpdator()->clone();
00029   theVertexSmoothedChiSquaredEstimator 
00030     = smoother.vertexSmoothedChiSquaredEstimator()->clone();
00031   theTrackToTrackCovCalculator = smoother.trackToTrackCovCalculator()->clone();
00032 }


Member Function Documentation

template<unsigned int N>
virtual SequentialVertexSmoother<N>* SequentialVertexSmoother< N >::clone ( void   )  const [inline, virtual]

Clone method.

Implements VertexSmoother< N >.

Definition at line 67 of file SequentialVertexSmoother.h.

00068   {
00069     return new SequentialVertexSmoother(* this);
00070   }

template<unsigned int N>
CachingVertex< N > SequentialVertexSmoother< N >::smooth ( const CachingVertex< N > &  vertex  )  const [inline, virtual]

Methode which will refit the tracks with the vertex constraint, calculate the smoothed vertex chi**2, and, if required, the track-to-track covariance matrix.

Parameters:
initVertex is the initial guess of the vertex (a-priori information), used at the start of the fit.
newVertex is the final estimate of the vertex, as given by the last update.
Returns:
the final vertex estimate, with all the supplementary information

Implements VertexSmoother< N >.

Definition at line 37 of file SequentialVertexSmoother.cc.

References CachingVertex< N >::hasPrior(), i, CachingVertex< N >::position(), CachingVertex< N >::priorVertexState(), SequentialVertexSmoother< N >::theTrackToTrackCovCalculator, SequentialVertexSmoother< N >::theVertexSmoothedChiSquaredEstimator, SequentialVertexSmoother< N >::theVertexTrackUpdator, CachingVertex< N >::totalChiSquared(), CachingVertex< N >::tracks(), CachingVertex< N >::vertexState(), and CachingVertex< N >::weight().

00038 {
00039 
00040   // Track refit
00041 
00042   vector<RefCountedVertexTrack> newTracks;
00043   if (theVertexTrackUpdator != 0) {
00044     const vector<RefCountedVertexTrack>&  vOut=vertex.tracks();
00045     for(typename vector<RefCountedVertexTrack>::const_iterator i = vOut.begin();
00046           i != vOut.end();i++)
00047     {
00048       RefCountedVertexTrack nTrack = theVertexTrackUpdator->update(vertex, *i);
00049       newTracks.push_back(nTrack);
00050     }
00051   } else {
00052     newTracks = vertex.tracks();
00053   }
00054 
00055   // intermediate vertex for chi2 calculation and TktoTkcovariance map
00056   CachingVertex<N> interVertex(vertex.position(), vertex.weight(),
00057                                 newTracks, 0.);
00058 
00059   // Smoothed chi2
00060 
00061   float smChi2 = vertex.totalChiSquared();
00062   if (theVertexSmoothedChiSquaredEstimator != 0) {
00063     smChi2 = theVertexSmoothedChiSquaredEstimator->estimate(interVertex);
00064   }
00065 
00066   if (theTrackToTrackCovCalculator == 0) {
00067     if  (vertex.hasPrior()) {
00068       return CachingVertex<N>(vertex.priorVertexState(), vertex.vertexState(),
00069                   newTracks, smChi2);
00070     } else {
00071       return CachingVertex<N>(vertex.vertexState(), newTracks, smChi2);
00072     }
00073   }
00074   
00075   //TktoTkcovariance map
00076   typename CachingVertex<N>::TrackToTrackMap tkMap = (*theTrackToTrackCovCalculator)(interVertex);
00077 
00078 //   CachingVertex<N> finalVertex(vertex.position(), vertex.error(),
00079 //                          newTracks, smChi2, tkMap);
00080   if  (vertex.hasPrior()) {
00081     CachingVertex<N> finalVertex(vertex.priorVertexState(), vertex.vertexState(),
00082                 newTracks, smChi2, tkMap);
00083     return finalVertex;
00084   }
00085 
00086   CachingVertex<N> finalVertex(vertex.vertexState(), newTracks, smChi2, tkMap);
00087   return finalVertex;
00088 
00089 }

template<unsigned int N>
const TrackToTrackCovCalculator<N>* SequentialVertexSmoother< N >::trackToTrackCovCalculator (  )  const [inline]

Definition at line 61 of file SequentialVertexSmoother.h.

Referenced by SequentialVertexSmoother< N >::SequentialVertexSmoother().

00062     { return theTrackToTrackCovCalculator; }

template<unsigned int N>
const VertexSmoothedChiSquaredEstimator<N>* SequentialVertexSmoother< N >::vertexSmoothedChiSquaredEstimator (  )  const [inline]

Definition at line 59 of file SequentialVertexSmoother.h.

Referenced by SequentialVertexSmoother< N >::SequentialVertexSmoother().

template<unsigned int N>
const VertexTrackUpdator<N>* SequentialVertexSmoother< N >::vertexTrackUpdator (  )  const [inline]

Access methods.

Definition at line 57 of file SequentialVertexSmoother.h.

Referenced by SequentialVertexSmoother< N >::SequentialVertexSmoother().

00058     { return theVertexTrackUpdator; }


Member Data Documentation

template<unsigned int N>
TrackToTrackCovCalculator<N>* SequentialVertexSmoother< N >::theTrackToTrackCovCalculator [private]

Definition at line 75 of file SequentialVertexSmoother.h.

Referenced by SequentialVertexSmoother< N >::SequentialVertexSmoother(), SequentialVertexSmoother< N >::smooth(), SequentialVertexSmoother< 5 >::trackToTrackCovCalculator(), and SequentialVertexSmoother< N >::~SequentialVertexSmoother().

template<unsigned int N>
VertexSmoothedChiSquaredEstimator<N>* SequentialVertexSmoother< N >::theVertexSmoothedChiSquaredEstimator [private]

Definition at line 74 of file SequentialVertexSmoother.h.

Referenced by SequentialVertexSmoother< N >::SequentialVertexSmoother(), SequentialVertexSmoother< N >::smooth(), SequentialVertexSmoother< 5 >::vertexSmoothedChiSquaredEstimator(), and SequentialVertexSmoother< N >::~SequentialVertexSmoother().

template<unsigned int N>
VertexTrackUpdator<N>* SequentialVertexSmoother< N >::theVertexTrackUpdator [private]

Definition at line 73 of file SequentialVertexSmoother.h.

Referenced by SequentialVertexSmoother< N >::SequentialVertexSmoother(), SequentialVertexSmoother< N >::smooth(), SequentialVertexSmoother< 5 >::vertexTrackUpdator(), and SequentialVertexSmoother< N >::~SequentialVertexSmoother().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:31 2009 for CMSSW by  doxygen 1.5.4