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 <iostream>
16 
20 
22 
23 #include "BeamSpotGeomDet.h"
24 
26 
28  public:
29 
31 
33  const BeamSpotGeomDet * geom,
34  double phi)
35  :TransientTrackingRecHit(geom, AlignableBeamSpot::detId(), valid, 1.0, 1.0) {
36 
37  beamSpotGlobalPosition_ = GlobalPoint(beamSpot.x0(), beamSpot.y0(), beamSpot.z0());
39 
40  beamSpotLocalError_ = LocalError(sqrt(beamSpot.BeamWidthX()*cos(phi)*beamSpot.BeamWidthX()*cos(phi) +
41  beamSpot.BeamWidthY()*sin(phi)*beamSpot.BeamWidthY()*sin(phi)),
42  0.0, beamSpot.sigmaZ());
44 
46  beamSpotErrorR_ = sqrt(beamSpotGlobalError_.rerr(beamSpotGlobalPosition_));
47  beamSpotErrorZ_ = sqrt(beamSpotGlobalError_.czz());
48  }
49 
51 
54 
55  virtual LocalPoint localPosition() const { return beamSpotLocalPosition_; }
57 
58  float errorGlobalR() const { return beamSpotErrorR_; }
59  float errorGlobalZ() const { return beamSpotErrorZ_; }
60  float errorGlobalRPhi() const { return beamSpotErrorRPhi_; }
61 
62  virtual AlgebraicVector parameters() const;
63  virtual AlgebraicSymMatrix parametersError() const;
64  virtual int dimension() const { return 1; }
65 
66  virtual const TrackingRecHit * hit() const { return 0; }
67 
68  virtual std::vector<const TrackingRecHit*> recHits() const {
69  return std::vector<const TrackingRecHit*>();
70  }
71  virtual std::vector<TrackingRecHit*> recHits() {
72  return std::vector<TrackingRecHit*>();
73  }
74 
75  virtual const Surface * surface() const { return &(det()->surface()); }
76 
78  if (!isInitialized) initialize();
79  return theProjectionMatrix;
80  }
81 
82  protected:
83 
89 
90  private:
91 
92  // should not have assignment operator (?)
94  return *(this);
95  }
96 
97  // hide the clone method for ReferenceCounted. Warning: this method is still
98  // accessible via the bas class TrackingRecHit interface!
100  return new BeamSpotTransientTrackingRecHit(*this);
101  }
102 
103  static bool isInitialized;
105  void initialize() const;
106 };
107 
108 #endif
109 
virtual AlgebraicSymMatrix parametersError() const
double z0() const
z coordinate
Definition: BeamSpot.h:69
virtual const Surface * surface() const
T perp() const
Definition: PV3DBase.h:66
GlobalError transform(const LocalError &le, const Surface &surf) 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:64
virtual const TrackingRecHit * hit() const
virtual GlobalError globalPositionError() const
CLHEP::HepMatrix AlgebraicMatrix
T sqrt(T t)
Definition: SSEVec.h:28
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 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
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
double x0() const
x coordinate
Definition: BeamSpot.h:65
Definition: DDAxes.h:10