CMS 3D CMS Logo

TrackerSingleRecHit.h
Go to the documentation of this file.
1 #ifndef TrackerSingleRecHit_H
2 #define TrackerSingleRecHit_H
3 
4 
8 
9 
10 /* a Hit composed by a "single" measurement
11  * it has a reference to a cluster and a local position&error
12  */
14 public:
15 
17 
19 
20 
24 
25  // no position (as in persistent)
27  OmniClusterRef const& clus) :
28  Base(id, trackerHitRTTI::single), cluster_(clus){}
29 
30  template<typename CluRef>
32  GeomDet const & idet,
33  CluRef const& clus) : Base(p,e,idet, trackerHitRTTI::single), cluster_(clus){}
34 
35  // for projected...
36  template<typename CluRef>
38  GeomDet const & idet, trackerHitRTTI::RTTI rt,
39  CluRef const& clus) : Base(p,e,idet, rt), cluster_(clus){}
40 
41  // a single hit is on a detunit
42  const GeomDetUnit* detUnit() const override {
43  return static_cast<const GeomDetUnit*>(det());
44  }
45 
46  // used by trackMerger (to be improved)
47  OmniClusterRef const & firstClusterRef() const final { return cluster_;}
48 
49  OmniClusterRef const & omniClusterRef() const { return cluster_;}
50  OmniClusterRef const & omniCluster() const { return cluster_;}
51  // for rekeying...
54 
55  ClusterPixelRef cluster_pixel() const {
56  return cluster_.cluster_pixel();
57  }
58 
59  ClusterStripRef cluster_strip() const {
60  return cluster_.cluster_strip();
61  }
62 
63  ClusterPhase2Ref cluster_phase2OT() const {
64  return cluster_.cluster_phase2OT();
65  }
66 
67  SiStripCluster const & stripCluster() const {
68  return cluster_.stripCluster();
69  }
70 
71  SiPixelCluster const & pixelCluster() const {
72  return cluster_.pixelCluster();
73  }
74 
76  return cluster_.phase2OTCluster();
77  }
78 
79  // void setClusterRef(const & OmniClusterRef ref) { cluster_ =ref;}
80  void setClusterPixelRef(ClusterPixelRef const & ref) { cluster_ = OmniClusterRef(ref); }
81  void setClusterStripRef(ClusterStripRef const & ref) { cluster_ = OmniClusterRef(ref); }
82  void setClusterPhase2Ref(ClusterPhase2Ref const & ref) { cluster_ = OmniClusterRef(ref); }
83 
84  bool sharesInput( const TrackingRecHit* other, SharedInputType what) const final;
85 
86 
87  bool sharesInput(TrackerSingleRecHit const & other) const {
88  return cluster_== other.cluster_;
89  }
90 
91  bool sameCluster( OmniClusterRef const & oh) const {
92  return oh == cluster_;
93  }
94 
95  std::vector<const TrackingRecHit*> recHits() const override;
96  std::vector<TrackingRecHit*> recHits() override;
97 
98 private:
99 
100  // new game
102 
103 };
104 
105 #endif
SharedInputType
definition of equality via shared input
ClusterStripRef cluster_strip() const
Phase2Cluster1DRef cluster_phase2OT() const
Phase2TrackerCluster1D const & phase2OTCluster() const
TrackerSingleRecHit(const LocalPoint &p, const LocalError &e, GeomDet const &idet, CluRef const &clus)
OmniClusterRef const & firstClusterRef() const final
SiPixelCluster const & pixelCluster() const
void setClusterStripRef(ClusterStripRef const &ref)
OmniClusterRef & omniCluster()
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const final
OmniClusterRef::Phase2Cluster1DRef ClusterPhase2Ref
bool sharesInput(TrackerSingleRecHit const &other) const
ClusterPixelRef cluster_pixel() const
ClusterPhase2Ref cluster_phase2OT() const
SiStripCluster const & stripCluster() const
const GeomDet * det() const
ClusterStripRef cluster_strip() const
TrackerSingleRecHit(DetId id, OmniClusterRef const &clus)
OmniClusterRef const & omniCluster() const
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: DetId.h:18
OmniClusterRef const & omniClusterRef() const
BaseTrackerRecHit Base
SiStripCluster const & stripCluster() const
void setClusterPhase2Ref(ClusterPhase2Ref const &ref)
const GeomDetUnit * detUnit() const override
bool sameCluster(OmniClusterRef const &oh) const
SiPixelCluster const & pixelCluster() const
Pixel cluster – collection of neighboring pixels above threshold.
ClusterPixelRef cluster_pixel() const
void setClusterPixelRef(ClusterPixelRef const &ref)
OmniClusterRef & omniClusterRef()
OmniClusterRef::ClusterPixelRef ClusterPixelRef
Phase2TrackerCluster1D const & phase2OTCluster() const
OmniClusterRef::ClusterStripRef ClusterStripRef
TrackerSingleRecHit(const LocalPoint &p, const LocalError &e, GeomDet const &idet, trackerHitRTTI::RTTI rt, CluRef const &clus)