CMS 3D CMS Logo

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  float length() const override { return theZmax - theZmin;}
20  float width() const override { return 2*theRmax;}
21  float thickness() const override { return theZmax-theZmin;}
22 
23  bool inside( const Local3DPoint& p) const override {
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  bool inside( const Local3DPoint& p, const LocalError& err, float scale) const override;
31 
32  virtual bool inside( const Local2DPoint& p, const LocalError& err) const;
33 
34  Bounds* clone() const override;
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.
Bounds * clone() const override
T perp2() const
Definition: PV3DBase.h:71
float thickness() const override
float minZ() const
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
T z() const
Definition: PV3DBase.h:64
float outerRadius() const
float maxZ() const
bool inside(const Local3DPoint &p) const override
Determine if the point is inside the bounds.
float length() const override
Definition: Bounds.h:22
float innerRadius() const
Extension of the Bounds interface.
float width() const override