CMS 3D CMS Logo

TSiPixelRecHit.h

Go to the documentation of this file.
00001 
00002 #ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_TSiPixelRecHit_H
00003 #define RECOTRACKER_TRANSIENTRACKINGRECHIT_TSiPixelRecHit_H
00004 
00005 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
00006 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00007 #include "RecoLocalTracker/ClusterParameterEstimator/interface/PixelClusterParameterEstimator.h"
00008 #include "TrackingTools/TransientTrackingRecHit/interface/HelpertRecHit2DLocalPos.h"
00009 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00010 
00011 
00012 // class GeomDetUnit;
00013 
00014 class TSiPixelRecHit : public TransientTrackingRecHit {
00015 public:
00016 
00017   typedef SiPixelRecHit::ClusterRef clusterRef;
00018 
00019 
00020   virtual ~TSiPixelRecHit() {}
00021 
00022   virtual AlgebraicVector parameters() const {return theHitData.parameters();}
00023 
00024   virtual AlgebraicSymMatrix parametersError() const {
00025     return HelpertRecHit2DLocalPos().parError( theHitData.localPositionError(), *det()); 
00026     // return theHitData->parametersError();
00027   }
00028 
00029   virtual AlgebraicMatrix projectionMatrix() const {return theHitData.projectionMatrix();}
00030   virtual int dimension() const {return theHitData.dimension();}
00031 
00032   virtual LocalPoint localPosition() const {return theHitData.localPosition();}
00033   virtual LocalError localPositionError() const {return theHitData.localPositionError();}
00034 
00035   virtual void getKfComponents( KfComponentsHolder & holder ) const {
00036       HelpertRecHit2DLocalPos().getKfComponents(holder, theHitData, *det()); 
00037   }
00038 
00039   virtual const TrackingRecHit * hit() const {return &theHitData;};
00040   
00041   virtual std::vector<const TrackingRecHit*> recHits() const {
00042     return hit()->recHits();
00043   }
00044   virtual std::vector<TrackingRecHit*> recHits() {
00045     return theHitData.recHits();
00046   }
00047 
00048   virtual bool canImproveWithTrack() const {return true;}
00049 
00050   //RC  virtual TSiPixelRecHit* clone (const TrajectoryStateOnSurface& ts) const;
00051   virtual RecHitPointer clone (const TrajectoryStateOnSurface& ts) const;
00052 
00053   virtual const GeomDetUnit* detUnit() const;
00054 
00055   // Extension of the TransientTrackingRecHit interface
00056 
00057   const SiPixelRecHit* specificHit() const {return &theHitData;};
00058   const PixelClusterParameterEstimator* cpe() const {return theCPE;}
00059 
00060   static RecHitPointer build( const GeomDet * geom, const SiPixelRecHit* rh, 
00061                               const PixelClusterParameterEstimator* cpe,
00062                               float weight=1., float annealing=1.) {
00063   return RecHitPointer( new TSiPixelRecHit( geom, rh, cpe,weight, annealing));
00064   }
00065 
00066   static RecHitPointer build( const LocalPoint& pos, const LocalError& err,
00067                               const GeomDet* det, 
00068                               clusterRef cluster,
00069                               const PixelClusterParameterEstimator* cpe,
00070                               float weight=1., float annealing=1.) {
00071     return RecHitPointer( new TSiPixelRecHit( pos, err, det, cluster, cpe,weight, annealing));
00072   }
00073 
00074 
00075 private:
00076 
00077   SiPixelRecHit                         theHitData;
00078   const PixelClusterParameterEstimator* theCPE;
00079 
00082   TSiPixelRecHit(const GeomDet * geom, const SiPixelRecHit* rh, 
00083                  const PixelClusterParameterEstimator* cpe,
00084                  float weight, float annealing) : 
00085     TransientTrackingRecHit(geom, *rh, weight, annealing), theHitData(*rh), theCPE(cpe) {}
00086 
00088   TSiPixelRecHit( const LocalPoint& pos, const LocalError& err,
00089                                 const GeomDet* det, 
00090                   //                            const SiPixelCluster& clust,
00091                   clusterRef clust,
00092                   const PixelClusterParameterEstimator* cpe,
00093                   float weight, float annealing) :
00094     TransientTrackingRecHit(det,weight, annealing), 
00095     theHitData( pos, err, det->geographicalId(), clust),
00096     theCPE(cpe)
00097   {}
00098   
00099   //  TSiPixelRecHit( const TSiPixelRecHit& other ) :
00100   //  TransientTrackingRecHit( other.det()), 
00101   //  theHitData( other.specificHit()->clone()),
00102   //  theCPE( other.cpe())  {}
00103 
00104   virtual TSiPixelRecHit * clone() const {
00105     return new TSiPixelRecHit(*this);
00106   }
00107 
00108 };
00109 
00110 
00111 
00112 #endif

Generated on Tue Jun 9 17:46:01 2009 for CMSSW by  doxygen 1.5.4