00001 #ifndef Geom_SimpleCylinderBounds_H 00002 #define Geom_SimpleCylinderBounds_H 00003 00014 #include "DataFormats/GeometryVector/interface/LocalPoint.h" 00015 #include "DataFormats/GeometrySurface/interface/Bounds.h" 00016 #include <cmath> 00017 #include <algorithm> 00018 00019 00020 class SimpleCylinderBounds : public Bounds { 00021 public: 00022 00023 SimpleCylinderBounds( float rmin, float rmax, float zmin, float zmax); 00024 00026 virtual float length() const { return theZmax - theZmin;} 00028 virtual float width() const { return 2*theRmax;} 00030 virtual float thickness() const { return theRmax-theRmin;} 00031 00032 virtual bool inside( const Local3DPoint& p) const; 00033 00034 00035 virtual bool inside( const Local3DPoint& p, const LocalError& err,float scale) const; 00036 00037 virtual bool inside( const Local2DPoint& p, const LocalError& err) const; 00038 00039 00040 virtual Bounds* clone() const; 00041 00042 private: 00043 float theRmin; 00044 float theRmax; 00045 float theZmin; 00046 float theZmax; 00047 }; 00048 00049 #endif // Geom_SimpleCylinderBounds_H