ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/IPHCalignment2/RecoTracker/TransientTrackingRecHit/src/TSiStripRecHit2DLocalPos.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
Error occurred while calculating annotation data.
Log Message:
new IPHC alignment

File Contents

# Content
1 #include "RecoTracker/TransientTrackingRecHit/interface/TSiStripRecHit2DLocalPos.h"
2 #include "RecoTracker/TransientTrackingRecHit/interface/TSiStripRecHit1D.h"
3 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
4 #include "DataFormats/SiStripCluster/interface/SiStripCluster.h"
5 #include "RecoLocalTracker/ClusterParameterEstimator/interface/StripClusterParameterEstimator.h"
6
7
8 TransientTrackingRecHit::RecHitPointer
9 TSiStripRecHit2DLocalPos::clone (const TrajectoryStateOnSurface& ts) const
10 {
11 if (theCPE != 0) {
12
13 /// FIXME: this only uses the first cluster and ignores the others
14
15 if(!specificHit()->cluster().isNull()){
16 const SiStripCluster& clust = *specificHit()->cluster();
17 StripClusterParameterEstimator::LocalValues lv =
18 theCPE->localParameters( clust, *detUnit(), ts);
19 return TSiStripRecHit2DLocalPos::build( lv.first, lv.second, det(),
20 specificHit()->cluster(), theCPE, weight(), getAnnealingFactor());
21 }else{
22 const SiStripCluster& clust = *specificHit()->cluster_regional();
23 StripClusterParameterEstimator::LocalValues lv =
24 theCPE->localParameters( clust, *detUnit(), ts);
25 return TSiStripRecHit2DLocalPos::build( lv.first, lv.second, det(),
26 specificHit()->cluster_regional(), theCPE, weight(), getAnnealingFactor());
27 }
28
29 }
30 /// FIXME: should report the problem somehow
31 else return clone();
32 }
33
34 const GeomDetUnit* TSiStripRecHit2DLocalPos::detUnit() const
35 {
36 return static_cast<const GeomDetUnit*>(det());
37 }
38
39 TransientTrackingRecHit::ConstRecHitContainer
40 TSiStripRecHit2DLocalPos::transientHits () const {
41 ConstRecHitContainer result;
42 SiStripRecHit1D hit1d(specificHit());
43 result.push_back(TSiStripRecHit1D::build( det(),&hit1d,
44 cpe()));
45
46 return result;
47 }