CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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:
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  virtual LocalPoint localPosition() const { return localPosition_; }
46  virtual LocalError localPositionError() const { return localError_; }
47 
48  virtual AlgebraicVector parameters() const;
49  virtual AlgebraicSymMatrix parametersError() const;
50  virtual int dimension() const { return 1; }
51 
52  virtual const TrackingRecHit * hit() const { return nullptr; }
53  virtual TrackingRecHit * cloneHit() const { return nullptr;}
54 
55 
56  virtual std::vector<const TrackingRecHit*> recHits() const {
57  return std::vector<const TrackingRecHit*>();
58  }
59  virtual std::vector<TrackingRecHit*> recHits() {
60  return std::vector<TrackingRecHit*>();
61  }
62 
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 
virtual AlgebraicSymMatrix parametersError() const
double z0() const
z coordinate
Definition: BeamSpot.h:68
#define GCC11_FINAL
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:62
virtual const TrackingRecHit * hit() const
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
virtual AlgebraicMatrix projectionMatrix() const
virtual LocalError localPositionError() const
double sigmaZ() const
sigma z
Definition: BeamSpot.h:80
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:88
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
virtual AlgebraicVector parameters() const
BeamSpotTransientTrackingRecHit & operator=(const BeamSpotTransientTrackingRecHit &t)
virtual TrackingRecHit * cloneHit() const
CLHEP::HepSymMatrix AlgebraicSymMatrix
double y0() const
y coordinate
Definition: BeamSpot.h:66
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
virtual BeamSpotTransientTrackingRecHit * clone() const
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
Definition: DDAxes.h:10