CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SiStripMatchedRecHit2D.cc
Go to the documentation of this file.
2 
4  if (what == all && (geographicalId() != other->geographicalId()))
5  return false;
6 
7  if (!sameDetModule(*other))
8  return false;
9 
10  if (trackerHitRTTI::isMatched(*other)) {
11  const SiStripMatchedRecHit2D* otherMatched = static_cast<const SiStripMatchedRecHit2D*>(other);
12  return sharesClusters(*this, *otherMatched, what);
13  }
14 
15  if (what == all)
16  return false;
17  // what about multi ???
18  if (!trackerHitRTTI::isFromDet(*other))
19  return false;
20 
21  auto const& otherClus = reinterpret_cast<const BaseTrackerRecHit*>(other)->firstClusterRef();
22  return (otherClus == stereoClusterRef()) || (otherClus == monoClusterRef());
23 }
24 
26  return other.sameCluster(monoClusterRef()) || other.sameCluster(stereoClusterRef());
27 }
28 
29 // it does not have components anymore...
30 std::vector<const TrackingRecHit*> SiStripMatchedRecHit2D::recHits() const {
31  std::vector<const TrackingRecHit*> rechits;
32  return rechits;
33 }
34 
35 std::vector<TrackingRecHit*> SiStripMatchedRecHit2D::recHits() {
36  std::vector<TrackingRecHit*> rechits;
37  return rechits;
38 }
SharedInputType
definition of equality via shared input
bool isFromDet(TrackingRecHit const &hit)
OmniClusterRef const & stereoClusterRef() const
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
bool sameDetModule(TrackingRecHit const &hit) const
OmniClusterRef const & firstClusterRef() const override
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const override
bool isMatched(TrackingRecHit const &hit)
OmniClusterRef const & monoClusterRef() const
bool sameCluster(OmniClusterRef const &oh) const
DetId geographicalId() const
bool sharesClusters(SiStripMatchedRecHit2D const &h1, SiStripMatchedRecHit2D const &h2, TrackingRecHit::SharedInputType what)