CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/DataFormats/GeometrySurface/interface/Bounds.h

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   // For propagation with uncertainties - one has to know by how
00049   // much one missed a surface
00050   // virtual Local2DVector<float> howFar( const Local2DPoint&) = 0;
00051   //
00052   // Or maybe a better way of determining if a surface is "touched"
00053   // by a trajectory is to have a method
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