CMS 3D CMS Logo

Bounds.h
Go to the documentation of this file.
1 #ifndef Geom_Bounds_H
2 #define Geom_Bounds_H
3 
6 
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 { return inside(Local3DPoint(p.x(), p.y(), 0)); }
40 
42  virtual bool inside(const Local2DPoint& p, float tollerance) const {
43  return inside(p, LocalError(tollerance * tollerance, 0.f, tollerance * tollerance));
44  }
45 
46  // For propagation with uncertainties - one has to know by how
47  // much one missed a surface
48  // virtual Local2DVector<float> howFar( const Local2DPoint&) = 0;
49  //
50  // Or maybe a better way of determining if a surface is "touched"
51  // by a trajectory is to have a method
52 
54  virtual bool inside(const Local3DPoint&, const LocalError&, float scale = 1.f) const = 0;
55 
57  virtual bool inside(const Local2DPoint& p, const LocalError& err, float scale = 1.f) const {
58  return inside(Local3DPoint(p.x(), p.y(), 0), err, scale);
59  }
60 
61  virtual float significanceInside(const Local3DPoint&, const LocalError&) const;
62 
63  virtual Bounds* clone() const = 0;
64 
65  std::pair<float, float> const& phiSpan() const { return m_span.phiSpan(); }
66  std::pair<float, float> const& zSpan() const { return m_span.zSpan(); }
67  std::pair<float, float> const& rSpan() const { return m_span.rSpan(); }
68 
69  void computeSpan(Surface const& plane) { m_span.compute(plane); }
70 
71 private:
73 };
74 
75 #endif
Bounds::inside
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:42
Point2DBase< float, LocalTag >
Bounds::width
virtual float width() const =0
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
HLT_FULL_cff.scale
scale
Definition: HLT_FULL_cff.py:6637
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Bounds
Definition: Bounds.h:18
Bounds::inside
virtual bool inside(const Local2DPoint &p) const
Definition: Bounds.h:39
Surface
Definition: Surface.h:36
Bounds::length
virtual float length() const =0
BoundSpan
Definition: BoundSpan.h:13
Bounds::inside
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
LocalError.h
Bounds::phiSpan
std::pair< float, float > const & phiSpan() const
Definition: Bounds.h:65
Bounds::clone
virtual Bounds * clone() const =0
Bounds::m_span
BoundSpan m_span
Definition: Bounds.h:72
Point3DBase< float, LocalTag >
BoundSpan::phiSpan
std::pair< float, float > const & phiSpan() const
Definition: BoundSpan.h:19
Bounds::thickness
virtual float thickness() const =0
Bounds::computeSpan
void computeSpan(Surface const &plane)
Definition: Bounds.h:69
Bounds::widthAtHalfLength
virtual float widthAtHalfLength() const
Width at half length. Useful for e.g. pitch definition.
Definition: Bounds.h:35
LocalError
Definition: LocalError.h:12
BoundSpan::zSpan
std::pair< float, float > const & zSpan() const
Definition: BoundSpan.h:20
BoundSpan.h
Bounds::inside
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:57
BoundSpan::compute
void compute(Surface const &plane)
Definition: BoundSpan.cc:8
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
LocalPoint.h
BoundSpan::rSpan
std::pair< float, float > const & rSpan() const
Definition: BoundSpan.h:21
Bounds::significanceInside
virtual float significanceInside(const Local3DPoint &, const LocalError &) const
Definition: Bounds.cc:4
Bounds::rSpan
std::pair< float, float > const & rSpan() const
Definition: Bounds.h:67
Local3DPoint
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
Bounds::zSpan
std::pair< float, float > const & zSpan() const
Definition: Bounds.h:66
Bounds::~Bounds
virtual ~Bounds()
Definition: Bounds.h:20