CMS 3D CMS Logo

TRecHit5DParamConstraint.h
Go to the documentation of this file.
1 #ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit5DParamConstraint_H
2 #define RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit5DParamConstraint_H
3 
7 
8 
9 
11 
12 private:
13 
15 
17 
18 public:
19 
21 
22  int dimension() const override { return 5; }
23 
24  AlgebraicMatrix projectionMatrix() const override {
26  return projectionMatrix;
27  }
28 
29  AlgebraicVector parameters() const override { return asHepVector( tsos_.localParameters().vector() ); }
30 
32 
33  LocalPoint localPosition() const override { return tsos_.localPosition(); }
34 
35  LocalError localPositionError() const override { return tsos_.localError().positionError(); }
36 
37  virtual int charge() const { return tsos_.charge(); }
38 
39  bool canImproveWithTrack() const override { return false; }
40 
41  const TrackingRecHit* hit() const override { return nullptr; }
42  TrackingRecHit * cloneHit() const override { return nullptr;}
43 
44  std::vector<const TrackingRecHit*> recHits() const override { return std::vector<const TrackingRecHit*>(); }
45  std::vector<TrackingRecHit*> recHits() override { return std::vector<TrackingRecHit*>(); }
46  bool sharesInput( const TrackingRecHit*, SharedInputType) const override { return false;}
47 
48 
49  const GeomDetUnit* detUnit() const override { return nullptr; }
50 
51  virtual const GeomDet* det() const { return nullptr; }
52 
53  const Surface* surface() const override { return &tsos_.surface(); }
54 
55  GlobalPoint globalPosition() const override { return surface()->toGlobal(localPosition());}
57  float errorGlobalR() const override { return std::sqrt(globalPositionError().rerr(globalPosition()));}
58  float errorGlobalZ() const override { return std::sqrt(globalPositionError().czz()); }
59  float errorGlobalRPhi() const override { return globalPosition().perp()*sqrt(globalPositionError().phierr(globalPosition())); }
60 
61 
63  //return new TRecHit5DParamConstraint( this->trajectoryState() );
64  return RecHitPointer(new TRecHit5DParamConstraint( tsos ));
65  }
66 
68  return RecHitPointer( new TRecHit5DParamConstraint( tsos ) );
69  }
70 
71 private:
72 
74 
75  TRecHit5DParamConstraint* clone() const override {
76  return new TRecHit5DParamConstraint( this->trajectoryState() );
77  }
78 
79  const TrajectoryStateOnSurface& trajectoryState() const { return tsos_; }
80 
81 };
82 
83 #endif
SharedInputType
definition of equality via shared input
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
static GlobalError transform(const LocalError &le, const Surface &surf)
CLHEP::HepMatrix asHepMatrix(const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
Definition: Migration.h:54
T perp() const
Definition: PV3DBase.h:72
const LocalTrajectoryParameters & localParameters() const
bool canImproveWithTrack() const override
GlobalError globalPositionError() const override
GlobalPoint globalPosition() const override
const TrackingRecHit * hit() const override
float errorGlobalRPhi() const override
TRecHit5DParamConstraint(const TrajectoryStateOnSurface &tsos)
LocalError positionError() const
TrackingRecHit * cloneHit() const override
TRecHit5DParamConstraint * clone() const override
TRecHit5DParamConstraint(const TRecHit5DParamConstraint &other)
AlgebraicVector5 vector() const
LocalError localPositionError() const override
const SurfaceType & surface() const
CLHEP::HepMatrix AlgebraicMatrix
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
T sqrt(T t)
Definition: SSEVec.h:18
const GeomDetUnit * detUnit() const override
static TransientTrackingRecHit::RecHitPointer build(const TrajectoryStateOnSurface &tsos)
virtual const GeomDet * det() const
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
const TrajectoryStateOnSurface & trajectoryState() const
std::shared_ptr< TrackingRecHit const > RecHitPointer
AlgebraicMatrix projectionMatrix() const override
CLHEP::HepVector AlgebraicVector
LocalPoint localPosition() const override
AlgebraicSymMatrix parametersError() const override
AlgebraicVector parameters() const override
const Surface * surface() const override
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual TransientTrackingRecHit::RecHitPointer clone(const TrajectoryStateOnSurface &tsos) const
const TrajectoryStateOnSurface tsos_
bool sharesInput(const TrackingRecHit *, SharedInputType) const override
CLHEP::HepVector asHepVector(const ROOT::Math::SVector< double, N > &v)
Definition: Migration.h:48
std::vector< TrackingRecHit * > recHits() override
Non-const access to component RecHits (if any)
float errorGlobalR() const override
float errorGlobalZ() const override