CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TRecHit1DMomConstraint.h
Go to the documentation of this file.
1 #ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit1DMomConstraint_H
2 #define RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit1DMomConstraint_H
3 
5 
6 class GeomDetUnit;
7 
9  public:
10 
12 
13  virtual AlgebraicVector parameters() const {
15  result[0] = charge_/fabs(mom_);
16  return result;
17  }
18 
21  m[0][0] = err_/(mom_*mom_);//parametersErrors are squared
22  m[0][0] *= m[0][0];
23  return m;
24  }
25 
27  AlgebraicMatrix theProjectionMatrix;
28  theProjectionMatrix = AlgebraicMatrix( 1, 5, 0);
29  theProjectionMatrix[0][0] = 1;
30  return theProjectionMatrix;
31  }
32  virtual int dimension() const {return 1;}
33 
34  virtual LocalPoint localPosition() const {return LocalPoint(0,0,0);}
35  virtual LocalError localPositionError() const {return LocalError(0,0,0);}
36 
37  double mom() const {return mom_;}
38  double err() const {return err_;}
39  int charge() const {return charge_;}
40 
41  virtual const TrackingRecHit * hit() const {return 0;}//fixme return invalid
42 
43 
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 int charge,
60  const double mom,
61  const double err,//not sqared!!!
62  const Surface* surface) {
63  return RecHitPointer( new TRecHit1DMomConstraint( charge, mom, err, surface));
64  }
65 
66  virtual const Surface * surface() const {return surface_;}
67 
68  private:
69  const int charge_;
70  const double mom_;
71  const double err_;
72  const Surface* surface_;
75  const double mom,
76  const double err,//notsquared
77  const Surface* surface):
78  charge_(charge),mom_(mom),err_(err),surface_(surface) {}
79 
81  charge_( other.charge() ), mom_( other.mom() ),err_( other.err() ), surface_((other.surface())) {}
82 
83  virtual TRecHit1DMomConstraint * clone() const {
84  return new TRecHit1DMomConstraint(*this);
85  }
86 
87 };
88 
89 #endif
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
virtual const GeomDet * det() const
TRecHit1DMomConstraint(const int charge, const double mom, const double err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.
virtual bool canImproveWithTrack() const
virtual const Surface * surface() const
TRecHit1DMomConstraint(const TRecHit1DMomConstraint &other)
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
virtual AlgebraicSymMatrix parametersError() const
virtual TRecHit1DMomConstraint * clone() const
CLHEP::HepMatrix AlgebraicMatrix
#define GCC11_FINAL
tuple result
Definition: query.py:137
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
virtual AlgebraicMatrix projectionMatrix() const
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
virtual LocalPoint localPosition() const
CLHEP::HepVector AlgebraicVector
virtual LocalError localPositionError() const
virtual const GeomDetUnit * detUnit() const
CLHEP::HepSymMatrix AlgebraicSymMatrix
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
virtual int dimension() const
virtual RecHitPointer clone(const TrajectoryStateOnSurface &ts) const
static RecHitPointer build(const int charge, const double mom, const double err, const Surface *surface)
virtual AlgebraicVector parameters() const
virtual const TrackingRecHit * hit() const