File indexing completed on 2024-04-06 12:28:43
0001 #ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_GenericProjectedRecHit2D_H
0002 #define RECOTRACKER_TRANSIENTRACKINGRECHIT_GenericProjectedRecHit2D_H
0003
0004 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
0005 #include "TrackingTools/TransientTrackingRecHit/interface/HelpertRecHit2DLocalPos.h"
0006 #include "TrackingTools/KalmanUpdators/interface/TrackingRecHitPropagator.h"
0007
0008 class GenericProjectedRecHit2D : public TransientTrackingRecHit {
0009 public:
0010 GenericProjectedRecHit2D(const LocalPoint& pos,
0011 const LocalError& err,
0012 const GeomDet* det,
0013 const GeomDet* originaldet,
0014 const TransientTrackingRecHit::ConstRecHitPointer originalHit,
0015 const TrackingRecHitPropagator* propagator);
0016
0017 AlgebraicSymMatrix parametersError() const override {
0018 return HelpertRecHit2DLocalPos().parError(localPositionError(), *det());
0019 }
0020
0021
0022
0023 AlgebraicVector parameters() const override;
0024
0025 LocalPoint localPosition() const override { return theLp; }
0026
0027 LocalError localPositionError() const override { return theLe; }
0028
0029 AlgebraicMatrix projectionMatrix() const override { return theProjectionMatrix; }
0030
0031 virtual DetId geographicalId() const { return det() ? det()->geographicalId() : DetId(); }
0032
0033 int dimension() const override { return theDimension; }
0034
0035
0036 const TrackingRecHit* hit() const override { return theOriginalTransientHit->hit(); }
0037
0038 TrackingRecHit* cloneHit() const override { return theOriginalTransientHit->cloneHit(); }
0039
0040 virtual bool isValid() const { return true; }
0041
0042 std::vector<const TrackingRecHit*> recHits() const override {
0043
0044 return std::vector<const TrackingRecHit*>();
0045 }
0046
0047 std::vector<TrackingRecHit*> recHits() override {
0048
0049 return std::vector<TrackingRecHit*>();
0050 }
0051
0052 const TrackingRecHitPropagator* propagator() const { return thePropagator; }
0053
0054 bool canImproveWithTrack() const override { return true; }
0055
0056 const GeomDet* originalDet() const { return theOriginalDet; }
0057
0058 static RecHitPointer build(const LocalPoint& pos,
0059 const LocalError& err,
0060 const GeomDet* det,
0061 const GeomDet* originaldet,
0062 const TransientTrackingRecHit::ConstRecHitPointer originalHit,
0063 const TrackingRecHitPropagator* propagator) {
0064 return RecHitPointer(new GenericProjectedRecHit2D(pos, err, det, originaldet, originalHit, propagator));
0065 }
0066
0067 RecHitPointer clone(const TrajectoryStateOnSurface& ts, const TransientTrackingRecHitBuilder*) const;
0068
0069 private:
0070 const GeomDet* theOriginalDet;
0071 TransientTrackingRecHit::ConstRecHitPointer theOriginalTransientHit;
0072 LocalPoint theLp;
0073 LocalError theLe;
0074 AlgebraicMatrix theProjectionMatrix;
0075 const TrackingRecHitPropagator* thePropagator;
0076
0077 int theDimension;
0078
0079 GenericProjectedRecHit2D* clone() const override { return new GenericProjectedRecHit2D(*this); }
0080 };
0081
0082 #endif