CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.
T perp2() const
Definition: PV3DBase.h:68
float minZ() const
float width() const override
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
T z() const
Definition: PV3DBase.h:61
float outerRadius() const
float length() const override
float maxZ() const
Definition: Bounds.h:18
float innerRadius() const
Extension of the Bounds interface.
float thickness() const override
Bounds * clone() const override