CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/RecoTracker/SiTrackerMRHTools/interface/GenericProjectedRecHit2D.h

Go to the documentation of this file.
00001 #ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_GenericProjectedRecHit2D_H
00002 #define RECOTRACKER_TRANSIENTRACKINGRECHIT_GenericProjectedRecHit2D_H
00003 
00004 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00005 #include "TrackingTools/TransientTrackingRecHit/interface/HelpertRecHit2DLocalPos.h"
00006 #include "TrackingTools/KalmanUpdators/interface/TrackingRecHitPropagator.h"
00007 
00008 class GenericProjectedRecHit2D : public TransientTrackingRecHit {
00009 public:
00010 
00011   virtual AlgebraicSymMatrix parametersError() const {
00012     return HelpertRecHit2DLocalPos().parError( localPositionError(), *det()); 
00013   }
00014 
00015   //virtual ~GenericProjectedRecHit2D(){delete theOriginalTransientHit;}
00016 
00017   virtual AlgebraicVector parameters() const ;
00018 
00019   virtual LocalPoint localPosition() const {return theLp;}
00020 
00021   virtual LocalError localPositionError() const {return theLe;}  
00022 
00023   virtual AlgebraicMatrix projectionMatrix() const {return theProjectionMatrix;}        
00024 
00025   virtual DetId geographicalId() const {return det() ? det()->geographicalId() : DetId();}
00026 
00027   virtual int dimension() const {return theDimension;}
00028 
00029   //this hit lays on the original surface, NOT on the projection surface
00030   virtual const TrackingRecHit * hit() const {return theOriginalTransientHit->hit();};  
00031 
00032   virtual bool isValid() const{return true;}
00033 
00034   virtual std::vector<const TrackingRecHit*> recHits() const {
00035         //return theOriginalTransientHit->hit()->recHits();
00036         return std::vector<const TrackingRecHit*>();
00037   }
00038 
00039   virtual std::vector<TrackingRecHit*> recHits() {
00040         //should it do something different?
00041         return std::vector<TrackingRecHit*>();
00042   }
00043 
00044   const TrackingRecHitPropagator* propagator() const {return thePropagator;}
00045 
00046   virtual bool canImproveWithTrack() const {return true;} 
00047    
00048   const GeomDet* originalDet() const {return theOriginalDet;}
00049 
00050   static RecHitPointer build( const LocalPoint& pos, const LocalError& err, 
00051                               const GeomDet* det, const GeomDet* originaldet,
00052                               const TransientTrackingRecHit::ConstRecHitPointer originalHit,
00053                               const TrackingRecHitPropagator* propagator) {
00054     return RecHitPointer( new GenericProjectedRecHit2D( pos, err, det, originaldet, originalHit, propagator));
00055   }
00056 
00057   RecHitPointer clone( const TrajectoryStateOnSurface& ts) const;
00058 
00059 private:
00060 
00061   const GeomDet* theOriginalDet;
00062   TransientTrackingRecHit::ConstRecHitPointer theOriginalTransientHit; 
00063   LocalPoint theLp;
00064   LocalError theLe;
00065   AlgebraicMatrix theProjectionMatrix;
00066   const TrackingRecHitPropagator* thePropagator;         
00067   //const TrackingRecHit* theOriginalHit;
00068   int theDimension; 
00069 
00070   GenericProjectedRecHit2D( const LocalPoint& pos, const LocalError& err,
00071                      const GeomDet* det, const GeomDet* originaldet, 
00072                      const TransientTrackingRecHit::ConstRecHitPointer originalHit,
00073                      const TrackingRecHitPropagator* propagator);
00074 
00075   virtual GenericProjectedRecHit2D* clone() const {
00076     return new GenericProjectedRecHit2D(*this);
00077   }
00078 
00079 };
00080 
00081 
00082 
00083 #endif