CMS 3D CMS Logo

SiStripRecHit2D.h
Go to the documentation of this file.
1 #ifndef SiStripRecHit2D_H
2 #define SiStripRecHit2D_H
3 
5 #include "TkCloner.h"
6 
7 
8 class SiStripRecHit2D final : public TrackerSingleRecHit {
9 public:
10 
12 
14 
16 
17  // no position (as in persistent)
19  OmniClusterRef const& clus) :
20  TrackerSingleRecHit(id, clus){}
21 
22  template<typename CluRef>
24  GeomDet const & idet,
25  CluRef const& clus) :
26  TrackerSingleRecHit(pos,err, idet, clus) {}
27 
28 
29  ClusterRef cluster() const { return cluster_strip() ; }
30  void setClusterRef(ClusterRef const & ref) {setClusterStripRef(ref);}
31 
32  virtual SiStripRecHit2D * clone() const override {return new SiStripRecHit2D( * this); }
33 #ifndef __GCCXML__
34  virtual RecHitPointer cloneSH() const override { return std::make_shared<SiStripRecHit2D>(*this);}
35 #endif
36 
37  virtual int dimension() const override {return 2;}
38  virtual void getKfComponents( KfComponentsHolder & holder ) const override { getKfComponents2D(holder); }
39 
40  virtual bool canImproveWithTrack() const override {return true;}
41 private:
42  // double dispatch
43  virtual SiStripRecHit2D* clone(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const override {
44  return cloner(*this,tsos).release();
45  }
46 #ifndef __GCCXML__
47  virtual RecHitPointer cloneSH(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const override {
48  return cloner.makeShared(*this,tsos);
49  }
50 #endif
51 
52 private:
53 
54 };
55 
56 #endif
ClusterStripRef cluster_strip() const
void setClusterStripRef(ClusterStripRef const &ref)
virtual void getKfComponents(KfComponentsHolder &holder) const override
TrackingRecHit::ConstRecHitPointer makeShared(TrackingRecHit::ConstRecHitPointer const &hit, TrajectoryStateOnSurface const &tsos) const
Definition: TkCloner.h:23
virtual int dimension() const override
void setClusterRef(ClusterRef const &ref)
OmniClusterRef::ClusterStripRef ClusterRef
virtual SiStripRecHit2D * clone() const override
SiStripRecHit2D(const DetId &id, OmniClusterRef const &clus)
virtual bool canImproveWithTrack() const override
virtual SiStripRecHit2D * clone(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
void getKfComponents2D(KfComponentsHolder &holder) const
virtual RecHitPointer cloneSH() const override
ClusterRef cluster() const
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: DetId.h:18
virtual RecHitPointer cloneSH(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
SiStripRecHit2D(const LocalPoint &pos, const LocalError &err, GeomDet const &idet, CluRef const &clus)