Go to the documentation of this file.00001 #ifndef Geometry_CommonTopologies_Topology_H
00002 #define Geometry_CommonTopologies_Topology_H
00003
00004 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00005 #include "DataFormats/GeometryCommonDetAlgo/interface/LocalError.h"
00006 #include "DataFormats/GeometryCommonDetAlgo/interface/MeasurementPoint.h"
00007 #include "DataFormats/GeometryCommonDetAlgo/interface/MeasurementError.h"
00008 #include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
00009
00010 class GeomDetType;
00011
00039 class Topology {
00040 public:
00042 class LocalTrackAngles {
00043 public:
00044 LocalTrackAngles(double dxdz, double dydz) : dxdz_(dxdz), dydz_(dydz) {}
00045 double dydz() const { return dydz_; }
00046 double dxdz() const { return dxdz_; }
00047 private:
00048 double dxdz_, dydz_;
00049 };
00050 typedef Point2DBase <double, LocalTag> Local2DPoint;
00053 class LocalTrackPred {
00054 public:
00055 LocalTrackPred(double x, double y, double dxdz, double dydz) : point_(x,y),angles_(dxdz,dydz){}
00058 LocalTrackPred(const AlgebraicVector5& localTrajPar) :
00059 point_(localTrajPar[3], localTrajPar[4]), angles_(localTrajPar[1], localTrajPar[2]) {}
00060 const Local2DPoint& point() const {return point_;}
00061 const LocalTrackAngles& angles() const {return angles_;}
00062 private:
00063 Local2DPoint point_;
00064 LocalTrackAngles angles_;
00065 };
00066
00067 virtual ~Topology() {}
00068
00069
00070
00071
00072 virtual LocalPoint localPosition( const MeasurementPoint& ) const = 0;
00073
00074 virtual LocalError
00075 localError( const MeasurementPoint&, const MeasurementError& ) const = 0;
00076
00077 virtual MeasurementPoint measurementPosition( const LocalPoint&) const = 0;
00078
00079 virtual MeasurementError
00080 measurementError( const LocalPoint&, const LocalError& ) const = 0;
00081
00082 virtual int channel( const LocalPoint& p) const = 0;
00083
00084
00086 virtual LocalPoint localPosition(const MeasurementPoint &mp, const LocalTrackPred &) const {
00087 return localPosition(mp);
00088 }
00089
00091 virtual LocalError
00092 localError(const MeasurementPoint &mp, const MeasurementError &me,
00093 const LocalTrackPred &) const {
00094 return localError(mp,me);
00095 }
00096
00098 virtual MeasurementPoint measurementPosition( const LocalPoint &lp, const LocalTrackAngles &dir) const {
00099 return measurementPosition(lp);
00100 }
00101
00103 virtual MeasurementError
00104 measurementError( const LocalPoint &lp, const LocalError &le, const LocalTrackAngles &dir) const {
00105 return measurementError(lp, le);
00106 }
00107
00109 virtual int channel( const LocalPoint &lp, const LocalTrackAngles &dir) const {
00110 return channel(lp);
00111 }
00112
00113
00114 private:
00115
00116 };
00117
00118 #endif