CMS 3D CMS Logo

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
TRecHit1DMomConstraint::globalPositionError
GlobalError globalPositionError() const override
Definition: TRecHit1DMomConstraint.h:62
TRecHit1DMomConstraint::errorGlobalRPhi
float errorGlobalRPhi() const override
Definition: TRecHit1DMomConstraint.h:65
TRecHit1DMomConstraint::parameters
AlgebraicVector parameters() const override
Definition: TRecHit1DMomConstraint.h:11
TRecHit1DMomConstraint::err
double err() const
Definition: TRecHit1DMomConstraint.h:36
GeomDet
Definition: GeomDet.h:27
TRecHit1DMomConstraint::detUnit
const GeomDetUnit * detUnit() const override
Definition: TRecHit1DMomConstraint.h:50
Surface
Definition: Surface.h:36
TransientTrackingRecHit.h
TRecHit1DMomConstraint::err_
const double err_
Definition: TRecHit1DMomConstraint.h:70
TRecHit1DMomConstraint::localPosition
LocalPoint localPosition() const override
Definition: TRecHit1DMomConstraint.h:32
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: TrackingRecHit.h:24
TRecHit1DMomConstraint::build
static RecHitPointer build(const int charge, const double mom, const double err, const Surface *surface)
Definition: TRecHit1DMomConstraint.h:52
TRecHit1DMomConstraint::mom
double mom() const
Definition: TRecHit1DMomConstraint.h:35
TRecHit1DMomConstraint::sharesInput
bool sharesInput(const TrackingRecHit *, SharedInputType) const override
Definition: TRecHit1DMomConstraint.h:44
TRecHit1DMomConstraint::surface
const Surface * surface() const override
Definition: TRecHit1DMomConstraint.h:59
TRecHit1DMomConstraint::charge
int charge() const
Definition: TRecHit1DMomConstraint.h:37
TRecHit1DMomConstraint::canImproveWithTrack
bool canImproveWithTrack() const override
Definition: TRecHit1DMomConstraint.h:46
TRecHit1DMomConstraint::charge_
const int charge_
Definition: TRecHit1DMomConstraint.h:68
TRecHit1DMomConstraint::recHits
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: TRecHit1DMomConstraint.h:42
GlobalError
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
TRecHit1DMomConstraint::globalPosition
GlobalPoint globalPosition() const override
Definition: TRecHit1DMomConstraint.h:61
TRecHit1DMomConstraint::clone
TRecHit1DMomConstraint * clone() const override
Definition: TRecHit1DMomConstraint.h:81
TRecHit1DMomConstraint::mom_
const double mom_
Definition: TRecHit1DMomConstraint.h:69
TrackingRecHit::SharedInputType
SharedInputType
definition of equality via shared input
Definition: TrackingRecHit.h:59
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
TRecHit1DMomConstraint::localPositionError
LocalError localPositionError() const override
Definition: TRecHit1DMomConstraint.h:33
trackingPlots.other
other
Definition: trackingPlots.py:1464
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, LocalTag >
TRecHit1DMomConstraint::projectionMatrix
AlgebraicMatrix projectionMatrix() const override
Definition: TRecHit1DMomConstraint.h:24
TRecHit1DMomConstraint::errorGlobalR
float errorGlobalR() const override
Definition: TRecHit1DMomConstraint.h:63
TRecHit1DMomConstraint::surface_
const Surface * surface_
Definition: TRecHit1DMomConstraint.h:71
LocalError
Definition: LocalError.h:12
TRecHit1DMomConstraint::errorGlobalZ
float errorGlobalZ() const override
Definition: TRecHit1DMomConstraint.h:64
TRecHit1DMomConstraint::clone
virtual RecHitPointer clone(const TrajectoryStateOnSurface &ts) const
Definition: TRecHit1DMomConstraint.h:48
GlobalErrorBase< double, ErrorMatrixTag >
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
TRecHit1DMomConstraint::hit
const TrackingRecHit * hit() const override
Definition: TRecHit1DMomConstraint.h:39
TrackingRecHit
Definition: TrackingRecHit.h:21
TRecHit1DMomConstraint
Definition: TRecHit1DMomConstraint.h:7
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
ErrorFrameTransformer.h
TRecHit1DMomConstraint::TRecHit1DMomConstraint
TRecHit1DMomConstraint(const int charge, const double mom, const double err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.
Definition: TRecHit1DMomConstraint.h:73
TRecHit1DMomConstraint::~TRecHit1DMomConstraint
~TRecHit1DMomConstraint() override
Definition: TRecHit1DMomConstraint.h:9
TRecHit1DMomConstraint::recHits
std::vector< TrackingRecHit * > recHits() override
Non-const access to component RecHits (if any)
Definition: TRecHit1DMomConstraint.h:43
TRecHit1DMomConstraint::dimension
int dimension() const override
Definition: TRecHit1DMomConstraint.h:30
theProjectionMatrix
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
TRecHit1DMomConstraint::parametersError
AlgebraicSymMatrix parametersError() const override
Definition: TRecHit1DMomConstraint.h:17
mps_fire.result
result
Definition: mps_fire.py:311
TRecHit1DMomConstraint::cloneHit
TrackingRecHit * cloneHit() const override
Definition: TRecHit1DMomConstraint.h:40