CMS 3D CMS Logo

TRecHit2DPosConstraint.h
Go to the documentation of this file.
1 #ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit2DPosConstraint_H
2 #define RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit2DPosConstraint_H
3 
6 
7 class TRecHit2DPosConstraint final : public TrackingRecHit {
8 public:
11 
14 
17 
19 
20  AlgebraicVector parameters() const override {
23  result[0] = lp.x();
24  result[1] = lp.y();
25  return result;
26  }
27 
31  m[0][0] = le.xx();
32  m[0][1] = le.xy();
33  m[1][1] = le.yy();
34  return m;
35  }
36 
37  AlgebraicMatrix projectionMatrix() const override {
40  theProjectionMatrix[0][3] = 1;
41  theProjectionMatrix[1][4] = 1;
42  return theProjectionMatrix;
43  }
44  int dimension() const override { return 2; }
45 
46  LocalPoint localPosition() const override { return pos_; }
47  LocalError localPositionError() const override { return err_; }
48 
49  std::vector<const TrackingRecHit*> recHits() const override { return std::vector<const TrackingRecHit*>(); }
50  std::vector<TrackingRecHit*> recHits() override { return std::vector<TrackingRecHit*>(); }
51 
52  // use position?
53  bool sharesInput(const TrackingRecHit*, SharedInputType) const override { return false; }
54 
55  bool canImproveWithTrack() const override { return false; }
56 
57  virtual RecHitPointer clone(const TrajectoryStateOnSurface& ts) const { return RecHitPointer(clone()); }
58 
59  static RecHitPointer build(const LocalPoint& pos, const LocalError& err, const Surface* surface) {
61  }
62 
63  const Surface* surface() const override { return det() ? &(det()->surface()) : &(*surface_); }
64 
65  GlobalPoint globalPosition() const override { return surface()->toGlobal(localPosition()); }
66  GlobalError globalPositionError() const override {
68  }
69  float errorGlobalR() const override { return std::sqrt(globalPositionError().rerr(globalPosition())); }
70  float errorGlobalZ() const override { return std::sqrt(globalPositionError().czz()); }
71  float errorGlobalRPhi() const override {
72  return globalPosition().perp() * sqrt(globalPositionError().phierr(globalPosition()));
73  }
74 
75 private:
79 
80  TRecHit2DPosConstraint* clone() const override { return new TRecHit2DPosConstraint(*this); }
81 };
82 
83 #endif
SharedInputType
definition of equality via shared input
int dimension() const override
static GlobalError transform(const LocalError &le, const Surface &surf)
T perp() const
Definition: PV3DBase.h:69
static RecHitPointer build(const LocalPoint &pos, const LocalError &err, const Surface *surface)
const Surface * surface() const override
bool canImproveWithTrack() const override
GlobalError globalPositionError() const override
bool sharesInput(const TrackingRecHit *, SharedInputType) const override
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
const GeomDet * det() const
TRecHit2DPosConstraint(const GeomDet &idet, const LocalPoint &pos, const LocalError &err, const Surface *surface)
ConstReferenceCountingPointer< Surface > surface_
float yy() const
Definition: LocalError.h:24
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
TRecHit2DPosConstraint * clone() const override
CLHEP::HepMatrix AlgebraicMatrix
T sqrt(T t)
Definition: SSEVec.h:19
AlgebraicVector parameters() const override
float errorGlobalZ() const override
std::shared_ptr< TrackingRecHit const > RecHitPointer
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
GlobalPoint globalPosition() const override
float xy() const
Definition: LocalError.h:23
CLHEP::HepVector AlgebraicVector
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
AlgebraicMatrix projectionMatrix() const override
LocalError localPositionError() const override
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::vector< TrackingRecHit * > recHits() override
Non-const access to component RecHits (if any)
virtual RecHitPointer clone(const TrajectoryStateOnSurface &ts) const
float errorGlobalRPhi() const override
AlgebraicSymMatrix parametersError() const override
float errorGlobalR() const override
TRecHit2DPosConstraint(const LocalPoint &pos, const LocalError &err, const Surface *surface)
float xx() const
Definition: LocalError.h:22
LocalPoint localPosition() const override