CMS 3D CMS Logo

TrackerSingleRecHit.h
Go to the documentation of this file.
1 #ifndef TrackerSingleRecHit_H
2 #define TrackerSingleRecHit_H
3 
7 
8 /* a Hit composed by a "single" measurement
9  * it has a reference to a cluster and a local position&error
10  */
12 public:
14 
16 
21 
22  // no position (as in persistent)
23  TrackerSingleRecHit(DetId id, OmniClusterRef const& clus) : Base(id, trackerHitRTTI::single), cluster_(clus) {}
24 
25  template <typename CluRef>
26  TrackerSingleRecHit(const LocalPoint& p, const LocalError& e, GeomDet const& idet, CluRef const& clus)
27  : Base(p, e, idet, trackerHitRTTI::single), cluster_(clus) {}
28 
29  // for projected or timing...
30  template <typename CluRef>
32  const LocalPoint& p, const LocalError& e, GeomDet const& idet, trackerHitRTTI::RTTI rt, CluRef const& clus)
33  : Base(p, e, idet, rt), cluster_(clus) {}
34 
35  // a single hit is on a detunit
36  const GeomDetUnit* detUnit() const override { return static_cast<const GeomDetUnit*>(det()); }
37 
38  // used by trackMerger (to be improved)
39  OmniClusterRef const& firstClusterRef() const final { return cluster_; }
40 
41  OmniClusterRef const& omniClusterRef() const { return cluster_; }
42  OmniClusterRef const& omniCluster() const { return cluster_; }
43  // for rekeying...
46 
47  ClusterPixelRef cluster_pixel() const { return cluster_.cluster_pixel(); }
48 
49  ClusterStripRef cluster_strip() const { return cluster_.cluster_strip(); }
50 
51  ClusterPhase2Ref cluster_phase2OT() const { return cluster_.cluster_phase2OT(); }
52 
53  ClusterMTDRef cluster_mtd() const { return cluster_.cluster_mtd(); }
54 
55  SiStripCluster const& stripCluster() const { return cluster_.stripCluster(); }
56 
57  SiPixelCluster const& pixelCluster() const { return cluster_.pixelCluster(); }
58 
60 
61  FTLCluster const& mtdCluster() const { return cluster_.mtdCluster(); }
62 
63  // void setClusterRef(const & OmniClusterRef ref) { cluster_ =ref;}
64  void setClusterPixelRef(ClusterPixelRef const& ref) { cluster_ = OmniClusterRef(ref); }
65  void setClusterStripRef(ClusterStripRef const& ref) { cluster_ = OmniClusterRef(ref); }
66  void setClusterPhase2Ref(ClusterPhase2Ref const& ref) { cluster_ = OmniClusterRef(ref); }
67  void setClusterMTDRef(ClusterMTDRef const& ref) { cluster_ = OmniClusterRef(ref); }
68 
69  bool sharesInput(const TrackingRecHit* other, SharedInputType what) const final;
70 
71  bool sharesInput(TrackerSingleRecHit const& other) const { return cluster_ == other.cluster_; }
72 
73  bool sameCluster(OmniClusterRef const& oh) const { return oh == cluster_; }
74 
75  std::vector<const TrackingRecHit*> recHits() const override;
76  std::vector<TrackingRecHit*> recHits() override;
77 
78 private:
79  // new game
81 };
82 
83 #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:17
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)