DataFormats
GeometrySurface
src
GeneralNSurfaceDelimitedBounds.cc
Go to the documentation of this file.
1
2
3
#include "
DataFormats/GeometrySurface/interface/GeneralNSurfaceDelimitedBounds.h
"
4
#include "
DataFormats/GeometrySurface/interface/LocalError.h
"
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
13
bool
GeneralNSurfaceDelimitedBounds::myInside
(
const
Local3DPoint
& lp,
float
tolerance
)
const
{
14
// cout << "GeneralNSurfaceDelimitedBounds::myInside called with local point " << lp << endl;
15
16
Surface::GlobalPoint
gp
=
theSurface
->
toGlobal
(lp);
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:355
SurfaceOrientation::onSurface
Definition:
Surface.h:18
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
Scenarios_cff.scale
scale
Definition:
Scenarios_cff.py:2186
LocalError
Definition:
LocalError.h:12
GeneralNSurfaceDelimitedBounds.h
tolerance
const double tolerance
Definition:
HGCalGeomParameters.cc:27
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
Generated for CMSSW Reference Manual by
1.8.16