CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/RecoTracker/TransientTrackingRecHit/src/TSiStripRecHit1D.cc

Go to the documentation of this file.
00001 #include "RecoTracker/TransientTrackingRecHit/interface/TSiStripRecHit1D.h"
00002 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00003 #include "DataFormats/SiStripCluster/interface/SiStripCluster.h"
00004 #include "RecoLocalTracker/ClusterParameterEstimator/interface/StripClusterParameterEstimator.h"
00005 
00006 
00007 TransientTrackingRecHit::RecHitPointer
00008 TSiStripRecHit1D::clone (const TrajectoryStateOnSurface& ts) const
00009 {
00010   if (theCPE != 0) {
00011 
00013 
00014      if(!specificHit()->cluster().isNull()){
00015        const SiStripCluster&  clust = *specificHit()->cluster();  
00016        StripClusterParameterEstimator::LocalValues lv = 
00017          theCPE->localParameters( clust, *detUnit(), ts);
00018        LocalError le(lv.second.xx(),0.,DBL_MAX); //Correct??
00019 
00020        return TSiStripRecHit1D::build( lv.first, le, det(), 
00021                                        specificHit()->cluster(), theCPE, weight(), getAnnealingFactor());
00022      }else{
00023        const SiStripCluster&  clust = *specificHit()->cluster_regional();  
00024        StripClusterParameterEstimator::LocalValues lv = 
00025          theCPE->localParameters( clust, *detUnit(), ts);
00026        LocalError le(lv.second.xx(),0.,DBL_MAX); //Correct??
00027        return TSiStripRecHit1D::build( lv.first, le, det(), 
00028                                        specificHit()->cluster_regional(), theCPE, weight(), getAnnealingFactor());       
00029      }
00030 
00031   }
00032   else {
00033     //FIXME. It should report the problem with a LogWarning;
00034     return clone();
00035   }
00036 }
00037 
00038 const GeomDetUnit* TSiStripRecHit1D::detUnit() const
00039 {
00040   return static_cast<const GeomDetUnit*>(det());
00041 }