CMS 3D CMS Logo

GeneralNSurfaceDelimitedBounds.cc
Go to the documentation of this file.
1 
2 
5 
7  const LocalError& le, float scale) const
8 {
9  // derive on-surface tolerance from LocalError in a very approximate way
10  float tolerance = scale * sqrt( le.xx()*le.xx() + le.yy()*le.yy());
11 
12  return myInside( lp, tolerance);
13 }
14 
16 {
17  // cout << "GeneralNSurfaceDelimitedBounds::myInside called with local point " << lp << endl;
18 
20 
21  // cout << "corresponding Global point " << gp << endl;
22 
23  for (SurfaceContainer::const_iterator i=theLimits.begin(); i!=theLimits.end(); i++) {
24 
25 // cout << "Local pos in boundary surface " << i->first->toLocal(gp)
26 // << " side " << i->first->side(gp, tolerance) << " should be "
27 // << i->second << endl;
28 
29  SurfaceOrientation::Side side = i->first->side(gp, tolerance);
30  if (side != i->second && side != SurfaceOrientation::onSurface) return false;
31  }
32  return true;
33 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
float xx() const
Definition: LocalError.h:24
const double tolerance
float yy() const
Definition: LocalError.h:26
T sqrt(T t)
Definition: SSEVec.h:18
bool myInside(const Local3DPoint &lp, float tolerance) const
bool inside(const Local3DPoint &lp) const override
Determine if the point is inside the bounds.