Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:47

0001 #ifndef CD_KFSplittingFitter_H_
0002 #define CD_KFSplittingFitter_H_
0003 
0004 /** \class KFTrajectoryFitter
0005  *  A Kalman track fit that splits matched RecHits into individual
0006  *  components before fitting them. Ported from ORCA
0007  *
0008  *  \author todorov, cerati
0009  */
0010 
0011 #include "TrackingTools/TrackFitters/interface/KFTrajectoryFitter.h"
0012 #include "TrackingTools/TrackFitters/interface/RecHitSplitter.h"
0013 
0014 class KFSplittingFitter final : public TrajectoryFitter {
0015 private:
0016   typedef RecHitSplitter::RecHitContainer RecHitContainer;
0017 
0018   typedef TrajectoryStateOnSurface TSOS;
0019   typedef FreeTrajectoryState FTS;
0020   typedef TrajectoryMeasurement TM;
0021 
0022 public:
0023   KFSplittingFitter(const Propagator& aPropagator,
0024                     const TrajectoryStateUpdator& aUpdator,
0025                     const MeasurementEstimator& aEstimator)
0026       : fitter(aPropagator, aUpdator, aEstimator) {}
0027 
0028   KFSplittingFitter(const Propagator* aPropagator,
0029                     const TrajectoryStateUpdator* aUpdator,
0030                     const MeasurementEstimator* aEstimator)
0031       : fitter(aPropagator, aUpdator, aEstimator) {}
0032 
0033   std::unique_ptr<TrajectoryFitter> clone() const override {
0034     return std::unique_ptr<TrajectoryFitter>(
0035         new KFSplittingFitter(fitter.propagator(), fitter.updator(), fitter.estimator()));
0036   }
0037 
0038   Trajectory fitOne(const Trajectory& aTraj, fitType type) const override;
0039   Trajectory fitOne(const TrajectorySeed& aSeed, const RecHitContainer& hits, fitType type) const override;
0040   Trajectory fitOne(const TrajectorySeed& aSeed,
0041                     const RecHitContainer& hits,
0042                     const TSOS& firstPredTsos,
0043                     fitType type) const override;
0044 
0045   void setHitCloner(TkCloner const* hc) override { fitter.setHitCloner(hc); }
0046 
0047 private:
0048   void sorter(const RecHitContainer& hits, PropagationDirection dir, RecHitContainer& result) const;
0049 
0050   KFTrajectoryFitter fitter;
0051 };
0052 
0053 #endif  //CD_KFSplittingFitter_H_