CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GeneralTrapezoidalPlaneBounds.h
Go to the documentation of this file.
1 #ifndef Geom_GeneralTrapezoidalPlaneBounds_H
2 #define Geom_GeneralTrapezoidalPlaneBounds_H
3 
4 
7 #include <vector>
8 
17 public:
18 
19  GeneralTrapezoidalPlaneBounds( float be, float te, float ang,
20  float a, float t);
21 
22  virtual float length() const { return 2 * hapothem;}
23  virtual float width() const { return 2 * std::max( hbotedge, htopedge);}
24  virtual float thickness() const { return 2 * hthickness;}
25 
26  virtual float widthAtHalfLength() const {return hbotedge+htopedge;}
27 
28  virtual bool inside( const Local2DPoint& p) const;
29 
30  virtual bool inside( const Local3DPoint& p) const;
31 
32  virtual bool inside( const Local3DPoint& p, const LocalError& err, float scale) const;
33 
34  virtual bool inside( const Local2DPoint& p, const LocalError& err, float scale) const {
35  return Bounds::inside(p,err,scale);
36  }
37 
38  virtual const std::vector<float> parameters() const;
39 
40  virtual Bounds* clone() const {
41  return new GeneralTrapezoidalPlaneBounds(*this);
42  }
43 
44 private:
45  // persistent part
46  float hbotedge;
47  float htopedge;
48  float tilt_angle;
49  float hapothem;
50  float hthickness;
51 
52  // transient part
53  float xoff;
54  float tg_tilt;
56  float tan_ap,tan_an;
57 };
58 
59 #endif
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
virtual const std::vector< float > parameters() const
GeneralTrapezoidalPlaneBounds(float be, float te, float ang, float a, float t)
virtual bool inside(const Local2DPoint &p, const LocalError &err, float scale) const
Determine if a 2D point is inside the bounds, taking error into account.
virtual bool inside(const Local2DPoint &p) const
const T & max(const T &a, const T &b)
virtual float widthAtHalfLength() const
Width at half length. Useful for e.g. pitch definition.
double a
Definition: hdecay.h:121
Definition: Bounds.h:18