CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
double z0() const
z coordinate
Definition: BeamSpot.h:65
AlgebraicMatrix projectionMatrix() const override
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
AlgebraicSymMatrix parametersError() const override
LocalError localPositionError() const override
AlgebraicVector parameters() 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
const TrackingRecHit * hit() const override
CLHEP::HepVector AlgebraicVector
double sigmaZ() const
sigma z
Definition: BeamSpot.h:76
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:84
TrackingRecHit * cloneHit() 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)
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
BeamSpotTransientTrackingRecHit * clone() const override
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
static const AlgebraicMatrix theProjectionMatrix
double x0() const
x coordinate
Definition: BeamSpot.h:61