CMS 3D CMS Logo

Public Member Functions | Private Attributes

SiStripMatchedRecHit2D Class Reference

#include <SiStripMatchedRecHit2D.h>

Inheritance diagram for SiStripMatchedRecHit2D:
BaseSiTrackerRecHit2DLocalPos RecHit2DLocalPos TrackingRecHit

List of all members.

Public Member Functions

virtual SiStripMatchedRecHit2Dclone () const
const SiStripRecHit2DmonoHit () const
SiStripRecHit2DmonoHit ()
virtual std::vector
< TrackingRecHit * > 
recHits ()
 Non-const access to component RecHits (if any)
virtual std::vector< const
TrackingRecHit * > 
recHits () const
 Access to component RecHits (if any)
virtual bool sharesInput (const TrackingRecHit *other, SharedInputType what) const
 SiStripMatchedRecHit2D ()
 SiStripMatchedRecHit2D (const LocalPoint &pos, const LocalError &err, const DetId &id, const SiStripRecHit2D *rMono, const SiStripRecHit2D *rStereo)
SiStripRecHit2DstereoHit ()
const SiStripRecHit2DstereoHit () const
 ~SiStripMatchedRecHit2D ()

Private Attributes

SiStripRecHit2D componentMono_
SiStripRecHit2D componentStereo_

Detailed Description

Definition at line 8 of file SiStripMatchedRecHit2D.h.


Constructor & Destructor Documentation

SiStripMatchedRecHit2D::SiStripMatchedRecHit2D ( ) [inline]

Definition at line 10 of file SiStripMatchedRecHit2D.h.

Referenced by clone(), and sharesInput().

SiStripMatchedRecHit2D::~SiStripMatchedRecHit2D ( ) [inline]

Definition at line 11 of file SiStripMatchedRecHit2D.h.

{}
SiStripMatchedRecHit2D::SiStripMatchedRecHit2D ( const LocalPoint pos,
const LocalError err,
const DetId id,
const SiStripRecHit2D rMono,
const SiStripRecHit2D rStereo 
)

Definition at line 4 of file SiStripMatchedRecHit2D.cc.

                                                                                                                                              : BaseSiTrackerRecHit2DLocalPos(pos, err, id), componentMono_(*rMono),componentStereo_(*rStereo){}

Member Function Documentation

SiStripMatchedRecHit2D * SiStripMatchedRecHit2D::clone ( void  ) const [virtual]
const SiStripRecHit2D* SiStripMatchedRecHit2D::monoHit ( ) const [inline]
SiStripRecHit2D* SiStripMatchedRecHit2D::monoHit ( ) [inline]

Definition at line 19 of file SiStripMatchedRecHit2D.h.

References componentMono_.

{ return &componentMono_;}
std::vector< TrackingRecHit * > SiStripMatchedRecHit2D::recHits ( ) [virtual]

Non-const access to component RecHits (if any)

Reimplemented from RecHit2DLocalPos.

Definition at line 45 of file SiStripMatchedRecHit2D.cc.

References componentMono_, and componentStereo_.

                                {
  std::vector<TrackingRecHit*> rechits(2);
  rechits[0]=&componentMono_;
  rechits[1]=&componentStereo_;
  return rechits;
}
std::vector< const TrackingRecHit * > SiStripMatchedRecHit2D::recHits ( ) const [virtual]

Access to component RecHits (if any)

Reimplemented from RecHit2DLocalPos.

Definition at line 37 of file SiStripMatchedRecHit2D.cc.

References componentMono_, and componentStereo_.

                                     {
  std::vector<const TrackingRecHit*> rechits(2);
  rechits[0]=&componentMono_;
  rechits[1]=&componentStereo_;
  return rechits;
}
bool SiStripMatchedRecHit2D::sharesInput ( const TrackingRecHit other,
SharedInputType  what 
) const [virtual]

Returns true if the two TrackingRecHits are using the same input information (like Digis, Clusters, etc), false otherwise. The second argument specifies how much sharing is needed in order to return true: the value "all" means that all inputs of the two hits must be identical; the value "some" means that at least one of the inputs is in common.

Reimplemented from TrackingRecHit.

Definition at line 14 of file SiStripMatchedRecHit2D.cc.

References TrackingRecHit::all, TrackingRecHit::geographicalId(), monoHit(), SiStripRecHit2D::sharesInput(), SiStripMatchedRecHit2D(), and stereoHit().

{
  if (what==all && (geographicalId() != other->geographicalId())) return false;
  
  if ( typeid(*other)!=typeid(SiStripMatchedRecHit2D)){
    if (what==all)  return false;
    else return (monoHit()->sharesInput( other,what)|| stereoHit()->sharesInput( other,what));
  }
  else{
    const SiStripMatchedRecHit2D* otherMatched = static_cast<const SiStripMatchedRecHit2D*>(other);
    if ( what == all) {
      return (monoHit()->sharesInput( otherMatched->monoHit(),what) && 
              stereoHit()->sharesInput( otherMatched->stereoHit(),what));
    }
    else {
      return (monoHit()->sharesInput( otherMatched->monoHit(),what) || 
              stereoHit()->sharesInput( otherMatched->stereoHit(),what));
    }
  }
}
const SiStripRecHit2D* SiStripMatchedRecHit2D::stereoHit ( ) const [inline]
SiStripRecHit2D* SiStripMatchedRecHit2D::stereoHit ( ) [inline]

Definition at line 18 of file SiStripMatchedRecHit2D.h.

References componentStereo_.

{ return &componentStereo_;}

Member Data Documentation

Definition at line 31 of file SiStripMatchedRecHit2D.h.

Referenced by monoHit(), and recHits().

Definition at line 31 of file SiStripMatchedRecHit2D.h.

Referenced by recHits(), and stereoHit().