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)
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 0; }
53 
54  virtual std::vector<const TrackingRecHit*> recHits() const {
55  return std::vector<const TrackingRecHit*>();
56  }
57  virtual std::vector<TrackingRecHit*> recHits() {
58  return std::vector<TrackingRecHit*>();
59  }
60 
61  virtual const Surface * surface() const { return &(det()->surface()); }
62 
64  if (!isInitialized) initialize();
65  return theProjectionMatrix;
66  }
67 
68  protected:
69 
72 
73  private:
74 
75  // should not have assignment operator (?)
77  return *(this);
78  }
79 
80  // hide the clone method for ReferenceCounted. Warning: this method is still
81  // accessible via the bas class TrackingRecHit interface!
83  return new BeamSpotTransientTrackingRecHit(*this);
84  }
85 
86  static bool isInitialized;
88  void initialize() const;
89 };
90 
91 #endif
92 
virtual AlgebraicSymMatrix parametersError() const
double z0() const
z coordinate
Definition: BeamSpot.h:69
virtual const Surface * surface() const
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
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:87
CLHEP::HepVector AlgebraicVector
virtual AlgebraicMatrix projectionMatrix() const
virtual LocalError localPositionError() const
double sigmaZ() const
sigma z
Definition: BeamSpot.h:81
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:89
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
virtual AlgebraicVector parameters() const
BeamSpotTransientTrackingRecHit & operator=(const BeamSpotTransientTrackingRecHit &t)
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
CLHEP::HepSymMatrix AlgebraicSymMatrix
double y0() const
y coordinate
Definition: BeamSpot.h:67
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
double x0() const
x coordinate
Definition: BeamSpot.h:65
Definition: DDAxes.h:10