CMS 3D CMS Logo

TrapezoidalPlaneBounds.h
Go to the documentation of this file.
1 #ifndef Geom_TrapezoidalPlaneBounds_H
2 #define Geom_TrapezoidalPlaneBounds_H
3 
6 #include <array>
7 
15 class TrapezoidalPlaneBounds /* final */ : public Bounds {
16 public:
24  TrapezoidalPlaneBounds(float be, float te, float a, float t);
25 
27  float length() const override { return 2 * hapothem; }
28 
30  float width() const override { return 2 * std::max(hbotedge, htopedge); }
31 
33  float thickness() const override { return 2 * hthickness; }
34 
37  float widthAtHalfLength() const override { return hbotedge + htopedge; }
38 
39  virtual int yAxisOrientation() const;
40 
41  using Bounds::inside;
42 
43  bool inside(const Local2DPoint& p) const override;
44 
45  bool inside(const Local3DPoint& p) const override;
46 
47  bool inside(const Local3DPoint& p, const LocalError& err, float scale) const override;
48 
49  bool inside(const Local2DPoint& p, const LocalError& err, float scale) const override;
50 
51  float significanceInside(const Local3DPoint&, const LocalError&) const override;
52 
57  virtual const std::array<const float, 4> parameters() const;
58 
59  Bounds* clone() const override;
60 
61 private:
62  // persistent part
63  float hbotedge;
64  float htopedge;
65  float hapothem;
66  float hthickness;
67 
68  // transient part
69  float offset;
70  float tan_a;
71 };
72 
73 #endif // Geom_TrapezoidalPlaneBounds_H
float width() const override
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
float widthAtHalfLength() const override
TrapezoidalPlaneBounds(float be, float te, float a, float t)
virtual int yAxisOrientation() const
float length() const override
float significanceInside(const Local3DPoint &, const LocalError &) const override
virtual const std::array< const float, 4 > parameters() const
bool inside(const Local2DPoint &p) const override
Bounds * clone() const override
double a
Definition: hdecay.h:121
float thickness() const override
Definition: Bounds.h:18