CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/TrackingTools/TrackFitters/interface/KFTrajectorySmoother.h

Go to the documentation of this file.
00001 #ifndef CD_KFTrajectorySmoother_H_
00002 #define CD_KFTrajectorySmoother_H_
00003 
00013 #include "TrackingTools/PatternTools/interface/TrajectorySmoother.h"
00014 #include "TrackingTools/PatternTools/interface/TrajectoryStateUpdator.h"
00015 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00016 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00017 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00018 #include "TrackingTools/PatternTools/interface/MeasurementEstimator.h"
00019 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
00020 #include "TrackingTools/DetLayers/interface/DetLayerGeometry.h"
00021 
00022 class KFTrajectorySmoother : public TrajectorySmoother {
00023 
00024 private:
00025 
00026   typedef TrajectoryStateOnSurface TSOS;
00027   typedef FreeTrajectoryState FTS;
00028   typedef TrajectoryMeasurement TM;
00029 
00030 public:
00031 
00032   KFTrajectorySmoother(const Propagator& aPropagator,
00033                        const TrajectoryStateUpdator& aUpdator,
00034                        const MeasurementEstimator& aEstimator,
00035                        float errorRescaling = 100.f,
00036                        int minHits = 3) :
00037     thePropagator(aPropagator.clone()),
00038     theUpdator(aUpdator.clone()),
00039     theEstimator(aEstimator.clone()),
00040     theErrorRescaling(errorRescaling),
00041     minHits_(minHits),
00042     theGeometry(0){ // to be fixed. Why this first constructor is needed? who is using it? Can it be removed?
00043       if(!theGeometry) theGeometry = &dummyGeometry;
00044     }
00045 
00046 
00047   KFTrajectorySmoother(const Propagator* aPropagator,
00048                        const TrajectoryStateUpdator* aUpdator, 
00049                        const MeasurementEstimator* aEstimator,
00050                        float errorRescaling = 100.f,
00051                        int minHits = 3,
00052                        const DetLayerGeometry* detLayerGeometry=0) :
00053     thePropagator(aPropagator->clone()),
00054     theUpdator(aUpdator->clone()),
00055     theEstimator(aEstimator->clone()),
00056     theErrorRescaling(errorRescaling),
00057     minHits_(minHits),
00058     theGeometry(detLayerGeometry){
00059       if(!theGeometry) theGeometry = &dummyGeometry;
00060     }
00061 
00062   virtual ~KFTrajectorySmoother();
00063 
00064   virtual std::vector<Trajectory> trajectories(const Trajectory& aTraj) const;
00065 
00066   const Propagator* propagator() const {return thePropagator;}
00067   const TrajectoryStateUpdator* updator() const {return theUpdator;}
00068   const MeasurementEstimator* estimator() const {return theEstimator;}
00069 
00070   virtual KFTrajectorySmoother* clone() const{
00071     return new KFTrajectorySmoother(thePropagator,theUpdator,theEstimator,theErrorRescaling,minHits_,theGeometry);
00072   }
00073 
00074 private:
00075   const DetLayerGeometry dummyGeometry;
00076   Propagator* thePropagator;
00077   const TrajectoryStateUpdator* theUpdator;
00078   const MeasurementEstimator* theEstimator;
00079   float theErrorRescaling;
00080   int minHits_;
00081   const DetLayerGeometry* theGeometry;
00082 };
00083 
00084 #endif //CD_KFTrajectorySmoother_H_