ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/IPHCalignment2/RecoTracker/TransientTrackingRecHit/interface/TSiPixelRecHit.h
Revision: 1.1
Committed: Fri Nov 25 17:05:34 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
2     #ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_TSiPixelRecHit_H
3     #define RECOTRACKER_TRANSIENTRACKINGRECHIT_TSiPixelRecHit_H
4    
5     #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
6     #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
7     #include "RecoLocalTracker/ClusterParameterEstimator/interface/PixelClusterParameterEstimator.h"
8     #include "TrackingTools/TransientTrackingRecHit/interface/HelpertRecHit2DLocalPos.h"
9     #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
10     #include "FWCore/MessageLogger/interface/MessageLogger.h"
11    
12     // class GeomDetUnit;
13    
14     class TSiPixelRecHit : public TransientTrackingRecHit {
15     public:
16    
17     typedef SiPixelRecHit::ClusterRef clusterRef;
18    
19    
20     virtual ~TSiPixelRecHit() {}
21    
22     virtual AlgebraicVector parameters() const {return theHitData.parameters();}
23    
24     virtual AlgebraicSymMatrix parametersError() const {
25     return HelpertRecHit2DLocalPos().parError( theHitData.localPositionError(), *det());
26     // return theHitData->parametersError();
27     }
28    
29     virtual AlgebraicMatrix projectionMatrix() const {return theHitData.projectionMatrix();}
30     virtual int dimension() const {return theHitData.dimension();}
31    
32     virtual LocalPoint localPosition() const {return theHitData.localPosition();}
33     virtual LocalError localPositionError() const {return theHitData.localPositionError();}
34    
35     virtual void getKfComponents( KfComponentsHolder & holder ) const {
36     HelpertRecHit2DLocalPos().getKfComponents(holder, theHitData, *det());
37     }
38    
39     virtual const TrackingRecHit * hit() const {return &theHitData;};
40    
41     virtual std::vector<const TrackingRecHit*> recHits() const {
42     return hit()->recHits();
43     }
44     virtual std::vector<TrackingRecHit*> recHits() {
45     return theHitData.recHits();
46     }
47    
48     virtual bool canImproveWithTrack() const {return true;}
49    
50     //RC virtual TSiPixelRecHit* clone (const TrajectoryStateOnSurface& ts) const;
51     virtual RecHitPointer clone (const TrajectoryStateOnSurface& ts) const;
52    
53     virtual const GeomDetUnit* detUnit() const;
54    
55     // Extension of the TransientTrackingRecHit interface
56    
57     const SiPixelRecHit* specificHit() const {return &theHitData;};
58     const PixelClusterParameterEstimator* cpe() const {return theCPE;}
59    
60     static RecHitPointer build( const GeomDet * geom, const SiPixelRecHit* rh,
61     const PixelClusterParameterEstimator* cpe,
62     float weight=1., float annealing=1.,
63     bool computeCoarseLocalPosition=false) {
64     return RecHitPointer( new TSiPixelRecHit( geom, rh, cpe,weight, annealing, computeCoarseLocalPosition));
65     }
66    
67     static RecHitPointer build( const LocalPoint& pos, const LocalError& err,
68     const GeomDet* det,
69     clusterRef cluster,
70     const PixelClusterParameterEstimator* cpe,
71     float weight=1., float annealing=1.) {
72     return RecHitPointer( new TSiPixelRecHit( pos, err, det, cluster, cpe,weight, annealing));
73     }
74    
75    
76     //! Probability of the compatibility of the track with the pixel cluster shape.
77     virtual float clusterProbability() const {
78     return theHitData.clusterProbability( theClusterProbComputationFlag );
79     }
80    
81    
82    
83     private:
84    
85     SiPixelRecHit theHitData;
86     const PixelClusterParameterEstimator* theCPE;
87     unsigned int theClusterProbComputationFlag;
88    
89     /// This private constructor copies the TrackingRecHit. It should be used when the
90     /// TrackingRecHit exist already in some collection.
91     TSiPixelRecHit(const GeomDet * geom, const SiPixelRecHit* rh,
92     const PixelClusterParameterEstimator* cpe,
93     float weight, float annealing,
94     bool computeCoarseLocalPosition);
95    
96    
97    
98     /// Another private constructor. It creates the TrackingRecHit internally,
99     /// avoiding redundent cloning.
100     TSiPixelRecHit( const LocalPoint& pos, const LocalError& err,
101     const GeomDet* det,
102     // const SiPixelCluster& clust,
103     clusterRef clust,
104     const PixelClusterParameterEstimator* cpe,
105     float weight, float annealing);
106    
107    
108    
109     // TSiPixelRecHit( const TSiPixelRecHit& other ) :
110     // TransientTrackingRecHit( other.det()),
111     // theHitData( other.specificHit()->clone()),
112     // theCPE( other.cpe()) {}
113    
114     virtual TSiPixelRecHit * clone() const {
115     return new TSiPixelRecHit(*this);
116     }
117    
118     };
119    
120    
121    
122     #endif