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
TRecHit2DPosConstraint
Definition: TRecHit2DPosConstraint.h:7
TRecHit2DPosConstraint::pos_
const LocalPoint pos_
Definition: TRecHit2DPosConstraint.h:76
GeomDet
Definition: GeomDet.h:27
LocalError::xy
float xy() const
Definition: LocalError.h:23
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
TRecHit2DPosConstraint::parametersError
AlgebraicSymMatrix parametersError() const override
Definition: TRecHit2DPosConstraint.h:28
TRecHit2DPosConstraint::dimension
int dimension() const override
Definition: TRecHit2DPosConstraint.h:44
TrackingRecHit::det
const GeomDet * det() const
Definition: TrackingRecHit.h:122
pos
Definition: PixelAliasList.h:18
TRecHit2DPosConstraint::recHits
std::vector< TrackingRecHit * > recHits() override
Non-const access to component RecHits (if any)
Definition: TRecHit2DPosConstraint.h:50
ConstReferenceCountingPointer< Surface >
TRecHit2DPosConstraint::clone
virtual RecHitPointer clone(const TrajectoryStateOnSurface &ts) const
Definition: TRecHit2DPosConstraint.h:57
Surface
Definition: Surface.h:36
TRecHit2DPosConstraint::errorGlobalRPhi
float errorGlobalRPhi() const override
Definition: TRecHit2DPosConstraint.h:71
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: TrackingRecHit.h:24
TRecHit2DPosConstraint::globalPositionError
GlobalError globalPositionError() const override
Definition: TRecHit2DPosConstraint.h:66
TRecHit2DPosConstraint::sharesInput
bool sharesInput(const TrackingRecHit *, SharedInputType) const override
Definition: TRecHit2DPosConstraint.h:53
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
TrackingRecHit::SharedInputType
SharedInputType
definition of equality via shared input
Definition: TrackingRecHit.h:59
ErrorFrameTransformer
Definition: ErrorFrameTransformer.h:12
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
LocalError::xx
float xx() const
Definition: LocalError.h:22
TRecHit2DPosConstraint::clone
TRecHit2DPosConstraint * clone() const override
Definition: TRecHit2DPosConstraint.h:80
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
TRecHit2DPosConstraint::projectionMatrix
AlgebraicMatrix projectionMatrix() const override
Definition: TRecHit2DPosConstraint.h:37
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
TRecHit2DPosConstraint::parameters
AlgebraicVector parameters() const override
Definition: TRecHit2DPosConstraint.h:20
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
TRecHit2DPosConstraint::errorGlobalZ
float errorGlobalZ() const override
Definition: TRecHit2DPosConstraint.h:70
trackingPlots.other
other
Definition: trackingPlots.py:1460
Point3DBase< float, LocalTag >
TRecHit2DPosConstraint::recHits
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: TRecHit2DPosConstraint.h:49
TRecHit2DPosConstraint::errorGlobalR
float errorGlobalR() const override
Definition: TRecHit2DPosConstraint.h:69
TRecHit2DPosConstraint::canImproveWithTrack
bool canImproveWithTrack() const override
Definition: TRecHit2DPosConstraint.h:55
LocalError
Definition: LocalError.h:12
TRecHit2DPosConstraint::TRecHit2DPosConstraint
TRecHit2DPosConstraint(const LocalPoint &pos, const LocalError &err, const Surface *surface)
Definition: TRecHit2DPosConstraint.h:9
TRecHit2DPosConstraint::localPosition
LocalPoint localPosition() const override
Definition: TRecHit2DPosConstraint.h:46
TRecHit2DPosConstraint::globalPosition
GlobalPoint globalPosition() const override
Definition: TRecHit2DPosConstraint.h:65
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
createfilelist.int
int
Definition: createfilelist.py:10
TRecHit2DPosConstraint::surface_
ConstReferenceCountingPointer< Surface > surface_
Definition: TRecHit2DPosConstraint.h:78
trackerHitRTTI.h
GlobalErrorBase< double, ErrorMatrixTag >
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
TRecHit2DPosConstraint::err_
const LocalError err_
Definition: TRecHit2DPosConstraint.h:77
TrackingRecHit
Definition: TrackingRecHit.h:21
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
TRecHit2DPosConstraint::build
static RecHitPointer build(const LocalPoint &pos, const LocalError &err, const Surface *surface)
Definition: TRecHit2DPosConstraint.h:59
ErrorFrameTransformer.h
TRecHit2DPosConstraint::~TRecHit2DPosConstraint
~TRecHit2DPosConstraint() override
Definition: TRecHit2DPosConstraint.h:18
TRecHit2DPosConstraint::localPositionError
LocalError localPositionError() const override
Definition: TRecHit2DPosConstraint.h:47
theProjectionMatrix
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
mps_fire.result
result
Definition: mps_fire.py:311
ErrorFrameTransformer::transform
static GlobalError transform(const LocalError &le, const Surface &surf)
Definition: ErrorFrameTransformer.h:16
trackerHitRTTI::notFromCluster
Definition: trackerHitRTTI.h:19
trackerHitRTTI
Definition: trackerHitRTTI.h:6
TRecHit2DPosConstraint::surface
const Surface * surface() const override
Definition: TRecHit2DPosConstraint.h:63
LocalError::yy
float yy() const
Definition: LocalError.h:24
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
TRecHit2DPosConstraint::TRecHit2DPosConstraint
TRecHit2DPosConstraint(const GeomDet &idet, const LocalPoint &pos, const LocalError &err, const Surface *surface)
Definition: TRecHit2DPosConstraint.h:12