Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:46

0001 #ifndef RecoPixelVertexing_PixelTrackFitting_PixelTrackFilter_H
0002 #define RecoPixelVertexing_PixelTrackFitting_PixelTrackFilter_H
0003 
0004 #include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackFilterBase.h"
0005 
0006 #include <memory>
0007 
0008 class PixelTrackFilter {
0009 public:
0010   PixelTrackFilter() {}
0011   explicit PixelTrackFilter(std::unique_ptr<PixelTrackFilterBase> filter) : filter_(std::move(filter)) {}
0012 
0013   void swap(PixelTrackFilter& o) { std::swap(filter_, o.filter_); }
0014 
0015   bool operator()(const reco::Track* track, const PixelTrackFilterBase::Hits& hits) const {
0016     return (*filter_)(track, hits);
0017   }
0018 
0019 private:
0020   std::unique_ptr<PixelTrackFilterBase> filter_;
0021 };
0022 
0023 #endif