Go to the documentation of this file.00001 #ifndef Geom_Bounds_H
00002 #define Geom_Bounds_H
00003
00004
00005 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00006 #include "DataFormats/GeometrySurface/interface/LocalError.h"
00007
00008
00018 class Bounds {
00019 public:
00020 virtual ~Bounds() {}
00021
00024 virtual float length() const = 0;
00025
00028 virtual float width() const = 0;
00029
00032 virtual float thickness() const = 0;
00033
00035 virtual float widthAtHalfLength() const {return width();}
00036
00038 virtual bool inside( const Local3DPoint&) const = 0;
00039 virtual bool inside( const Local2DPoint& p) const {
00040 return inside( Local3DPoint(p.x(), p.y(), 0) );
00041 }
00042
00044 virtual bool inside(const Local2DPoint& p, float tollerance) const {
00045 return inside(p,LocalError(tollerance*tollerance,0.f,tollerance*tollerance));
00046 }
00047
00048
00049
00050
00051
00052
00053
00054
00056 virtual bool inside( const Local3DPoint&, const LocalError&, float scale=1.f) const = 0;
00057
00059 virtual bool inside( const Local2DPoint& p, const LocalError& err,
00060 float scale=1.f) const {
00061 return inside( Local3DPoint(p.x(), p.y(), 0), err, scale);
00062 }
00063
00064 virtual Bounds* clone() const = 0;
00065
00066 };
00067
00068 #endif