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  if (!trackerHitRTTI::isFromDet(*other) ) return false;
21 
22  auto const & otherClus = reinterpret_cast<const BaseTrackerRecHit *>(other)->firstClusterRef();
23  return (otherClus==stereoClusterRef()) || (otherClus==monoClusterRef());
24 
25 
26 }
27 
28 
29 
31  return other.sameCluster(monoClusterRef()) || other.sameCluster(stereoClusterRef());
32 }
33 
34 // it does not have components anymore...
35 std::vector<const TrackingRecHit*>
37  std::vector<const TrackingRecHit*> rechits;
38  return rechits;
39 }
40 
41 std::vector<TrackingRecHit*>
43  std::vector<TrackingRecHit*> rechits;
44  return rechits;
45 }
46 
47 
SharedInputType
definition of equality via shared input
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
bool isFromDet(TrackingRecHit const &hit)
OmniClusterRef const & stereoClusterRef() const
bool sameDetModule(TrackingRecHit const &hit) const
bool isMatched(TrackingRecHit const &hit)
OmniClusterRef const & firstClusterRef() const override
OmniClusterRef const & monoClusterRef() const
bool sameCluster(OmniClusterRef const &oh) const
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const override
DetId geographicalId() const
bool sharesClusters(SiStripMatchedRecHit2D const &h1, SiStripMatchedRecHit2D const &h2, TrackingRecHit::SharedInputType what)