CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripMatchedRecHit2D.cc
Go to the documentation of this file.
2 
3 
4 
5 bool
6 SiStripMatchedRecHit2D::sharesInput( const TrackingRecHit* other,
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 
28 bool SiStripMatchedRecHit2D::sharesInput(TrackerSingleRecHit const & other) const {
29  return other.sameCluster(monoClusterRef()) || other.sameCluster(stereoClusterRef());
30 }
31 
32 // it does not have components anymore...
33 std::vector<const TrackingRecHit*>
34 SiStripMatchedRecHit2D::recHits()const {
35  std::vector<const TrackingRecHit*> rechits;
36  return rechits;
37 }
38 
39 std::vector<TrackingRecHit*>
40 SiStripMatchedRecHit2D::recHits() {
41  std::vector<TrackingRecHit*> rechits;
42  return rechits;
43 }
44 
45 
bool isMatched(TrackingRecHit const &hit)
bool sameCluster(OmniClusterRef const &oh) const
DetId geographicalId() const
bool sharesClusters(SiStripMatchedRecHit2D const &h1, SiStripMatchedRecHit2D const &h2, TrackingRecHit::SharedInputType what)