CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TRecHit1DMomConstraint.h
Go to the documentation of this file.
1 #ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit1DMomConstraint_H
2 #define RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit1DMomConstraint_H
3 
6 
8 public:
9  ~TRecHit1DMomConstraint() override {}
10 
11  AlgebraicVector parameters() const override {
13  result[0] = charge_ / fabs(mom_);
14  return result;
15  }
16 
19  m[0][0] = err_ / (mom_ * mom_); //parametersErrors are squared
20  m[0][0] *= m[0][0];
21  return m;
22  }
23 
24  AlgebraicMatrix projectionMatrix() const override {
27  theProjectionMatrix[0][0] = 1;
28  return theProjectionMatrix;
29  }
30  int dimension() const override { return 1; }
31 
32  LocalPoint localPosition() const override { return LocalPoint(0, 0, 0); }
33  LocalError localPositionError() const override { return LocalError(0, 0, 0); }
34 
35  double mom() const { return mom_; }
36  double err() const { return err_; }
37  int charge() const { return charge_; }
38 
39  const TrackingRecHit* hit() const override { return nullptr; } //fixme return invalid
40  TrackingRecHit* cloneHit() const override { return nullptr; }
41 
42  std::vector<const TrackingRecHit*> recHits() const override { return std::vector<const TrackingRecHit*>(); }
43  std::vector<TrackingRecHit*> recHits() override { return std::vector<TrackingRecHit*>(); }
44  bool sharesInput(const TrackingRecHit*, SharedInputType) const override { return false; }
45 
46  bool canImproveWithTrack() const override { return false; }
47 
48  virtual RecHitPointer clone(const TrajectoryStateOnSurface& ts) const { return RecHitPointer(clone()); }
49 
50  const GeomDetUnit* detUnit() const override { return nullptr; }
51 
52  static RecHitPointer build(const int charge,
53  const double mom,
54  const double err, //not sqared!!!
55  const Surface* surface) {
57  }
58 
59  const Surface* surface() const override { return surface_; }
60 
61  GlobalPoint globalPosition() const override { return GlobalPoint(); }
62  GlobalError globalPositionError() const override { return GlobalError(); }
63  float errorGlobalR() const override { return 0; }
64  float errorGlobalZ() const override { return 0; }
65  float errorGlobalRPhi() const override { return 0; }
66 
67 private:
68  const int charge_;
69  const double mom_;
70  const double err_;
71  const Surface* surface_;
74  const double mom,
75  const double err, //notsquared
76  const Surface* surface)
78 
80 
81  TRecHit1DMomConstraint* clone() const override { return new TRecHit1DMomConstraint(*this); }
82 };
83 
84 #endif
SharedInputType
definition of equality via shared input
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
TRecHit1DMomConstraint * clone() const override
std::vector< TrackingRecHit * > recHits() override
Non-const access to component RecHits (if any)
TRecHit1DMomConstraint(const int charge, const double mom, const double err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.
AlgebraicSymMatrix parametersError() const override
bool canImproveWithTrack() const override
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
bool sharesInput(const TrackingRecHit *, SharedInputType) const override
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
TrackingRecHit * cloneHit() const override
float errorGlobalRPhi() const override
AlgebraicVector parameters() const override
CLHEP::HepMatrix AlgebraicMatrix
const GeomDetUnit * detUnit() const override
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer clone(const TrajectoryStateOnSurface &ts) const
AlgebraicMatrix projectionMatrix() const override
const Surface * surface() const override
CLHEP::HepVector AlgebraicVector
const TrackingRecHit * hit() const override
GlobalError globalPositionError() const override
LocalError localPositionError() const override
float errorGlobalR() const override
CLHEP::HepSymMatrix AlgebraicSymMatrix
float errorGlobalZ() const override
static RecHitPointer build(const int charge, const double mom, const double err, const Surface *surface)
int dimension() const override
LocalPoint localPosition() const override
GlobalPoint globalPosition() const override