CMS 3D CMS Logo

RectangularPlaneBounds.h
Go to the documentation of this file.
1 #ifndef Geom_RectangularPlaneBounds_H
2 #define Geom_RectangularPlaneBounds_H
3 
6 
12 class RectangularPlaneBounds final : public Bounds {
13 public:
16  RectangularPlaneBounds(float w, float h, float t);
17  ~RectangularPlaneBounds() override;
18 
20  float length() const override { return 2 * halfLength; }
22  float width() const override { return 2 * halfWidth; }
24  float thickness() const override { return 2 * halfThickness; }
25 
26  // basic bounds function
27  using Bounds::inside;
28 
29  bool inside(const Local2DPoint& p) const override {
30  return (std::abs(p.x()) < halfWidth) & (std::abs(p.y()) < halfLength);
31  }
32 
33  bool inside(const Local3DPoint& p) const override {
34  return (std::abs(p.x()) < halfWidth) & (std::abs(p.y()) < halfLength) & (std::abs(p.z()) < halfThickness);
35  }
36 
37  bool inside(const Local2DPoint& p, float tollerance) const override {
38  return (std::abs(p.x()) < (halfWidth + tollerance)) & (std::abs(p.y()) < (halfLength + tollerance));
39  }
40 
41  bool inside(const Local3DPoint& p, const LocalError& err, float scale = 1.f) const override;
42 
43  bool inside(const Local2DPoint& p, const LocalError& err, float scale = 1.f) const override;
44 
45  float significanceInside(const Local3DPoint&, const LocalError&) const override;
46 
47  // compatible of being inside or outside...
48  std::pair<bool, bool> inout(const Local3DPoint& p, const LocalError& err, float scale = 1.f) const;
49 
50  Bounds* clone() const override;
51 
52 private:
53  float halfWidth;
54  float halfLength;
56 };
57 
58 #endif
Bounds * clone() const override
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
T w() const
float length() const override
Lenght along local Y.
float thickness() const override
Thickness of the volume in local Z.
RectangularPlaneBounds(float w, float h, float t)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
double f[11][100]
std::pair< bool, bool > inout(const Local3DPoint &p, const LocalError &err, float scale=1.f) const
bool inside(const Local2DPoint &p) const override
float width() const override
Width along local X.
Definition: Bounds.h:18
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
bool inside(const Local2DPoint &p, float tollerance) const override
Determine if a point is inside the bounds, taking a tollerance into account.
float significanceInside(const Local3DPoint &, const LocalError &) const override