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 GCC11_FINAL : 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
00036 theLogPixelProbabilityCut( logPixelProbabilityCut ),
00037
00038 theMinNumberOfHits(minNumberOfHits),
00039 rejectTracksFlag(rejectTracks),
00040 breakTrajWith2ConsecutiveMissing(BreakTrajWith2ConsecutiveMissing),
00041 noInvalidHitsBeginEnd(NoInvalidHitsBeginEnd) {}
00042
00043 virtual ~KFFittingSmoother();
00044
00045 Trajectory fitOne(const Trajectory& t, fitType type) const;
00046 Trajectory fitOne(const TrajectorySeed& aSeed,
00047 const RecHitContainer& hits,
00048 const TrajectoryStateOnSurface& firstPredTsos, fitType type) const;
00049 Trajectory fitOne(const TrajectorySeed& aSeed,
00050 const RecHitContainer& hits, fitType type) 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 Trajectory smoothingStep(Trajectory const & fitted) const {return smoother()->trajectory(fitted);}
00065
00066 private:
00067
00068 const TrajectoryFitter* theFitter;
00069 const TrajectorySmoother* theSmoother;
00070 double theEstimateCut;
00071
00072 double theLogPixelProbabilityCut;
00073
00074 int theMinNumberOfHits;
00075 bool rejectTracksFlag;
00076 bool breakTrajWith2ConsecutiveMissing;
00077 bool noInvalidHitsBeginEnd;
00078
00079 TrajectoryStateWithArbitraryError tsosWithError;
00080
00082 bool checkForNans(const Trajectory &theTraj) const;
00083
00084 };
00085
00086 #endif //CD_KFFittingSmoother_H_