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 {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 {return false;}
51 
52  virtual RecHitPointer clone (const TrajectoryStateOnSurface& ts) const {return clone();}
53 
54  virtual const GeomDetUnit* detUnit() const {return 0;}
55  virtual const GeomDet* det() const {return 0;}
56 
57  static RecHitPointer build(const int charge,
58  const double mom,
59  const double err,//not sqared!!!
60  const Surface* surface) {
61  return RecHitPointer( new TRecHit1DMomConstraint( charge, mom, err, surface));
62  }
63 
64  virtual const Surface * surface() const {return surface_;}
65 
66  virtual GlobalPoint globalPosition() const { return GlobalPoint(); }
67  virtual GlobalError globalPositionError() const { return GlobalError();}
68  virtual float errorGlobalR() const { return 0;}
69  virtual float errorGlobalZ() const { return 0; }
70  virtual float errorGlobalRPhi() const { return 0; }
71 
72 
73  private:
74  const int charge_;
75  const double mom_;
76  const double err_;
77  const Surface* surface_;
80  const double mom,
81  const double err,//notsquared
82  const Surface* surface):
83  charge_(charge),mom_(mom),err_(err),surface_(surface) {}
84 
85  TRecHit1DMomConstraint( const TRecHit1DMomConstraint& other ):
86  charge_( other.charge() ), mom_( other.mom() ),err_( other.err() ), surface_((other.surface())) {}
87 
88  virtual TRecHit1DMomConstraint * clone() const {
89  return new TRecHit1DMomConstraint(*this);
90  }
91 
92 };
93 
94 #endif
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
virtual LocalError localPositionError() const
virtual GlobalError globalPositionError() const
virtual const Surface * surface() const
The surface of the GeometricSearchDet.
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 GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
TRecHit1DMomConstraint(const TRecHit1DMomConstraint &other)
virtual bool canImproveWithTrack() const
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
CLHEP::HepMatrix AlgebraicMatrix
virtual const TrackingRecHit * hit() const
tuple result
Definition: query.py:137
virtual const GeomDetUnit * detUnit() const
virtual AlgebraicVector parameters() const
const Surface * surface_
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
TRecHit1DMomConstraint(const int charge, const double mom, const double err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.
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.