CMS 3D CMS Logo

Topology.h
Go to the documentation of this file.
1 #ifndef Geometry_CommonTopologies_Topology_H
2 #define Geometry_CommonTopologies_Topology_H
3 
9 
10 class GeomDetType;
11 
39 class Topology {
40 public:
44  class LocalTrackAngles : public Vector2D {
45  public:
48  LocalTrackAngles(const Base &v) : Base(v) {}
49  LocalTrackAngles(double dxdz, double dydz) : Base(dxdz, dydz) {}
50  double dxdz() const { return x(); }
51  double dydz() const { return y(); }
52  };
57  public:
59  LocalTrackPred(double x, double y, double dxdz, double dydz) : point_(x, y), angles_(dxdz, dydz) {}
62  LocalTrackPred(const AlgebraicVector5 &localTrajPar)
63  : point_(localTrajPar[3], localTrajPar[4]), angles_(localTrajPar[1], localTrajPar[2]) {}
64  const Local2DPoint &point() const { return point_; }
65  const LocalTrackAngles &angles() const { return angles_; }
66 
67  private:
70  };
71 
72  virtual ~Topology() {}
73 
74  // Conversion between measurement (strip, pixel, ...) coordinates
75  // and local cartesian coordinates
76 
77  virtual LocalPoint localPosition(const MeasurementPoint &) const = 0;
78 
79  virtual LocalError localError(const MeasurementPoint &, const MeasurementError &) const = 0;
80 
81  virtual MeasurementPoint measurementPosition(const LocalPoint &) const = 0;
82 
83  virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const = 0;
84 
85  virtual int channel(const LocalPoint &p) const = 0;
86 
87  // new sets of methods taking also an angle
89  virtual LocalPoint localPosition(const MeasurementPoint &mp, const LocalTrackPred & /*trkPred*/) const {
90  return localPosition(mp);
91  }
92 
95  const MeasurementError &me,
96  const LocalTrackPred & /*trkPred*/) const {
97  return localError(mp, me);
98  }
99 
101  virtual MeasurementPoint measurementPosition(const LocalPoint &lp, const LocalTrackAngles & /*dir*/) const {
102  return measurementPosition(lp);
103  }
104 
107  const LocalError &le,
108  const LocalTrackAngles & /*dir*/) const {
109  return measurementError(lp, le);
110  }
111 
113  virtual int channel(const LocalPoint &lp, const LocalTrackAngles & /*dir*/) const { return channel(lp); }
114 
115 private:
116 };
117 
118 #endif
float dydz
const LocalTrackAngles & angles() const
Definition: Topology.h:65
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
float dxdz
double y() const
Cartesian y coordinate.
Point2DBase< double, LocalTag > Local2DPoint
Definition: Topology.h:53
LocalTrackPred(double x, double y, double dxdz, double dydz)
Definition: Topology.h:59
LocalTrackPred(const AlgebraicVector5 &localTrajPar)
Definition: Topology.h:62
LocalTrackAngles(const Base &v)
Definition: Topology.h:48
const Local2DPoint & point() const
Definition: Topology.h:64
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
Vector2D::MathVector MathVector2D
Definition: Topology.h:42
Basic2DVector< double > Vector2D
Definition: Topology.h:41
LocalTrackAngles angles_
local x, y
Definition: Topology.h:69
ROOT::Math::SVector< double, 5 > AlgebraicVector5
virtual int channel(const LocalPoint &p) const =0
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
virtual MeasurementPoint measurementPosition(const LocalPoint &lp, const LocalTrackAngles &) const
conversion taking also the angle from the track state
Definition: Topology.h:101
virtual LocalPoint localPosition(const MeasurementPoint &mp, const LocalTrackPred &) const
conversion taking also the angle from the predicted track state
Definition: Topology.h:89
virtual MeasurementError measurementError(const LocalPoint &lp, const LocalError &le, const LocalTrackAngles &) const
conversion taking also the angle from the track state
Definition: Topology.h:106
Local2DPoint point_
Definition: Topology.h:68
virtual LocalError localError(const MeasurementPoint &, const MeasurementError &) const =0
double dxdz() const
Definition: Topology.h:50
Basic2DVector< double > Base
Definition: Topology.h:46
LocalTrackAngles(double dxdz, double dydz)
Definition: Topology.h:49
virtual int channel(const LocalPoint &lp, const LocalTrackAngles &) const
conversion taking also the angle from the track state
Definition: Topology.h:113
double dydz() const
Definition: Topology.h:51
virtual LocalError localError(const MeasurementPoint &mp, const MeasurementError &me, const LocalTrackPred &) const
conversion taking also the angle from the predicted track state
Definition: Topology.h:94
double x() const
Cartesian x coordinate.
virtual ~Topology()
Definition: Topology.h:72