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 
6 
7 
8 
10  public:
11 
13 
14  virtual AlgebraicVector parameters() const {
16  result[0] = charge_/fabs(mom_);
17  return result;
18  }
19 
22  m[0][0] = err_/(mom_*mom_);//parametersErrors are squared
23  m[0][0] *= m[0][0];
24  return m;
25  }
26 
29  theProjectionMatrix = AlgebraicMatrix( 1, 5, 0);
30  theProjectionMatrix[0][0] = 1;
31  return theProjectionMatrix;
32  }
33  virtual int dimension() const {return 1;}
34 
35  virtual LocalPoint localPosition() const {return LocalPoint(0,0,0);}
36  virtual LocalError localPositionError() const {return LocalError(0,0,0);}
37 
38  double mom() const {return mom_;}
39  double err() const {return err_;}
40  int charge() const {return charge_;}
41 
42 
43  virtual const TrackingRecHit * hit() const override {return 0;}//fixme return invalid
44  virtual TrackingRecHit * cloneHit() const { return 0;}
45 
46  virtual std::vector<const TrackingRecHit*> recHits() const { return std::vector<const TrackingRecHit*>(); }
47  virtual std::vector<TrackingRecHit*> recHits() { return std::vector<TrackingRecHit*>(); }
48  virtual bool sharesInput( const TrackingRecHit*, SharedInputType) const { return false;}
49 
50  virtual bool canImproveWithTrack() const override {return false;}
51 
52  virtual RecHitPointer clone (const TrajectoryStateOnSurface& ts) const {return RecHitPointer(clone());}
53 
54  virtual const GeomDetUnit* detUnit() const override {return 0;}
55 
56  static RecHitPointer build(const int charge,
57  const double mom,
58  const double err,//not sqared!!!
59  const Surface* surface) {
60  return RecHitPointer( new TRecHit1DMomConstraint( charge, mom, err, surface));
61  }
62 
63  virtual const Surface * surface() const override {return surface_;}
64 
65  virtual GlobalPoint globalPosition() const { return GlobalPoint(); }
66  virtual GlobalError globalPositionError() const { return GlobalError();}
67  virtual float errorGlobalR() const { return 0;}
68  virtual float errorGlobalZ() const { return 0; }
69  virtual float errorGlobalRPhi() const { return 0; }
70 
71 
72  private:
73  const int charge_;
74  const double mom_;
75  const double err_;
76  const Surface* surface_;
79  const double mom,
80  const double err,//notsquared
81  const Surface* surface):
82  charge_(charge),mom_(mom),err_(err),surface_(surface) {}
83 
85  charge_( other.charge() ), mom_( other.mom() ),err_( other.err() ), surface_((other.surface())) {}
86 
87  virtual TRecHit1DMomConstraint * clone() const {
88  return new TRecHit1DMomConstraint(*this);
89  }
90 
91 };
92 
93 #endif
SharedInputType
definition of equality via shared input
#define GCC11_FINAL
virtual GlobalError globalPositionError() const
TRecHit1DMomConstraint(const int charge, const double mom, const double err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.
virtual bool sharesInput(const TrackingRecHit *, SharedInputType) const
virtual float errorGlobalZ() const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
TRecHit1DMomConstraint(const TRecHit1DMomConstraint &other)
virtual float errorGlobalR() const
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:80
virtual AlgebraicSymMatrix parametersError() const
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:11
virtual TRecHit1DMomConstraint * clone() const
CLHEP::HepMatrix AlgebraicMatrix
tuple result
Definition: query.py:137
virtual AlgebraicMatrix projectionMatrix() const
virtual float errorGlobalRPhi() const
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
virtual LocalPoint localPosition() const
virtual const Surface * surface() const override
CLHEP::HepVector AlgebraicVector
virtual LocalError localPositionError() const
virtual bool canImproveWithTrack() const override
virtual GlobalPoint globalPosition() const
virtual TrackingRecHit * cloneHit() const
virtual const TrackingRecHit * hit() const override
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual const GeomDetUnit * detUnit() const override
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