CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ProjectedSiStripRecHit2D.h
Go to the documentation of this file.
1 #ifndef ProjectedSiStripRecHit2D_H
2 #define ProjectedSiStripRecHit2D_H
3 
5 
6 // #include<iostream>
7 
9 public:
10 
11  inline static bool isMono(GeomDet const & gdet, GeomDet const & sdet) {
12  return (sdet.geographicalId()-gdet.geographicalId())==2;
13  }
14 
15 
17 
19 
21  GeomDet const & idet,
22  SiStripRecHit2D const & originalHit) :
23  TrackerSingleRecHit(pos, err, idet,
24  isMono(idet,*originalHit.det()) ? trackerHitRTTI::projMono: trackerHitRTTI::projStereo,
25  originalHit.omniCluster()),
26  theOriginalDet(originalHit.det()) {
27 // std::cout << getRTTI() << ' ' << originalHit.rawId() << ' ' << idet.geographicalId().rawId() << ' ' << originalId() << std::endl;
28  assert(originalId()==originalHit.rawId());
29  }
30 
31  template<typename CluRef>
33  GeomDet const & idet, GeomDet const & originalDet,
34  CluRef const& clus) :
35  TrackerSingleRecHit(pos, err, idet,
36  isMono(idet,originalDet) ? trackerHitRTTI::projMono: trackerHitRTTI::projStereo,
37  clus),
38  theOriginalDet(&originalDet) {
39  assert(originalId()==originalDet.geographicalId());
40  }
41 
42 
43  virtual void setDet(const GeomDet & idet);
44 
45  virtual bool canImproveWithTrack() const {return true;}
46 
47  virtual ProjectedSiStripRecHit2D* clone() const {return new ProjectedSiStripRecHit2D( *this); }
48 
49 
50  virtual int dimension() const {return 2;}
51  virtual void getKfComponents( KfComponentsHolder & holder ) const { getKfComponents2D(holder); }
52 
54  ClusterRef cluster() const { return cluster_strip() ; }
55  const GeomDetUnit* originalDet() const {
56  return static_cast<const GeomDetUnit*>(theOriginalDet);
57  }
58  unsigned int originalId() const { return trackerHitRTTI::projId(*this);}
59 
60  // not useful only for backward compatibility
62 
63 
64  virtual std::vector<const TrackingRecHit*> recHits() const{
65  std::vector<const TrackingRecHit*> rechits;
66  return rechits;
67  }
68  virtual std::vector<TrackingRecHit*> recHits() {
69  std::vector<TrackingRecHit*> rechits;
70  return rechits;
71  }
72 
73 
74 private:
75  // double dispatch
76  virtual ProjectedSiStripRecHit2D * clone(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const {
77  return cloner(*this,tsos).release();
78  }
79 #ifdef NO_DICT
80  virtual ConstRecHitPointer cloneSH(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const {
81  return cloner.makeShared(*this,tsos);
82  }
83 #endif
84 
85 private:
87 
88 };
89 
90 #endif
ClusterStripRef cluster_strip() const
virtual ProjectedSiStripRecHit2D * clone() const
virtual void getKfComponents(KfComponentsHolder &holder) const
#define GCC11_FINAL
virtual ProjectedSiStripRecHit2D * clone(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const
#define nullptr
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
unsigned int originalId() const
unsigned int projId(TrackingRecHit const &hit)
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const GeomDet * det() const
void getKfComponents2D(KfComponentsHolder &holder) const
OmniClusterRef const & omniCluster() const
const GeomDetUnit * originalDet() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
SiStripRecHit2D originalHit() const
OmniClusterRef const & omniClusterRef() const
TrackingRecHit *operator()[[cms TrackingRecHit::ConstRecHitPointer makeShared(TrackingRecHit::ConstRecHitPointer const &hit, TrajectoryStateOnSurface const &tsos) const
Definition: TkCloner.h:22
ProjectedSiStripRecHit2D(const LocalPoint &pos, const LocalError &err, GeomDet const &idet, GeomDet const &originalDet, CluRef const &clus)
virtual ConstRecHitPointer cloneSH(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const
virtual void setDet(const GeomDet &idet)
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
static bool isMono(GeomDet const &gdet, GeomDet const &sdet)
ProjectedSiStripRecHit2D(const LocalPoint &pos, const LocalError &err, GeomDet const &idet, SiStripRecHit2D const &originalHit)
OmniClusterRef::ClusterStripRef ClusterRef
id_type rawId() const
virtual bool canImproveWithTrack() const