CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SimpleDiskBounds.h
Go to the documentation of this file.
1 #ifndef Geom_SimpleDiskBounds_H
2 #define Geom_SimpleDiskBounds_H
3 
4 
7 
8 
13 class SimpleDiskBounds final : public Bounds {
14 public:
15 
17  SimpleDiskBounds( float rmin, float rmax, float zmin, float zmax);
18 
19  virtual float length() const { return theZmax - theZmin;}
20  virtual float width() const { return 2*theRmax;}
21  virtual float thickness() const { return theZmax-theZmin;}
22 
23  virtual bool inside( const Local3DPoint& p) const {
24  return ((p.z() > theZmin) & (p.z() < theZmax)) &&
25  ( (p.perp2() > theRmin*theRmin) & (p.perp2() < theRmax*theRmax) );
26  }
27 
28  using Bounds::inside;
29 
30  virtual bool inside( const Local3DPoint& p, const LocalError& err, float scale) const;
31 
32  virtual bool inside( const Local2DPoint& p, const LocalError& err) const;
33 
34  virtual Bounds* clone() const;
35 
37  float innerRadius() const {return theRmin;}
38  float outerRadius() const {return theRmax;}
39 
40  float minZ() const { return theZmin;}
41  float maxZ() const { return theZmax;}
42 
43 private:
44  float theRmin;
45  float theRmax;
46  float theZmin;
47  float theZmax;
48 };
49 
50 #endif // Geom_SimpleDiskBounds_H
51 
52 
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 &p) const
Determine if the point is inside the bounds.
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
virtual float width() const
T perp2() const
Definition: PV3DBase.h:71
float minZ() const
virtual float length() const
T z() const
Definition: PV3DBase.h:64
virtual Bounds * clone() const
float outerRadius() const
virtual float thickness() const
float maxZ() const
Definition: Bounds.h:22
float innerRadius() const
Extension of the Bounds interface.