00001 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h" 00002 00003 SiPixelRecHit::SiPixelRecHit( const LocalPoint& pos, const LocalError& err, 00004 const DetId& id, 00005 SiPixelClusterRefNew const& cluster): 00006 BaseSiTrackerRecHit2DLocalPos(pos,err,id), 00007 cluster_(cluster) 00008 00009 { 00010 } 00011 00012 bool SiPixelRecHit::sharesInput( const TrackingRecHit* other, 00013 SharedInputType what) const 00014 { 00015 if (geographicalId() != other->geographicalId()) return false; 00016 if(! other->isValid()) return false; 00017 00018 const SiPixelRecHit* otherCast = static_cast<const SiPixelRecHit*>(other); 00019 00020 return cluster_ == otherCast->cluster(); 00021 }