CMS 3D CMS Logo

KFFittingSmoother.h

Go to the documentation of this file.
00001 #ifndef CD_KFFittingSmoother_H_
00002 #define CD_KFFittingSmoother_H_
00003 
00014 #include "TrackingTools/PatternTools/interface/TrajectorySmoother.h"
00015 #include "TrackingTools/PatternTools/interface/TrajectoryFitter.h"
00016 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00017 #include "TrackingTools/TrackFitters/interface/TrajectoryStateWithArbitraryError.h"
00018 
00019 class KFFittingSmoother : public TrajectoryFitter {
00020 
00021 public:
00023   KFFittingSmoother(const TrajectoryFitter& aFitter,
00024                     const TrajectorySmoother& aSmoother,
00025                     double estimateCut = -1,
00026                     int minNumberOfHits = 5,
00027                     bool rejectTracks = false,
00028                     bool BreakTrajWith2ConsecutiveMissing = false,
00029                     bool NoInvalidHitsBeginEnd = false) :
00030     theFitter(aFitter.clone()),
00031     theSmoother(aSmoother.clone()),
00032     theEstimateCut(estimateCut),
00033     theMinNumberOfHits(minNumberOfHits),
00034     rejectTracksFlag(rejectTracks),
00035     breakTrajWith2ConsecutiveMissing(BreakTrajWith2ConsecutiveMissing),
00036     noInvalidHitsBeginEnd(NoInvalidHitsBeginEnd) {}
00037   
00038   virtual ~KFFittingSmoother();
00039   
00040   virtual std::vector<Trajectory> fit(const Trajectory& t) const;
00041   virtual std::vector<Trajectory> fit(const TrajectorySeed& aSeed,
00042                                  const RecHitContainer& hits, 
00043                                  const TrajectoryStateOnSurface& firstPredTsos) const;
00044   virtual std::vector<Trajectory> fit(const TrajectorySeed& aSeed,
00045                                  const RecHitContainer& hits) const;
00046 
00047   const TrajectoryFitter* fitter() const {return theFitter;}
00048   const TrajectorySmoother* smoother() const {return theSmoother;}
00049 
00050   KFFittingSmoother* clone() const {
00051     return new KFFittingSmoother(*theFitter,*theSmoother);
00052   }
00053   
00054 private:
00055 
00056   const TrajectoryFitter* theFitter;
00057   const TrajectorySmoother* theSmoother;
00058   double theEstimateCut;
00059   int theMinNumberOfHits;
00060   bool rejectTracksFlag;
00061   bool breakTrajWith2ConsecutiveMissing;
00062   bool noInvalidHitsBeginEnd;
00063   
00064   void smoothingStep(std::vector<Trajectory>& fitted, std::vector<Trajectory> & smoothed) const;
00065   TrajectoryStateWithArbitraryError   tsosWithError;
00066   
00067 };
00068 
00069 #endif //CD_KFFittingSmoother_H_

Generated on Tue Jun 9 17:48:29 2009 for CMSSW by  doxygen 1.5.4