CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/DataFormats/GeometrySurface/interface/TrapezoidalPlaneBounds.h

Go to the documentation of this file.
00001 #ifndef Geom_TrapezoidalPlaneBounds_H
00002 #define Geom_TrapezoidalPlaneBounds_H
00003 
00004 
00005 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00006 #include "DataFormats/GeometrySurface/interface/Bounds.h"
00007 #include <vector>
00008 
00016 class TrapezoidalPlaneBounds : public Bounds {
00017 public:
00018 
00026   TrapezoidalPlaneBounds( float be, float te, float a, float t);
00027   
00028 
00030   virtual float length() const    { return 2 * hapothem;}
00031 
00033   virtual float width()  const    { return 2 * std::max( hbotedge, htopedge);}
00034 
00036   virtual float thickness() const { return 2 * hthickness;}
00037 
00040   virtual float widthAtHalfLength() const {return hbotedge+htopedge;}
00041 
00042   virtual int yAxisOrientation() const;
00043 
00044   virtual bool inside( const Local2DPoint& p) const;
00045 
00046   virtual bool inside( const Local3DPoint& p) const;
00047 
00048   virtual bool inside( const Local3DPoint& p, const LocalError& err, float scale) const;
00049 
00050   virtual bool inside( const Local2DPoint& p, const LocalError& err, float scale) const;
00051 
00056   virtual const std::vector<float> parameters() const;
00057 
00058   virtual Bounds* clone() const;
00059 
00060 private:
00061   // persistent part
00062   float hbotedge;
00063   float htopedge;
00064   float hapothem;
00065   float hthickness;
00066 
00067   // transient part 
00068   float offset;
00069   float tan_a;
00070 };
00071 
00072 #endif // Geom_TrapezoidalPlaneBounds_H