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, AlignableBeamSpot::detId(), valid) {
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  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 ~BeamSpotTransientTrackingRecHit()
double z0() const
z coordinate
Definition: BeamSpot.h:68
virtual LocalError localPositionError() const
dictionary parameters
Definition: Parameters.py:2
virtual TrackingRecHit * cloneHit() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
static AlgebraicMatrix theProjectionMatrix
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
BeamSpotTransientTrackingRecHit(const reco::BeamSpot &beamSpot, const BeamSpotGeomDet *geom, double phi)
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:80
virtual BeamSpotTransientTrackingRecHit * clone() const
virtual AlgebraicMatrix projectionMatrix() const
CLHEP::HepMatrix AlgebraicMatrix
virtual const TrackingRecHit * hit() const
TrackingRecHit::Type Type
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:86
virtual LocalPoint localPosition() const
CLHEP::HepVector AlgebraicVector
double sigmaZ() const
sigma z
Definition: BeamSpot.h:80
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:88
CLHEP::HepSymMatrix AlgebraicSymMatrix
double y0() const
y coordinate
Definition: BeamSpot.h:66
virtual int dimension() const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
double x0() const
x coordinate
Definition: BeamSpot.h:64
Definition: DDAxes.h:10
Unlimited (trivial) bounds.