src
RecoVertex
VertexTools
src
lms_3d.cc
Go to the documentation of this file.
1
#include "
CommonTools/Statistics/interface/lms_1d.h
"
2
#include "
RecoVertex/VertexTools/interface/lms_3d.h
"
3
#include "
RecoVertex/VertexPrimitives/interface/VertexException.h
"
4
#include <vector>
5
8
GlobalPoint
lms_3d
(std::vector<GlobalPoint>
values
) {
9
const
int
sze =
values
.size();
10
if
(sze == 0) {
11
throw
VertexException
(
"lms_3d: no values given."
);
12
};
13
std::vector<float> x_vals, y_vals, z_vals;
14
x_vals.reserve(sze - 1);
15
y_vals.reserve(sze - 1);
16
z_vals.reserve(sze - 1);
17
for
(std::vector<GlobalPoint>::iterator
i
=
values
.begin();
i
!=
values
.end();
i
++) {
18
x_vals.push_back(
i
->x());
19
y_vals.push_back(
i
->y());
20
z_vals.push_back(
i
->z());
21
};
22
return
GlobalPoint
(
lms_1d
(x_vals),
lms_1d
(y_vals),
lms_1d
(z_vals));
23
}
lms_3d
GlobalPoint lms_3d(std::vector< GlobalPoint > values)
Definition:
lms_3d.cc:8
mps_fire.i
i
Definition:
mps_fire.py:429
VertexException
Common base class.
Definition:
VertexException.h:12
GlobalPoint
Global3DPoint GlobalPoint
Definition:
GlobalPoint.h:10
lms_3d.h
contentValuesCheck.values
values
Definition:
contentValuesCheck.py:38
VertexException.h
lms_1d
T lms_1d(std::vector< T > values)
Definition:
lms_1d.h:15
Point3DBase< float, GlobalTag >
lms_1d.h
Generated for CMSSW Reference Manual by
1.8.14