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 class GeomDetUnit;
8 
9 class TRecHit1DMomConstraint GCC11_FINAL : public TransientTrackingRecHit {
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 
84  TRecHit1DMomConstraint( const TRecHit1DMomConstraint& other ):
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
virtual LocalError localPositionError() const
virtual GlobalError globalPositionError() const
virtual ~TRecHit1DMomConstraint()
virtual bool sharesInput(const TrackingRecHit *, SharedInputType) const
virtual AlgebraicSymMatrix parametersError() const
virtual TrackingRecHit * cloneHit() const
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MagVolume.h:20
double err() const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
virtual const Surface * surface() const override
TRecHit1DMomConstraint(const TRecHit1DMomConstraint &other)
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:80
double charge(const std::vector< uint8_t > &Ampls)
virtual AlgebraicMatrix projectionMatrix() const
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:11
int charge() const
virtual const GeomDetUnit * detUnit() const override
CLHEP::HepMatrix AlgebraicMatrix
tuple result
Definition: query.py:137
virtual AlgebraicVector parameters() const
const Surface * surface_
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual float errorGlobalZ() const
virtual TRecHit1DMomConstraint * clone() const
virtual LocalPoint localPosition() const
CLHEP::HepVector AlgebraicVector
static RecHitPointer build(const int charge, const double mom, const double err, const Surface *surface)
virtual RecHitPointer clone(const TrajectoryStateOnSurface &ts) const
double mom() const
virtual const TrackingRecHit * hit() const override
TRecHit1DMomConstraint(const int charge, const double mom, const double err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.
virtual bool canImproveWithTrack() const override
CLHEP::HepSymMatrix AlgebraicSymMatrix
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
virtual float errorGlobalR() const
virtual GlobalPoint globalPosition() const
virtual float errorGlobalRPhi() const
virtual int dimension() const
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
Unlimited (trivial) bounds.