CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/TrackingTools/TrackFitters/interface/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/TrackFitters/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                     double logPixelProbabilityCut = -16.0, 
00027                     int minNumberOfHits = 5,
00028                     bool rejectTracks = false,
00029                     bool BreakTrajWith2ConsecutiveMissing = false,
00030                     bool NoInvalidHitsBeginEnd = false) :
00031     theFitter(aFitter.clone()),
00032     theSmoother(aSmoother.clone()),
00033     theEstimateCut(estimateCut),
00034 
00035     // ggiurgiu@fnal.gov
00036     theLogPixelProbabilityCut( logPixelProbabilityCut ),
00037     
00038     theMinNumberOfHits(minNumberOfHits),
00039     rejectTracksFlag(rejectTracks),
00040     breakTrajWith2ConsecutiveMissing(BreakTrajWith2ConsecutiveMissing),
00041     noInvalidHitsBeginEnd(NoInvalidHitsBeginEnd) {}
00042   
00043   virtual ~KFFittingSmoother();
00044   
00045   virtual std::vector<Trajectory> fit(const Trajectory& t) const;
00046   virtual std::vector<Trajectory> fit(const TrajectorySeed& aSeed,
00047                                  const RecHitContainer& hits, 
00048                                  const TrajectoryStateOnSurface& firstPredTsos) const;
00049   virtual std::vector<Trajectory> fit(const TrajectorySeed& aSeed,
00050                                  const RecHitContainer& hits) const;
00051 
00052   const TrajectoryFitter* fitter() const {return theFitter;}
00053   const TrajectorySmoother* smoother() const {return theSmoother;}
00054 
00055   KFFittingSmoother* clone() const {
00056     return new KFFittingSmoother(*theFitter,*theSmoother,
00057                                  theEstimateCut,theLogPixelProbabilityCut,
00058                                  theMinNumberOfHits,rejectTracksFlag,
00059                                  breakTrajWith2ConsecutiveMissing,noInvalidHitsBeginEnd);
00060   }
00061   
00062 private:
00063 
00064   const TrajectoryFitter* theFitter;
00065   const TrajectorySmoother* theSmoother;
00066   double theEstimateCut;
00067 
00068   double theLogPixelProbabilityCut; // ggiurgiu@fnal.gov
00069 
00070   int theMinNumberOfHits;
00071   bool rejectTracksFlag;
00072   bool breakTrajWith2ConsecutiveMissing;
00073   bool noInvalidHitsBeginEnd;
00074   
00075   void smoothingStep(std::vector<Trajectory>& fitted, std::vector<Trajectory> & smoothed) const;
00076   TrajectoryStateWithArbitraryError   tsosWithError;
00077   
00078 };
00079 
00080 #endif //CD_KFFittingSmoother_H_