CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/RecoTracker/TransientTrackingRecHit/src/TSiStripRecHit2DLocalPos.cc

Go to the documentation of this file.
00001 #include "RecoTracker/TransientTrackingRecHit/interface/TSiStripRecHit2DLocalPos.h"
00002 #include "RecoTracker/TransientTrackingRecHit/interface/TSiStripRecHit1D.h"
00003 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00004 #include "DataFormats/SiStripCluster/interface/SiStripCluster.h"
00005 #include "RecoLocalTracker/ClusterParameterEstimator/interface/StripClusterParameterEstimator.h"
00006 
00007 
00008 TransientTrackingRecHit::RecHitPointer
00009 TSiStripRecHit2DLocalPos::clone (const TrajectoryStateOnSurface& ts) const
00010 {
00011   if (theCPE != 0) {
00012     
00014     const SiStripCluster&  clust = specificHit()->stripCluster();  
00015     StripClusterParameterEstimator::LocalValues lv = 
00016       theCPE->localParameters( clust, *detUnit(), ts);
00017     return TSiStripRecHit2DLocalPos::build( lv.first, lv.second, det(), specificHit()->omniClusterRef(), theCPE);                                           
00018   }
00020   else return clone();
00021 }
00022 
00023 const GeomDetUnit* TSiStripRecHit2DLocalPos::detUnit() const
00024 {
00025   return static_cast<const GeomDetUnit*>(det());
00026 }
00027 
00028 TransientTrackingRecHit::ConstRecHitContainer   
00029 TSiStripRecHit2DLocalPos::transientHits () const {
00030   ConstRecHitContainer result;
00031   SiStripRecHit1D hit1d(specificHit());
00032   result.push_back(TSiStripRecHit1D::build( det(),&hit1d,
00033                                             cpe()));
00034   
00035   return result;
00036 }