ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/IPHCalignment2/RecoTracker/TransientTrackingRecHit/src/TSiStripRecHit1D.cc
Revision: 1.1
Committed: Fri Nov 25 17:05:36 2011 UTC (13 years, 5 months ago) by econte
Content type: text/plain
Branch: MAIN
CVS Tags: TBD2011, TBD_2011, HEAD
Log Message:
new IPHC alignment

File Contents

# User Rev Content
1 econte 1.1 #include "RecoTracker/TransientTrackingRecHit/interface/TSiStripRecHit1D.h"
2     #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
3     #include "DataFormats/SiStripCluster/interface/SiStripCluster.h"
4     #include "RecoLocalTracker/ClusterParameterEstimator/interface/StripClusterParameterEstimator.h"
5    
6    
7     TransientTrackingRecHit::RecHitPointer
8     TSiStripRecHit1D::clone (const TrajectoryStateOnSurface& ts) const
9     {
10     if (theCPE != 0) {
11    
12     /// FIXME: this only uses the first cluster and ignores the others
13    
14     if(!specificHit()->cluster().isNull()){
15     const SiStripCluster& clust = *specificHit()->cluster();
16     StripClusterParameterEstimator::LocalValues lv =
17     theCPE->localParameters( clust, *detUnit(), ts);
18     LocalError le(lv.second.xx(),0.,DBL_MAX); //Correct??
19    
20     return TSiStripRecHit1D::build( lv.first, le, det(),
21     specificHit()->cluster(), theCPE, weight(), getAnnealingFactor());
22     }else{
23     const SiStripCluster& clust = *specificHit()->cluster_regional();
24     StripClusterParameterEstimator::LocalValues lv =
25     theCPE->localParameters( clust, *detUnit(), ts);
26     LocalError le(lv.second.xx(),0.,DBL_MAX); //Correct??
27     return TSiStripRecHit1D::build( lv.first, le, det(),
28     specificHit()->cluster_regional(), theCPE, weight(), getAnnealingFactor());
29     }
30    
31     }
32     else {
33     //FIXME. It should report the problem with a LogWarning;
34     return clone();
35     }
36     }
37    
38     const GeomDetUnit* TSiStripRecHit1D::detUnit() const
39     {
40     return static_cast<const GeomDetUnit*>(det());
41     }