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 bool canImproveWithTrack() const {return true;}
44 
45  virtual ProjectedSiStripRecHit2D* clone() const {return new ProjectedSiStripRecHit2D( *this); }
46 
47 
48  virtual int dimension() const {return 2;}
49  virtual void getKfComponents( KfComponentsHolder & holder ) const { getKfComponents2D(holder); }
50 
52  ClusterRef cluster() const { return cluster_strip() ; }
53  const GeomDetUnit* originalDet() const {
54  return static_cast<const GeomDetUnit*>(theOriginalDet);
55  }
56  unsigned int originalId() const { return trackerHitRTTI::projId(*this);}
57 
58  // not useful only for backward compatibility
60 
61 
62  virtual std::vector<const TrackingRecHit*> recHits() const{
63  std::vector<const TrackingRecHit*> rechits;
64  return rechits;
65  }
66  virtual std::vector<TrackingRecHit*> recHits() {
67  std::vector<TrackingRecHit*> rechits;
68  return rechits;
69  }
70 
71 
72 private:
73  // double dispatch
74  virtual ProjectedSiStripRecHit2D * clone(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const {
75  return cloner(*this,tsos);
76  }
77 #ifdef NO_DICT
78  virtual ConstRecHitPointer cloneSH(TkCloner const& cloner, TrajectoryStateOnSurface const& tsos) const {
79  return cloner.makeShared(*this,tsos);
80  }
81 #endif
82 
83 private:
85 
86 };
87 
88 #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:72
SiStripRecHit2D originalHit() const
OmniClusterRef const & omniClusterRef() const
TrackingRecHit *operator()[[cms TrackingRecHit::ConstRecHitPointer makeShared(TrackingRecHit::ConstRecHitPointer const &hit, TrajectoryStateOnSurface const &tsos) const
Definition: TkCloner.h:20
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 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