Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:20

0001 #ifndef SiStripRecHit2D_H
0002 #define SiStripRecHit2D_H
0003 
0004 #include "DataFormats/TrackerRecHit2D/interface/TrackerSingleRecHit.h"
0005 #include "TkCloner.h"
0006 
0007 class SiStripRecHit2D final : public TrackerSingleRecHit {
0008 public:
0009   SiStripRecHit2D() {}
0010 
0011   ~SiStripRecHit2D() override {}
0012 
0013   typedef OmniClusterRef::ClusterStripRef ClusterRef;
0014 
0015   // no position (as in persistent)
0016   SiStripRecHit2D(const DetId& id, OmniClusterRef const& clus) : TrackerSingleRecHit(id, clus) {}
0017 
0018   template <typename CluRef>
0019   SiStripRecHit2D(const LocalPoint& pos, const LocalError& err, GeomDet const& idet, CluRef const& clus)
0020       : TrackerSingleRecHit(pos, err, idet, clus) {}
0021 
0022   ClusterRef cluster() const { return cluster_strip(); }
0023   void setClusterRef(ClusterRef const& ref) { setClusterStripRef(ref); }
0024 
0025   SiStripRecHit2D* clone() const override { return new SiStripRecHit2D(*this); }
0026 #ifndef __GCCXML__
0027   RecHitPointer cloneSH() const override { return std::make_shared<SiStripRecHit2D>(*this); }
0028 #endif
0029 
0030   int dimension() const override { return 2; }
0031   void getKfComponents(KfComponentsHolder& holder) const override { getKfComponents2D(holder); }
0032 
0033   bool canImproveWithTrack() const override { return true; }
0034 
0035 private:
0036   // double dispatch
0037   SiStripRecHit2D* clone_(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const override {
0038     return cloner(*this, tsos).release();
0039   }
0040 #ifndef __GCCXML__
0041   RecHitPointer cloneSH_(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const override {
0042     return cloner.makeShared(*this, tsos);
0043   }
0044 #endif
0045 
0046 private:
0047 };
0048 
0049 #endif