CMS 3D CMS Logo

SimpleCylinderBounds.h
Go to the documentation of this file.
1 #ifndef Geom_SimpleCylinderBounds_H
2 #define Geom_SimpleCylinderBounds_H
3 
16 #include <cmath>
17 #include <algorithm>
18 
19 class SimpleCylinderBounds final : public Bounds {
20 public:
21  SimpleCylinderBounds(float rmin, float rmax, float zmin, float zmax);
22 
24  float length() const override { return theZmax - theZmin; }
26  float width() const override { return 2 * theRmax; }
28  float thickness() const override { return theRmax - theRmin; }
29 
30  using Bounds::inside;
31  bool inside(const Local3DPoint& p) const override;
32 
33  bool inside(const Local3DPoint& p, const LocalError& err, float scale) const override;
34 
35  virtual bool inside(const Local2DPoint& p, const LocalError& err) const;
36 
37  Bounds* clone() const override;
38 
39 private:
40  float theRmin;
41  float theRmax;
42  float theZmin;
43  float theZmax;
44 };
45 
46 #endif // Geom_SimpleCylinderBounds_H
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
Bounds * clone() const override
SimpleCylinderBounds(float rmin, float rmax, float zmin, float zmax)
float thickness() const override
Thikness of the "pipe", i.e. difference between outer and inner radius.
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
float width() const override
Outer diameter of the cylinder.
Definition: Bounds.h:20
float length() const override
Lenght of the cylinder.