00001 #include "RecoTracker/SiTrackerMRHTools/interface/GenericProjectedRecHit2D.h" 00002 #include "RecoTracker/TransientTrackingRecHit/interface/TSiPixelRecHit.h" 00003 #include "RecoTracker/TransientTrackingRecHit/interface/TSiStripMatchedRecHit.h" 00004 #include "RecoTracker/TransientTrackingRecHit/interface/TSiStripRecHit2DLocalPos.h" 00005 #include "RecoTracker/TransientTrackingRecHit/interface/ProjectedRecHit2D.h" 00006 #include "FWCore/Utilities/interface/Exception.h" 00007 00008 GenericProjectedRecHit2D::GenericProjectedRecHit2D( const LocalPoint& pos, const LocalError& err, 00009 const GeomDet* det, const GeomDet* originalDet, 00010 const TransientTrackingRecHit::ConstRecHitPointer originalHit, 00011 const TrackingRecHitPropagator* propagator) : 00012 TransientTrackingRecHit( det, originalHit->weight(), originalHit->getAnnealingFactor()) 00013 { 00014 theOriginalDet = originalDet; 00015 thePropagator = propagator; 00016 theOriginalTransientHit = originalHit; 00017 theLp = pos; 00018 theLe = err; 00019 theProjectionMatrix = originalHit->projectionMatrix(); 00020 theDimension = originalHit->dimension(); 00021 //theOriginalHit = originalTransientHit.hit()->clone(); 00022 } 00023 00024 AlgebraicVector GenericProjectedRecHit2D::parameters() const{ 00025 AlgebraicVector result(2); 00026 result[0] = theLp.x(); 00027 result[1] = theLp.y(); 00028 return result; 00029 } 00030 00031 TransientTrackingRecHit::RecHitPointer 00032 GenericProjectedRecHit2D::clone( const TrajectoryStateOnSurface& ts) const 00033 { 00034 return thePropagator->project<GenericProjectedRecHit2D>(theOriginalTransientHit, *det(), ts); 00035 } 00036