CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GenericTransientTrackingRecHit.h
Go to the documentation of this file.
1 #ifndef GenericTransientTrackingRecHit_H
2 #define GenericTransientTrackingRecHit_H
3 
6 
8 public:
10 
12 
13  virtual AlgebraicVector parameters() const override {return trackingRecHit_->parameters();}
14  virtual AlgebraicSymMatrix parametersError() const override {return trackingRecHit_->parametersError();}
15  virtual AlgebraicMatrix projectionMatrix() const override {return trackingRecHit_->projectionMatrix();}
16  virtual int dimension() const override {return trackingRecHit_->dimension();}
17 
18  // virtual void getKfComponents( KfComponentsHolder & holder ) const override { trackingRecHit_->getKfComponents(holder); }
19  // NO, because someone might specialize parametersError, projectionMatrix or parameters in the transient rechit
20  // and in fact this happens for alignment
21 
22  virtual LocalPoint localPosition() const override {return trackingRecHit_->localPosition();}
23  virtual LocalError localPositionError() const override {return trackingRecHit_->localPositionError();}
24 
25  virtual bool canImproveWithTrack() const override {return false;}
26 
27  virtual const TrackingRecHit * hit() const override {return trackingRecHit_;}
28  TrackingRecHit * cloneHit() const override { return hit()->clone();}
29 
30  virtual std::vector<const TrackingRecHit*> recHits() const override {
31  return ((const TrackingRecHit *)(trackingRecHit_))->recHits();
32  }
33  virtual std::vector<TrackingRecHit*> recHits() override {
34  return trackingRecHit_->recHits();
35  }
36 
37  static RecHitPointer build( const GeomDet * geom, const TrackingRecHit * rh) {
38  return RecHitPointer( new GenericTransientTrackingRecHit( *geom, *rh));
39  }
40 
41 protected:
42 
43  // private constructors enforce usage of builders
45  TValidTrackingRecHit(geom,rh) {
46  trackingRecHit_ = rh.clone();
47  }
48 
51  TValidTrackingRecHit(geom,*rh), trackingRecHit_(rh) {}
52 
54  TValidTrackingRecHit( *other.det(),other) {
55  trackingRecHit_ = other.cloneHit();
56  }
57 
59 
60  private:
61 
62  // should not have assignment operator (?)
65  return *(this);
66  }
67 
68  // hide the clone method for ReferenceCounted. Warning: this method is still
69  // accessible via the bas class TrackingRecHit interface!
70  virtual GenericTransientTrackingRecHit * clone() const override {
71  return new GenericTransientTrackingRecHit(*this);
72  }
73 
74 };
75 
76 #endif
77 
virtual AlgebraicVector parameters() const override
virtual int dimension() const =0
GenericTransientTrackingRecHit(const GeomDet &geom, const TrackingRecHit &rh)
virtual AlgebraicSymMatrix parametersError() const override
virtual LocalPoint localPosition() const override
virtual LocalError localPositionError() const override
virtual std::vector< TrackingRecHit * > recHits() override
Non-const access to component RecHits (if any)
virtual std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
virtual AlgebraicVector parameters() const =0
static RecHitPointer build(const GeomDet *geom, const TrackingRecHit *rh)
CLHEP::HepMatrix AlgebraicMatrix
const GeomDet * det() const
GenericTransientTrackingRecHit(const GenericTransientTrackingRecHit &other)
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
virtual GenericTransientTrackingRecHit * clone() const override
GenericTransientTrackingRecHit & operator=(const GenericTransientTrackingRecHit &t)
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual TrackingRecHit * clone() const =0
virtual bool canImproveWithTrack() const override
CLHEP::HepVector AlgebraicVector
virtual LocalError localPositionError() const =0
virtual AlgebraicMatrix projectionMatrix() const =0
TrackingRecHit * cloneHit() const override
virtual AlgebraicMatrix projectionMatrix() const override
virtual const TrackingRecHit * hit() const override
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual LocalPoint localPosition() const =0
GenericTransientTrackingRecHit(const GeomDet &geom, TrackingRecHit *rh)
for derived classes convenience, does not clone!
virtual AlgebraicSymMatrix parametersError() const =0