CMS 3D CMS Logo

CMSSW_4_4_3_patch1/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 
00015      if(!specificHit()->cluster().isNull()){
00016        const SiStripCluster&  clust = *specificHit()->cluster();  
00017            StripClusterParameterEstimator::LocalValues lv = 
00018       theCPE->localParameters( clust, *detUnit(), ts);
00019            return TSiStripRecHit2DLocalPos::build( lv.first, lv.second, det(), 
00020                                                    specificHit()->cluster(), theCPE, weight(), getAnnealingFactor());
00021      }else{
00022        const SiStripCluster&  clust = *specificHit()->cluster_regional();  
00023        StripClusterParameterEstimator::LocalValues lv = 
00024          theCPE->localParameters( clust, *detUnit(), ts);
00025        return TSiStripRecHit2DLocalPos::build( lv.first, lv.second, det(), 
00026                                                specificHit()->cluster_regional(), theCPE, weight(), getAnnealingFactor());       
00027      }
00028 
00029   }
00031   else return clone();
00032 }
00033 
00034 const GeomDetUnit* TSiStripRecHit2DLocalPos::detUnit() const
00035 {
00036   return static_cast<const GeomDetUnit*>(det());
00037 }
00038 
00039 TransientTrackingRecHit::ConstRecHitContainer   
00040 TSiStripRecHit2DLocalPos::transientHits () const {
00041   ConstRecHitContainer result;
00042   SiStripRecHit1D hit1d(specificHit());
00043   result.push_back(TSiStripRecHit1D::build( det(),&hit1d,
00044                                             cpe()));
00045 
00046   return result;
00047 }