Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:20

0001 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h"
0002 
0003 bool SiStripMatchedRecHit2D::sharesInput(const TrackingRecHit* other, SharedInputType what) const {
0004   if (what == all && (geographicalId() != other->geographicalId()))
0005     return false;
0006 
0007   if (!sameDetModule(*other))
0008     return false;
0009 
0010   if (trackerHitRTTI::isMatched(*other)) {
0011     const SiStripMatchedRecHit2D* otherMatched = static_cast<const SiStripMatchedRecHit2D*>(other);
0012     return sharesClusters(*this, *otherMatched, what);
0013   }
0014 
0015   if (what == all)
0016     return false;
0017   // what about multi ???
0018   if (!trackerHitRTTI::isFromDet(*other))
0019     return false;
0020 
0021   auto const& otherClus = reinterpret_cast<const BaseTrackerRecHit*>(other)->firstClusterRef();
0022   return (otherClus == stereoClusterRef()) || (otherClus == monoClusterRef());
0023 }
0024 
0025 bool SiStripMatchedRecHit2D::sharesInput(TrackerSingleRecHit const& other) const {
0026   return other.sameCluster(monoClusterRef()) || other.sameCluster(stereoClusterRef());
0027 }
0028 
0029 // it does not have components anymore...
0030 std::vector<const TrackingRecHit*> SiStripMatchedRecHit2D::recHits() const {
0031   std::vector<const TrackingRecHit*> rechits;
0032   return rechits;
0033 }
0034 
0035 std::vector<TrackingRecHit*> SiStripMatchedRecHit2D::recHits() {
0036   std::vector<TrackingRecHit*> rechits;
0037   return rechits;
0038 }