CMS 3D CMS Logo

SimpleDiskBounds.h
Go to the documentation of this file.
1 #ifndef Geom_SimpleDiskBounds_H
2 #define Geom_SimpleDiskBounds_H
3 
6 
11 class SimpleDiskBounds final : public Bounds {
12 public:
14  SimpleDiskBounds(float rmin, float rmax, float zmin, float zmax);
15 
16  float length() const override { return theZmax - theZmin; }
17  float width() const override { return 2 * theRmax; }
18  float thickness() const override { return theZmax - theZmin; }
19 
20  bool inside(const Local3DPoint& p) const override {
21  return ((p.z() > theZmin) && (p.z() < theZmax)) &&
22  ((p.perp2() > theRmin * theRmin) && (p.perp2() < theRmax * theRmax));
23  }
24 
25  using Bounds::inside;
26 
27  bool inside(const Local3DPoint& p, const LocalError& err, float scale) const override;
28 
29  virtual bool inside(const Local2DPoint& p, const LocalError& err) const;
30 
31  Bounds* clone() const override;
32 
34  float innerRadius() const { return theRmin; }
35  float outerRadius() const { return theRmax; }
36 
37  float minZ() const { return theZmin; }
38  float maxZ() const { return theZmax; }
39 
40 private:
41  float theRmin;
42  float theRmax;
43  float theZmin;
44  float theZmax;
45 };
46 
47 #endif // Geom_SimpleDiskBounds_H
SimpleDiskBounds(float rmin, float rmax, float zmin, float zmax)
Construct the bounds from min and max R and Z in LOCAL coordinates.
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
float width() const override
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
float length() const override
float maxZ() const
float outerRadius() const
float minZ() const
float innerRadius() const
Extension of the Bounds interface.
Definition: Bounds.h:18
float thickness() const override
Bounds * clone() const override