CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Bounds.h
Go to the documentation of this file.
1 #ifndef Geom_Bounds_H
2 #define Geom_Bounds_H
3 
4 
7 
8 
18 class Bounds {
19 public:
20  virtual ~Bounds() {}
21 
24  virtual float length() const = 0;
25 
28  virtual float width() const = 0;
29 
32  virtual float thickness() const = 0;
33 
35  virtual float widthAtHalfLength() const {return width();}
36 
38  virtual bool inside( const Local3DPoint&) const = 0;
39  virtual bool inside( const Local2DPoint& p) const {
40  return inside( Local3DPoint(p.x(), p.y(), 0) );
41  }
42 
44  virtual bool inside(const Local2DPoint& p, float tollerance) const {
45  return inside(p,LocalError(tollerance*tollerance,0.f,tollerance*tollerance));
46  }
47 
48  // For propagation with uncertainties - one has to know by how
49  // much one missed a surface
50  // virtual Local2DVector<float> howFar( const Local2DPoint&) = 0;
51  //
52  // Or maybe a better way of determining if a surface is "touched"
53  // by a trajectory is to have a method
54 
56  virtual bool inside( const Local3DPoint&, const LocalError&, float scale=1.f) const = 0;
57 
59  virtual bool inside( const Local2DPoint& p, const LocalError& err,
60  float scale=1.f) const {
61  return inside( Local3DPoint(p.x(), p.y(), 0), err, scale);
62  }
63 
64  virtual Bounds* clone() const = 0;
65 
66 };
67 
68 #endif
virtual float widthAtHalfLength() const
Width at half length. Useful for e.g. pitch definition.
Definition: Bounds.h:35
T y() const
Definition: PV2DBase.h:45
virtual float length() const =0
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
virtual ~Bounds()
Definition: Bounds.h:20
virtual float thickness() const =0
double f[11][100]
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
virtual bool inside(const Local2DPoint &p) const
Definition: Bounds.h:39
virtual bool inside(const Local2DPoint &p, const LocalError &err, float scale=1.f) const
Determine if a 2D point is inside the bounds, taking error into account.
Definition: Bounds.h:59
Definition: Bounds.h:18
virtual Bounds * clone() const =0
T x() const
Definition: PV2DBase.h:44
virtual float width() const =0
virtual bool inside(const Local2DPoint &p, float tollerance) const
Determine if a point is inside the bounds, taking a tollerance into account.
Definition: Bounds.h:44