CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/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 #include "FWCore/Utilities/interface/GCC11Compatibility.h"
00009 
00010 
00020 class Bounds {
00021 public:
00022   virtual ~Bounds() {}
00023 
00026   virtual float length() const = 0;
00027 
00030   virtual float width() const = 0;
00031 
00034   virtual float thickness() const = 0;
00035 
00037   virtual float widthAtHalfLength() const {return width();}
00038 
00040   virtual bool inside( const Local3DPoint&) const = 0;
00041   virtual bool inside( const Local2DPoint& p) const {
00042     return inside( Local3DPoint(p.x(), p.y(), 0) );
00043   }
00044 
00046   virtual bool inside(const Local2DPoint& p, float tollerance) const {
00047     return inside(p,LocalError(tollerance*tollerance,0.f,tollerance*tollerance));
00048   }
00049 
00050   // For propagation with uncertainties - one has to know by how
00051   // much one missed a surface
00052   // virtual Local2DVector<float> howFar( const Local2DPoint&) = 0;
00053   //
00054   // Or maybe a better way of determining if a surface is "touched"
00055   // by a trajectory is to have a method
00056 
00058   virtual bool inside( const Local3DPoint&, const LocalError&, float scale=1.f) const = 0;
00059 
00061   virtual bool inside( const Local2DPoint& p, const LocalError& err, 
00062                        float scale=1.f) const {
00063     return inside( Local3DPoint(p.x(), p.y(), 0), err, scale);
00064   }
00065 
00066   virtual Bounds* clone() const = 0;
00067 
00068 };
00069 
00070 #endif