CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/DataFormats/TrackingRecHit/interface/RecHit2DLocalPos.h

Go to the documentation of this file.
00001 #ifndef RecHit2DLocalPos_H
00002 #define RecHit2DLocalPos_H
00003 
00004 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
00005 #include "DataFormats/GeometrySurface/interface/Plane.h"
00006 #include "DataFormats/GeometrySurface/interface/LocalError.h"
00007 
00008 class RecHit2DLocalPos : public TrackingRecHit {
00009 public:
00010 
00011   typedef Surface::LocalPoint LocalPoint;
00012   
00013   RecHit2DLocalPos(DetId id) : TrackingRecHit(id) {}
00014   RecHit2DLocalPos(TrackingRecHit::id_type id=0) : TrackingRecHit(id) {}
00015   virtual ~RecHit2DLocalPos() {}
00016   
00017   virtual RecHit2DLocalPos * clone() const = 0;
00018   
00019   virtual AlgebraicVector parameters() const;
00020 
00021   virtual AlgebraicSymMatrix parametersError() const;
00022 
00023   virtual AlgebraicMatrix projectionMatrix() const {
00024     if ( !isInitialized) initialize();
00025     return theProjectionMatrix;
00026   }
00027 
00028   virtual int dimension() const { return 2;}
00029 
00030   virtual LocalPoint localPosition() const = 0;
00031 
00032   virtual LocalError localPositionError() const = 0;
00033 
00034   virtual std::vector<const TrackingRecHit*> recHits() const;
00035 
00036   virtual std::vector<TrackingRecHit*> recHits();
00037 
00038 private:
00039 
00040   static bool isInitialized;
00041 
00042   static AlgebraicMatrix theProjectionMatrix;
00043 
00044   void initialize() const;
00045 
00046 };
00047 
00048 #endif