CMS 3D CMS Logo

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