CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 GeomDetUnit;
8 
10 public:
11 
13 
14  virtual AlgebraicVector parameters() const {
17  result[0] = lp.x();
18  result[1] = lp.y();
19  return result;
20  }
21 
25  m[0][0] = le.xx();
26  m[0][1] = le.xy();
27  m[1][1] = le.yy();
28  return m;
29  }
30 
32  AlgebraicMatrix theProjectionMatrix;
33  theProjectionMatrix = AlgebraicMatrix( 2, 5, 0);
34  theProjectionMatrix[0][3] = 1;
35  theProjectionMatrix[1][4] = 1;
36  return theProjectionMatrix;
37  }
38  virtual int dimension() const {return 2;}
39 
40  virtual LocalPoint localPosition() const {return pos_;}
41  virtual LocalError localPositionError() const {return err_;}
42 
43  virtual const TrackingRecHit * hit() const {return 0;}//fixme return invalid
44 
45  virtual std::vector<const TrackingRecHit*> recHits() const {
46  return hit()->recHits();
47  }
48  virtual std::vector<TrackingRecHit*> recHits() {
49  return std::vector<TrackingRecHit*>();
50  }
51 
52  virtual bool canImproveWithTrack() const {return false;}
53 
54  virtual RecHitPointer clone (const TrajectoryStateOnSurface& ts) const {return clone();}
55 
56  virtual const GeomDetUnit* detUnit() const {return 0;}
57  virtual const GeomDet* det() const {return 0;}
58 
59  static RecHitPointer build( const LocalPoint& pos, const LocalError& err,
60  const Surface* surface) {
61  return RecHitPointer( new TRecHit2DPosConstraint( pos, err, surface));
62  }
63 
64  virtual const Surface * surface() const {return &(*surface_);}
65 
66 private:
69 // const Surface* surface_;
73  const LocalError& err,
74  const Surface* surface):
75  pos_(pos),err_(err),surface_(surface) {}
76 
78  pos_( other.localPosition() ),err_( other.localPositionError() ), surface_((other.surface())) {}
79 
80  virtual TRecHit2DPosConstraint * clone() const {
81  return new TRecHit2DPosConstraint(*this);
82  }
83 
84 };
85 
86 #endif
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
float xx() const
Definition: LocalError.h:19
virtual LocalPoint localPosition() const
static RecHitPointer build(const LocalPoint &pos, const LocalError &err, const Surface *surface)
virtual const GeomDet * det() const
virtual AlgebraicMatrix projectionMatrix() const
T y() const
Definition: PV3DBase.h:57
ConstReferenceCountingPointer< Surface > surface_
virtual const TrackingRecHit * hit() const
float xy() const
Definition: LocalError.h:20
virtual TRecHit2DPosConstraint * clone() const
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
CLHEP::HepMatrix AlgebraicMatrix
float yy() const
Definition: LocalError.h:21
virtual RecHitPointer clone(const TrajectoryStateOnSurface &ts) const
tuple result
Definition: query.py:137
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
virtual const GeomDetUnit * detUnit() const
virtual const Surface * surface() const
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
virtual bool canImproveWithTrack() const
CLHEP::HepVector AlgebraicVector
virtual int dimension() const
virtual AlgebraicSymMatrix parametersError() const
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual LocalError localPositionError() const
TRecHit2DPosConstraint(const TRecHit2DPosConstraint &other)
virtual AlgebraicVector parameters() const
T x() const
Definition: PV3DBase.h:56
TRecHit2DPosConstraint(const LocalPoint &pos, const LocalError &err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.