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 
13  ~SiStripRecHit2D() override {}
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  SiStripRecHit2D * clone() const override {return new SiStripRecHit2D( * this); }
33 #ifndef __GCCXML__
34  RecHitPointer cloneSH() const override { return std::make_shared<SiStripRecHit2D>(*this);}
35 #endif
36 
37  int dimension() const override {return 2;}
38  void getKfComponents( KfComponentsHolder & holder ) const override { getKfComponents2D(holder); }
39 
40  bool canImproveWithTrack() const override {return true;}
41 private:
42  // double dispatch
43  SiStripRecHit2D* clone(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const override {
44  return cloner(*this,tsos).release();
45  }
46 #ifndef __GCCXML__
47  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)
RecHitPointer cloneSH() const override
bool canImproveWithTrack() const override
TrackingRecHit::ConstRecHitPointer makeShared(TrackingRecHit::ConstRecHitPointer const &hit, TrajectoryStateOnSurface const &tsos) const
Definition: TkCloner.h:23
void setClusterRef(ClusterRef const &ref)
OmniClusterRef::ClusterStripRef ClusterRef
SiStripRecHit2D(const DetId &id, OmniClusterRef const &clus)
int dimension() const override
void getKfComponents2D(KfComponentsHolder &holder) const
ClusterRef cluster() const
std::shared_ptr< TrackingRecHit const > RecHitPointer
SiStripRecHit2D * clone(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
Definition: DetId.h:18
SiStripRecHit2D(const LocalPoint &pos, const LocalError &err, GeomDet const &idet, CluRef const &clus)
SiStripRecHit2D * clone() const override
~SiStripRecHit2D() override
void getKfComponents(KfComponentsHolder &holder) const override
RecHitPointer cloneSH(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override