CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TRecHit5DParamConstraint.h
Go to the documentation of this file.
1 #ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit5DParamConstraint_H
2 #define RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit5DParamConstraint_H
3 
6 
7 class GeomDetUnit;
8 
9 class TRecHit5DParamConstraint GCC11_FINAL : public TransientTrackingRecHit
10 {
11 
12 private:
13 
14  TRecHit5DParamConstraint( const TrajectoryStateOnSurface& tsos ) : tsos_( tsos ) {}
15 
16  TRecHit5DParamConstraint( const TRecHit5DParamConstraint& other ) : tsos_( other.trajectoryState() ) {}
17 
18 public:
19 
21 
22  virtual int dimension() const { return 5; }
23 
26  return projectionMatrix;
27  }
28 
29  virtual AlgebraicVector parameters() const { return asHepVector( tsos_.localParameters().vector() ); }
30 
31  virtual AlgebraicSymMatrix parametersError() const { return asHepMatrix( tsos_.localError().matrix() ); }
32 
33  virtual LocalPoint localPosition() const { return tsos_.localPosition(); }
34 
35  virtual LocalError localPositionError() const { return tsos_.localError().positionError(); }
36 
37  virtual int charge() const { return tsos_.charge(); }
38 
39  virtual bool canImproveWithTrack() const { return false; }
40 
41  virtual const TrackingRecHit* hit() const { return 0; }
42 
43  virtual std::vector<const TrackingRecHit*> recHits() const { return std::vector<const TrackingRecHit*>(); }
44 
45  virtual std::vector<TrackingRecHit*> recHits() { return std::vector<TrackingRecHit*>(); }
46 
47  virtual const GeomDetUnit* detUnit() const { return 0; }
48 
49  virtual const GeomDet* det() const { return 0; }
50 
51  virtual const Surface* surface() const { return &tsos_.surface(); }
52 
54  //return new TRecHit5DParamConstraint( this->trajectoryState() );
55  return new TRecHit5DParamConstraint( tsos );
56  }
57 
59  return RecHitPointer( new TRecHit5DParamConstraint( tsos ) );
60  }
61 
62 private:
63 
65 
66  virtual TRecHit5DParamConstraint* clone() const {
67  return new TRecHit5DParamConstraint( this->trajectoryState() );
68  }
69 
70  const TrajectoryStateOnSurface& trajectoryState() const { return tsos_; }
71 
72 };
73 
74 #endif
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
CLHEP::HepMatrix asHepMatrix(const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
Definition: Migration.h:49
virtual TRecHit5DParamConstraint * clone() const
virtual const GeomDet * det() const
const TrajectoryStateOnSurface & trajectoryState() const
TRecHit5DParamConstraint(const TrajectoryStateOnSurface &tsos)
virtual TransientTrackingRecHit::RecHitPointer clone(const TrajectoryStateOnSurface &tsos) const
CLHEP::HepMatrix AlgebraicMatrix
virtual const TrackingRecHit * hit() const
TRecHit5DParamConstraint(const TRecHit5DParamConstraint &other)
virtual LocalPoint localPosition() const
const TrajectoryStateOnSurface tsos_
virtual int dimension() const
CLHEP::HepVector AlgebraicVector
virtual LocalError localPositionError() const
virtual AlgebraicMatrix projectionMatrix() const
virtual AlgebraicMatrix projectionMatrix() const =0
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
virtual int charge() const
static TransientTrackingRecHit::RecHitPointer build(const TrajectoryStateOnSurface &tsos)
virtual ~TRecHit5DParamConstraint()
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
virtual bool canImproveWithTrack() const
virtual const Surface * surface() const
The surface of the GeometricSearchDet.
CLHEP::HepVector asHepVector(const ROOT::Math::SVector< double, N > &v)
Definition: Migration.h:43
virtual AlgebraicVector parameters() const
virtual AlgebraicSymMatrix parametersError() const
virtual const GeomDetUnit * detUnit() const
Our base class.
Definition: SiPixelRecHit.h:22