Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:51

0001 #ifndef InvalidTrackingRecHit_H
0002 #define InvalidTrackingRecHit_H
0003 
0004 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
0005 #include "DataFormats/GeometrySurface/interface/LocalError.h"
0006 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0007 
0008 class InvalidTrackingRecHit : public TrackingRecHit {
0009 public:
0010   typedef TrackingRecHit::Type Type;
0011 
0012   InvalidTrackingRecHit(GeomDet const& idet, Type type) : TrackingRecHit(idet, type) {}
0013   explicit InvalidTrackingRecHit(Type type) : TrackingRecHit(DetId(0), type) {}
0014 
0015   InvalidTrackingRecHit() : TrackingRecHit(DetId(0), TrackingRecHit::missing) {}
0016 
0017   ~InvalidTrackingRecHit() override {}
0018 
0019   InvalidTrackingRecHit* clone() const override { return new InvalidTrackingRecHit(*this); }
0020 #ifndef __GCCXML__
0021   RecHitPointer cloneSH() const override { return RecHitPointer(clone()); }
0022 #endif
0023 
0024   AlgebraicVector parameters() const override;
0025 
0026   AlgebraicSymMatrix parametersError() const override;
0027 
0028   AlgebraicMatrix projectionMatrix() const override;
0029 
0030   int dimension() const override { return 0; }
0031 
0032   LocalPoint localPosition() const override;
0033 
0034   LocalError localPositionError() const override;
0035 
0036   std::vector<const TrackingRecHit*> recHits() const override;
0037 
0038   std::vector<TrackingRecHit*> recHits() override;
0039 
0040   bool sharesInput(const TrackingRecHit* other, SharedInputType what) const override;
0041 
0042 private:
0043   void throwError() const;
0044 };
0045 
0046 class InvalidTrackingRecHitNoDet final : public InvalidTrackingRecHit {
0047 public:
0048   InvalidTrackingRecHitNoDet() {}
0049   InvalidTrackingRecHitNoDet(Surface const& surface, Type type) : InvalidTrackingRecHit(type), m_surface(&surface) {}
0050 
0051   InvalidTrackingRecHitNoDet* clone() const override { return new InvalidTrackingRecHitNoDet(*this); }
0052 
0053   const Surface* surface() const override { return m_surface; }
0054 
0055 private:
0056   Surface const* m_surface;
0057 };
0058 
0059 #endif