Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-20 02:47:05

0001 #ifndef RecoPixelVertexing_PixelTrackFitting_PixelFitter_H
0002 #define RecoPixelVertexing_PixelTrackFitting_PixelFitter_H
0003 
0004 #include "RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterBase.h"
0005 
0006 #include <memory>
0007 
0008 class PixelFitter {
0009 public:
0010   PixelFitter() {}
0011   explicit PixelFitter(std::unique_ptr<PixelFitterBase> fitter) : fitter_(std::move(fitter)) {}
0012 
0013   void swap(PixelFitter& o) { std::swap(fitter_, o.fitter_); }
0014 
0015   std::unique_ptr<reco::Track> run(const std::vector<const TrackingRecHit*>& hits, const TrackingRegion& region) const {
0016     return fitter_->run(hits, region);
0017   }
0018 
0019 private:
0020   std::unique_ptr<PixelFitterBase> fitter_;
0021 };
0022 
0023 #endif