CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

SequentialVertexSmoother< N > Class Template Reference

#include <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
 SequentialVertexSmoother (const VertexTrackUpdator< N > &vtu, const VertexSmoothedChiSquaredEstimator< N > &vse, const TrackToTrackCovCalculator< N > &covCalc)
 SequentialVertexSmoother (const SequentialVertexSmoother< N > &smoother)
virtual CachingVertex< N > smooth (const CachingVertex< N > &vertex) const
const
TrackToTrackCovCalculator< N > * 
trackToTrackCovCalculator () const
const
VertexSmoothedChiSquaredEstimator
< N > * 
vertexSmoothedChiSquaredEstimator () const
const VertexTrackUpdator< N > * vertexTrackUpdator () const
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

Definition at line 22 of file SequentialVertexSmoother.h.

Definition at line 20 of file SequentialVertexSmoother.h.

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 
)

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

Parameters:
vtuThe algorithm to refit the tracks with the vertex constraint (or smoothing)
vseThe 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().

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

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.

  {
    return new SequentialVertexSmoother(* this);
  }
template<unsigned int N>
CachingVertex< N > SequentialVertexSmoother< N >::smooth ( const CachingVertex< N > &  vertex) const [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:
initVertexis the initial guess of the vertex (a-priori information), used at the start of the fit.
newVertexis 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(), query::result, CachingVertex< N >::totalChiSquared(), CachingVertex< N >::tracks(), CachingVertex< N >::vertexState(), and CachingVertex< N >::weight().

{

  // Track refit

  std::vector<RefCountedVertexTrack> newTracks;
  if (theVertexTrackUpdator != 0) {
    const std::vector<RefCountedVertexTrack>&  vOut=vertex.tracks();
    for(typename std::vector<RefCountedVertexTrack>::const_iterator i = vOut.begin();
          i != vOut.end();i++)
    {
      RefCountedVertexTrack nTrack = theVertexTrackUpdator->update(vertex, *i);
      newTracks.push_back(nTrack);
    }
  } else {
    newTracks = vertex.tracks();
  }

  // intermediate vertex for chi2 calculation and TktoTkcovariance map
  CachingVertex<N> interVertex(vertex.position(), vertex.weight(),
                                newTracks, 0.);

  // Smoothed chi2

  float smChi2 = vertex.totalChiSquared();
  if (theVertexSmoothedChiSquaredEstimator != 0) {
    std::pair<bool, double> result = theVertexSmoothedChiSquaredEstimator->estimate(interVertex);
    smChi2 = result.second;
  }

  if (theTrackToTrackCovCalculator == 0) {
    if  (vertex.hasPrior()) {
      return CachingVertex<N>(vertex.priorVertexState(), vertex.vertexState(),
                  newTracks, smChi2);
    } else {
      return CachingVertex<N>(vertex.vertexState(), newTracks, smChi2);
    }
  }
  
  //TktoTkcovariance map
  typename CachingVertex<N>::TrackToTrackMap tkMap = (*theTrackToTrackCovCalculator)(interVertex);

//   CachingVertex<N> finalVertex(vertex.position(), vertex.error(),
//                          newTracks, smChi2, tkMap);
  if  (vertex.hasPrior()) {
    CachingVertex<N> finalVertex(vertex.priorVertexState(), vertex.vertexState(),
                newTracks, smChi2, tkMap);
    return finalVertex;
  }

  CachingVertex<N> finalVertex(vertex.vertexState(), newTracks, smChi2, tkMap);
  return finalVertex;

}
template<unsigned int N>
const TrackToTrackCovCalculator<N>* SequentialVertexSmoother< N >::trackToTrackCovCalculator ( ) const [inline]
template<unsigned int N>
const VertexSmoothedChiSquaredEstimator<N>* SequentialVertexSmoother< N >::vertexSmoothedChiSquaredEstimator ( ) const [inline]
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().

    { return theVertexTrackUpdator; }

Member Data Documentation

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