CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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>
23  SiStripRecHit2D( const LocalPoint& pos, const LocalError& err,
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)
void setClusterRef(ClusterRef const &ref)
OmniClusterRef::ClusterStripRef ClusterRef
SiStripRecHit2D(const DetId &id, OmniClusterRef const &clus)
virtual SiStripRecHit2D * clone() const override
void getKfComponents2D(KfComponentsHolder &holder) const
ClusterRef cluster() const
virtual void getKfComponents(KfComponentsHolder &holder) const override
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: DetId.h:18
virtual int dimension() const override
TrackingRecHit *operator()[[cms TrackingRecHit::ConstRecHitPointer makeShared(TrackingRecHit::ConstRecHitPointer const &hit, TrajectoryStateOnSurface const &tsos) const
Definition: TkCloner.h:22
SiStripRecHit2D(const LocalPoint &pos, const LocalError &err, GeomDet const &idet, CluRef const &clus)
virtual bool canImproveWithTrack() const override
virtual RecHitPointer cloneSH() const override
virtual RecHitPointer cloneSH(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
virtual SiStripRecHit2D * clone(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override