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 
25 
26 
27  // no position (as in persistent)
29  OmniClusterRef const& clus) :
30  Base(id, trackerHitRTTI::single), cluster_(clus){}
31 
32  template<typename CluRef>
34  GeomDet const & idet,
35  CluRef const& clus) : Base(p,e,idet, trackerHitRTTI::single), cluster_(clus){}
36 
37  // for projected or timing...
38  template<typename CluRef>
40  GeomDet const & idet, trackerHitRTTI::RTTI rt,
41  CluRef const& clus) : Base(p,e,idet, rt), cluster_(clus){}
42 
43  // a single hit is on a detunit
44  const GeomDetUnit* detUnit() const override {
45  return static_cast<const GeomDetUnit*>(det());
46  }
47 
48  // used by trackMerger (to be improved)
49  OmniClusterRef const & firstClusterRef() const final { return cluster_;}
50 
51  OmniClusterRef const & omniClusterRef() const { return cluster_;}
52  OmniClusterRef const & omniCluster() const { return cluster_;}
53  // for rekeying...
56 
57  ClusterPixelRef cluster_pixel() const {
58  return cluster_.cluster_pixel();
59  }
60 
61  ClusterStripRef cluster_strip() const {
62  return cluster_.cluster_strip();
63  }
64 
65  ClusterPhase2Ref cluster_phase2OT() const {
66  return cluster_.cluster_phase2OT();
67  }
68 
69  ClusterMTDRef cluster_mtd() const {
70  return cluster_.cluster_mtd();
71  }
72 
73  SiStripCluster const & stripCluster() const {
74  return cluster_.stripCluster();
75  }
76 
77  SiPixelCluster const & pixelCluster() const {
78  return cluster_.pixelCluster();
79  }
80 
82  return cluster_.phase2OTCluster();
83  }
84 
85  FTLCluster const & mtdCluster() const {
86  return cluster_.mtdCluster();
87  }
88 
89  // void setClusterRef(const & OmniClusterRef ref) { cluster_ =ref;}
90  void setClusterPixelRef(ClusterPixelRef const & ref) { cluster_ = OmniClusterRef(ref); }
91  void setClusterStripRef(ClusterStripRef const & ref) { cluster_ = OmniClusterRef(ref); }
92  void setClusterPhase2Ref(ClusterPhase2Ref const & ref) { cluster_ = OmniClusterRef(ref); }
93  void setClusterMTDRef(ClusterMTDRef const & ref) { cluster_ = OmniClusterRef(ref); }
94 
95  bool sharesInput( const TrackingRecHit* other, SharedInputType what) const final;
96 
97 
98  bool sharesInput(TrackerSingleRecHit const & other) const {
99  return cluster_== other.cluster_;
100  }
101 
102  bool sameCluster( OmniClusterRef const & oh) const {
103  return oh == cluster_;
104  }
105 
106  std::vector<const TrackingRecHit*> recHits() const override;
107  std::vector<TrackingRecHit*> recHits() override;
108 
109 private:
110 
111  // new game
113 
114 };
115 
116 #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
OmniClusterRef::ClusterMTDRef ClusterMTDRef
SiPixelCluster const & pixelCluster() const
void setClusterStripRef(ClusterStripRef const &ref)
OmniClusterRef & omniCluster()
void setClusterMTDRef(ClusterMTDRef const &ref)
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const final
FTLCluster const & mtdCluster() const
FTLCluster const & mtdCluster() const
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
ClusterMTDRef cluster_mtd() 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
ClusterMTDRef cluster_mtd() 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)