00001 #ifndef GeneralNSurfaceDelimitedBounds_H 00002 #define GeneralNSurfaceDelimitedBounds_H 00003 00004 #include "DataFormats/GeometrySurface/interface/Bounds.h" 00005 #include "DataFormats/GeometrySurface/interface/Surface.h" 00006 00007 #include <vector> 00008 00016 class GeneralNSurfaceDelimitedBounds : public Bounds { 00017 public: 00018 00019 typedef std::pair<const Surface*, SurfaceOrientation::Side> SurfaceAndSide; 00020 typedef std::vector<SurfaceAndSide> SurfaceContainer; 00021 00022 GeneralNSurfaceDelimitedBounds( const Surface* surf, 00023 const std::vector<SurfaceAndSide>& limits) : 00024 theLimits( limits), theSurface(surf) {} 00025 00026 virtual float length() const { return 0;} 00027 virtual float width() const { return 0;} 00028 virtual float thickness() const { return 0;} 00029 00030 00031 virtual bool inside( const Local3DPoint& lp) const { 00032 return myInside(lp,0); 00033 } 00034 00035 virtual bool inside( const Local3DPoint&, const LocalError&, float scale=1.f) const; 00036 00037 virtual Bounds* clone() const {return new GeneralNSurfaceDelimitedBounds(*this);} 00038 00039 private: 00040 00041 SurfaceContainer theLimits; 00042 const Surface* theSurface; 00043 00044 bool myInside( const Local3DPoint& lp, float tolerance) const; 00045 00046 }; 00047 00048 #endif