CMS 3D CMS Logo

BeamSpotTransientTrackingRecHit.h
Go to the documentation of this file.
1 #ifndef BeamSpotTransientTrackingRecHit_H
2 #define BeamSpotTransientTrackingRecHit_H
3 
15 #include <cmath>
16 
20 
22 
23 #include "BeamSpotGeomDet.h"
24 
26 
28 public:
30 
32  : TValidTrackingRecHit(*geom) {
33  localPosition_ = det()->toLocal(GlobalPoint(beamSpot.x0(), beamSpot.y0(), beamSpot.z0()));
34  localError_ =
35  LocalError(std::pow(beamSpot.BeamWidthX() * cos(phi), 2) + std::pow(beamSpot.BeamWidthY() * sin(phi), 2),
36  0.0,
37  std::pow(beamSpot.sigmaZ(), 2));
38  }
39 
41 
42  LocalPoint localPosition() const override { return localPosition_; }
43  LocalError localPositionError() const override { return localError_; }
44 
45  AlgebraicVector parameters() const override;
46  AlgebraicSymMatrix parametersError() const override;
47  int dimension() const override { return 1; }
48 
49  const TrackingRecHit *hit() const override { return nullptr; }
50  TrackingRecHit *cloneHit() const override { return nullptr; }
51 
52  std::vector<const TrackingRecHit *> recHits() const override { return std::vector<const TrackingRecHit *>(); }
53  std::vector<TrackingRecHit *> recHits() override { return std::vector<TrackingRecHit *>(); }
54 
56 
57 protected:
60 
61 private:
62  // should not have assignment operator (?)
64 
65  // hide the clone method for ReferenceCounted. Warning: this method is still
66  // accessible via the bas class TrackingRecHit interface!
68 
70 };
71 
72 #endif
BeamSpotTransientTrackingRecHit * clone() const override
double z0() const
z coordinate
Definition: BeamSpot.h:65
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
AlgebraicMatrix projectionMatrix() const override
AlgebraicSymMatrix parametersError() const override
TrackingRecHit * cloneHit() const override
CLHEP::HepMatrix AlgebraicMatrix
const GeomDet * det() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
BeamSpotTransientTrackingRecHit(const reco::BeamSpot &beamSpot, const BeamSpotGeomDet *geom, double phi)
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:82
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
CLHEP::HepVector AlgebraicVector
double sigmaZ() const
sigma z
Definition: BeamSpot.h:76
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:84
AlgebraicVector parameters() const override
LocalError localPositionError() const override
BeamSpotTransientTrackingRecHit & operator=(const BeamSpotTransientTrackingRecHit &t)
CLHEP::HepSymMatrix AlgebraicSymMatrix
double y0() const
y coordinate
Definition: BeamSpot.h:63
std::vector< TrackingRecHit * > recHits() override
Non-const access to component RecHits (if any)
const TrackingRecHit * hit() const override
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
static const AlgebraicMatrix theProjectionMatrix
double x0() const
x coordinate
Definition: BeamSpot.h:61