CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/RecoTracker/TransientTrackingRecHit/interface/TRecHit5DParamConstraint.h

Go to the documentation of this file.
00001 #ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit5DParamConstraint_H
00002 #define RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit5DParamConstraint_H
00003 
00004 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00005 #include "DataFormats/CLHEP/interface/Migration.h"
00006 
00007 class GeomDetUnit;
00008 
00009 class TRecHit5DParamConstraint GCC11_FINAL : public TransientTrackingRecHit
00010 {
00011 
00012 private:
00013 
00014   TRecHit5DParamConstraint( const TrajectoryStateOnSurface& tsos ) : tsos_( tsos ) {}
00015 
00016   TRecHit5DParamConstraint( const TRecHit5DParamConstraint& other ) : tsos_( other.trajectoryState() ) {}
00017 
00018 public:
00019 
00020   virtual ~TRecHit5DParamConstraint() {}
00021 
00022   virtual int dimension() const { return 5; }
00023 
00024   virtual AlgebraicMatrix projectionMatrix() const {
00025     AlgebraicMatrix projectionMatrix( 5, 5, 1 );
00026     return projectionMatrix;
00027   }
00028 
00029   virtual AlgebraicVector parameters() const { return asHepVector( tsos_.localParameters().vector() ); }
00030 
00031   virtual AlgebraicSymMatrix parametersError() const { return asHepMatrix( tsos_.localError().matrix() ); }
00032 
00033   virtual LocalPoint localPosition() const { return tsos_.localPosition(); }
00034 
00035   virtual LocalError localPositionError() const { return tsos_.localError().positionError(); }
00036 
00037   virtual int charge() const { return tsos_.charge(); }
00038 
00039   virtual bool canImproveWithTrack() const { return false; }
00040 
00041   virtual const TrackingRecHit* hit() const { return 0; }
00042   
00043   virtual std::vector<const TrackingRecHit*> recHits() const { return std::vector<const TrackingRecHit*>(); }
00044 
00045   virtual std::vector<TrackingRecHit*> recHits() { return std::vector<TrackingRecHit*>(); }
00046 
00047   virtual const GeomDetUnit* detUnit() const { return 0; }
00048 
00049   virtual const GeomDet* det() const { return 0; }
00050 
00051   virtual const Surface* surface() const { return &tsos_.surface(); }
00052 
00053   virtual TransientTrackingRecHit::RecHitPointer clone( const TrajectoryStateOnSurface& tsos ) const {
00054     //return new TRecHit5DParamConstraint( this->trajectoryState() );
00055     return new TRecHit5DParamConstraint( tsos );
00056   }
00057 
00058   static TransientTrackingRecHit::RecHitPointer build( const TrajectoryStateOnSurface& tsos ) {
00059     return RecHitPointer( new TRecHit5DParamConstraint( tsos ) );
00060   }
00061 
00062 private:
00063 
00064   const TrajectoryStateOnSurface tsos_;
00065   
00066   virtual TRecHit5DParamConstraint* clone() const {
00067     return new TRecHit5DParamConstraint( this->trajectoryState() );
00068   }
00069 
00070   const TrajectoryStateOnSurface& trajectoryState() const { return tsos_; }
00071 
00072 };
00073 
00074 #endif