CMS 3D CMS Logo

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