CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/DataFormats/TrackerRecHit2D/interface/BaseSiTrackerRecHit2DLocalPos.h

Go to the documentation of this file.
00001 #ifndef BaseSiTrackerRecHit2DLocalPos_H
00002 #define BaseSiTrackerRecHit2DLocalPos_H
00003 
00004 #include "DataFormats/TrackingRecHit/interface/RecHit2DLocalPos.h"
00005 #include "DataFormats/GeometrySurface/interface/LocalError.h"
00006 #include "DataFormats/DetId/interface/DetId.h"
00007 
00008 class BaseSiTrackerRecHit2DLocalPos : public RecHit2DLocalPos {
00009 public:
00010 
00011   BaseSiTrackerRecHit2DLocalPos(): RecHit2DLocalPos(0) {}
00012 
00013   ~BaseSiTrackerRecHit2DLocalPos() {}
00014 
00015   BaseSiTrackerRecHit2DLocalPos( const LocalPoint& p, const LocalError&e,
00016                                  DetId id) :  RecHit2DLocalPos(id), pos_(p), err_(e){}
00017 
00018   //  virtual BaseSiTrackerRecHit2DLocalPos * clone() const {return new BaseSiTrackerRecHit2DLocalPos( * this); }
00019 
00020   virtual LocalPoint localPosition() const ;
00021 
00022   virtual LocalError localPositionError() const ;
00023 
00024   bool hasPositionAndError() const ; 
00025  
00026   virtual void getKfComponents( KfComponentsHolder & holder ) const ; 
00027 
00028   const LocalPoint & localPositionFast()      const { return pos_; }
00029   const LocalError & localPositionErrorFast() const { return err_; }
00030 
00031  private:
00032 
00033   void throwExceptionUninitialized(const char *where) const;
00034   
00035   LocalPoint pos_;
00036   LocalError err_;
00037 };
00038 
00039 // Comparison operators
00040 inline bool operator<( const BaseSiTrackerRecHit2DLocalPos& one, const BaseSiTrackerRecHit2DLocalPos& other) {
00041   return ( one.geographicalId() < other.geographicalId() );
00042 }
00043 
00044 #endif