CMS 3D CMS Logo

GeneralTrapezoidalPlaneBounds.h

Go to the documentation of this file.
00001 #ifndef Geom_GeneralTrapezoidalPlaneBounds_H
00002 #define Geom_GeneralTrapezoidalPlaneBounds_H
00003 
00004 
00005 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00006 #include "DataFormats/GeometrySurface/interface/Bounds.h"
00007 #include <vector>
00008 
00016 class GeneralTrapezoidalPlaneBounds : public Bounds {
00017 public:
00018 
00019   GeneralTrapezoidalPlaneBounds( float be, float te, float ang, 
00020                                  float a, float t);
00021   
00022   virtual float length() const    { return 2 * hapothem;}
00023   virtual float width()  const    { return 2 * std::max( hbotedge, htopedge);}
00024   virtual float thickness() const { return 2 * hthickness;}
00025 
00026   virtual float widthAtHalfLength() const {return hbotedge+htopedge;}
00027 
00028   virtual bool inside( const Local2DPoint& p) const;
00029 
00030   virtual bool inside( const Local3DPoint& p) const;
00031 
00032   virtual bool inside( const Local3DPoint& p, const LocalError& err, float scale) const;
00033 
00034   virtual bool inside( const Local2DPoint& p, const LocalError& err, float scale) const {
00035     return Bounds::inside(p,err,scale);
00036   }
00037 
00038   virtual const std::vector<float> parameters() const;
00039 
00040   virtual Bounds* clone() const { 
00041     return new GeneralTrapezoidalPlaneBounds(*this);
00042   }
00043 
00044 private:
00045   // persistent part
00046   float hbotedge;
00047   float htopedge;
00048   float tilt_angle;
00049   float hapothem;
00050   float hthickness;
00051 
00052   // transient part 
00053   float xoff;
00054   float tg_tilt;
00055   float offsetp,offsetn;
00056   float tan_ap,tan_an;
00057 };
00058 
00059 #endif

Generated on Tue Jun 9 17:30:50 2009 for CMSSW by  doxygen 1.5.4