00001 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h" 00002 00003 00004 00005 bool 00006 SiStripMatchedRecHit2D::sharesInput( const TrackingRecHit* other, 00007 SharedInputType what) const 00008 { 00009 if (what==all && (geographicalId() != other->geographicalId())) return false; 00010 00011 if (!sameDetModule(*other)) return false; 00012 00013 if (trackerHitRTTI::isMatched(*other) ) { 00014 const SiStripMatchedRecHit2D* otherMatched = static_cast<const SiStripMatchedRecHit2D*>(other); 00015 return sharesClusters(*this, *otherMatched,what); 00016 } 00017 00018 if (what==all) return false; 00019 // what about multi??? 00020 auto const & otherClus = reinterpret_cast<const BaseTrackerRecHit *>(other)->firstClusterRef(); 00021 return (otherClus==stereoClusterRef()) || (otherClus==monoClusterRef()); 00022 00023 00024 } 00025 00026 00027 00028 bool SiStripMatchedRecHit2D::sharesInput(TrackerSingleRecHit const & other) const { 00029 return other.sameCluster(monoClusterRef()) || other.sameCluster(stereoClusterRef()); 00030 } 00031 00032 // it does not have components anymore... 00033 std::vector<const TrackingRecHit*> 00034 SiStripMatchedRecHit2D::recHits()const { 00035 std::vector<const TrackingRecHit*> rechits; 00036 return rechits; 00037 } 00038 00039 std::vector<TrackingRecHit*> 00040 SiStripMatchedRecHit2D::recHits() { 00041 std::vector<TrackingRecHit*> rechits; 00042 return rechits; 00043 } 00044 00045