Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:20

0001 #ifndef _SequentialVertexSmoother_H_
0002 #define _SequentialVertexSmoother_H_
0003 
0004 #include "RecoVertex/VertexPrimitives/interface/VertexSmoother.h"
0005 #include "RecoVertex/VertexPrimitives/interface/VertexTrackUpdator.h"
0006 #include "RecoVertex/VertexPrimitives/interface/VertexSmoothedChiSquaredEstimator.h"
0007 #include "RecoVertex/VertexPrimitives/interface/TrackToTrackCovCalculator.h"
0008 
0009 /**
0010  *  The class which handles the track-refit, smoothed chi**2 and track-to-track 
0011  *  covariance matrix calculations.
0012  */
0013 
0014 template <unsigned int N>
0015 class SequentialVertexSmoother : public VertexSmoother<N> {
0016 public:
0017   typedef ReferenceCountingPointer<RefittedTrackState<N> > RefCountedRefittedTrackState;
0018   typedef ReferenceCountingPointer<VertexTrack<N> > RefCountedVertexTrack;
0019   typedef ReferenceCountingPointer<LinearizedTrackState<N> > RefCountedLinearizedTrackState;
0020 
0021   /**
0022    *  The constructor, where the different components to be used are specified.
0023    *  \param vtu The algorithm to refit the tracks  with the vertex constraint (or smoothing)
0024    *  \param vse The algorithm to calculate the smoothed chi**2
0025    *  \return covCalc The algorithm the track-to-track covariance matrix. 
0026    *  If this option is not required, this pointer should be 0.
0027    */
0028   SequentialVertexSmoother(const VertexTrackUpdator<N>& vtu,
0029                            const VertexSmoothedChiSquaredEstimator<N>& vse,
0030                            const TrackToTrackCovCalculator<N>& covCalc);
0031 
0032   ~SequentialVertexSmoother() override;
0033 
0034   /**
0035    *  Special copy constructor cloning the private data
0036    */
0037   SequentialVertexSmoother(const SequentialVertexSmoother<N>& smoother);
0038 
0039   /**
0040    *  Methode which will refit the tracks with the vertex constraint, 
0041    *  calculate the smoothed vertex chi**2, and, if required, the 
0042    *  track-to-track covariance matrix.
0043    *  \param initVertex is the initial guess of the vertex (a-priori 
0044    *    information), used at the start of the fit.
0045    *  \param newVertex is the final estimate of the vertex, as given by the 
0046    *    last update.
0047    *  \return the final vertex estimate, with all the supplementary information
0048    */
0049   CachingVertex<N> smooth(const CachingVertex<N>& vertex) const override;
0050 
0051   /**
0052    *  Access methods
0053    */
0054   const VertexTrackUpdator<N>* vertexTrackUpdator() const { return theVertexTrackUpdator; }
0055   const VertexSmoothedChiSquaredEstimator<N>* vertexSmoothedChiSquaredEstimator() const {
0056     return theVertexSmoothedChiSquaredEstimator;
0057   }
0058   const TrackToTrackCovCalculator<N>* trackToTrackCovCalculator() const { return theTrackToTrackCovCalculator; }
0059 
0060   /**
0061    * Clone method 
0062    */
0063   SequentialVertexSmoother<N>* clone() const override { return new SequentialVertexSmoother(*this); }
0064 
0065 private:
0066   VertexTrackUpdator<N>* theVertexTrackUpdator;
0067   VertexSmoothedChiSquaredEstimator<N>* theVertexSmoothedChiSquaredEstimator;
0068   TrackToTrackCovCalculator<N>* theTrackToTrackCovCalculator;
0069 };
0070 
0071 #endif