Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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,
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
15
bool
GeneralNSurfaceDelimitedBounds::myInside(
const
Local3DPoint
& lp,
float
tolerance)
const
16
{
17
// cout << "GeneralNSurfaceDelimitedBounds::myInside called with local point " << lp << endl;
18
19
Surface::GlobalPoint
gp = theSurface->toGlobal(lp);
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
}
LocalError.h
i
int i
Definition:
DBlmapReader.cc:9
LocalError::xx
float xx() const
Definition:
LocalError.h:24
GeneralNSurfaceDelimitedBounds.h
LocalError::yy
float yy() const
Definition:
LocalError.h:26
pileupReCalc_HLTpaths.scale
int scale
Definition:
pileupReCalc_HLTpaths.py:111
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:48
SurfaceOrientation::Side
Side
Definition:
Surface.h:25
LocalError
Definition:
LocalError.h:12
Point3DBase< float, LocalTag >
asciidump.le
int le
Definition:
asciidump.py:443
SurfaceOrientation::onSurface
Definition:
Surface.h:25
Generated for CMSSW Reference Manual by
1.8.5