CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/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 
00007 class LocalError;
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   
00043   // For propagation with uncertainties - one has to know by how
00044   // much one missed a surface
00045   // virtual Local2DVector<float> howFar( const Local2DPoint&) = 0;
00046   //
00047   // Or maybe a better way of determining if a surface is "touched"
00048   // by a trajectory is to have a method
00049 
00051   virtual bool inside( const Local3DPoint&, const LocalError&, float scale=1.f) const = 0;
00052 
00054   virtual bool inside( const Local2DPoint& p, const LocalError& err, 
00055                        float scale=1.f) const {
00056     return inside( Local3DPoint(p.x(), p.y(), 0), err, scale);
00057   }
00058 
00059   virtual Bounds* clone() const = 0;
00060 
00061 };
00062 
00063 #endif