CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 class SiStripRecHit2D final : public TrackerSingleRecHit {
8 public:
10 
11  ~SiStripRecHit2D() override {}
12 
14 
15  // no position (as in persistent)
16  SiStripRecHit2D(const DetId& id, OmniClusterRef const& clus) : TrackerSingleRecHit(id, clus) {}
17 
18  template <typename CluRef>
19  SiStripRecHit2D(const LocalPoint& pos, const LocalError& err, GeomDet const& idet, CluRef const& clus)
20  : TrackerSingleRecHit(pos, err, idet, clus) {}
21 
22  ClusterRef cluster() const { return cluster_strip(); }
23  void setClusterRef(ClusterRef const& ref) { setClusterStripRef(ref); }
24 
25  SiStripRecHit2D* clone() const override { return new SiStripRecHit2D(*this); }
26 #ifndef __GCCXML__
27  RecHitPointer cloneSH() const override { return std::make_shared<SiStripRecHit2D>(*this); }
28 #endif
29 
30  int dimension() const override { return 2; }
31  void getKfComponents(KfComponentsHolder& holder) const override { getKfComponents2D(holder); }
32 
33  bool canImproveWithTrack() const override { return true; }
34 
35 private:
36  // double dispatch
37  SiStripRecHit2D* clone_(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const override {
38  return cloner(*this, tsos).release();
39  }
40 #ifndef __GCCXML__
41  RecHitPointer cloneSH_(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const override {
42  return cloner.makeShared(*this, tsos);
43  }
44 #endif
45 
46 private:
47 };
48 
49 #endif
SiStripRecHit2D * clone() const override
ClusterStripRef cluster_strip() const
void setClusterStripRef(ClusterStripRef const &ref)
RecHitPointer cloneSH_(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
TrackingRecHit::ConstRecHitPointer makeShared(TrackingRecHit::ConstRecHitPointer const &hit, TrajectoryStateOnSurface const &tsos) const
Definition: TkCloner.h:24
void setClusterRef(ClusterRef const &ref)
OmniClusterRef::ClusterStripRef ClusterRef
bool canImproveWithTrack() const override
SiStripRecHit2D(const DetId &id, OmniClusterRef const &clus)
int dimension() const override
void getKfComponents2D(KfComponentsHolder &holder) const
SiStripRecHit2D * clone_(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
ClusterRef cluster() const
RecHitPointer cloneSH() const override
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: DetId.h:17
void getKfComponents(KfComponentsHolder &holder) const override
SiStripRecHit2D(const LocalPoint &pos, const LocalError &err, GeomDet const &idet, CluRef const &clus)
~SiStripRecHit2D() override