CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DataFormats/TrackerRecHit2D/interface/ProjectedSiStripRecHit2D.h

Go to the documentation of this file.
00001 #ifndef ProjectedSiStripRecHit2D_H
00002 #define ProjectedSiStripRecHit2D_H
00003 
00004 #include "DataFormats/TrackerRecHit2D/interface/BaseSiTrackerRecHit2DLocalPos.h"
00005 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h"
00006 
00007 class ProjectedSiStripRecHit2D : public BaseSiTrackerRecHit2DLocalPos {
00008 public:
00009 
00010   ProjectedSiStripRecHit2D() {};
00011   ProjectedSiStripRecHit2D( const LocalPoint& pos, const LocalError& err, const DetId& id , 
00012                             const SiStripRecHit2D* originalHit) :
00013     BaseSiTrackerRecHit2DLocalPos(pos, err, id), originalHit_(*originalHit) {}
00014     
00015   virtual ProjectedSiStripRecHit2D* clone() const {return new ProjectedSiStripRecHit2D( *this); }
00016 
00017   const SiStripRecHit2D& originalHit() const {return originalHit_;}
00018   SiStripRecHit2D& originalHit() {return originalHit_;}
00019 
00020   virtual bool sharesInput( const TrackingRecHit* other, SharedInputType what) const {
00021     return originalHit().sharesInput(other,what);
00022   }
00023   virtual std::vector<const TrackingRecHit*> recHits() const{
00024     std::vector<const TrackingRecHit*> rechits(1,&originalHit_);
00025     return rechits;
00026   }
00027   virtual std::vector<TrackingRecHit*> recHits() {
00028     std::vector<TrackingRecHit*> rechits(1,&originalHit_);
00029     return rechits;
00030   }
00031 
00032 
00033 private:
00034 
00035   SiStripRecHit2D originalHit_;
00036 
00037 };
00038 
00039 #endif