Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
MagneticField
VolumeGeometry
src
FourPointPlaneBounds.cc
Go to the documentation of this file.
1
// #include "Utilities/Configuration/interface/Architecture.h"
2
3
#include "
MagneticField/VolumeGeometry/interface/FourPointPlaneBounds.h
"
4
#include "
DataFormats/GeometrySurface/interface/GeomExceptions.h
"
5
#include <algorithm>
6
#include <iostream>
7
8
FourPointPlaneBounds::FourPointPlaneBounds
(
const
LocalPoint
&
a
,
9
const
LocalPoint
&
b
,
10
const
LocalPoint
&
c
,
11
const
LocalPoint
&
d
) {
12
corners_
[0] =
Local2DPoint
(
a
.x(),
a
.y());
13
corners_
[1] =
Local2DPoint
(
b
.x(),
b
.y());
14
corners_
[2] =
Local2DPoint
(
c
.x(),
c
.y());
15
corners_
[3] =
Local2DPoint
(
d
.x(),
d
.y());
16
17
// check for convexity
18
for
(
int
i
= 0;
i
< 4; ++
i
) {
19
if
(
checkSide
(
i
,
corner
(
i
+ 2)) *
checkSide
(
i
,
corner
(
i
+ 3)) < 0) {
// not on same side
20
throw
GeometryError
(
"FourPointPlaneBounds: coners not in order or not convex"
);
21
}
22
}
23
24
double
side =
checkSide
(0,
corners_
[2]);
// - for clockwise corners, + for counterclockwise
25
if
(side < 0) {
26
std::cout
<<
"FourPointPlaneBounds: Changing order of corners to counterclockwise"
<< std::endl;
27
std::swap
(
corners_
[1],
corners_
[3]);
28
}
29
}
30
31
double
FourPointPlaneBounds::checkSide
(
int
i
,
const
Local2DPoint
& lp)
const
{
return
checkSide
(
i
, lp.
x
(), lp.
y
()); }
32
33
bool
FourPointPlaneBounds::inside
(
const
Local3DPoint
& lp)
const
{
34
for
(
int
i
= 0;
i
< 4; ++
i
) {
35
if
(
checkSide
(
i
, lp.
x
(), lp.
y
()) < 0)
36
return
false
;
37
}
38
return
true
;
39
}
40
41
float
FourPointPlaneBounds::length
()
const
{
return
0; }
42
float
FourPointPlaneBounds::width
()
const
{
return
0; }
43
float
FourPointPlaneBounds::thickness
()
const
{
return
0; }
Point2DBase< float, LocalTag >
mps_fire.i
i
Definition:
mps_fire.py:355
PV3DBase::x
T x() const
Definition:
PV3DBase.h:59
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
FourPointPlaneBounds::width
float width() const override
Definition:
FourPointPlaneBounds.cc:42
FourPointPlaneBounds::inside
bool inside(const Local3DPoint &lp) const override
Determine if the point is inside the bounds.
Definition:
FourPointPlaneBounds.cc:33
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition:
DataFrameContainer.h:209
FourPointPlaneBounds::thickness
float thickness() const override
Definition:
FourPointPlaneBounds.cc:43
Point3DBase< float, LocalTag >
b
double b
Definition:
hdecay.h:118
GeomExceptions.h
a
double a
Definition:
hdecay.h:119
FourPointPlaneBounds::FourPointPlaneBounds
FourPointPlaneBounds(const LocalPoint &a, const LocalPoint &b, const LocalPoint &c, const LocalPoint &d)
Definition:
FourPointPlaneBounds.cc:8
PV2DBase::y
T y() const
Definition:
PV2DBase.h:44
PV2DBase::x
T x() const
Definition:
PV2DBase.h:43
PV3DBase::y
T y() const
Definition:
PV3DBase.h:60
FourPointPlaneBounds::corner
const Local2DPoint & corner(int i) const
Definition:
FourPointPlaneBounds.h:33
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
FourPointPlaneBounds::corners_
Local2DPoint corners_[4]
Definition:
FourPointPlaneBounds.h:31
GeometryError
Definition:
GeomExceptions.h:18
FourPointPlaneBounds::length
float length() const override
Definition:
FourPointPlaneBounds.cc:41
FourPointPlaneBounds.h
ztail.d
d
Definition:
ztail.py:151
FourPointPlaneBounds::checkSide
double checkSide(int i, const Local2DPoint &lp) const
Definition:
FourPointPlaneBounds.cc:31
Local2DPoint
Point2DBase< float, LocalTag > Local2DPoint
Definition:
LocalPoint.h:8
Generated for CMSSW Reference Manual by
1.8.16