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:
29 
31 
33  const BeamSpotGeomDet * geom,
34  double phi)
35  : TValidTrackingRecHit(*geom) {
36 
37  localPosition_ = det()->toLocal(GlobalPoint(beamSpot.x0(), beamSpot.y0(), beamSpot.z0()));
38  localError_ = LocalError(std::pow(beamSpot.BeamWidthX()*cos(phi), 2) +
39  std::pow(beamSpot.BeamWidthY()*sin(phi), 2),
40  0.0, std::pow(beamSpot.sigmaZ(), 2));
41  }
42 
44 
45  LocalPoint localPosition() const override { return localPosition_; }
46  LocalError localPositionError() const override { return localError_; }
47 
48  AlgebraicVector parameters() const override;
49  AlgebraicSymMatrix parametersError() const override;
50  int dimension() const override { return 1; }
51 
52  const TrackingRecHit * hit() const override { return nullptr; }
53  TrackingRecHit * cloneHit() const override { return nullptr;}
54 
55 
56  std::vector<const TrackingRecHit*> recHits() const override {
57  return std::vector<const TrackingRecHit*>();
58  }
59  std::vector<TrackingRecHit*> recHits() override {
60  return std::vector<TrackingRecHit*>();
61  }
62 
63  AlgebraicMatrix projectionMatrix() const override {
64  return theProjectionMatrix;
65  }
66 
67  protected:
68 
71 
72  private:
73 
74  // should not have assignment operator (?)
76  return *(this);
77  }
78 
79  // hide the clone method for ReferenceCounted. Warning: this method is still
80  // accessible via the bas class TrackingRecHit interface!
82  return new BeamSpotTransientTrackingRecHit(*this);
83  }
84 
86 };
87 
88 #endif
89 
BeamSpotTransientTrackingRecHit * clone() const override
double z0() const
z coordinate
Definition: BeamSpot.h:68
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
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:69
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:86
CLHEP::HepVector AlgebraicVector
double sigmaZ() const
sigma z
Definition: BeamSpot.h:80
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:88
AlgebraicVector parameters() const override
LocalError localPositionError() const override
BeamSpotTransientTrackingRecHit & operator=(const BeamSpotTransientTrackingRecHit &t)
std::vector< TrackingRecHit * > recHits() override
Non-const access to component RecHits (if any)
CLHEP::HepSymMatrix AlgebraicSymMatrix
double y0() const
y coordinate
Definition: BeamSpot.h:66
const TrackingRecHit * hit() const override
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
static const AlgebraicMatrix theProjectionMatrix
double x0() const
x coordinate
Definition: BeamSpot.h:64