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 
20 class SimpleCylinderBounds final : public Bounds {
21 public:
22 
23  SimpleCylinderBounds( float rmin, float rmax, float zmin, float zmax);
24 
26  float length() const override { return theZmax - theZmin;}
28  float width() const override { return 2*theRmax;}
30  float thickness() const override { return theRmax-theRmin;}
31 
32  using Bounds::inside;
33  bool inside( const Local3DPoint& p) const override;
34 
35 
36  bool inside( const Local3DPoint& p, const LocalError& err,float scale) const override;
37 
38  virtual bool inside( const Local2DPoint& p, const LocalError& err) const;
39 
40 
41  Bounds* clone() const override;
42 
43 private:
44  float theRmin;
45  float theRmax;
46  float theZmin;
47  float theZmax;
48 };
49 
50 #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:22
float length() const override
Lenght of the cylinder.